@apolitical/component-library 1.10.0-beta.0 → 1.10.0-beta.2

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.
@@ -0,0 +1,69 @@
1
+ "use strict";var Ba=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var b=(e,t,r)=>(Ba(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},$=(e,t,r,n)=>(Ba(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Hs=(e,t,r,n)=>({set _(i){$(e,t,i,r)},get _(){return b(e,t,n)}}),X=(e,t,r)=>(Ba(e,t,"access private method"),r);const C=require("react"),g=require("react/jsx-runtime");function Kp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Q=Kp(C);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zd={exports:{}};/*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var o=typeof s;if(o==="string"||o==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var a=r.apply(null,s);a&&n.push(a)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Zd);var Zp=Zd.exports;const L=fi(Zp),em=({element:e="span",showOnFocus:t=!0,children:r,...n})=>C.createElement(e,{...n,className:L("hidden",{"show-on-focus":t}),children:r}),ze=C.memo(em),tm=({element:e="span",children:t=null,...r})=>C.createElement(e,{...r,"aria-hidden":!0},t),xc=C.memo(tm),ef=()=>{const[e,t]=C.useState(window.location.pathname),r=()=>{const n=window.location.pathname;t(n)};return C.useEffect(()=>(window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}),[]),e},ln=(e,t)=>{const r=C.useRef(!1);C.useEffect(()=>{r.current?e():r.current=!0},t)};function rm(e,t,r){var n=this,i=C.useRef(null),s=C.useRef(0),o=C.useRef(null),a=C.useRef([]),l=C.useRef(),u=C.useRef(),c=C.useRef(e),h=C.useRef(!0);C.useEffect(function(){c.current=e},[e]);var m=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,p=!("trailing"in r)||!!r.trailing,v="maxWait"in r,x=v?Math.max(+r.maxWait||0,t):null;C.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var S=C.useMemo(function(){var k=function(E){var I=a.current,R=l.current;return a.current=l.current=null,s.current=E,u.current=c.current.apply(R,I)},T=function(E,I){m&&cancelAnimationFrame(o.current),o.current=m?requestAnimationFrame(E):setTimeout(E,I)},P=function(E){if(!h.current)return!1;var I=E-i.current;return!i.current||I>=t||I<0||v&&E-s.current>=x},y=function(E){return o.current=null,p&&a.current?k(E):(a.current=l.current=null,u.current)},O=function E(){var I=Date.now();if(P(I))return y(I);if(h.current){var R=t-(I-i.current),N=v?Math.min(R,x-(I-s.current)):R;T(E,N)}},M=function(){var E=Date.now(),I=P(E);if(a.current=[].slice.call(arguments),l.current=n,i.current=E,I){if(!o.current&&h.current)return s.current=i.current,T(O,t),f?k(i.current):u.current;if(v)return T(O,t),k(i.current)}return o.current||T(O,t),u.current};return M.cancel=function(){o.current&&(m?cancelAnimationFrame(o.current):clearTimeout(o.current)),s.current=0,a.current=i.current=l.current=o.current=null},M.isPending=function(){return!!o.current},M.flush=function(){return o.current?y(Date.now()):u.current},M},[f,v,t,x,p,m]);return S}function tf(e,t,r){var n=r===void 0?{}:r,i=n.leading,s=n.trailing;return rm(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}let Ha;const ms=(e=!0,t=!1)=>{if(!e)return;const[r,n]=C.useState(0)||[!1,()=>{}];C.useEffect(()=>(s(),window.addEventListener("resize",o),()=>{clearTimeout(Ha),o.flush(),window.removeEventListener("resize",o)}),[]);const i=()=>window.innerWidth,s=()=>{n(i())},o=tf(()=>{i()!==r&&(t&&(clearTimeout(Ha),document.body.classList.add("is-resizing"),Ha=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),s())},500,{leading:!0});return r},rf=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:r=()=>{},scrollUp:n=()=>{}}})=>{if(!window)return;const[i,s]=C.useState({current:0,past:0})||[!1,()=>{}],[o,a]=C.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];C.useEffect(()=>(l(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const l=()=>{const c=window.scrollY,h=i.current,m=c-h,f=m>0?"down":"up";if(s({current:c,past:h}),f==="down"){c>=e+t.down&&!o.scrollDown&&(!o.scrollUp||m>t.up)&&(r(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(m)>=t.up&&!o.scrollUp&&(n(),a({scrollUp:!0,scrollDown:!1}))},u=tf(()=>{l()},250);return i},nm=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const r=C.useRef(!1);ln(()=>{if(window&&window.location&&window.location.hash){if(r.current)return;const n=document.getElementById(window.location.hash.replace("#",""));n&&(n.scrollIntoView(t?{behavior:"smooth"}:null),r.current=!0)}},e)};var po={exports:{}};po.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object GeneratorFunction]",m="[object Map]",f="[object Number]",p="[object Object]",v="[object Promise]",x="[object RegExp]",S="[object Set]",k="[object String]",T="[object Symbol]",P="[object WeakMap]",y="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",N="[object Int32Array]",z="[object Uint8Array]",Y="[object Uint8ClampedArray]",q="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,Se=/\w*$/,ve=/^\[object .+?Constructor\]$/,ye=/^(?:0|[1-9]\d*)$/,V={};V[s]=V[o]=V[y]=V[O]=V[a]=V[l]=V[M]=V[E]=V[I]=V[R]=V[N]=V[m]=V[f]=V[p]=V[x]=V[S]=V[k]=V[T]=V[z]=V[Y]=V[q]=V[ae]=!0,V[u]=V[c]=V[P]=!1;var Z=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,ce=typeof self=="object"&&self&&self.Object===Object&&self,ue=Z||ce||Function("return this")(),Te=t&&!t.nodeType&&t,ee=Te&&!0&&e&&!e.nodeType&&e,Ke=ee&&ee.exports===Te;function Nr(d,_){return d.set(_[0],_[1]),d}function Ze(d,_){return d.add(_),d}function fr(d,_){for(var w=-1,A=d?d.length:0;++w<A&&_(d[w],w,d)!==!1;);return d}function et(d,_){for(var w=-1,A=_.length,W=d.length;++w<A;)d[W+w]=_[w];return d}function Xt(d,_,w,A){var W=-1,G=d?d.length:0;for(A&&G&&(w=d[++W]);++W<G;)w=_(w,d[W],W,d);return w}function D(d,_){for(var w=-1,A=Array(d);++w<d;)A[w]=_(w);return A}function _t(d,_){return d==null?void 0:d[_]}function pt(d){var _=!1;if(d!=null&&typeof d.toString!="function")try{_=!!(d+"")}catch{}return _}function Ot(d){var _=-1,w=Array(d.size);return d.forEach(function(A,W){w[++_]=[W,A]}),w}function hr(d,_){return function(w){return d(_(w))}}function pr(d){var _=-1,w=Array(d.size);return d.forEach(function(A){w[++_]=A}),w}var Zo=Array.prototype,ea=Function.prototype,yn=Object.prototype,_i=ue["__core-js_shared__"],Ss=function(){var d=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Es=ea.toString,Mt=yn.hasOwnProperty,bn=yn.toString,ta=RegExp("^"+Es.call(Mt).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lr=Ke?ue.Buffer:void 0,wn=ue.Symbol,yi=ue.Uint8Array,yt=hr(Object.getPrototypeOf,Object),ks=Object.create,Ts=yn.propertyIsEnumerable,ra=Zo.splice,bi=Object.getOwnPropertySymbols,xn=Lr?Lr.isBuffer:void 0,Cs=hr(Object.keys,Object),Sn=Pt(ue,"DataView"),Dr=Pt(ue,"Map"),Ct=Pt(ue,"Promise"),En=Pt(ue,"Set"),wi=Pt(ue,"WeakMap"),Br=Pt(Object,"create"),xi=tt(Sn),Hr=tt(Dr),Si=tt(Ct),Ei=tt(En),ki=tt(wi),mr=wn?wn.prototype:void 0,Ps=mr?mr.valueOf:void 0;function Yt(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function na(){this.__data__=Br?Br(null):{}}function ia(d){return this.has(d)&&delete this.__data__[d]}function sa(d){var _=this.__data__;if(Br){var w=_[d];return w===n?void 0:w}return Mt.call(_,d)?_[d]:void 0}function As(d){var _=this.__data__;return Br?_[d]!==void 0:Mt.call(_,d)}function Ti(d,_){var w=this.__data__;return w[d]=Br&&_===void 0?n:_,this}Yt.prototype.clear=na,Yt.prototype.delete=ia,Yt.prototype.get=sa,Yt.prototype.has=As,Yt.prototype.set=Ti;function Le(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function oa(){this.__data__=[]}function aa(d){var _=this.__data__,w=Tn(_,d);if(w<0)return!1;var A=_.length-1;return w==A?_.pop():ra.call(_,w,1),!0}function la(d){var _=this.__data__,w=Tn(_,d);return w<0?void 0:_[w][1]}function ca(d){return Tn(this.__data__,d)>-1}function ua(d,_){var w=this.__data__,A=Tn(w,d);return A<0?w.push([d,_]):w[A][1]=_,this}Le.prototype.clear=oa,Le.prototype.delete=aa,Le.prototype.get=la,Le.prototype.has=ca,Le.prototype.set=ua;function qe(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function da(){this.__data__={hash:new Yt,map:new(Dr||Le),string:new Yt}}function fa(d){return Gr(this,d).delete(d)}function ha(d){return Gr(this,d).get(d)}function pa(d){return Gr(this,d).has(d)}function ma(d,_){return Gr(this,d).set(d,_),this}qe.prototype.clear=da,qe.prototype.delete=fa,qe.prototype.get=ha,qe.prototype.has=pa,qe.prototype.set=ma;function lt(d){this.__data__=new Le(d)}function ga(){this.__data__=new Le}function va(d){return this.__data__.delete(d)}function _a(d){return this.__data__.get(d)}function ya(d){return this.__data__.has(d)}function ba(d,_){var w=this.__data__;if(w instanceof Le){var A=w.__data__;if(!Dr||A.length<r-1)return A.push([d,_]),this;w=this.__data__=new qe(A)}return w.set(d,_),this}lt.prototype.clear=ga,lt.prototype.delete=va,lt.prototype.get=_a,lt.prototype.has=ya,lt.prototype.set=ba;function kn(d,_){var w=Oi(d)||Pn(d)?D(d.length,String):[],A=w.length,W=!!A;for(var G in d)(_||Mt.call(d,G))&&!(W&&(G=="length"||Fa(G,A)))&&w.push(G);return w}function Os(d,_,w){var A=d[_];(!(Mt.call(d,_)&&Rs(A,w))||w===void 0&&!(_ in d))&&(d[_]=w)}function Tn(d,_){for(var w=d.length;w--;)if(Rs(d[w][0],_))return w;return-1}function It(d,_){return d&&Ai(_,Ii(_),d)}function Ci(d,_,w,A,W,G,re){var le;if(A&&(le=G?A(d,W,G,re):A(d)),le!==void 0)return le;if(!Ft(d))return d;var Pe=Oi(d);if(Pe){if(le=Ia(d),!_)return Aa(d,le)}else{var fe=Kt(d),Ve=fe==c||fe==h;if(js(d))return Cn(d,_);if(fe==p||fe==s||Ve&&!G){if(pt(d))return G?d:{};if(le=$t(Ve?{}:d),!_)return Oa(d,It(le,d))}else{if(!V[fe])return G?d:{};le=$a(d,fe,Ci,_)}}re||(re=new lt);var ct=re.get(d);if(ct)return ct;if(re.set(d,le),!Pe)var $e=w?Ma(d):Ii(d);return fr($e||d,function(Qe,De){$e&&(De=Qe,Qe=d[De]),Os(le,De,Ci(Qe,_,w,A,De,d,re))}),le}function wa(d){return Ft(d)?ks(d):{}}function xa(d,_,w){var A=_(d);return Oi(d)?A:et(A,w(d))}function Sa(d){return bn.call(d)}function Ea(d){if(!Ft(d)||ja(d))return!1;var _=Mi(d)||pt(d)?ta:ve;return _.test(tt(d))}function ka(d){if(!$s(d))return Cs(d);var _=[];for(var w in Object(d))Mt.call(d,w)&&w!="constructor"&&_.push(w);return _}function Cn(d,_){if(_)return d.slice();var w=new d.constructor(d.length);return d.copy(w),w}function Pi(d){var _=new d.constructor(d.byteLength);return new yi(_).set(new yi(d)),_}function Ur(d,_){var w=_?Pi(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.byteLength)}function Ms(d,_,w){var A=_?w(Ot(d),!0):Ot(d);return Xt(A,Nr,new d.constructor)}function Is(d){var _=new d.constructor(d.source,Se.exec(d));return _.lastIndex=d.lastIndex,_}function Ta(d,_,w){var A=_?w(pr(d),!0):pr(d);return Xt(A,Ze,new d.constructor)}function Ca(d){return Ps?Object(Ps.call(d)):{}}function Pa(d,_){var w=_?Pi(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.length)}function Aa(d,_){var w=-1,A=d.length;for(_||(_=Array(A));++w<A;)_[w]=d[w];return _}function Ai(d,_,w,A){w||(w={});for(var W=-1,G=_.length;++W<G;){var re=_[W],le=A?A(w[re],d[re],re,w,d):void 0;Os(w,re,le===void 0?d[re]:le)}return w}function Oa(d,_){return Ai(d,Jt(d),_)}function Ma(d){return xa(d,Ii,Jt)}function Gr(d,_){var w=d.__data__;return Ra(_)?w[typeof _=="string"?"string":"hash"]:w.map}function Pt(d,_){var w=_t(d,_);return Ea(w)?w:void 0}var Jt=bi?hr(bi,Object):La,Kt=Sa;(Sn&&Kt(new Sn(new ArrayBuffer(1)))!=O||Dr&&Kt(new Dr)!=m||Ct&&Kt(Ct.resolve())!=v||En&&Kt(new En)!=S||wi&&Kt(new wi)!=P)&&(Kt=function(d){var _=bn.call(d),w=_==p?d.constructor:void 0,A=w?tt(w):void 0;if(A)switch(A){case xi:return O;case Hr:return m;case Si:return v;case Ei:return S;case ki:return P}return _});function Ia(d){var _=d.length,w=d.constructor(_);return _&&typeof d[0]=="string"&&Mt.call(d,"index")&&(w.index=d.index,w.input=d.input),w}function $t(d){return typeof d.constructor=="function"&&!$s(d)?wa(yt(d)):{}}function $a(d,_,w,A){var W=d.constructor;switch(_){case y:return Pi(d);case a:case l:return new W(+d);case O:return Ur(d,A);case M:case E:case I:case R:case N:case z:case Y:case q:case ae:return Pa(d,A);case m:return Ms(d,A,w);case f:case k:return new W(d);case x:return Is(d);case S:return Ta(d,A,w);case T:return Ca(d)}}function Fa(d,_){return _=_??i,!!_&&(typeof d=="number"||ye.test(d))&&d>-1&&d%1==0&&d<_}function Ra(d){var _=typeof d;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?d!=="__proto__":d===null}function ja(d){return!!Ss&&Ss in d}function $s(d){var _=d&&d.constructor,w=typeof _=="function"&&_.prototype||yn;return d===w}function tt(d){if(d!=null){try{return Es.call(d)}catch{}try{return d+""}catch{}}return""}function Fs(d){return Ci(d,!0,!0)}function Rs(d,_){return d===_||d!==d&&_!==_}function Pn(d){return Na(d)&&Mt.call(d,"callee")&&(!Ts.call(d,"callee")||bn.call(d)==s)}var Oi=Array.isArray;function An(d){return d!=null&&Ns(d.length)&&!Mi(d)}function Na(d){return Ls(d)&&An(d)}var js=xn||Da;function Mi(d){var _=Ft(d)?bn.call(d):"";return _==c||_==h}function Ns(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=i}function Ft(d){var _=typeof d;return!!d&&(_=="object"||_=="function")}function Ls(d){return!!d&&typeof d=="object"}function Ii(d){return An(d)?kn(d):ka(d)}function La(){return[]}function Da(){return!1}e.exports=Fs})(po,po.exports);var im=po.exports;const sm=fi(im);var om="Expected a function",nf="__lodash_hash_undefined__",sf=1/0,am=9007199254740991,lm="[object Function]",cm="[object GeneratorFunction]",um="[object Symbol]",dm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fm=/^\w*$/,hm=/^\./,pm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mm=/[\\^$.*+?()[\]{}|]/g,gm=/\\(\\)?/g,vm=/^\[object .+?Constructor\]$/,_m=/^(?:0|[1-9]\d*)$/,ym=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,bm=typeof self=="object"&&self&&self.Object===Object&&self,Sc=ym||bm||Function("return this")();function wm(e,t){return e==null?void 0:e[t]}function xm(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Sm=Array.prototype,Em=Function.prototype,of=Object.prototype,Ua=Sc["__core-js_shared__"],du=function(){var e=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),af=Em.toString,Do=of.hasOwnProperty,lf=of.toString,km=RegExp("^"+af.call(Do).replace(mm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fu=Sc.Symbol,Tm=Sm.splice,Cm=cf(Sc,"Map"),zi=cf(Object,"create"),hu=fu?fu.prototype:void 0,pu=hu?hu.toString:void 0;function cn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Pm(){this.__data__=zi?zi(null):{}}function Am(e){return this.has(e)&&delete this.__data__[e]}function Om(e){var t=this.__data__;if(zi){var r=t[e];return r===nf?void 0:r}return Do.call(t,e)?t[e]:void 0}function Mm(e){var t=this.__data__;return zi?t[e]!==void 0:Do.call(t,e)}function Im(e,t){var r=this.__data__;return r[e]=zi&&t===void 0?nf:t,this}cn.prototype.clear=Pm;cn.prototype.delete=Am;cn.prototype.get=Om;cn.prototype.has=Mm;cn.prototype.set=Im;function hi(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $m(){this.__data__=[]}function Fm(e){var t=this.__data__,r=Bo(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Tm.call(t,r,1),!0}function Rm(e){var t=this.__data__,r=Bo(t,e);return r<0?void 0:t[r][1]}function jm(e){return Bo(this.__data__,e)>-1}function Nm(e,t){var r=this.__data__,n=Bo(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}hi.prototype.clear=$m;hi.prototype.delete=Fm;hi.prototype.get=Rm;hi.prototype.has=jm;hi.prototype.set=Nm;function gn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Lm(){this.__data__={hash:new cn,map:new(Cm||hi),string:new cn}}function Dm(e){return Ho(this,e).delete(e)}function Bm(e){return Ho(this,e).get(e)}function Hm(e){return Ho(this,e).has(e)}function Um(e,t){return Ho(this,e).set(e,t),this}gn.prototype.clear=Lm;gn.prototype.delete=Dm;gn.prototype.get=Bm;gn.prototype.has=Hm;gn.prototype.set=Um;function Gm(e,t,r){var n=e[t];(!(Do.call(e,t)&&uf(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function Bo(e,t){for(var r=e.length;r--;)if(uf(e[r][0],t))return r;return-1}function zm(e){if(!mo(e)||Jm(e))return!1;var t=tg(e)||xm(e)?km:vm;return t.test(eg(e))}function qm(e,t,r,n){if(!mo(e))return e;t=Xm(t,e)?[t]:Qm(t);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=Zm(t[i]),u=r;if(i!=o){var c=a[l];u=n?n(c,l,a):void 0,u===void 0&&(u=mo(c)?c:Wm(t[i+1])?[]:{})}Gm(a,l,u),a=a[l]}return e}function Vm(e){if(typeof e=="string")return e;if(kc(e))return pu?pu.call(e):"";var t=e+"";return t=="0"&&1/e==-sf?"-0":t}function Qm(e){return df(e)?e:Km(e)}function Ho(e,t){var r=e.__data__;return Ym(t)?r[typeof t=="string"?"string":"hash"]:r.map}function cf(e,t){var r=wm(e,t);return zm(r)?r:void 0}function Wm(e,t){return t=t??am,!!t&&(typeof e=="number"||_m.test(e))&&e>-1&&e%1==0&&e<t}function Xm(e,t){if(df(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||kc(e)?!0:fm.test(e)||!dm.test(e)||t!=null&&e in Object(t)}function Ym(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jm(e){return!!du&&du in e}var Km=Ec(function(e){e=ng(e);var t=[];return hm.test(e)&&t.push(""),e.replace(pm,function(r,n,i,s){t.push(i?s.replace(gm,"$1"):n||r)}),t});function Zm(e){if(typeof e=="string"||kc(e))return e;var t=e+"";return t=="0"&&1/e==-sf?"-0":t}function eg(e){if(e!=null){try{return af.call(e)}catch{}try{return e+""}catch{}}return""}function Ec(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(om);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o),o};return r.cache=new(Ec.Cache||gn),r}Ec.Cache=gn;function uf(e,t){return e===t||e!==e&&t!==t}var df=Array.isArray;function tg(e){var t=mo(e)?lf.call(e):"";return t==lm||t==cm}function mo(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function rg(e){return!!e&&typeof e=="object"}function kc(e){return typeof e=="symbol"||rg(e)&&lf.call(e)==um}function ng(e){return e==null?"":Vm(e)}function ig(e,t,r){return e==null?e:qm(e,t,r)}var sg=ig;const og=fi(sg),ag=(e,t)=>{Array.isArray(t)||(t=[t]);const r=sm(e);return t.forEach(({type:n,value:i})=>{og(r,n,i)}),r},ff=e=>{const t=[];return e.forEach(r=>{const n=parseInt(r);isNaN(n)||t.push(n)}),t.sort((r,n)=>r-n)},hf=(e,t,r)=>{let n=r.mobile;for(const i in t){const s=parseInt(String(t[i]));if(e>=s)n=r[s];else if(e<s)break}return n},lg=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),cg=e=>{let s;try{s=new Date().getTime()-new Date(e).getTime()}catch{return""}const o=s/36e5,a=Math.floor(s/864e5);if(a<1)return o<1?{path:"now"}:{path:"hours",number:Math.floor(o)};if(a<7)return{path:"days",number:a};const l=Math.floor(a/7);return l<=52?{path:"weeks",number:l}:{path:"years",number:Math.floor(a/365)}},ug=e=>new Promise(t=>setTimeout(t,e)),Tc={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}.
6
+
7
+ 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.
8
+
9
+ 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",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..."},dg={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>"},fg={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>"},hg={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>"},pg=Object.freeze(Object.defineProperty({__proto__:null,en:Tc,es:dg,fr:fg,pt:hg},Symbol.toStringTag,{value:"Module"})),jt=(e,t,r,n,i={})=>{let s="";return`${t}_${r}`in Tc?s=e({id:`${t}_${r}`},i):s=e({id:t},{[n]:r,...i}),s},mg=(e,t,r)=>{if(!e||e===0)return"0";t||(t=0),r||(r=["k","m","b","t"]);let n=e.toString();t=Math.pow(10,t);for(let i=r.length-1;i>=0;i--){const s=Math.pow(10,(i+1)*3);if(s<=e){e=Math.round(e*t/s)/t,e===1e3&&i<r.length-1&&(e=1,i++),n=`${e}${r[i]}`;break}}return n},pf=(e,t)=>C.Children.map(e,r=>C.cloneElement(r,{...t})),gg=e=>e.replace(/\s+/g,"").length>0,Oe=({variant:e="primary",size:t="medium",styling:r={muted:!1,fullWidth:!1},icon:n=!1,href:i=!1,element:s="button",onClick:o=!1,className:a="",disabled:l=!1,screenreaderText:u=!1,children:c=!1,...h})=>{const f=ms(typeof t=="object");if(typeof t=="object"&&typeof f=="number"){const x=Object.assign({},t),S=ff(Object.keys(x));t=hf(f,S,x)}const p=[];typeof t=="string"&&p.push(t),n&&(p.push("icon"),typeof n=="object"?(p.push(n.icon),n.position?p.push(n.position):p.push("left"),n.hover&&p.push(`hover_${n.hover}`),n.animate&&(p.push("animate"),typeof n.animate=="string"&&p.push(n.animate))):(p.push(n),!n.includes("right")&&!n.includes("left")&&p.push("left"))),r.muted&&p.push("muted"),r.fullWidth&&p.push("full-width");const v={...h,className:L(e,a,p,{"no-text":!c,disabled:l,button:i}),onClick:x=>{(!i||i[0]==="#")&&o&&(x.preventDefault(),x.stopPropagation()),o&&o(x)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return i&&(s="a",v.href=i),C.createElement(s,v,c||(u?g.jsx(ze,{showOnFocus:!1,children:u}):null))},gs=({buttons:e,className:t="",...r})=>{const n=e.length>1?"ul":"p",i=e.map((s,o)=>n==="p"?g.jsx(Oe,{...s},o):g.jsx("li",{children:g.jsx(Oe,{...s})},o));return C.createElement(n,{className:L("button-wrapper",t),...r,children:i})};const go=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return g.jsx("hr",{className:L({"has-max-width":e}),style:t})},vs=({href:e,children:t,fallbackElement:r,className:n="",onClick:i,gtmContext:s,gtmType:o,...a})=>{if(e){const l={...a};return i&&(l.onClick=i),s&&(l["data-gtm-event-context"]=s),o&&(l["data-gtm-event-type"]=o),g.jsx("a",{href:e,className:L("gtm-trackable",n),...l,children:t})}return r?C.createElement(r,{children:t,className:n,...a}):t},mu={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"}},vg=({aspect:e,range:t,sizes:r})=>{const{range:n,sizes:i}=e?mu[e]:mu.fallback;return{range:t&&t.length>0?t:n,sizes:r||i}},_g=({format:e,height:t,query:r,width:n})=>{let i=`w=${n}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=r?`${i}&${r}`:i,i},Ga=({format:e,range:t,url:r,query:n})=>t.map(({height:i,width:s})=>`${r}?${_g({format:e,height:i,query:n,width:s})} ${s}w`).join(", ");const mf=({image:e,className:t,testId:r})=>{const{description:n,height:i,type:s,query:o,url:a,width:l,loading:u,decoding:c,fetchPriority:h}=e,{range:m,sizes:f}=vg(e),p=Ga({format:"avif",query:o,range:m,url:a}),v=Ga({format:"webp",query:o,range:m,url:a}),x=Ga({format:"",query:o,range:m,url:a});return g.jsxs("picture",{className:t,children:[s!=="image/gif"&&g.jsx("source",{type:"image/avif",srcSet:p,sizes:f,"data-testid":"source"}),g.jsx("source",{type:"image/webp",srcSet:v,sizes:f,"data-testid":"source"}),g.jsx("img",{srcSet:x,sizes:f,src:a,alt:n,loading:u||"lazy",decoding:c||"async",fetchpriority:h||"auto",width:l,height:i,"data-testid":r||"image"})]})};var xl=function(e,t){return xl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},xl(e,t)};function kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xl(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var B=function(){return B=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},B.apply(this,arguments)};function ai(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function zt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Sl={exports:{}},he={};/** @license React v16.13.1
10
+ * react-is.production.min.js
11
+ *
12
+ * Copyright (c) Facebook, Inc. and its affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */var gu;function yg(){if(gu)return he;gu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(y){if(typeof y=="object"&&y!==null){var O=y.$$typeof;switch(O){case t:switch(y=y.type,y){case l:case u:case n:case s:case i:case h:return y;default:switch(y=y&&y.$$typeof,y){case a:case c:case p:case f:case o:return y;default:return O}}case r:return O}}}function P(y){return T(y)===u}return he.AsyncMode=l,he.ConcurrentMode=u,he.ContextConsumer=a,he.ContextProvider=o,he.Element=t,he.ForwardRef=c,he.Fragment=n,he.Lazy=p,he.Memo=f,he.Portal=r,he.Profiler=s,he.StrictMode=i,he.Suspense=h,he.isAsyncMode=function(y){return P(y)||T(y)===l},he.isConcurrentMode=P,he.isContextConsumer=function(y){return T(y)===a},he.isContextProvider=function(y){return T(y)===o},he.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},he.isForwardRef=function(y){return T(y)===c},he.isFragment=function(y){return T(y)===n},he.isLazy=function(y){return T(y)===p},he.isMemo=function(y){return T(y)===f},he.isPortal=function(y){return T(y)===r},he.isProfiler=function(y){return T(y)===s},he.isStrictMode=function(y){return T(y)===i},he.isSuspense=function(y){return T(y)===h},he.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===u||y===s||y===i||y===h||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===f||y.$$typeof===o||y.$$typeof===a||y.$$typeof===c||y.$$typeof===x||y.$$typeof===S||y.$$typeof===k||y.$$typeof===v)},he.typeOf=T,he}var pe={};/** @license React v16.13.1
17
+ * react-is.development.js
18
+ *
19
+ * Copyright (c) Facebook, Inc. and its affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */var vu;function bg(){return vu||(vu=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===s||D===i||D===h||D===m||typeof D=="object"&&D!==null&&(D.$$typeof===p||D.$$typeof===f||D.$$typeof===o||D.$$typeof===a||D.$$typeof===c||D.$$typeof===x||D.$$typeof===S||D.$$typeof===k||D.$$typeof===v)}function P(D){if(typeof D=="object"&&D!==null){var _t=D.$$typeof;switch(_t){case t:var pt=D.type;switch(pt){case l:case u:case n:case s:case i:case h:return pt;default:var Ot=pt&&pt.$$typeof;switch(Ot){case a:case c:case p:case f:case o:return Ot;default:return _t}}case r:return _t}}}var y=l,O=u,M=a,E=o,I=t,R=c,N=n,z=p,Y=f,q=r,ae=s,ge=i,Se=h,ve=!1;function ye(D){return ve||(ve=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),V(D)||P(D)===l}function V(D){return P(D)===u}function Z(D){return P(D)===a}function ce(D){return P(D)===o}function ue(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Te(D){return P(D)===c}function ee(D){return P(D)===n}function Ke(D){return P(D)===p}function Nr(D){return P(D)===f}function Ze(D){return P(D)===r}function fr(D){return P(D)===s}function et(D){return P(D)===i}function Xt(D){return P(D)===h}pe.AsyncMode=y,pe.ConcurrentMode=O,pe.ContextConsumer=M,pe.ContextProvider=E,pe.Element=I,pe.ForwardRef=R,pe.Fragment=N,pe.Lazy=z,pe.Memo=Y,pe.Portal=q,pe.Profiler=ae,pe.StrictMode=ge,pe.Suspense=Se,pe.isAsyncMode=ye,pe.isConcurrentMode=V,pe.isContextConsumer=Z,pe.isContextProvider=ce,pe.isElement=ue,pe.isForwardRef=Te,pe.isFragment=ee,pe.isLazy=Ke,pe.isMemo=Nr,pe.isPortal=Ze,pe.isProfiler=fr,pe.isStrictMode=et,pe.isSuspense=Xt,pe.isValidElementType=T,pe.typeOf=P}()),pe}process.env.NODE_ENV==="production"?Sl.exports=yg():Sl.exports=bg();var wg=Sl.exports,gf=wg,xg={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vf={};vf[gf.ForwardRef]=xg;vf[gf.Memo]=Sg;function _f(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}var ne;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ne||(ne={}));var Ee;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Ee||(Ee={}));var li;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(li||(li={}));function _u(e){return e.type===Ee.literal}function Eg(e){return e.type===Ee.argument}function yf(e){return e.type===Ee.number}function bf(e){return e.type===Ee.date}function wf(e){return e.type===Ee.time}function xf(e){return e.type===Ee.select}function Sf(e){return e.type===Ee.plural}function kg(e){return e.type===Ee.pound}function Ef(e){return e.type===Ee.tag}function kf(e){return!!(e&&typeof e=="object"&&e.type===li.number)}function El(e){return!!(e&&typeof e=="object"&&e.type===li.dateTime)}var Tf=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Tg=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Cg(e){var t={};return e.replace(Tg,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Pg=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ag(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Pg).filter(function(m){return m.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],l=o.slice(1),u=0,c=l;u<c.length;u++){var h=c[u];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:l})}return r}function Og(e){return e.replace(/^(.*?)-/,"")}var yu=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Cf=/^(@+)?(\+|#+)?[rs]?$/g,Mg=/(\*)(0+)|(#+)(0+)|(0+)/g,Pf=/^(0+)$/;function bu(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Cf,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function Af(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ig(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Pf.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function wu(e){var t={},r=Af(e);return r||t}function $g(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Og(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=B(B(B({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return B(B({},l),wu(u))},{}));continue;case"engineering":t=B(B(B({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return B(B({},l),wu(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Mg,function(l,u,c,h,m,f){if(u)t.minimumIntegerDigits=c.length;else{if(h&&m)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Pf.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(yu.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(yu,function(l,u,c,h,m,f){return c==="*"?t.minimumFractionDigits=u.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:m&&f?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+f.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var s=i.options[0];s==="w"?t=B(B({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=B(B({},t),bu(s)));continue}if(Cf.test(i.stem)){t=B(B({},t),bu(i.stem));continue}var o=Af(i.stem);o&&(t=B(B({},t),o));var a=Ig(i.stem);a&&(t=B(B({},t),a))}return t}var Us={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Fg(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var s=0;n+1<e.length&&e.charAt(n+1)===i;)s++,n++;var o=1+(s&1),a=s<2?1:3+(s>>1),l="a",u=Rg(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)r+=l;for(;o-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function Rg(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Us[n||""]||Us[r||""]||Us["".concat(r,"-001")]||Us["001"];return i[0]}var za,jg=new RegExp("^".concat(Tf.source,"*")),Ng=new RegExp("".concat(Tf.source,"*$"));function oe(e,t){return{start:e,end:t}}var Lg=!!String.prototype.startsWith,Dg=!!String.fromCodePoint,Bg=!!Object.fromEntries,Hg=!!String.prototype.codePointAt,Ug=!!String.prototype.trimStart,Gg=!!String.prototype.trimEnd,zg=!!Number.isSafeInteger,qg=zg?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},kl=!0;try{var Vg=Mf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");kl=((za=Vg.exec("a"))===null||za===void 0?void 0:za[0])==="a"}catch{kl=!1}var xu=Lg?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Tl=Dg?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,o;i>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},Su=Bg?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],o=s[0],a=s[1];r[o]=a}return r},Of=Hg?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),s;return i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},Qg=Ug?function(t){return t.trimStart()}:function(t){return t.replace(jg,"")},Wg=Gg?function(t){return t.trimEnd()}:function(t){return t.replace(Ng,"")};function Mf(e,t){return new RegExp(e,t)}var Cl;if(kl){var Eu=Mf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Cl=function(t,r){var n;Eu.lastIndex=r;var i=Eu.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Cl=function(t,r){for(var n=[];;){var i=Of(t,r);if(i===void 0||If(i)||Kg(i))break;n.push(i),r+=i>=65536?2:1}return Tl.apply(void 0,n)};var Xg=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,n);if(o.err)return o;i.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:Ee.pound,location:oe(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(ne.UNMATCHED_CLOSING_TAG,oe(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Pl(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ee.literal,value:"<".concat(i,"/>"),location:oe(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var o=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Pl(this.char()))return this.error(ne.INVALID_TAG,oe(a,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(ne.UNMATCHED_CLOSING_TAG,oe(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ee.tag,value:i,children:o,location:oe(n,this.clonePosition())},err:null}:this.error(ne.INVALID_TAG,oe(a,this.clonePosition())))}else return this.error(ne.UNCLOSED_TAG,oe(n,this.clonePosition()))}else return this.error(ne.INVALID_TAG,oe(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Jg(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(r);if(s){i+=s;continue}var o=this.tryParseUnquoted(t,r);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var l=oe(n,this.clonePosition());return{val:{type:Ee.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Yg(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Tl.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Tl(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ne.EXPECT_ARGUMENT_CLOSING_BRACE,oe(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ne.EMPTY_ARGUMENT,oe(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ne.MALFORMED_ARGUMENT,oe(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ne.EXPECT_ARGUMENT_CLOSING_BRACE,oe(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ee.argument,value:i,location:oe(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ne.EXPECT_ARGUMENT_CLOSING_BRACE,oe(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(ne.MALFORMED_ARGUMENT,oe(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Cl(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),o=oe(t,s);return{value:n,location:o}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(ne.EXPECT_ARGUMENT_TYPE,oe(o,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var m=Wg(h.val);if(m.length===0)return this.error(ne.EXPECT_ARGUMENT_STYLE,oe(this.clonePosition(),this.clonePosition()));var f=oe(c,this.clonePosition());u={style:m,styleLocation:f}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var v=oe(i,this.clonePosition());if(u&&xu(u==null?void 0:u.style,"::",0)){var x=Qg(u.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(x,u.styleLocation);return h.err?h:{val:{type:Ee.number,value:n,location:v,style:h.val},err:null}}else{if(x.length===0)return this.error(ne.EXPECT_DATE_TIME_SKELETON,v);var S=x;this.locale&&(S=Fg(x,this.locale));var m={type:li.dateTime,pattern:S,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Cg(S):{}},k=a==="date"?Ee.date:Ee.time;return{val:{type:k,value:n,location:v,style:m},err:null}}}return{val:{type:a==="number"?Ee.number:a==="date"?Ee.date:Ee.time,value:n,location:v,style:(s=u==null?void 0:u.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ne.EXPECT_SELECT_ARGUMENT_OPTIONS,oe(T,B({},T)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),y=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(ne.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,oe(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(ne.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ne.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),P=this.parseIdentifierIfPossible(),y=h.val}var O=this.tryParsePluralOrSelectOptions(t,a,r,P);if(O.err)return O;var p=this.tryParseArgumentClose(i);if(p.err)return p;var M=oe(i,this.clonePosition());return a==="select"?{val:{type:Ee.select,value:n,options:Su(O.val),location:M},err:null}:{val:{type:Ee.plural,value:n,options:Su(O.val),offset:y,pluralType:a==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error(ne.INVALID_ARGUMENT_TYPE,oe(o,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ne.EXPECT_ARGUMENT_CLOSING_BRACE,oe(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ne.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,oe(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Ag(t)}catch{return this.error(ne.INVALID_NUMBER_SKELETON,r)}return{val:{type:li.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?$g(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,o=!1,a=[],l=new Set,u=i.value,c=i.location;;){if(u.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ne.EXPECT_PLURAL_ARGUMENT_SELECTOR,ne.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;c=oe(h,this.clonePosition()),u=this.message.slice(h.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?ne.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ne.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?ne.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ne.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,oe(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,n);if(p.err)return p;var v=this.tryParseArgumentClose(f);if(v.err)return v;a.push([u,{value:p.val,location:oe(f,this.clonePosition())}]),l.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,c=s.location}return a.length===0?this.error(r==="select"?ne.EXPECT_SELECT_ARGUMENT_SELECTOR:ne.EXPECT_PLURAL_ARGUMENT_SELECTOR,oe(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(ne.MISSING_OTHER_CLAUSE,oe(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,o=o*10+(a-48),this.bump();else break}var l=oe(i,this.clonePosition());return s?(o*=n,qg(o)?{val:o,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Of(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(xu(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&If(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Pl(e){return e>=97&&e<=122||e>=65&&e<=90}function Yg(e){return Pl(e)||e===47}function Jg(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function If(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Kg(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Al(e){e.forEach(function(t){if(delete t.location,xf(t)||Sf(t))for(var r in t.options)delete t.options[r].location,Al(t.options[r].value);else yf(t)&&kf(t.style)||(bf(t)||wf(t))&&El(t.style)?delete t.style.location:Ef(t)&&Al(t.children)})}function Zg(e,t){t===void 0&&(t={}),t=B({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Xg(e,t).parse();if(r.err){var n=SyntaxError(ne[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Al(r.val),r.val}function Lt(e,t){var r=t&&t.cache?t.cache:sv,n=t&&t.serializer?t.serializer:iv,i=t&&t.strategy?t.strategy:tv;return i(e,{cache:r,serializer:n})}function ev(e){return e==null||typeof e=="number"||typeof e=="boolean"}function $f(e,t,r,n){var i=ev(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function Ff(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,n),t.set(i,s)),s}function Cc(e,t,r,n,i){return r.bind(t,e,n,i)}function tv(e,t){var r=e.length===1?$f:Ff;return Cc(e,this,r,t.cache.create(),t.serializer)}function rv(e,t){return Cc(e,this,Ff,t.cache.create(),t.serializer)}function nv(e,t){return Cc(e,this,$f,t.cache.create(),t.serializer)}var iv=function(){return JSON.stringify(arguments)};function Pc(){this.cache=Object.create(null)}Pc.prototype.get=function(e){return this.cache[e]};Pc.prototype.set=function(e,t){this.cache[e]=t};var sv={create:function(){return new Pc}},Dt={variadic:rv,monadic:nv},qt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(qt||(qt={}));var jr=function(e){kt(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.code=n,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ku=function(e){kt(t,e);function t(r,n,i,s){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),qt.INVALID_VALUE,s)||this}return t}(jr),ov=function(e){kt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),qt.INVALID_VALUE,i)||this}return t}(jr),av=function(e){kt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),qt.MISSING_VALUE,n)||this}return t}(jr),it;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(it||(it={}));function lv(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==it.literal||r.type!==it.literal?t.push(r):n.value+=r.value,t},[])}function Rf(e){return typeof e=="function"}function no(e,t,r,n,i,s,o){if(e.length===1&&_u(e[0]))return[{type:it.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(_u(c)){a.push({type:it.literal,value:c.value});continue}if(kg(c)){typeof s=="number"&&a.push({type:it.literal,value:r.getNumberFormat(t).format(s)});continue}var h=c.value;if(!(i&&h in i))throw new av(h,o);var m=i[h];if(Eg(c)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?it.literal:it.object,value:m});continue}if(bf(c)){var f=typeof c.style=="string"?n.date[c.style]:El(c.style)?c.style.parsedOptions:void 0;a.push({type:it.literal,value:r.getDateTimeFormat(t,f).format(m)});continue}if(wf(c)){var f=typeof c.style=="string"?n.time[c.style]:El(c.style)?c.style.parsedOptions:n.time.medium;a.push({type:it.literal,value:r.getDateTimeFormat(t,f).format(m)});continue}if(yf(c)){var f=typeof c.style=="string"?n.number[c.style]:kf(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(m=m*(f.scale||1)),a.push({type:it.literal,value:r.getNumberFormat(t,f).format(m)});continue}if(Ef(c)){var p=c.children,v=c.value,x=i[v];if(!Rf(x))throw new ov(v,"function",o);var S=no(p,t,r,n,i,s),k=x(S.map(function(y){return y.value}));Array.isArray(k)||(k=[k]),a.push.apply(a,k.map(function(y){return{type:typeof y=="string"?it.literal:it.object,value:y}}))}if(xf(c)){var T=c.options[m]||c.options.other;if(!T)throw new ku(c.value,m,Object.keys(c.options),o);a.push.apply(a,no(T.value,t,r,n,i));continue}if(Sf(c)){var T=c.options["=".concat(m)];if(!T){if(!Intl.PluralRules)throw new jr(`Intl.PluralRules is not available in this environment.
24
+ Try polyfilling it using "@formatjs/intl-pluralrules"
25
+ `,qt.MISSING_INTL_API,o);var P=r.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));T=c.options[P]||c.options.other}if(!T)throw new ku(c.value,m,Object.keys(c.options),o);a.push.apply(a,no(T.value,t,r,n,i,m-(c.offset||0)));continue}}return lv(a)}function cv(e,t){return t?B(B(B({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=B(B({},e[n]),t[n]||{}),r},{})):e}function uv(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=cv(e[n],t[n]),r},B({},e)):e}function qa(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function dv(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Lt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,zt([void 0],r,!1)))},{cache:qa(e.number),strategy:Dt.variadic}),getDateTimeFormat:Lt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,zt([void 0],r,!1)))},{cache:qa(e.dateTime),strategy:Dt.variadic}),getPluralRules:Lt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,zt([void 0],r,!1)))},{cache:qa(e.pluralRules),strategy:Dt.variadic})}}var jf=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=s.formatToParts(l);if(u.length===1)return u[0].value;var c=u.reduce(function(h,m){return!h.length||m.type!==it.literal||typeof h[h.length-1]!="string"?h.push(m.value):h[h.length-1]+=m.value,h},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(l){return no(s.ast,s.locales,s.formatters,s.formats,l,void 0,s.message)},this.resolvedOptions=function(){var l;return{locale:((l=s.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=i||{};o.formatters;var a=ai(o,["formatters"]);this.ast=e.__parse(t,B(B({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=uv(e.formats,n),this.formatters=i&&i.formatters||dv(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Zg,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),un;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(un||(un={}));var _s=function(e){kt(t,e);function t(r,n,i){var s=this,o=i?i instanceof Error?i:new Error(String(i)):void 0;return s=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
26
+ `).concat(o?`
27
+ `.concat(o.message,`
28
+ `).concat(o.stack):""))||this,s.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(s,t),s}return t}(Error),fv=function(e){kt(t,e);function t(r,n){return e.call(this,un.UNSUPPORTED_FORMATTER,r,n)||this}return t}(_s),hv=function(e){kt(t,e);function t(r,n){return e.call(this,un.INVALID_CONFIG,r,n)||this}return t}(_s),Tu=function(e){kt(t,e);function t(r,n){return e.call(this,un.MISSING_DATA,r,n)||this}return t}(_s),Tt=function(e){kt(t,e);function t(r,n,i){var s=e.call(this,un.FORMAT_ERROR,"".concat(r,`
29
+ Locale: `).concat(n,`
30
+ `),i)||this;return s.locale=n,s}return t}(_s),Va=function(e){kt(t,e);function t(r,n,i,s){var o=e.call(this,"".concat(r,`
31
+ MessageID: `).concat(i==null?void 0:i.id,`
32
+ Default Message: `).concat(i==null?void 0:i.defaultMessage,`
33
+ Description: `).concat(i==null?void 0:i.description,`
34
+ `),n,s)||this;return o.descriptor=i,o.locale=n,o}return t}(Tt),pv=function(e){kt(t,e);function t(r,n){var i=e.call(this,un.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(s){var o;return(o=s.value)!==null&&o!==void 0?o:JSON.stringify(s)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t}(_s);function vn(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var mv=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},gv=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Nf={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:mv,onWarn:gv};function Lf(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function qr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function vv(e){e===void 0&&(e=Lf());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.DateTimeFormat).bind.apply(a,zt([void 0],l,!1)))},{cache:qr(e.dateTime),strategy:Dt.variadic}),s=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.NumberFormat).bind.apply(a,zt([void 0],l,!1)))},{cache:qr(e.number),strategy:Dt.variadic}),o=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.PluralRules).bind.apply(a,zt([void 0],l,!1)))},{cache:qr(e.pluralRules),strategy:Dt.variadic});return{getDateTimeFormat:i,getNumberFormat:s,getMessageFormat:Lt(function(a,l,u,c){return new jf(a,l,u,B({formatters:{getNumberFormat:s,getDateTimeFormat:i,getPluralRules:o}},c||{}))},{cache:qr(e.message),strategy:Dt.variadic}),getRelativeTimeFormat:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(t.bind.apply(t,zt([void 0],a,!1)))},{cache:qr(e.relativeTime),strategy:Dt.variadic}),getPluralRules:o,getListFormat:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(r.bind.apply(r,zt([void 0],a,!1)))},{cache:qr(e.list),strategy:Dt.variadic}),getDisplayNames:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(n.bind.apply(n,zt([void 0],a,!1)))},{cache:qr(e.displayNames),strategy:Dt.variadic})}}function Ac(e,t,r,n){var i=e&&e[t],s;if(i&&(s=i[r]),s)return s;n(new fv("No ".concat(t," format named: ").concat(r)))}function Gs(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=B({timeZone:t},e[n]),r},{})}function Cu(e,t){var r=Object.keys(B(B({},e),t));return r.reduce(function(n,i){return n[i]=B(B({},e[i]||{}),t[i]||{}),n},{})}function Pu(e,t){if(!t)return e;var r=jf.formats;return B(B(B({},r),e),{date:Cu(Gs(r.date,t),Gs(e.date||{},t)),time:Cu(Gs(r.time,t),Gs(e.time||{},t))})}var Ol=function(e,t,r,n,i){var s=e.locale,o=e.formats,a=e.messages,l=e.defaultLocale,u=e.defaultFormats,c=e.fallbackOnEmptyString,h=e.onError,m=e.timeZone,f=e.defaultRichTextElements;r===void 0&&(r={id:""});var p=r.id,v=r.defaultMessage;_f(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var x=String(p),S=a&&Object.prototype.hasOwnProperty.call(a,x)&&a[x];if(Array.isArray(S)&&S.length===1&&S[0].type===Ee.literal)return S[0].value;if(!n&&S&&typeof S=="string"&&!f)return S.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=B(B({},f),n||{}),o=Pu(o,m),u=Pu(u,m),!S){if(c===!1&&S==="")return S;if((!v||s&&s.toLowerCase()!==l.toLowerCase())&&h(new pv(r,s)),v)try{var k=t.getMessageFormat(v,l,u,i);return k.format(n)}catch(T){return h(new Va('Error formatting default message for: "'.concat(x,'", rendering default message verbatim'),s,r,T)),typeof v=="string"?v:x}return x}try{var k=t.getMessageFormat(S,s,o,B({formatters:t},i||{}));return k.format(n)}catch(T){h(new Va('Error formatting message: "'.concat(x,'", using ').concat(v?"default message":"id"," as fallback."),s,r,T))}if(v)try{var k=t.getMessageFormat(v,l,u,i);return k.format(n)}catch(T){h(new Va('Error formatting the default message for: "'.concat(x,'", rendering message verbatim'),s,r,T))}return typeof S=="string"?S:typeof v=="string"?v:x},Df=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Uo(e,t,r,n){var i=e.locale,s=e.formats,o=e.onError,a=e.timeZone;n===void 0&&(n={});var l=n.format,u=B(B({},a&&{timeZone:a}),l&&Ac(s,t,l,o)),c=vn(n,Df,u);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=B(B({},c),{hour:"numeric",minute:"numeric"})),r(i,c)}function _v(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],s=r[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"date",t,o).format(a)}catch(l){e.onError(new Tt("Error formatting date.",e.locale,l))}return String(a)}function yv(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],s=r[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"time",t,o).format(a)}catch(l){e.onError(new Tt("Error formatting time.",e.locale,l))}return String(a)}function bv(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],s=r[1],o=r[2],a=o===void 0?{}:o,l=e.timeZone,u=e.locale,c=e.onError,h=vn(a,Df,l?{timeZone:l}:{});try{return t(u,h).formatRange(i,s)}catch(m){c(new Tt("Error formatting date time range.",e.locale,m))}return String(i)}function wv(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],s=r[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"date",t,o).formatToParts(a)}catch(l){e.onError(new Tt("Error formatting date.",e.locale,l))}return[]}function xv(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],s=r[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"time",t,o).formatToParts(a)}catch(l){e.onError(new Tt("Error formatting time.",e.locale,l))}return[]}var Sv=["style","type","fallback","languageDisplay"];function Ev(e,t,r,n){var i=e.locale,s=e.onError,o=Intl.DisplayNames;o||s(new jr(`Intl.DisplayNames is not available in this environment.
35
+ Try polyfilling it using "@formatjs/intl-displaynames"
36
+ `,qt.MISSING_INTL_API));var a=vn(n,Sv);try{return t(i,a).of(r)}catch(l){s(new Tt("Error formatting display name.",i,l))}}var kv=["type","style"],Au=Date.now();function Tv(e){return"".concat(Au,"_").concat(e,"_").concat(Au)}function Cv(e,t,r,n){n===void 0&&(n={});var i=Bf(e,t,r,n).reduce(function(s,o){var a=o.value;return typeof a!="string"?s.push(a):typeof s[s.length-1]=="string"?s[s.length-1]+=a:s.push(a),s},[]);return i.length===1?i[0]:i.length===0?"":i}function Bf(e,t,r,n){var i=e.locale,s=e.onError;n===void 0&&(n={});var o=Intl.ListFormat;o||s(new jr(`Intl.ListFormat is not available in this environment.
37
+ Try polyfilling it using "@formatjs/intl-listformat"
38
+ `,qt.MISSING_INTL_API));var a=vn(n,kv);try{var l={},u=r.map(function(c,h){if(typeof c=="object"){var m=Tv(h);return l[m]=c,m}return String(c)});return t(i,a).formatToParts(u).map(function(c){return c.type==="literal"?c:B(B({},c),{value:l[c.value]||c.value})})}catch(c){s(new Tt("Error formatting list.",i,c))}return r}var Pv=["type"];function Av(e,t,r,n){var i=e.locale,s=e.onError;n===void 0&&(n={}),Intl.PluralRules||s(new jr(`Intl.PluralRules is not available in this environment.
39
+ Try polyfilling it using "@formatjs/intl-pluralrules"
40
+ `,qt.MISSING_INTL_API));var o=vn(n,Pv);try{return t(i,o).select(r)}catch(a){s(new Tt("Error formatting plural.",i,a))}return"other"}var Ov=["numeric","style"];function Mv(e,t,r){var n=e.locale,i=e.formats,s=e.onError;r===void 0&&(r={});var o=r.format,a=!!o&&Ac(i,"relative",o,s)||{},l=vn(r,Ov,a);return t(n,l)}function Iv(e,t,r,n,i){i===void 0&&(i={}),n||(n="second");var s=Intl.RelativeTimeFormat;s||e.onError(new jr(`Intl.RelativeTimeFormat is not available in this environment.
41
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
42
+ `,qt.MISSING_INTL_API));try{return Mv(e,t,i).format(r,n)}catch(o){e.onError(new Tt("Error formatting relative time.",e.locale,o))}return String(r)}var $v=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Hf(e,t,r){var n=e.locale,i=e.formats,s=e.onError;r===void 0&&(r={});var o=r.format,a=o&&Ac(i,"number",o,s)||{},l=vn(r,$v,a);return t(n,l)}function Fv(e,t,r,n){n===void 0&&(n={});try{return Hf(e,t,n).format(r)}catch(i){e.onError(new Tt("Error formatting number.",e.locale,i))}return String(r)}function Rv(e,t,r,n){n===void 0&&(n={});try{return Hf(e,t,n).formatToParts(r)}catch(i){e.onError(new Tt("Error formatting number.",e.locale,i))}return[]}function jv(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function Nv(e){e.onWarn&&e.defaultRichTextElements&&jv(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
43
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
44
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Lv(e,t){var r=vv(t),n=B(B({},Nf),e),i=n.locale,s=n.defaultLocale,o=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&o?o(new Tu('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(s,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&o&&o(new Tu('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(s,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(o&&o(new hv('"locale" was not configured, using "'.concat(s,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),Nv(n),B(B({},n),{formatters:r,formatNumber:Fv.bind(null,n,r.getNumberFormat),formatNumberToParts:Rv.bind(null,n,r.getNumberFormat),formatRelativeTime:Iv.bind(null,n,r.getRelativeTimeFormat),formatDate:_v.bind(null,n,r.getDateTimeFormat),formatDateToParts:wv.bind(null,n,r.getDateTimeFormat),formatTime:yv.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:bv.bind(null,n,r.getDateTimeFormat),formatTimeToParts:xv.bind(null,n,r.getDateTimeFormat),formatPlural:Av.bind(null,n,r.getPluralRules),formatMessage:Ol.bind(null,n,r),$t:Ol.bind(null,n,r),formatList:Cv.bind(null,n,r.getListFormat),formatListToParts:Bf.bind(null,n,r.getListFormat),formatDisplayName:Ev.bind(null,n,r.getDisplayNames)})}function Uf(e){_f(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Gf=B(B({},Nf),{textComponent:Q.Fragment});function Dv(e){return function(t){return e(Q.Children.toArray(t))}}function Ml(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),i=r.length;if(n.length!==i)return!1;for(var s=0;s<i;s++){var o=r[s];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}var Oc=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Q.createContext(null)):Q.createContext(null);Oc.Consumer;var Bv=Oc.Provider,Hv=Bv,Uv=Oc;function te(){var e=Q.useContext(Uv);return Uf(e),e}var Il;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Il||(Il={}));var $l;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})($l||($l={}));function zf(e){var t=function(r){var n=te(),i=r.value,s=r.children,o=ai(r,["value","children"]),a=typeof i=="string"?new Date(i||0):i,l=e==="formatDate"?n.formatDateToParts(a,o):n.formatTimeToParts(a,o);return s(l)};return t.displayName=$l[e],t}function ys(e){var t=function(r){var n=te(),i=r.value,s=r.children,o=ai(r,["value","children"]),a=n[e](i,o);if(typeof s=="function")return s(a);var l=n.textComponent||Q.Fragment;return Q.createElement(l,null,a)};return t.displayName=Il[e],t}function Qa(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function qf(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=Rf(n)?Dv(n):n,t},{})}var Ou=function(e,t,r,n){for(var i=[],s=4;s<arguments.length;s++)i[s-4]=arguments[s];var o=qf(n),a=Ol.apply(void 0,zt([e,t,r,o],i,!1));return Array.isArray(a)?Q.Children.toArray(a):a},Fl=function(e,t){var r=e.defaultRichTextElements,n=ai(e,["defaultRichTextElements"]),i=qf(r),s=Lv(B(B(B({},Gf),n),{defaultRichTextElements:i}),t),o={locale:s.locale,timeZone:s.timeZone,fallbackOnEmptyString:s.fallbackOnEmptyString,formats:s.formats,defaultLocale:s.defaultLocale,defaultFormats:s.defaultFormats,messages:s.messages,onError:s.onError,defaultRichTextElements:i};return B(B({},s),{formatMessage:Ou.bind(null,o,s.formatters),$t:Ou.bind(null,o,s.formatters)})},Gv=function(e){kt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.cache=Lf(),r.state={cache:r.cache,intl:Fl(Qa(r.props),r.cache),prevConfig:Qa(r.props)},r}return t.getDerivedStateFromProps=function(r,n){var i=n.prevConfig,s=n.cache,o=Qa(r);return Ml(i,o)?null:{intl:Fl(o,s),prevConfig:o}},t.prototype.render=function(){return Uf(this.state.intl),Q.createElement(Hv,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Gf,t}(Q.PureComponent);function zv(e,t){var r=e.values,n=ai(e,["values"]),i=t.values,s=ai(t,["values"]);return Ml(i,r)&&Ml(n,s)}function Vf(e){var t=te(),r=t.formatMessage,n=t.textComponent,i=n===void 0?Q.Fragment:n,s=e.id,o=e.description,a=e.defaultMessage,l=e.values,u=e.children,c=e.tagName,h=c===void 0?i:c,m=e.ignoreTag,f={id:s,description:o,defaultMessage:a},p=r(f,l,{ignoreTag:m});return typeof u=="function"?u(Array.isArray(p)?p:[p]):h?Q.createElement(h,null,Q.Children.toArray(p)):Q.createElement(Q.Fragment,null,p)}Vf.displayName="FormattedMessage";var Qf=Q.memo(Vf,zv);Qf.displayName="MemoizedFormattedMessage";const Mr=Qf;ys("formatDate");ys("formatTime");ys("formatNumber");ys("formatList");ys("formatDisplayName");zf("formatDate");zf("formatTime");let $i=!1;const Wf=({isOpen:e=!1,isLoading:t=!1,children:r})=>{const n=te(),i=C.useRef(null),[s,o]=C.useState("hidden");C.useEffect(()=>{const l=i.current;if(l)return l.addEventListener("transitionend",a),()=>{l.removeEventListener("transitionend",a)}},[]);const a=({propertyName:l})=>{l==="opacity"&&($i!==!1&&clearTimeout($i),o(u=>u==="opening"?"open":u==="closing"?"closed":u==="closed"?"hidden":u))};return ln(()=>{$i!==!1&&clearTimeout($i);let l="open";e?o("opening"):(o("closing"),l="hidden"),$i=setTimeout(()=>{o(l)},300)},[e]),g.jsx("aside",{ref:i,className:L("tooltip text-medium",s,{loading:t}),hidden:s==="hidden",children:t?g.jsx("p",{children:n.formatMessage({id:"tooltip_loading"})}):typeof r=="string"?g.jsx("p",{children:r}):r})};const Mc=({children:e,className:t="",...r})=>g.jsx("section",{className:L("full-width-section",t),...r,children:e});const qv=({text:e,buttons:t,className:r=""})=>{const n=[];return t.forEach(i=>{n.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})}),g.jsx(Mc,{className:L("download-section",r),children:g.jsxs(g.Fragment,{children:[C.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),g.jsx(gs,{buttons:n})]})})};const Vv=({title:e=!1,logos:t=[],className:r=""})=>{const n=t.length;if(n===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return g.jsxs("div",{className:L("logos",r),children:[e&&C.createElement(i.element,{className:"title"},i.text),g.jsx("ul",{className:L({"two-col":n===2||n===4,"three-col":n===5||n<=10&&n%3===0}),children:t.map(({logo:s,nameOfBusiness:o,link:a=!1,description:l=!1},u)=>{if(!s||!s.url)return null;const c=g.jsx("img",{src:s.url,width:s.width||"auto",height:s.height||"auto",alt:o});return g.jsxs("li",{children:[g.jsx("p",{className:"img-wrapper",children:a?g.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),l&&g.jsx("small",{children:l})]},window.btoa(`${s.url}_${u}`))})})]})};const Qv=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Wv=({content:e,image:t,variant:r="default",spacing:n="normal",cta:i,children:s})=>{const o=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},l={};return o.forEach(u=>{if(!e[u]){l[u]=!1;return}if(typeof e[u]=="object"){l[u]=e[u];const{text:c,element:h}=e[u];if(h&&Qv.includes(h.toLowerCase()))return;l[u]={text:c,element:a[u]};return}l[u]={text:e[u],element:a[u]}}),i&&i.link&&i.link[0]==="#"&&(i.props||(i.props={}),i.props.onClick=u=>{u.preventDefault(),u.stopPropagation();const c=document.getElementById(i.link.substring(1));c&&c.scrollIntoView({behavior:"smooth"})}),g.jsx(Mc,{className:L("banner-section",r,n,{"has-image":t,"has-extra-spacing":n==="normal"&&l.eyebrow&&l.title}),children:g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"content-wrapper",children:[o.map(u=>{if(l[u]&&typeof l[u]=="object"){const{text:c,element:h=""}=l[u];return C.createElement(h.toLowerCase(),{key:u,className:u},c)}return null}),s,i&&i.text&&i.link&&g.jsx(Oe,{variant:t||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:i.link,...i.props,children:i.text})]}),t&&g.jsx(mf,{image:{...t,aspect:"banner"}})]})})},Xv=C.memo(Wv);const Yv=({variant:e="primary",button:t=null,title:r,text:n,gtmContext:i})=>!r&&!n?null:g.jsxs("aside",{className:L("marketing-block",e),children:[r&&g.jsx("p",{className:"title",children:r}),n&&g.jsx("p",{children:n}),t&&g.jsx(Oe,{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})]});var Xf={exports:{}};(function(e){(function(t,r){var n="…",i=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function s(a,l,u){return u.length===a.length||!l.ellipsis||(u+=l.ellipsis),u}function o(a,l,u){var c="",h=!0,m=l,f,p;if(u=u||{},u.ellipsis=typeof u.ellipsis>"u"?n:u.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(i.lastIndex=c.length,h=i.exec(a),!h||h.index-c.length>=m||i.lastIndex>=l+3e3)return c+=a.substring(c.length,l),s(a,u,c);if(f=h[0],p=h.index,c+=a.substring(c.length,p+f.length),m-=p+f.length,m<=0)break}return s(a,u,c)}e.exports?e.exports=o:t.truncate=o})(String)})(Xf);var Jv=Xf.exports;const Ic=fi(Jv),vo="https://storage.googleapis.com/apolitical-assets/",In={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Kv="200,000+";const $c=({label:e=!1,className:t="",children:r})=>{const n=te();return g.jsxs("details",{className:L("collapsible-section",t),children:[g.jsx("summary",{children:e||n.formatMessage({id:"collapsibleSection_summary"})}),g.jsx("div",{className:"content",children:r})]})};function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(this,arguments)}const Zv=["children","options"],Mu=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),Iu={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},e_=["style","script"],t_=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,r_=/mailto:/i,n_=/\n{2,}$/,Yf=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,i_=/^ *> ?/gm,s_=/^ {2,}\n/,o_=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Jf=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,Kf=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,a_=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,l_=/^(?:\n *)*\n/,c_=/\r\n?/g,u_=/^\[\^([^\]]+)](:.*)\n/,d_=/^\[\^([^\]]+)]/,f_=/\f/g,h_=/^\s*?\[(x|\s)\]/,Zf=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,eh=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,th=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Rl=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,p_=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,rh=/^<!--[\s\S]*?(?:-->)/,m_=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,jl=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,g_=/^\{.*\}$/,v_=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,__=/^<([^ >]+@[^ >]+)>/,y_=/^<([^ >]+:\/[^ >]+)>/,b_=/-([a-z])?/gi,nh=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,w_=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,x_=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,S_=/^\[([^\]]*)\] ?\[([^\]]*)\]/,E_=/(\[|\])/g,k_=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,T_=/\t/g,C_=/^ *\| */,P_=/(^ *\||\| *$)/g,A_=/ *$/,O_=/^ *:-+: *$/,M_=/^ *:-+ *$/,I_=/^ *-+: *$/,$_=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,F_=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,R_=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,j_=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,N_=/^\\([^0-9A-Za-z\s])/,L_=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,D_=/^\n+/,B_=/^([ \t]*)/,H_=/\\([^\\])/g,$u=/ *\n+$/,U_=/(?:^|\n)( *)$/,Fc="(?:\\d+\\.)",Rc="(?:[*+-])";function ih(e){return"( *)("+(e===1?Fc:Rc)+") +"}const sh=ih(1),oh=ih(2);function ah(e){return new RegExp("^"+(e===1?sh:oh))}const G_=ah(1),z_=ah(2);function lh(e){return new RegExp("^"+(e===1?sh:oh)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Fc:Rc)+" )[^\\n]*)*(\\n|$)","gm")}const ch=lh(1),uh=lh(2);function dh(e){const t=e===1?Fc:Rc;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const fh=dh(1),hh=dh(2);function Fu(e,t){const r=t===1,n=r?fh:hh,i=r?ch:uh,s=r?G_:z_;return{t(o,a,l){const u=U_.exec(l);return u&&(a.o||!a._&&!a.u)?n.exec(o=u[1]+o):null},i:ie.HIGH,l(o,a,l){const u=r?+o[2]:void 0,c=o[0].replace(n_,`
45
+ `).match(i);let h=!1;return{p:c.map(function(m,f){const p=s.exec(m)[0].length,v=new RegExp("^ {1,"+p+"}","gm"),x=m.replace(v,"").replace(s,""),S=f===c.length-1,k=x.indexOf(`
46
+
47
+ `)!==-1||S&&h;h=k;const T=l._,P=l.o;let y;l.o=!0,k?(l._=!1,y=x.replace($u,`
48
+
49
+ `)):(l._=!0,y=x.replace($u,""));const O=a(y,l);return l._=T,l.o=P,O}),m:r,g:u}},h:(o,a,l)=>e(o.m?"ol":"ul",{key:l.k,start:o.g},o.p.map(function(u,c){return e("li",{key:c},a(u,l))}))}}const q_=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,V_=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,ph=[Yf,Jf,Kf,Zf,th,eh,rh,nh,ch,fh,uh,hh],Q_=[...ph,/^[^\n]+(?: \n|\n{2,})/,Rl,jl];function W_(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function X_(e){return I_.test(e)?"right":O_.test(e)?"center":M_.test(e)?"left":null}function Ru(e,t,r){const n=r.$;r.$=!0;const i=t(e.trim(),r);r.$=n;let s=[[]];return i.forEach(function(o,a){o.type==="tableSeparator"?a!==0&&a!==i.length-1&&s.push([]):(o.type!=="text"||i[a+1]!=null&&i[a+1].type!=="tableSeparator"||(o.v=o.v.replace(A_,"")),s[s.length-1].push(o))}),s}function Y_(e,t,r){r._=!0;const n=Ru(e[1],t,r),i=e[2].replace(P_,"").split("|").map(X_),s=function(o,a,l){return o.trim().split(`
50
+ `).map(function(u){return Ru(u,a,l)})}(e[3],t,r);return r._=!1,{S:i,A:s,L:n,type:"table"}}function ju(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function vr(e){return function(t,r){return r._?e.exec(t):null}}function _r(e){return function(t,r){return r._||r.u?e.exec(t):null}}function er(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function Fi(e){return function(t){return e.exec(t)}}function J_(e,t,r){if(t._||t.u||r&&!r.endsWith(`
51
+ `))return null;let n="";e.split(`
52
+ `).every(s=>!ph.some(o=>o.test(s))&&(n+=s+`
53
+ `,s.trim()));const i=n.trimEnd();return i==""?null:[n,i]}function On(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function Nu(e){return e.replace(H_,"$1")}function io(e,t,r){const n=r._||!1,i=r.u||!1;r._=!0,r.u=!0;const s=e(t,r);return r._=n,r.u=i,s}function K_(e,t,r){const n=r._||!1,i=r.u||!1;r._=!1,r.u=!0;const s=e(t,r);return r._=n,r.u=i,s}function Z_(e,t,r){return r._=!1,e(t,r)}const Wa=(e,t,r)=>({v:io(t,e[1],r)});function Xa(){return{}}function Ya(){return null}function ey(...e){return e.filter(Boolean).join(" ")}function Ja(e,t,r){let n=e;const i=t.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}var ie;function ty(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||W_,t.namedCodesToUnicode=t.namedCodesToUnicode?Wr({},Iu,t.namedCodesToUnicode):Iu;const r=t.createElement||Q.createElement;function n(f,p,...v){const x=Ja(t.overrides,`${f}.props`,{});return r(function(S,k){const T=Ja(k,S);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:Ja(k,`${S}.component`,S):S}(f,t.overrides),Wr({},p,x,{className:ey(p==null?void 0:p.className,x.className)||void 0}),...v)}function i(f){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=k_.test(f)===!1);const v=c(u(p?f:`${f.trimEnd().replace(D_,"")}
54
+
55
+ `,{_:p}));for(;typeof v[v.length-1]=="string"&&!v[v.length-1].trim();)v.pop();if(t.wrapper===null)return v;const x=t.wrapper||(p?"span":"div");let S;if(v.length>1||t.forceWrapper)S=v;else{if(v.length===1)return S=v[0],typeof S=="string"?n("span",{key:"outer"},S):S;S=null}return Q.createElement(x,{key:"outer"},S)}function s(f){const p=f.match(t_);return p?p.reduce(function(v,x,S){const k=x.indexOf("=");if(k!==-1){const T=function(M){return M.indexOf("-")!==-1&&M.match(m_)===null&&(M=M.replace(b_,function(E,I){return I.toUpperCase()})),M}(x.slice(0,k)).trim(),P=function(M){const E=M[0];return(E==='"'||E==="'")&&M.length>=2&&M[M.length-1]===E?M.slice(1,-1):M}(x.slice(k+1).trim()),y=Mu[T]||T,O=v[y]=function(M,E){return M==="style"?E.split(/;\s?/).reduce(function(I,R){const N=R.slice(0,R.indexOf(":"));return I[N.replace(/(-[a-z])/g,z=>z[1].toUpperCase())]=R.slice(N.length+1).trim(),I},{}):M==="href"?On(E):(E.match(g_)&&(E=E.slice(1,E.length-1)),E==="true"||E!=="false"&&E)}(T,P);typeof O=="string"&&(Rl.test(O)||jl.test(O))&&(v[y]=Q.cloneElement(i(O.trim()),{key:S}))}else x!=="style"&&(v[Mu[x]||x]=!0);return v},{}):null}const o=[],a={},l={blockQuote:{t:er(Yf),i:ie.HIGH,l:(f,p,v)=>({v:p(f[0].replace(i_,""),v)}),h:(f,p,v)=>n("blockquote",{key:v.k},p(f.v,v))},breakLine:{t:Fi(s_),i:ie.HIGH,l:Xa,h:(f,p,v)=>n("br",{key:v.k})},breakThematic:{t:er(o_),i:ie.HIGH,l:Xa,h:(f,p,v)=>n("hr",{key:v.k})},codeBlock:{t:er(Kf),i:ie.MAX,l:f=>({v:f[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(f,p,v)=>n("pre",{key:v.k},n("code",Wr({},f.O,{className:f.M?`lang-${f.M}`:""}),f.v))},codeFenced:{t:er(Jf),i:ie.MAX,l:f=>({O:s(f[3]||""),v:f[4],M:f[2]||void 0,type:"codeBlock"})},codeInline:{t:_r(a_),i:ie.LOW,l:f=>({v:f[2]}),h:(f,p,v)=>n("code",{key:v.k},f.v)},footnote:{t:er(u_),i:ie.MAX,l:f=>(o.push({I:f[2],j:f[1]}),{}),h:Ya},footnoteReference:{t:vr(d_),i:ie.HIGH,l:f=>({v:f[1],B:`#${t.slugify(f[1])}`}),h:(f,p,v)=>n("a",{key:v.k,href:On(f.B)},n("sup",{key:v.k},f.v))},gfmTask:{t:vr(h_),i:ie.HIGH,l:f=>({R:f[1].toLowerCase()==="x"}),h:(f,p,v)=>n("input",{checked:f.R,key:v.k,readOnly:!0,type:"checkbox"})},heading:{t:er(t.enforceAtxHeadings?eh:Zf),i:ie.HIGH,l:(f,p,v)=>({v:io(p,f[2],v),T:t.slugify(f[2]),C:f[1].length}),h:(f,p,v)=>n(`h${f.C}`,{id:f.T,key:v.k},p(f.v,v))},headingSetext:{t:er(th),i:ie.MAX,l:(f,p,v)=>({v:io(p,f[1],v),C:f[2]==="="?1:2,type:"heading"})},htmlComment:{t:Fi(rh),i:ie.HIGH,l:()=>({}),h:Ya},image:{t:_r(V_),i:ie.HIGH,l:f=>({D:f[1],B:Nu(f[2]),F:f[3]}),h:(f,p,v)=>n("img",{key:v.k,alt:f.D||void 0,title:f.F||void 0,src:On(f.B)})},link:{t:vr(q_),i:ie.LOW,l:(f,p,v)=>({v:K_(p,f[1],v),B:Nu(f[2]),F:f[3]}),h:(f,p,v)=>n("a",{key:v.k,href:On(f.B),title:f.F},p(f.v,v))},linkAngleBraceStyleDetector:{t:vr(y_),i:ie.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],type:"link"})},linkBareUrlDetector:{t:(f,p)=>p.N?null:vr(v_)(f,p),i:ie.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],F:void 0,type:"link"})},linkMailtoDetector:{t:vr(__),i:ie.MAX,l(f){let p=f[1],v=f[1];return r_.test(v)||(v="mailto:"+v),{v:[{v:p.replace("mailto:",""),type:"text"}],B:v,type:"link"}}},orderedList:Fu(n,1),unorderedList:Fu(n,2),newlineCoalescer:{t:er(l_),i:ie.LOW,l:Xa,h:()=>`
56
+ `},paragraph:{t:J_,i:ie.LOW,l:Wa,h:(f,p,v)=>n("p",{key:v.k},p(f.v,v))},ref:{t:vr(w_),i:ie.MAX,l:f=>(a[f[1]]={B:f[2],F:f[4]},{}),h:Ya},refImage:{t:_r(x_),i:ie.MAX,l:f=>({D:f[1]||void 0,P:f[2]}),h:(f,p,v)=>n("img",{key:v.k,alt:f.D,src:On(a[f.P].B),title:a[f.P].F})},refLink:{t:vr(S_),i:ie.MAX,l:(f,p,v)=>({v:p(f[1],v),Z:p(f[0].replace(E_,"\\$1"),v),P:f[2]}),h:(f,p,v)=>a[f.P]?n("a",{key:v.k,href:On(a[f.P].B),title:a[f.P].F},p(f.v,v)):n("span",{key:v.k},p(f.Z,v))},table:{t:er(nh),i:ie.HIGH,l:Y_,h:(f,p,v)=>n("table",{key:v.k},n("thead",null,n("tr",null,f.L.map(function(x,S){return n("th",{key:S,style:ju(f,S)},p(x,v))}))),n("tbody",null,f.A.map(function(x,S){return n("tr",{key:S},x.map(function(k,T){return n("td",{key:T,style:ju(f,T)},p(k,v))}))})))},tableSeparator:{t:function(f,p){return p.$?(p._=!0,C_.exec(f)):null},i:ie.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Fi(L_),i:ie.MIN,l:f=>({v:f[0].replace(p_,(p,v)=>t.namedCodesToUnicode[v]?t.namedCodesToUnicode[v]:p)}),h:f=>f.v},textBolded:{t:_r($_),i:ie.MED,l:(f,p,v)=>({v:p(f[2],v)}),h:(f,p,v)=>n("strong",{key:v.k},p(f.v,v))},textEmphasized:{t:_r(F_),i:ie.LOW,l:(f,p,v)=>({v:p(f[2],v)}),h:(f,p,v)=>n("em",{key:v.k},p(f.v,v))},textEscaped:{t:_r(N_),i:ie.HIGH,l:f=>({v:f[1],type:"text"})},textMarked:{t:_r(R_),i:ie.LOW,l:Wa,h:(f,p,v)=>n("mark",{key:v.k},p(f.v,v))},textStrikethroughed:{t:_r(j_),i:ie.LOW,l:Wa,h:(f,p,v)=>n("del",{key:v.k},p(f.v,v))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Fi(Rl),i:ie.HIGH,l(f,p,v){const[,x]=f[3].match(B_),S=new RegExp(`^${x}`,"gm"),k=f[3].replace(S,""),T=(P=k,Q_.some(E=>E.test(P))?Z_:io);var P;const y=f[1].toLowerCase(),O=e_.indexOf(y)!==-1;v.N=v.N||y==="a";const M=O?f[3]:T(p,k,v);return v.N=!1,{O:s(f[2]),v:M,G:O,H:O?y:f[1]}},h:(f,p,v)=>n(f.H,Wr({key:v.k},f.O),f.G?f.v:p(f.v,v))},l.htmlSelfClosing={t:Fi(jl),i:ie.HIGH,l:f=>({O:s(f[2]||""),H:f[1]}),h:(f,p,v)=>n(f.H,Wr({},f.O,{key:v.k}))});const u=function(f){let p=Object.keys(f);function v(x,S){let k=[],T="";for(;x;){let P=0;for(;P<p.length;){const y=p[P],O=f[y],M=O.t(x,S,T);if(M){const E=M[0];x=x.substring(E.length);const I=O.l(M,v,S);I.type==null&&(I.type=y),k.push(I),T=E;break}P++}}return k}return p.sort(function(x,S){let k=f[x].i,T=f[S].i;return k!==T?k-T:x<S?-1:1}),function(x,S){return v(function(k){return k.replace(c_,`
57
+ `).replace(f_,"").replace(T_," ")}(x),S)}}(l),c=(h=function(f){return function(p,v,x){return f[p.type].h(p,v,x)}}(l),function f(p,v={}){if(Array.isArray(p)){const x=v.k,S=[];let k=!1;for(let T=0;T<p.length;T++){v.k=T;const P=f(p[T],v),y=typeof P=="string";y&&k?S[S.length-1]+=P:P!==null&&S.push(P),k=y}return v.k=x,S}return h(p,f,v)});var h;const m=i(e);return o.length?n("div",null,m,n("footer",{key:"footer"},o.map(function(f){return n("div",{id:t.slugify(f.j),key:f.j},f.j,c(u(f.I,{_:!0})))}))):m}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(ie||(ie={}));const Go=e=>{let{children:t,options:r}=e,n=function(i,s){if(i==null)return{};var o,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)s.indexOf(o=u[a])>=0||(l[o]=i[o]);return l}(e,Zv);return Q.cloneElement(ty(t,r),n)};const ar=({variant:e="primary",className:t="",children:r,...n})=>g.jsx("div",{className:L("highlighted-text-box",e,t),...n,children:r});const bs=({variant:e="empty",text:t=!1,button:r=!1,className:n=""})=>{let i=r&&!!Object.keys(r).length;const s=typeof r=="object"&&"breakpoints"in r,o=ms(s);if(s&&typeof r=="object"&&typeof o=="number"){const h=Object.assign({},r.breakpoints),m=ff(Object.keys(h));i=hf(o,m,h)}const{breakpoints:a,text:l="",component:u,...c}=r;return g.jsx(ar,{variant:"subtle",className:L("empty-state-box",e,n),children:g.jsxs(g.Fragment,{children:[t&&g.jsx(Go,{options:{forceBlock:!0},children:t}),i&&typeof r=="object"&&(u||g.jsx(Oe,{...c,variant:r.variant?r.variant:"secondary",children:l}))]})})};const Nl=({children:e,...t})=>g.jsx("p",{...t,children:e}),mh={q:Nl,blockquote:Nl};for(let e=1;e<=6;e++)mh[`h${e}`]={component:Nl,props:{className:"title"}};const gh=({type:e="default",className:t="",heading:r=!1,children:n})=>g.jsxs("div",{className:L("helper-text-box text-small",e,t),children:[r&&g.jsx("p",{className:"title",children:r}),typeof n=="string"?g.jsx(Go,{options:{wrapper:C.Fragment,forceBlock:!0,overrides:mh},children:n}):g.jsx("p",{children:n})]});const ry=({className:e="",show:t=!1,hide:r=!1,text:n,children:i})=>{const s=te(),o=C.useRef(null),[a,l]=C.useState(""),[u,c]=C.useState("closed");C.useEffect(()=>{const f=o.current;if(f)return f.addEventListener("transitionend",h),()=>{f.removeEventListener("transitionend",h)}},[]),C.useEffect(()=>{if(!n||typeof n!="string")return;const f=n.split(`
58
+ `);l(f.length<3?`${n.substring(0,400)}...`:f.slice(0,3).join(`
59
+ `))},[n]),C.useEffect(()=>{u==="ready-to-close"&&c("closing")},[u]);const h=({propertyName:f})=>{f==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!n)return null;const m=["opening","open"].includes(u);return g.jsxs(ar,{variant:"subtle",className:L("hide-show-text-box",e),children:[g.jsxs("div",{ref:o,className:L("content",u),children:[g.jsx(Go,{options:{forceBlock:!0},children:u==="closed"?a:n}),u!=="closed"&&i]}),g.jsx("p",{className:"cta",children:g.jsx(Oe,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:L({"rotate-180":m}),onClick:()=>{c(m?"ready-to-close":"opening")},children:m?r||s.formatMessage({id:"hideShowTextBox_hide"}):t||s.formatMessage({id:"hideShowTextBox_show"})})})]})},ny=()=>C.Fragment,iy=({children:e})=>g.jsx(ar,{variant:"secondary",children:e}),sy=["span","strong","h1","h2","h3","h4","h5","h6","p"],oy=({children:e})=>{const t=te();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const s of C.Children.toArray(e))if(!(!s||typeof s=="string"||typeof s=="number"))if(C.isValidElement(s)&&s.type==="summary"){if(s.props&&s.props.children){for(const o of C.Children.toArray(s.props.children))if(!(!o||typeof o=="string"||typeof o=="number")&&C.isValidElement(o)){const a=o.type;if(sy.includes(a)){for(r=o.props.children;typeof r!="string"&&(Array.isArray(r)&&r[0].props&&r[0].props.children&&r[0].props.children[0]);)r=r[0].props.children[0];break}}}}else n.push(s);const i=r?r.toString():"";return g.jsx($c,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:n.map(s=>s)})},ay=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return g.jsx(ar,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return g.jsx(ar,{variant:"primary",children:e});case"pink-textbox":return g.jsx(ar,{variant:"tertiary",children:e});default:return g.jsx("div",{...t,children:e})}return g.jsx("div",{...t,children:e})},ly=e=>{const t=te(),r=Date.now().toString();let n="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?n="video":i.includes("riddle")||i.includes("sli.do")?n="poll":i.includes("padlet")&&(n="padlet"),g.jsxs(g.Fragment,{children:[g.jsx(ze,{children:g.jsx("a",{href:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),g.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),g.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},Lu=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},cy=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,i=!1;for(const s of C.Children.toArray(e))if(!(!s||typeof s=="string"||typeof s=="number")&&C.isValidElement(s)){const o=s.type;if(["button","center","span","strong"].includes(o)&&s.props&&s.props.children&&s.props.children[0])for((o==="button"||Lu(s.props.children[0])==="button")&&(i=!0),n=s.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!C.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&Lu(n)==="button"&&(i=!0);else break}return i?(r={...r,className:"button primary medium"},g.jsx("p",{className:"center",children:g.jsx(Oe,{variant:"primary",size:"medium",...r,children:n})})):g.jsx("a",{...r,children:n})},vh=({children:e})=>g.jsx("span",{children:e});const Ll=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:C.Fragment,forceBlock:!0,overrides:{a:cy,CollapsibleSection:$c,TextBox:ar,CaseStudy:iy,style:ny,details:oy,div:ay,iframe:ly}};return g.jsx("div",{className:L("markdown-text",e),children:g.jsx(Go,{options:{...n,...t},children:r})})};const _h=({size:e="medium",variant:t="default",className:r="",children:n})=>g.jsx("span",{className:L("pill",e,t,r),children:n});const _o=({element:e="p",children:t=null,className:r="",...n})=>C.createElement(e,{...n,className:L("status-banner text-small",r),"aria-live":"assertive"},t);const uy=({progress:e=0,text:t=!1,className:r=""})=>{const n=te(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,s={"--progress":`${e}%`};return g.jsx("span",{className:L(`progress-bar section-${i}`,r),style:s,children:g.jsx(ze,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},yh=C.memo(uy);const Ka="loadingBlock_",dy=({progress:e=0,steps:t=!1,className:r=""})=>{const n=te();t||(t={0:{text:n.formatMessage({id:`${Ka}loading`})},75:{text:n.formatMessage({id:`${Ka}almostDone`})},100:{text:n.formatMessage({id:`${Ka}complete`})}});let i=null;const s=Object.keys(t);for(let a=0;a<s.length&&!(e<parseInt(s[a]));a++)i=s[a];const o=i&&t[i].icon?{"--icon":`url(${vo}icons/${t[i].icon}.svg)`}:{};return g.jsxs(ar,{className:L("loading-block",r,{"has-icon":i&&t[i].icon}),variant:"subtle",style:o,children:[i&&g.jsx("span",{className:"step",children:t[i].text}),g.jsx(yh,{progress:e})]})},fy=C.memo(dy);const Vt=({element:e="div",className:t="",...r})=>g.jsx(xc,{element:e,className:L("loading-placeholder",t),...r});const Dl={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"]},bh=(e,t)=>e in Dl?g.jsx("div",{className:e,children:Dl[e].map((r,n)=>bh(r,n))},t):g.jsx(Vt,{className:e},t),wh=({layout:e="overview-page"})=>g.jsx("div",{className:L("loading-state",e),children:Dl[e].map((t,r)=>bh(t,r))}),xh=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):""},zs=["#5AB6A3","#A2D7AF","#806056","#3962B3"],hy=e=>{const t=Math.ceil(26/zs.length),r=xh(e).toLowerCase();if(r==="")return zs[0];const n=r.charCodeAt(0)-96;for(let i=0;i<zs.length;i++)if(n<=t*(i+1))return zs[i]};const Du=256,zo=({className:e="",src:t="",name:r,alt:n,width:i=Du,height:s=Du,...o})=>{const[a,l]=C.useState(!1),u=C.useRef(null);C.useEffect(()=>{const h=u.current;if(!h)return;const m=h.getContext("2d");if(!m)return;const f=i,p=s;typeof window<"u"&&window.devicePixelRatio&&(h.width=f*window.devicePixelRatio,h.height=p*window.devicePixelRatio,m.scale(window.devicePixelRatio,window.devicePixelRatio)),m.fillStyle=hy(r),m.fillRect(0,0,f,p),m.font=`${f/3}px Arial`,m.textAlign="center",m.fillStyle="white",m.fillText(xh(r),f/2,p/1.6)},[r]);let c=!1;return t&&t!==""&&!a&&(t.includes("http")||t.includes("//"))&&(c=!0),g.jsx("figure",{className:L("profile-picture",e,{error:a}),...o,children:c?g.jsx("img",{src:t,alt:n||r,onError:()=>{l(!0)},width:i,height:s}):g.jsx("canvas",{ref:u})})},jc=e=>e==="apolitical"?{image:`${vo}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${vo}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},py=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const i=e!=="",s=t!=="",o=r!=="";if(!i&&!s&&!o)return"";const a=`${e}${i&&s?` — ${t}`:t}`;let l=`${a}${(i||s)&&o?`, ${r}`:r}`;return l.length>n&&(l=a),l.length>n&&(l=Ic(l,n)),l};const qo=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:i="member-click",className:s=""})=>{const o=te(),a=jc(t);a.name||(a.name=o.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:l,url:u,image:c}=a,h=py(a),m=r&&r.createdAt?cg(r.createdAt):!1,f=r&&r.createdAt?lg(r.createdAt):"";return C.createElement(e,{className:L("member text-medium",s),children:g.jsxs(vs,{href:u,gtmType:i,gtmContext:n,onClick:p=>{p==null||p.stopPropagation()},children:[g.jsx(zo,{name:l,src:c}),g.jsxs("p",{className:"details",children:[g.jsx("strong",{children:l}),r&&g.jsxs("span",{className:"additional-content",children:[r.createdAt&&m&&g.jsx("span",{className:"date",title:f,"aria-label":f,children:o.formatMessage({id:`dates_${m.path}`},{number:m.number})}),r.didEdit&&g.jsx("em",{children:o.formatMessage({id:"discussion_edited"})})]}),h&&g.jsx("small",{children:h})]})]})})};const Bu={small:24,medium:48},Sh=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:i,showGap:s,showPlaceholders:o}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:l=""})=>{const u=te();return!r||r.length===0?null:C.createElement(e,{className:L("contributors",l,i,{"has-gap":s}),children:g.jsxs(g.Fragment,{children:[g.jsx("ul",{children:r.map((c,h)=>{let m,f="";if(h<a){const{name:p="",image:v=""}=jc(c);if(o)return g.jsx(Vt,{element:"li",className:"contributor"},h);m=g.jsx(zo,{name:p,src:v,width:Bu[i||"medium"],height:Bu[i||"medium"]})}else if(h===a){const p=(t||r.length)-a;m=g.jsxs("small",{className:L({"large-number":p>99}),children:["+",mg(p,0)]}),f="number-left"}return m?g.jsx("li",{className:L("contributor",f),children:m},h):null})}),n&&g.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?u.formatMessage({id:`member_${r[0]}`}):Ic(r[0].name||"",20):null})]})})};var pi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ci=typeof window>"u"||"Deno"in window;function Et(){}function my(e,t){return typeof e=="function"?e(t):e}function Bl(e){return typeof e=="number"&&e>=0&&e!==1/0}function Eh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Hu(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Nc(o,t.options))return!1}else if(!Vi(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function Uu(e,t){const{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(qi(t.options.mutationKey)!==qi(s))return!1}else if(!Vi(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Nc(e,t){return((t==null?void 0:t.queryKeyHashFn)||qi)(e)}function qi(e){return JSON.stringify(e,(t,r)=>Hl(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Vi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Vi(e[r],t[r])):!1}function kh(e,t){if(e===t)return e;const r=Gu(e)&&Gu(t);if(r||Hl(e)&&Hl(t)){const n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),s=i.length,o=r?[]:{};let a=0;for(let l=0;l<s;l++){const u=r?l:i[l];o[u]=kh(e[u],t[u]),o[u]===e[u]&&a++}return n===s&&a===n?e:o}return t}function yo(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Gu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hl(e){if(!zu(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!zu(r)||!r.hasOwnProperty("isPrototypeOf"))}function zu(e){return Object.prototype.toString.call(e)==="[object Object]"}function Th(e){return new Promise(t=>{setTimeout(t,e)})}function qu(e){Th(0).then(e)}function Ul(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?kh(e,t):t}function gy(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function vy(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Yr,Sr,Dn,Ud,_y=(Ud=class extends pi{constructor(){super();F(this,Yr,void 0);F(this,Sr,void 0);F(this,Dn,void 0);$(this,Dn,t=>{if(!ci&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){b(this,Sr)||this.setEventListener(b(this,Dn))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,Sr))==null||t.call(this),$(this,Sr,void 0))}setEventListener(t){var r;$(this,Dn,t),(r=b(this,Sr))==null||r.call(this),$(this,Sr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){b(this,Yr)!==t&&($(this,Yr,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof b(this,Yr)=="boolean"?b(this,Yr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Yr=new WeakMap,Sr=new WeakMap,Dn=new WeakMap,Ud),bo=new _y,Bn,Er,Hn,Gd,yy=(Gd=class extends pi{constructor(){super();F(this,Bn,!0);F(this,Er,void 0);F(this,Hn,void 0);$(this,Hn,t=>{if(!ci&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){b(this,Er)||this.setEventListener(b(this,Hn))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,Er))==null||t.call(this),$(this,Er,void 0))}setEventListener(t){var r;$(this,Hn,t),(r=b(this,Er))==null||r.call(this),$(this,Er,t(this.setOnline.bind(this)))}setOnline(t){b(this,Bn)!==t&&($(this,Bn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return b(this,Bn)}},Bn=new WeakMap,Er=new WeakMap,Hn=new WeakMap,Gd),Qi=new yy;function by(e){return Math.min(1e3*2**e,3e4)}function Vo(e){return(e??"online")==="online"?Qi.isOnline():!0}var Ch=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Za(e){return e instanceof Ch}function Ph(e){let t=!1,r=0,n=!1,i,s,o;const a=new Promise((x,S)=>{s=x,o=S}),l=x=>{var S;n||(f(new Ch(x)),(S=e.abort)==null||S.call(e))},u=()=>{t=!0},c=()=>{t=!1},h=()=>!bo.isFocused()||e.networkMode!=="always"&&!Qi.isOnline(),m=x=>{var S;n||(n=!0,(S=e.onSuccess)==null||S.call(e,x),i==null||i(),s(x))},f=x=>{var S;n||(n=!0,(S=e.onError)==null||S.call(e,x),i==null||i(),o(x))},p=()=>new Promise(x=>{var S;i=k=>{const T=n||!h();return T&&x(k),T},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;i=void 0,n||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(n)return;let x;try{x=e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(m).catch(S=>{var O;if(n)return;const k=e.retry??(ci?0:3),T=e.retryDelay??by,P=typeof T=="function"?T(r,S):T,y=k===!0||typeof k=="number"&&r<k||typeof k=="function"&&k(r,S);if(t||!y){f(S);return}r++,(O=e.onFail)==null||O.call(e,r,S),Th(P).then(()=>{if(h())return p()}).then(()=>{t?f(S):v()})})};return Vo(e.networkMode)?v():p().then(v),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function wy(){let e=[],t=0,r=c=>{c()},n=c=>{c()};const i=c=>{let h;t++;try{h=c()}finally{t--,t||a()}return h},s=c=>{t?e.push(c):qu(()=>{r(c)})},o=c=>(...h)=>{s(()=>{c(...h)})},a=()=>{const c=e;e=[],c.length&&qu(()=>{n(()=>{c.forEach(h=>{r(h)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c}}}var Re=wy(),Jr,zd,Ah=(zd=class{constructor(){F(this,Jr,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bl(this.gcTime)&&$(this,Jr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ci?1/0:5*60*1e3))}clearGcTimeout(){b(this,Jr)&&(clearTimeout(b(this,Jr)),$(this,Jr,void 0))}},Jr=new WeakMap,zd),Un,Gn,bt,kr,wt,Ne,Zi,Kr,zn,so,At,nr,qd,xy=(qd=class extends Ah{constructor(t){super();F(this,zn);F(this,At);F(this,Un,void 0);F(this,Gn,void 0);F(this,bt,void 0);F(this,kr,void 0);F(this,wt,void 0);F(this,Ne,void 0);F(this,Zi,void 0);F(this,Kr,void 0);$(this,Kr,!1),$(this,Zi,t.defaultOptions),X(this,zn,so).call(this,t.options),$(this,Ne,[]),$(this,bt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Un,t.state||Sy(this.options)),this.state=b(this,Un),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!b(this,Ne).length&&this.state.fetchStatus==="idle"&&b(this,bt).remove(this)}setData(t,r){const n=Ul(this.state.data,t,this.options);return X(this,At,nr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){X(this,At,nr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n;const r=b(this,kr);return(n=b(this,wt))==null||n.cancel(t),r?r.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,Un))}isActive(){return b(this,Ne).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||b(this,Ne).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Eh(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=b(this,Ne).find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=b(this,wt))==null||r.continue()}onOnline(){var r;const t=b(this,Ne).find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=b(this,wt))==null||r.continue()}addObserver(t){b(this,Ne).includes(t)||(b(this,Ne).push(t),this.clearGcTimeout(),b(this,bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){b(this,Ne).includes(t)&&($(this,Ne,b(this,Ne).filter(r=>r!==t)),b(this,Ne).length||(b(this,wt)&&(b(this,Kr)?b(this,wt).cancel({revert:!0}):b(this,wt).cancelRetry()),this.scheduleGc()),b(this,bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return b(this,Ne).length}invalidate(){this.state.isInvalidated||X(this,At,nr).call(this,{type:"invalidate"})}fetch(t,r){var u,c,h,m;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(b(this,kr))return(u=b(this,wt))==null||u.continueRetry(),b(this,kr)}if(t&&X(this,zn,so).call(this,t),!this.options.queryFn){const f=b(this,Ne).find(p=>p.options.queryFn);f&&X(this,zn,so).call(this,f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>($(this,Kr,!0),n.signal)})};s(i);const o=()=>this.options.queryFn?($(this,Kr,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,Gn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=a.fetchOptions)==null?void 0:h.meta))&&X(this,At,nr).call(this,{type:"fetch",meta:(m=a.fetchOptions)==null?void 0:m.meta});const l=f=>{var p,v,x,S;Za(f)&&f.silent||X(this,At,nr).call(this,{type:"error",error:f}),Za(f)||((v=(p=b(this,bt).config).onError)==null||v.call(p,f,this),(S=(x=b(this,bt).config).onSettled)==null||S.call(x,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return $(this,wt,Ph({fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,v,x,S;if(typeof f>"u"){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(v=(p=b(this,bt).config).onSuccess)==null||v.call(p,f,this),(S=(x=b(this,bt).config).onSettled)==null||S.call(x,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(f,p)=>{X(this,At,nr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{X(this,At,nr).call(this,{type:"pause"})},onContinue:()=>{X(this,At,nr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),$(this,kr,b(this,wt).promise),b(this,kr)}},Un=new WeakMap,Gn=new WeakMap,bt=new WeakMap,kr=new WeakMap,wt=new WeakMap,Ne=new WeakMap,Zi=new WeakMap,Kr=new WeakMap,zn=new WeakSet,so=function(t){this.options={...b(this,Zi),...t},this.updateGcTime(this.options.gcTime)},At=new WeakSet,nr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:Vo(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Za(i)&&i.revert&&b(this,Gn)?{...b(this,Gn),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Re.batch(()=>{b(this,Ne).forEach(n=>{n.onQueryUpdate()}),b(this,bt).notify({query:this,type:"updated",action:t})})},qd);function Sy(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Bt,Vd,Ey=(Vd=class extends pi{constructor(t={}){super();F(this,Bt,void 0);this.config=t,$(this,Bt,new Map)}build(t,r,n){const i=r.queryKey,s=r.queryHash??Nc(i,r);let o=this.get(s);return o||(o=new xy({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){b(this,Bt).has(t.queryHash)||(b(this,Bt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=b(this,Bt).get(t.queryHash);r&&(t.destroy(),r===t&&b(this,Bt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Re.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return b(this,Bt).get(t)}getAll(){return[...b(this,Bt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Hu(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Hu(t,n)):r}notify(t){Re.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Re.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Re.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bt=new WeakMap,Vd),Ht,es,mt,qn,Ut,yr,Qd,ky=(Qd=class extends Ah{constructor(t){super();F(this,Ut);F(this,Ht,void 0);F(this,es,void 0);F(this,mt,void 0);F(this,qn,void 0);this.mutationId=t.mutationId,$(this,es,t.defaultOptions),$(this,mt,t.mutationCache),$(this,Ht,[]),this.state=t.state||Oh(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...b(this,es),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){b(this,Ht).includes(t)||(b(this,Ht).push(t),this.clearGcTimeout(),b(this,mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Ht,b(this,Ht).filter(r=>r!==t)),this.scheduleGc(),b(this,mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){b(this,Ht).length||(this.state.status==="pending"?this.scheduleGc():b(this,mt).remove(this))}continue(){var t;return((t=b(this,qn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,c,h,m,f,p,v,x,S,k,T,P,y,O,M;const r=()=>($(this,qn,Ph({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,I)=>{X(this,Ut,yr).call(this,{type:"failed",failureCount:E,error:I})},onPause:()=>{X(this,Ut,yr).call(this,{type:"pause"})},onContinue:()=>{X(this,Ut,yr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),b(this,qn).promise),n=this.state.status==="pending";try{if(!n){X(this,Ut,yr).call(this,{type:"pending",variables:t}),await((s=(i=b(this,mt).config).onMutate)==null?void 0:s.call(i,t,this));const I=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));I!==this.state.context&&X(this,Ut,yr).call(this,{type:"pending",context:I,variables:t})}const E=await r();return await((u=(l=b(this,mt).config).onSuccess)==null?void 0:u.call(l,E,t,this.state.context,this)),await((h=(c=this.options).onSuccess)==null?void 0:h.call(c,E,t,this.state.context)),await((f=(m=b(this,mt).config).onSettled)==null?void 0:f.call(m,E,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,E,null,t,this.state.context)),X(this,Ut,yr).call(this,{type:"success",data:E}),E}catch(E){try{throw await((S=(x=b(this,mt).config).onError)==null?void 0:S.call(x,E,t,this.state.context,this)),await((T=(k=this.options).onError)==null?void 0:T.call(k,E,t,this.state.context)),await((y=(P=b(this,mt).config).onSettled)==null?void 0:y.call(P,void 0,E,this.state.variables,this.state.context,this)),await((M=(O=this.options).onSettled)==null?void 0:M.call(O,void 0,E,t,this.state.context)),E}finally{X(this,Ut,yr).call(this,{type:"error",error:E})}}}},Ht=new WeakMap,es=new WeakMap,mt=new WeakMap,qn=new WeakMap,Ut=new WeakSet,yr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Vo(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Re.batch(()=>{b(this,Ht).forEach(n=>{n.onMutationUpdate(t)}),b(this,mt).notify({mutation:this,type:"updated",action:t})})},Qd);function Oh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xt,ts,Zr,Wd,Ty=(Wd=class extends pi{constructor(t={}){super();F(this,xt,void 0);F(this,ts,void 0);F(this,Zr,void 0);this.config=t,$(this,xt,[]),$(this,ts,0)}build(t,r,n){const i=new ky({mutationCache:this,mutationId:++Hs(this,ts)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){b(this,xt).push(t),this.notify({type:"added",mutation:t})}remove(t){$(this,xt,b(this,xt).filter(r=>r!==t)),this.notify({type:"removed",mutation:t})}clear(){Re.batch(()=>{b(this,xt).forEach(t=>{this.remove(t)})})}getAll(){return b(this,xt)}find(t){const r={exact:!0,...t};return b(this,xt).find(n=>Uu(r,n))}findAll(t={}){return b(this,xt).filter(r=>Uu(t,r))}notify(t){Re.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){return $(this,Zr,(b(this,Zr)??Promise.resolve()).then(()=>{const t=b(this,xt).filter(r=>r.state.isPaused);return Re.batch(()=>t.reduce((r,n)=>r.then(()=>n.continue().catch(Et)),Promise.resolve()))}).then(()=>{$(this,Zr,void 0)})),b(this,Zr)}},xt=new WeakMap,ts=new WeakMap,Zr=new WeakMap,Wd);function Cy(e){return{onFetch:(t,r)=>{const n=async()=>{var p,v,x,S,k;const i=t.options,s=(x=(v=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,o=((S=t.state.data)==null?void 0:S.pages)||[],a=((k=t.state.data)==null?void 0:k.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},h=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),m=async(T,P,y)=>{if(u)return Promise.reject();if(P==null&&T.pages.length)return Promise.resolve(T);const O={queryKey:t.queryKey,pageParam:P,direction:y?"backward":"forward",meta:t.options.meta};c(O);const M=await h(O),{maxPages:E}=t.options,I=y?vy:gy;return{pages:I(T.pages,M,E),pageParams:I(T.pageParams,P,E)}};let f;if(s&&o.length){const T=s==="backward",P=T?Py:Vu,y={pages:o,pageParams:a},O=P(i,y);f=await m(y,O,T)}else{f=await m(l,a[0]??i.initialPageParam);const T=e??o.length;for(let P=1;P<T;P++){const y=Vu(i,f);f=await m(f,y)}}return f};t.options.persister?t.fetchFn=()=>{var i,s;return(s=(i=t.options).persister)==null?void 0:s.call(i,n,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=n}}}function Vu(e,{pages:t,pageParams:r}){const n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Py(e,{pages:t,pageParams:r}){var n;return(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r)}var Fe,Tr,Cr,Vn,Qn,Pr,Wn,Xn,Xd,Ay=(Xd=class{constructor(e={}){F(this,Fe,void 0);F(this,Tr,void 0);F(this,Cr,void 0);F(this,Vn,void 0);F(this,Qn,void 0);F(this,Pr,void 0);F(this,Wn,void 0);F(this,Xn,void 0);$(this,Fe,e.queryCache||new Ey),$(this,Tr,e.mutationCache||new Ty),$(this,Cr,e.defaultOptions||{}),$(this,Vn,new Map),$(this,Qn,new Map),$(this,Pr,0)}mount(){Hs(this,Pr)._++,b(this,Pr)===1&&($(this,Wn,bo.subscribe(()=>{bo.isFocused()&&(this.resumePausedMutations(),b(this,Fe).onFocus())})),$(this,Xn,Qi.subscribe(()=>{Qi.isOnline()&&(this.resumePausedMutations(),b(this,Fe).onOnline())})))}unmount(){var e,t;Hs(this,Pr)._--,b(this,Pr)===0&&((e=b(this,Wn))==null||e.call(this),$(this,Wn,void 0),(t=b(this,Xn))==null||t.call(this),$(this,Xn,void 0))}isFetching(e){return b(this,Fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return b(this,Tr).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=b(this,Fe).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=b(this,Fe).find({queryKey:e}),i=n==null?void 0:n.state.data,s=my(t,i);if(typeof s>"u")return;const o=this.defaultQueryOptions({queryKey:e});return b(this,Fe).build(this,o).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Re.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var t;return(t=b(this,Fe).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=b(this,Fe);Re.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=b(this,Fe),n={type:"active",...e};return Re.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=Re.batch(()=>b(this,Fe).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Et).catch(Et)}invalidateQueries(e={},t={}){return Re.batch(()=>{if(b(this,Fe).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=Re.batch(()=>b(this,Fe).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(Et)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const r=b(this,Fe).build(this,t);return r.isStaleByTime(t.staleTime)?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=Cy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}resumePausedMutations(){return b(this,Tr).resumePausedMutations()}getQueryCache(){return b(this,Fe)}getMutationCache(){return b(this,Tr)}getDefaultOptions(){return b(this,Cr)}setDefaultOptions(e){$(this,Cr,e)}setQueryDefaults(e,t){b(this,Vn).set(qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...b(this,Vn).values()];let r={};return t.forEach(n=>{Vi(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){b(this,Qn).set(qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...b(this,Qn).values()];let r={};return t.forEach(n=>{Vi(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...b(this,Cr).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nc(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...b(this,Cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){b(this,Fe).clear(),b(this,Tr).clear()}},Fe=new WeakMap,Tr=new WeakMap,Cr=new WeakMap,Vn=new WeakMap,Qn=new WeakMap,Pr=new WeakMap,Wn=new WeakMap,Xn=new WeakMap,Xd),ft,we,Yn,We,en,Jn,Gt,rs,Kn,Zn,tn,rn,Ar,nn,sn,Ni,ns,Gl,is,zl,ss,ql,os,Vl,as,Ql,ls,Wl,cs,Xl,Lo,Mh,Yd,Oy=(Yd=class extends pi{constructor(t,r){super();F(this,sn);F(this,ns);F(this,is);F(this,ss);F(this,os);F(this,as);F(this,ls);F(this,cs);F(this,Lo);F(this,ft,void 0);F(this,we,void 0);F(this,Yn,void 0);F(this,We,void 0);F(this,en,void 0);F(this,Jn,void 0);F(this,Gt,void 0);F(this,rs,void 0);F(this,Kn,void 0);F(this,Zn,void 0);F(this,tn,void 0);F(this,rn,void 0);F(this,Ar,void 0);F(this,nn,void 0);$(this,we,void 0),$(this,Yn,void 0),$(this,We,void 0),$(this,nn,new Set),$(this,ft,t),this.options=r,$(this,Gt,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,we).addObserver(this),Qu(b(this,we),this.options)&&X(this,sn,Ni).call(this),X(this,os,Vl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Yl(b(this,we),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Yl(b(this,we),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,as,Ql).call(this),X(this,ls,Wl).call(this),b(this,we).removeObserver(this)}setOptions(t,r){const n=this.options,i=b(this,we);if(this.options=b(this,ft).defaultQueryOptions(t),yo(n,this.options)||b(this,ft).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,we),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),X(this,cs,Xl).call(this);const s=this.hasListeners();s&&Wu(b(this,we),i,this.options,n)&&X(this,sn,Ni).call(this),this.updateResult(r),s&&(b(this,we)!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&X(this,ns,Gl).call(this);const o=X(this,is,zl).call(this);s&&(b(this,we)!==i||this.options.enabled!==n.enabled||o!==b(this,Ar))&&X(this,ss,ql).call(this,o)}getOptimisticResult(t){const r=b(this,ft).getQueryCache().build(b(this,ft),t),n=this.createResult(r,t);return Iy(this,n)&&($(this,We,n),$(this,Jn,this.options),$(this,en,b(this,we).state)),n}getCurrentResult(){return b(this,We)}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(b(this,nn).add(n),t[n])})}),r}getCurrentQuery(){return b(this,we)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=b(this,ft).defaultQueryOptions(t),n=b(this,ft).getQueryCache().build(b(this,ft),r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){return X(this,sn,Ni).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,We)))}createResult(t,r){var O;const n=b(this,we),i=this.options,s=b(this,We),o=b(this,en),a=b(this,Jn),u=t!==n?t.state:b(this,Yn),{state:c}=t;let{error:h,errorUpdatedAt:m,fetchStatus:f,status:p}=c,v=!1,x;if(r._optimisticResults){const M=this.hasListeners(),E=!M&&Qu(t,r),I=M&&Wu(t,n,r,i);(E||I)&&(f=Vo(t.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(p="pending")),r._optimisticResults==="isRestoring"&&(f="idle")}if(r.select&&typeof c.data<"u")if(s&&c.data===(o==null?void 0:o.data)&&r.select===b(this,rs))x=b(this,Kn);else try{$(this,rs,r.select),x=r.select(c.data),x=Ul(s==null?void 0:s.data,x,r),$(this,Kn,x),$(this,Gt,null)}catch(M){$(this,Gt,M)}else x=c.data;if(typeof r.placeholderData<"u"&&typeof x>"u"&&p==="pending"){let M;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof r.placeholderData=="function"?r.placeholderData((O=b(this,Zn))==null?void 0:O.state.data,b(this,Zn)):r.placeholderData,r.select&&typeof M<"u")try{M=r.select(M),$(this,Gt,null)}catch(E){$(this,Gt,E)}typeof M<"u"&&(p="success",x=Ul(s==null?void 0:s.data,M,r),v=!0)}b(this,Gt)&&(h=b(this,Gt),x=b(this,Kn),m=Date.now(),p="error");const S=f==="fetching",k=p==="pending",T=p==="error",P=k&&S;return{status:p,fetchStatus:f,isPending:k,isSuccess:p==="success",isError:T,isInitialLoading:P,isLoading:P,data:x,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!k,isLoadingError:T&&c.dataUpdatedAt===0,isPaused:f==="paused",isPlaceholderData:v,isRefetchError:T&&c.dataUpdatedAt!==0,isStale:Lc(t,r),refetch:this.refetch}}updateResult(t){const r=b(this,We),n=this.createResult(b(this,we),this.options);if($(this,en,b(this,we).state),$(this,Jn,this.options),yo(n,r))return;b(this,en).data!==void 0&&$(this,Zn,b(this,we)),$(this,We,n);const i={},s=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!b(this,nn).size)return!0;const l=new Set(a??b(this,nn));return this.options.throwOnError&&l.add("error"),Object.keys(b(this,We)).some(u=>{const c=u;return b(this,We)[c]!==r[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,Lo,Mh).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,os,Vl).call(this)}},ft=new WeakMap,we=new WeakMap,Yn=new WeakMap,We=new WeakMap,en=new WeakMap,Jn=new WeakMap,Gt=new WeakMap,rs=new WeakMap,Kn=new WeakMap,Zn=new WeakMap,tn=new WeakMap,rn=new WeakMap,Ar=new WeakMap,nn=new WeakMap,sn=new WeakSet,Ni=function(t){X(this,cs,Xl).call(this);let r=b(this,we).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Et)),r},ns=new WeakSet,Gl=function(){if(X(this,as,Ql).call(this),ci||b(this,We).isStale||!Bl(this.options.staleTime))return;const r=Eh(b(this,We).dataUpdatedAt,this.options.staleTime)+1;$(this,tn,setTimeout(()=>{b(this,We).isStale||this.updateResult()},r))},is=new WeakSet,zl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,we)):this.options.refetchInterval)??!1},ss=new WeakSet,ql=function(t){X(this,ls,Wl).call(this),$(this,Ar,t),!(ci||this.options.enabled===!1||!Bl(b(this,Ar))||b(this,Ar)===0)&&$(this,rn,setInterval(()=>{(this.options.refetchIntervalInBackground||bo.isFocused())&&X(this,sn,Ni).call(this)},b(this,Ar)))},os=new WeakSet,Vl=function(){X(this,ns,Gl).call(this),X(this,ss,ql).call(this,X(this,is,zl).call(this))},as=new WeakSet,Ql=function(){b(this,tn)&&(clearTimeout(b(this,tn)),$(this,tn,void 0))},ls=new WeakSet,Wl=function(){b(this,rn)&&(clearInterval(b(this,rn)),$(this,rn,void 0))},cs=new WeakSet,Xl=function(){const t=b(this,ft).getQueryCache().build(b(this,ft),this.options);if(t===b(this,we))return;const r=b(this,we);$(this,we,t),$(this,Yn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Lo=new WeakSet,Mh=function(t){Re.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(b(this,We))}),b(this,ft).getQueryCache().notify({query:b(this,we),type:"observerResultsUpdated"})})},Yd);function My(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Qu(e,t){return My(e,t)||e.state.dataUpdatedAt>0&&Yl(e,t,t.refetchOnMount)}function Yl(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Lc(e,t)}return!1}function Wu(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Lc(e,r)}function Lc(e,t){return e.isStaleByTime(t.staleTime)}function Iy(e,t){return!yo(e.getCurrentResult(),t)}var Or,nt,St,ir,ei,oo,us,Jl,Jd,$y=(Jd=class extends pi{constructor(t,r){super();F(this,ei);F(this,us);F(this,Or,void 0);F(this,nt,void 0);F(this,St,void 0);F(this,ir,void 0);$(this,nt,void 0),$(this,Or,t),this.setOptions(r),this.bindMethods(),X(this,ei,oo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=b(this,Or).defaultMutationOptions(t),yo(r,this.options)||b(this,Or).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,St),observer:this}),(n=b(this,St))==null||n.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=b(this,St))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,ei,oo).call(this),X(this,us,Jl).call(this,t)}getCurrentResult(){return b(this,nt)}reset(){$(this,St,void 0),X(this,ei,oo).call(this),X(this,us,Jl).call(this)}mutate(t,r){var n;return $(this,ir,r),(n=b(this,St))==null||n.removeObserver(this),$(this,St,b(this,Or).getMutationCache().build(b(this,Or),this.options)),b(this,St).addObserver(this),b(this,St).execute(t)}},Or=new WeakMap,nt=new WeakMap,St=new WeakMap,ir=new WeakMap,ei=new WeakSet,oo=function(){var r;const t=((r=b(this,St))==null?void 0:r.state)??Oh();$(this,nt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},us=new WeakSet,Jl=function(t){Re.batch(()=>{var r,n,i,s,o,a,l,u;b(this,ir)&&this.hasListeners()&&((t==null?void 0:t.type)==="success"?((n=(r=b(this,ir)).onSuccess)==null||n.call(r,t.data,b(this,nt).variables,b(this,nt).context),(s=(i=b(this,ir)).onSettled)==null||s.call(i,t.data,null,b(this,nt).variables,b(this,nt).context)):(t==null?void 0:t.type)==="error"&&((a=(o=b(this,ir)).onError)==null||a.call(o,t.error,b(this,nt).variables,b(this,nt).context),(u=(l=b(this,ir)).onSettled)==null||u.call(l,void 0,t.error,b(this,nt).variables,b(this,nt).context))),this.listeners.forEach(c=>{c(b(this,nt))})})},Jd),Ih=Q.createContext(void 0),mi=e=>{const t=Q.useContext(Ih);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fy=({client:e,children:t})=>(Q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Q.createElement(Ih.Provider,{value:e},t)),$h=Q.createContext(!1),Ry=()=>Q.useContext($h);$h.Provider;function jy(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ny=Q.createContext(jy()),Ly=()=>Q.useContext(Ny);function Fh(e,t){return typeof e=="function"?e(...t):!!e}var Dy=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},By=e=>{Q.useEffect(()=>{e.clearReset()},[e])},Hy=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&Fh(r,[e.error,n]),Uy=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Gy=(e,t)=>e.isLoading&&e.isFetching&&!t,zy=(e,t,r)=>(e==null?void 0:e.suspense)&&Gy(t,r),qy=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Vy(e,t,r){const n=mi(r),i=Ry(),s=Ly(),o=n.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",Uy(o),Dy(o,s),By(s);const[a]=Q.useState(()=>new t(n,o)),l=a.getOptimisticResult(o);if(Q.useSyncExternalStore(Q.useCallback(u=>{const c=i?()=>{}:a.subscribe(Re.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),Q.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),zy(o,l,i))throw qy(o,a,s);if(Hy({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function Rh(e,t){return Vy(e,Oy,t)}function Ir(e,t){const r=mi(t),[n]=Q.useState(()=>new $y(r,e));Q.useEffect(()=>{n.setOptions(e)},[n,e]);const i=Q.useSyncExternalStore(Q.useCallback(o=>n.subscribe(Re.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=Q.useCallback((o,a)=>{n.mutate(o,a).catch(Qy)},[n]);if(i.error&&Fh(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function Qy(){}var K={context:void 0,registry:void 0};function Li(e){K.context=e}var Wy=(e,t)=>e===t,Wi=Symbol("solid-proxy"),Dc=Symbol("solid-track"),Xy=Symbol("solid-dev-component"),wo={equals:Wy},jh=Bh,ur=1,xo=2,Nh={owned:null,cleanups:null,context:null,owner:null},el={},xe=null,tl=null,me=null,Je=null,lr=null,Qo=0,[Yy,F1]=st(!1);function $r(e,t){const r=me,n=xe,i=e.length===0,s=i?Nh:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},o=i?e:()=>e(()=>je(()=>Xo(s)));xe=s,me=null;try{return Qt(o,!0)}finally{me=r,xe=n}}function st(e,t){t=t?Object.assign({},wo,t):wo;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),Dh(r,i));return[Lh.bind(r),n]}function Kl(e,t,r){const n=Wo(e,t,!0,ur);gi(n)}function Fr(e,t,r){const n=Wo(e,t,!1,ur);gi(n)}function Bc(e,t,r){jh=u0;const n=Wo(e,t,!1,ur);(!r||!r.render)&&(n.user=!0),lr?lr.push(n):gi(n)}function at(e,t,r){r=r?Object.assign({},wo,r):wo;const n=Wo(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,gi(n),Lh.bind(n)}function Jy(e,t,r){let n,i,s;arguments.length===2&&typeof t=="object"||arguments.length===1?(n=!0,i=e,s=t||{}):(n=e,i=t,s=r||{});let o=null,a=el,l=null,u=!1,c="initialValue"in s,h=typeof n=="function"&&at(n);const m=new Set,[f,p]=(s.storage||st)(s.initialValue),[v,x]=st(void 0),[S,k]=st(void 0,{equals:!1}),[T,P]=st(c?"ready":"unresolved");if(K.context){l=`${K.context.id}${K.context.count++}`;let I;s.ssrLoadFrom==="initial"?a=s.initialValue:K.load&&(I=K.load(l))&&(a=I[0])}function y(I,R,N,z){return o===I&&(o=null,z!==void 0&&(c=!0),(I===a||R===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(z,{value:R})),a=el,O(R,N)),R}function O(I,R){Qt(()=>{R===void 0&&p(()=>I),P(R!==void 0?"errored":c?"ready":"unresolved"),x(R);for(const N of m.keys())N.decrement();m.clear()},!1)}function M(){const I=a0,R=f(),N=v();if(N!==void 0&&!o)throw N;return me&&!me.user&&I&&Kl(()=>{S(),o&&(I.resolved||m.has(I)||(I.increment(),m.add(I)))}),R}function E(I=!0){if(I!==!1&&u)return;u=!1;const R=h?h():n;if(R==null||R===!1){y(o,je(f));return}const N=a!==el?a:je(()=>i(R,{value:f(),refetching:I}));return typeof N!="object"||!(N&&"then"in N)?(y(o,N,void 0,R),N):(o=N,u=!0,queueMicrotask(()=>u=!1),Qt(()=>{P(c?"refreshing":"pending"),k()},!1),N.then(z=>y(N,z,void 0,R),z=>y(N,void 0,Uh(z),R)))}return Object.defineProperties(M,{state:{get:()=>T()},error:{get:()=>v()},loading:{get(){const I=T();return I==="pending"||I==="refreshing"}},latest:{get(){if(!c)return M();const I=v();if(I&&!o)throw I;return f()}}}),h?Kl(()=>E(!1)):E(!1),[M,{refetch:E,mutate:p}]}function Ky(e){return Qt(e,!1)}function je(e){if(me===null)return e();const t=me;me=null;try{return e()}finally{me=t}}function Zy(e,t,r){const n=Array.isArray(e);let i,s=r&&r.defer;return o=>{let a;if(n){a=Array(e.length);for(let u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s){s=!1;return}const l=je(()=>t(a,i,o));return i=a,l}}function e0(e){Bc(()=>je(e))}function Xi(e){return xe===null||(xe.cleanups===null?xe.cleanups=[e]:xe.cleanups.push(e)),e}function t0(){return me}function Xu(){return xe}function r0(e,t){const r=xe,n=me;xe=e,me=null;try{return Qt(t,!0)}catch(i){Uc(i)}finally{xe=r,me=n}}function n0(e){const t=me,r=xe;return Promise.resolve().then(()=>{me=t,xe=r;let n;return Qt(e,!1),me=xe=null,n?n.done:void 0})}function i0(){return[Yy,n0]}function s0(e,t){const r=Symbol("context");return{id:r,Provider:d0(r),defaultValue:e}}function o0(e){let t;return(t=Gh(xe,e.id))!==void 0?t:e.defaultValue}function Hc(e){const t=at(e),r=at(()=>Zl(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var a0;function Lh(){if(this.sources&&this.state)if(this.state===ur)gi(this);else{const e=Je;Je=null,Qt(()=>Eo(this),!1),Je=e}if(me){const e=this.observers?this.observers.length:0;me.sources?(me.sources.push(this),me.sourceSlots.push(e)):(me.sources=[this],me.sourceSlots=[e]),this.observers?(this.observers.push(me),this.observerSlots.push(me.sources.length-1)):(this.observers=[me],this.observerSlots=[me.sources.length-1])}return this.value}function Dh(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Qt(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=tl&&tl.running;o&&tl.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Je.push(s):lr.push(s),s.observers&&Hh(s)),o||(s.state=ur)}if(Je.length>1e6)throw Je=[],new Error},!1)),t}function gi(e){if(!e.fn)return;Xo(e);const t=xe,r=me,n=Qo;me=xe=e,l0(e,e.value,n),me=r,xe=t}function l0(e,t,r){let n;try{n=e.fn(t)}catch(i){return e.pure&&(e.state=ur,e.owned&&e.owned.forEach(Xo),e.owned=null),e.updatedAt=r+1,Uc(i)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Dh(e,n):e.value=n,e.updatedAt=r)}function Wo(e,t,r,n=ur,i){const s={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:xe,context:null,pure:r};return xe===null||xe!==Nh&&(xe.owned?xe.owned.push(s):xe.owned=[s]),s}function So(e){if(e.state===0)return;if(e.state===xo)return Eo(e);if(e.suspense&&je(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Qo);)e.state&&t.push(e);for(let r=t.length-1;r>=0;r--)if(e=t[r],e.state===ur)gi(e);else if(e.state===xo){const n=Je;Je=null,Qt(()=>Eo(e,t[0]),!1),Je=n}}function Qt(e,t){if(Je)return e();let r=!1;t||(Je=[]),lr?r=!0:lr=[],Qo++;try{const n=e();return c0(r),n}catch(n){r||(lr=null),Je=null,Uc(n)}}function c0(e){if(Je&&(Bh(Je),Je=null),e)return;const t=lr;lr=null,t.length&&Qt(()=>jh(t),!1)}function Bh(e){for(let t=0;t<e.length;t++)So(e[t])}function u0(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:So(n)}if(K.context){if(K.count){K.effects||(K.effects=[]),K.effects.push(...e.slice(0,r));return}else K.effects&&(e=[...K.effects,...e],r+=K.effects.length,delete K.effects);Li()}for(t=0;t<r;t++)So(e[t])}function Eo(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){const n=e.sources[r];if(n.sources){const i=n.state;i===ur?n!==t&&(!n.updatedAt||n.updatedAt<Qo)&&So(n):i===xo&&Eo(n,t)}}}function Hh(e){for(let t=0;t<e.observers.length;t+=1){const r=e.observers[t];r.state||(r.state=xo,r.pure?Je.push(r):lr.push(r),r.observers&&Hh(r))}}function Xo(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),i=r.observers;if(i&&i.length){const s=i.pop(),o=r.observerSlots.pop();n<i.length&&(s.sourceSlots[o]=n,i[n]=s,r.observerSlots[n]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Xo(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function Uh(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Uc(e,t=xe){throw Uh(e)}function Gh(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Gh(e.owner,t):void 0}function Zl(e){if(typeof e=="function"&&!e.length)return Zl(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=Zl(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function d0(e,t){return function(n){let i;return Fr(()=>i=je(()=>(xe.context={[e]:n.value},Hc(()=>n.children))),void 0),i}}var ec=Symbol("fallback");function ko(e){for(let t=0;t<e.length;t++)e[t]()}function f0(e,t,r={}){let n=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Xi(()=>ko(s)),()=>{let l=e()||[],u,c;return l[Dc],je(()=>{let m=l.length,f,p,v,x,S,k,T,P,y;if(m===0)o!==0&&(ko(s),s=[],n=[],i=[],o=0,a&&(a=[])),r.fallback&&(n=[ec],i[0]=$r(O=>(s[0]=O,r.fallback())),o=1);else if(o===0){for(i=new Array(m),c=0;c<m;c++)n[c]=l[c],i[c]=$r(h);o=m}else{for(v=new Array(m),x=new Array(m),a&&(S=new Array(m)),k=0,T=Math.min(o,m);k<T&&n[k]===l[k];k++);for(T=o-1,P=m-1;T>=k&&P>=k&&n[T]===l[P];T--,P--)v[P]=i[T],x[P]=s[T],a&&(S[P]=a[T]);for(f=new Map,p=new Array(P+1),c=P;c>=k;c--)y=l[c],u=f.get(y),p[c]=u===void 0?-1:u,f.set(y,c);for(u=k;u<=T;u++)y=n[u],c=f.get(y),c!==void 0&&c!==-1?(v[c]=i[u],x[c]=s[u],a&&(S[c]=a[u]),c=p[c],f.set(y,c)):s[u]();for(c=k;c<m;c++)c in v?(i[c]=v[c],s[c]=x[c],a&&(a[c]=S[c],a[c](c))):i[c]=$r(h);i=i.slice(0,o=m),n=l.slice(0)}return i});function h(m){if(s[c]=m,a){const[f,p]=st(c);return a[c]=p,t(l[c],f)}return t(l[c])}}}function h0(e,t,r={}){let n=[],i=[],s=[],o=[],a=0,l;return Xi(()=>ko(s)),()=>{const u=e()||[];return u[Dc],je(()=>{if(u.length===0)return a!==0&&(ko(s),s=[],n=[],i=[],a=0,o=[]),r.fallback&&(n=[ec],i[0]=$r(h=>(s[0]=h,r.fallback())),a=1),i;for(n[0]===ec&&(s[0](),s=[],n=[],i=[],a=0),l=0;l<u.length;l++)l<n.length&&n[l]!==u[l]?o[l](()=>u[l]):l>=n.length&&(i[l]=$r(c));for(;l<n.length;l++)s[l]();return a=o.length=s.length=u.length,n=u.slice(0),i=i.slice(0,a)});function c(h){s[l]=h;const[m,f]=st(u[l]);return o[l]=f,t(m,l)}}}function zh(e,t){return je(()=>e(t||{}))}function qs(){return!0}var tc={get(e,t,r){return t===Wi?r:e.get(t)},has(e,t){return t===Wi?!0:e.has(t)},set:qs,deleteProperty:qs,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:qs,deleteProperty:qs}},ownKeys(e){return e.keys()}};function rl(e){return(e=typeof e=="function"?e():e)?e:{}}function p0(){for(let e=0,t=this.length;e<t;++e){const r=this[e]();if(r!==void 0)return r}}function qh(...e){let t=!1;for(let s=0;s<e.length;s++){const o=e[s];t=t||!!o&&Wi in o,e[s]=typeof o=="function"?(t=!0,at(o)):o}if(t)return new Proxy({get(s){for(let o=e.length-1;o>=0;o--){const a=rl(e[o])[s];if(a!==void 0)return a}},has(s){for(let o=e.length-1;o>=0;o--)if(s in rl(e[o]))return!0;return!1},keys(){const s=[];for(let o=0;o<e.length;o++)s.push(...Object.keys(rl(e[o])));return[...new Set(s)]}},tc);const r={},n={},i=new Set;for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o)continue;const a=Object.getOwnPropertyNames(o);for(let l=0,u=a.length;l<u;l++){const c=a[l];if(c==="__proto__"||c==="constructor")continue;const h=Object.getOwnPropertyDescriptor(o,c);if(!i.has(c))h.get?(i.add(c),Object.defineProperty(r,c,{enumerable:!0,configurable:!0,get:p0.bind(n[c]=[h.get.bind(o)])})):(h.value!==void 0&&i.add(c),r[c]=h.value);else{const m=n[c];m?h.get?m.push(h.get.bind(o)):h.value!==void 0&&m.push(()=>h.value):r[c]===void 0&&(r[c]=h.value)}}}return r}function Vh(e,...t){if(Wi in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},tc));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},tc)),s}const r={},n=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const u of t)u.includes(i)&&(a=!0,o?n[l][i]=s.value:Object.defineProperty(n[l],i,s)),++l;a||(o?r[i]=s.value:Object.defineProperty(r,i,s))}return[...n,r]}function m0(e){let t,r;const n=i=>{const s=K.context;if(s){const[a,l]=st();K.count||(K.count=0),K.count++,(r||(r=e())).then(u=>{Li(s),K.count--,l(()=>u.default),Li()}),t=a}else if(!t){const[a]=Jy(()=>(r||(r=e())).then(l=>l.default));t=a}let o;return at(()=>(o=t())&&je(()=>{if(!s)return o(i);const a=K.context;Li(s);const l=o(i);return Li(a),l}))};return n.preload=()=>r||((r=e()).then(i=>t=()=>i.default),r),n}var g0=0;function v0(){const e=K.context;return e?`${e.id}${e.count++}`:`cl-${g0++}`}var Qh=e=>`Stale read from <${e}>.`;function _0(e){const t="fallback"in e&&{fallback:()=>e.fallback};return at(f0(()=>e.each,e.children,t||void 0))}function y0(e){const t="fallback"in e&&{fallback:()=>e.fallback};return at(h0(()=>e.each,e.children,t||void 0))}function b0(e){const t=e.keyed,r=at(()=>e.when,void 0,{equals:(n,i)=>t?n===i:!n==!i});return at(()=>{const n=r();if(n){const i=e.children;return typeof i=="function"&&i.length>0?je(()=>i(t?n:()=>{if(!je(r))throw Qh("Show");return e.when})):i}return e.fallback},void 0,void 0)}function w0(e){let t=!1;const r=(s,o)=>s[0]===o[0]&&(t?s[1]===o[1]:!s[1]==!o[1])&&s[2]===o[2],n=Hc(()=>e.children),i=at(()=>{let s=n();Array.isArray(s)||(s=[s]);for(let o=0;o<s.length;o++){const a=s[o].when;if(a)return t=!!s[o].keyed,[o,a,s[o]]}return[-1]},void 0,{equals:r});return at(()=>{const[s,o,a]=i();if(s<0)return e.fallback;const l=a.children;return typeof l=="function"&&l.length>0?je(()=>l(t?o:()=>{if(je(i)[0]!==s)throw Qh("Match");return a.when})):l},void 0,void 0)}function x0(e){return e}var S0=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],E0=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...S0]),k0=new Set(["innerHTML","textContent","innerText","children"]),T0=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),C0=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function P0(e,t){const r=C0[e];return typeof r=="object"?r[t]?r.$:void 0:r}var A0=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),O0=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),M0={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function I0(e,t,r){let n=r.length,i=t.length,s=n,o=0,a=0,l=t[i-1].nextSibling,u=null;for(;o<i||a<s;){if(t[o]===r[a]){o++,a++;continue}for(;t[i-1]===r[s-1];)i--,s--;if(i===o){const c=s<n?a?r[a-1].nextSibling:r[s-a]:l;for(;a<s;)e.insertBefore(r[a++],c)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===r[s-1]&&r[a]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(r[a++],t[o++].nextSibling),e.insertBefore(r[--s],c),t[i]=r[s]}else{if(!u){u=new Map;let h=a;for(;h<s;)u.set(r[h],h++)}const c=u.get(t[o]);if(c!=null)if(a<c&&c<s){let h=o,m=1,f;for(;++h<i&&h<s&&!((f=u.get(t[h]))==null||f!==c+m);)m++;if(m>c-a){const p=t[o];for(;a<c;)e.insertBefore(r[a++],p)}else e.replaceChild(r[a++],t[o++])}else o++;else t[o++].remove()}}}var Yu="_$DX_DELEGATE";function $0(e,t,r,n={}){let i;return $r(s=>{i=s,t===document?e():Co(t,e(),t.firstChild?null:void 0,r)},n.owner),()=>{i(),t.textContent=""}}function F0(e,t,r){let n;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,r?o.content.firstChild.firstChild:o.content.firstChild},s=t?()=>je(()=>document.importNode(n||(n=i()),!0)):()=>(n||(n=i())).cloneNode(!0);return s.cloneNode=s,s}function Wh(e,t=window.document){const r=t[Yu]||(t[Yu]=new Set);for(let n=0,i=e.length;n<i;n++){const s=e[n];r.has(s)||(r.add(s),t.addEventListener(s,U0))}}function To(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function R0(e,t,r,n){n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n)}function Xh(e,t){t==null?e.removeAttribute("class"):e.className=t}function Yh(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){const i=r[0];e.addEventListener(t,r[0]=s=>i.call(e,r[1],s))}else e.addEventListener(t,r)}function j0(e,t,r={}){const n=Object.keys(t||{}),i=Object.keys(r);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Ju(e,a,!1),delete r[a])}for(s=0,o=n.length;s<o;s++){const a=n[s],l=!!t[a];!a||a==="undefined"||r[a]===l||!l||(Ju(e,a,!0),r[a]=l)}return r}function N0(e,t,r){if(!t)return r?To(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let i,s;for(s in r)t[s]==null&&n.removeProperty(s),delete r[s];for(s in t)i=t[s],i!==r[s]&&(n.setProperty(s,i),r[s]=i);return r}function Jh(e,t={},r,n){const i={};return n||Fr(()=>i.children=ui(e,t.children,i.children)),Fr(()=>t.ref&&t.ref(e)),Fr(()=>D0(e,t,r,!0,i,!0)),i}function L0(e,t,r){return je(()=>e(t,r))}function Co(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return ui(e,t,n,r);Fr(i=>ui(e,t(),i,r),n)}function D0(e,t,r,n,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Ku(e,o,null,i[o],r,s)}for(const o in t){if(o==="children"){n||ui(e,t.children);continue}const a=t[o];i[o]=Ku(e,o,a,i[o],r,s)}}function B0(e){let t,r;if(!K.context||!(t=K.registry.get(r=G0()))){if(K.context,!e)throw new Error("Unrecoverable Hydration Mismatch. No template for key: "+r);return e()}return K.completed&&K.completed.add(t),K.registry.delete(r),t}function H0(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Ju(e,t,r){const n=t.trim().split(/\s+/);for(let i=0,s=n.length;i<s;i++)e.classList.toggle(n[i],r)}function Ku(e,t,r,n,i,s){let o,a,l,u,c;if(t==="style")return N0(e,r,n);if(t==="classList")return j0(e,r,n);if(r===n)return n;if(t==="ref")s||r(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);n&&e.removeEventListener(h,n),r&&e.addEventListener(h,r)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);n&&e.removeEventListener(h,n,!0),r&&e.addEventListener(h,r,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),m=A0.has(h);if(!m&&n){const f=Array.isArray(n)?n[0]:n;e.removeEventListener(h,f)}(m||r)&&(Yh(e,h,r,m),m&&Wh([h]))}else if(t.slice(0,5)==="attr:")To(e,t.slice(5),r);else if((c=t.slice(0,5)==="prop:")||(l=k0.has(t))||!i&&((u=P0(t,e.tagName))||(a=E0.has(t)))||(o=e.nodeName.includes("-")))c&&(t=t.slice(5),a=!0),t==="class"||t==="className"?Xh(e,r):o&&!a&&!l?e[H0(t)]=r:e[u||t]=r;else{const h=i&&t.indexOf(":")>-1&&M0[t.split(":")[0]];h?R0(e,h,t,r):To(e,T0[t]||t,r)}return r}function U0(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),K.registry&&!K.done&&(K.done=_$HY.done=!0);r;){const n=r[t];if(n&&!r.disabled){const i=r[`${t}Data`];if(i!==void 0?n.call(r,i,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function ui(e,t,r,n,i){if(K.context){!r&&(r=[...e.childNodes]);let a=[];for(let l=0;l<r.length;l++){const u=r[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():a.push(u)}r=a}for(;typeof r=="function";)r=r();if(t===r)return r;const s=typeof t,o=n!==void 0;if(e=o&&r[0]&&r[0].parentNode||e,s==="string"||s==="number"){if(K.context)return r;if(s==="number"&&(t=t.toString()),o){let a=r[0];a&&a.nodeType===3?a.data=t:a=document.createTextNode(t),r=Mn(e,r,n,a)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||s==="boolean"){if(K.context)return r;r=Mn(e,r,n)}else{if(s==="function")return Fr(()=>{let a=t();for(;typeof a=="function";)a=a();r=ui(e,a,r,n)}),()=>r;if(Array.isArray(t)){const a=[],l=r&&Array.isArray(r);if(rc(a,t,r,i))return Fr(()=>r=ui(e,a,r,n,!0)),()=>r;if(K.context){if(!a.length)return r;for(let u=0;u<a.length;u++)if(a[u].parentNode)return r=a}if(a.length===0){if(r=Mn(e,r,n),o)return r}else l?r.length===0?Zu(e,a,n):I0(e,r,a):(r&&Mn(e),Zu(e,a));r=a}else if(t.nodeType){if(K.context&&t.parentNode)return r=o?[t]:t;if(Array.isArray(r)){if(o)return r=Mn(e,r,n,t);Mn(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function rc(e,t,r,n){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=r&&r[s],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=rc(e,a,l)||i;else if(u==="function")if(n){for(;typeof a=="function";)a=a();i=rc(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return i}function Zu(e,t,r=null){for(let n=0,i=t.length;n<i;n++)e.insertBefore(t[n],r)}function Mn(e,t,r,n){if(r===void 0)return e.textContent="";const i=n||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,r):l&&a.remove()}else s=!0}}else e.insertBefore(i,r);return[i]}function G0(){const e=K.context;return`${e.id}${e.count++}`}var z0="http://www.w3.org/2000/svg";function Kh(e,t=!1){return t?document.createElementNS(z0,e):document.createElement(e)}function q0(e){const{useShadow:t}=e,r=document.createTextNode(""),n=()=>e.mount||document.body,i=Xu();let s,o=!!K.context;return Bc(()=>{o&&(Xu().user=o=!1),s||(s=r0(i,()=>at(()=>e.children)));const a=n();if(a instanceof HTMLHeadElement){const[l,u]=st(!1),c=()=>u(!0);$r(h=>Co(a,()=>l()?h():s(),null)),Xi(c)}else{const l=Kh(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return r.parentNode},configurable:!0}),Co(u,s),a.appendChild(l),e.ref&&e.ref(l),Xi(()=>a.removeChild(l))}},void 0,{render:!o}),r}function V0(e){const[t,r]=Vh(e,["component"]),n=at(()=>t.component);return at(()=>{const i=n();switch(typeof i){case"function":return Object.assign(i,{[Xy]:!0}),je(()=>i(r));case"string":const s=O0.has(i),o=K.context?B0():Kh(i,s);return Jh(o,r,s),o}})}var ti,ds,fs,hs,on,ri,ni,ii,si,oi,ps,Kd,Q0=(Kd=class{constructor(e){F(this,ti,void 0);F(this,ds,void 0);F(this,fs,void 0);F(this,hs,void 0);F(this,on,!1);F(this,ri,void 0);F(this,ni,void 0);F(this,ii,void 0);F(this,si,void 0);F(this,oi,void 0);F(this,ps,void 0);const{client:t,queryFlavor:r,version:n,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l}=e;$(this,ti,st(t)),$(this,fs,r),$(this,hs,n),$(this,ds,i),$(this,ri,st(s)),$(this,ni,st(o)),$(this,ii,st(a)),$(this,si,st(l))}setButtonPosition(e){b(this,ri)[1](e)}setPosition(e){b(this,ni)[1](e)}setInitialIsOpen(e){b(this,ii)[1](e)}setErrorTypes(e){b(this,si)[1](e)}setClient(e){b(this,ti)[1](e)}mount(e){if(b(this,on))throw new Error("Devtools is already mounted");const t=$0(()=>{const[r]=b(this,ri),[n]=b(this,ni),[i]=b(this,ii),[s]=b(this,si),[o]=b(this,ti);let a;b(this,oi)?a=b(this,oi):(a=m0(()=>Promise.resolve().then(()=>require("./4TNE5QTO-f73ecbf4.js"))),$(this,oi,a));const l=this;return zh(a,qh({get queryFlavor(){return b(l,fs)},get version(){return b(l,hs)},get onlineManager(){return b(l,ds)}},{get client(){return o()},get buttonPosition(){return r()},get position(){return n()},get initialIsOpen(){return i()},get errorTypes(){return s()}}))},e);$(this,on,!0),$(this,ps,t)}unmount(){var e;if(!b(this,on))throw new Error("Devtools is not mounted");(e=b(this,ps))==null||e.call(this),$(this,on,!1)}},ti=new WeakMap,ds=new WeakMap,fs=new WeakMap,hs=new WeakMap,on=new WeakMap,ri=new WeakMap,ni=new WeakMap,ii=new WeakMap,si=new WeakMap,oi=new WeakMap,ps=new WeakMap,Kd);function W0(e){const t=mi(),r=e.client||t,n=C.useRef(null),{buttonPosition:i,position:s,initialIsOpen:o,errorTypes:a}=e,[l]=C.useState(new Q0({client:r,queryFlavor:"React Query",version:"5",onlineManager:Qi,buttonPosition:i,position:s,initialIsOpen:o,errorTypes:a}));return C.useEffect(()=>{l.setClient(r)},[r,l]),C.useEffect(()=>{i&&l.setButtonPosition(i)},[i,l]),C.useEffect(()=>{s&&l.setPosition(s)},[s,l]),C.useEffect(()=>{l.setInitialIsOpen(o||!1)},[o,l]),C.useEffect(()=>{l.setErrorTypes(a||[])},[a,l]),C.useEffect(()=>(n.current&&l.mount(n.current),()=>{l.unmount()}),[l]),C.createElement("div",{className:"tsqd-parent-container",ref:n})}var X0=process.env.NODE_ENV!=="development"?function(){return null}:W0;const Zh=({children:e,showDevTools:t=!0})=>{const r=new Ay({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return g.jsxs(Fy,{client:r,children:[e,t&&g.jsx(X0,{initialIsOpen:!1})]})};function ed(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(n){H(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nc(e){return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ie(e,t,r){return t&&td(e.prototype,t),r&&td(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ep(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ic(e,t)}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Po(e)}function ic(e,t){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ic(e,t)}function Y0(e,t){if(e==null)return{};var r,n,i=function(o,a){if(o==null)return{};var l,u,c={},h=Object.keys(o);for(u=0;u<h.length;u++)l=h[u],a.indexOf(l)>=0||(c[l]=o[l]);return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function J0(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e)}function tp(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=Po(e);if(t){var i=Po(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return J0(this,r)}}function ws(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,a=[],l=!0,u=!1;try{for(i=i.call(r);!(l=(s=i.next()).done)&&(a.push(s.value),!n||a.length!==n);l=!0);}catch(c){u=!0,o=c}finally{try{l||i.return==null||i.return()}finally{if(u)throw o}}return a}}(e,t)||Gc(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
60
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sc(e){return function(t){if(Array.isArray(t))return oc(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Gc(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
61
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gc(e,t){if(e){if(typeof e=="string")return oc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oc(e,t):void 0}}function oc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dn(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Gc(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||r.return==null||r.return()}finally{if(a)throw s}}}}var fn={DEBUG:!1,LIB_VERSION:"1.87.6"},K0=Array.isArray,rp=Object.prototype,np=rp.hasOwnProperty,xs=rp.toString,Ge=K0||function(e){return xs.call(e)==="[object Array]"},rd=function(e){return xs.call(e)==="[object Uint8Array]"},hn=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}},Rr=function(e){return e===Object(e)&&!Ge(e)},Z0=function(e){if(Rr(e)){for(var t in e)if(np.call(e,t))return!1;return!0}return!1},se=function(e){return e===void 0},gt=function(e){return xs.call(e)=="[object String]"},Wt=function(e){return e===null},sr=function(e){return xs.call(e)=="[object Number]"},ac=function(e){return xs.call(e)==="[object Boolean]"},ip=Array.prototype,nd=ip.forEach,id=ip.indexOf,U=typeof window<"u"?window:{},eb=U.navigator||{userAgent:""},Ce=U.document||{},dt=eb.userAgent,sd="[PostHog.js]",j={_log:function(e){if((fn.DEBUG||U.POSTHOG_DEBUG)&&!se(U.console)&&U.console){for(var t=("__rrweb_original__"in U.console[e])?U.console[e].__rrweb_original__:U.console[e],r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];t.apply(void 0,[sd].concat(n))}},info:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];j._log.apply(j,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];j._log.apply(j,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];j._log.apply(j,["error"].concat(t))},critical:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=console).error.apply(e,[sd].concat(r))},uninitializedWarning:function(e){j.error("You must initialize PostHog before calling ".concat(e))}},zc={},lc=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Ln(e,t,r){if(Ge(e)){if(nd&&e.forEach===nd)e.forEach(t,r);else if("length"in e&&e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n)===zc)return}}}function be(e,t,r){if(!Wt(e)&&!se(e)){if(Ge(e))return Ln(e,t,r);for(var n in e)if(np.call(e,n)&&t.call(r,e[n],n)===zc)return}}var Xe=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Ln(r,function(i){for(var s in i)i[s]!==void 0&&(e[s]=i[s])}),e};function de(e,t){return e.indexOf(t)!==-1}var sp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},od=function(e){try{return e()}catch{return}},op=function(e){return function(){try{for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.apply(this,r)}catch(i){j.critical("Implementation error. Please turn on debug and contact support@posthog.com."),j.critical(i)}}},cc=function(e){var t={};return be(e,function(r,n){gt(r)&&r.length>0&&(t[n]=r)}),t},tb=["$performance_raw"];function rb(e,t){return r=e,n=function(s,o){return o&&tb.indexOf(o)>-1?s:gt(s)&&!Wt(t)?s.slice(0,t):s},i=new Set,function s(o,a){return o!==Object(o)?n?n(o,a):o:i.has(o)?void 0:(i.add(o),Ge(o)?(l=[],Ln(o,function(u){l.push(s(u))})):(l={},be(o,function(u,c){i.has(u)||(l[c]=s(u,c))})),l);var l}(r);var r,n,i}function qc(e){var t,r,n,i,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;e=nb(e);do t=(s=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=s>>12&63,n=s>>6&63,i=63&s,c[l++]=o.charAt(t)+o.charAt(r)+o.charAt(n)+o.charAt(i);while(a<e.length);switch(u=c.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}var nb=function(e){var t,r,n,i,s="";for(t=r=0,n=(e=(e+"").replace(/\r\n/g,`
63
+ `).replace(/\r/g,`
64
+ `)).length,i=0;i<n;i++){var o=e.charCodeAt(i),a=null;o<128?r++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Wt(a)||(r>t&&(s+=e.substring(t,r)),s+=a,t=r=i+1)}return r>t&&(s+=e.substring(t,e.length)),s},ib=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"],sb=function(e,t){if(!e)return!1;var r=e.toLowerCase();return ib.concat(t||[]).some(function(n){var i=n.toLowerCase();return r.includes?r.includes(i):r.indexOf(i)!==-1})},Bi=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,r,n,i,s){if(t)if(t.addEventListener&&!i)t.addEventListener(r,n,!!s);else{var o="on"+r,a=t[o];t[o]=function(l,u,c){return function(h){if(h=h||e(window.event)){var m,f=!0;hn(c)&&(m=c(h));var p=u.call(l,h);return m!==!1&&p!==!1||(f=!1),f}}}(t,n,a)}else j.error("No valid element provided to register_event")}}();function Hi(e,t){var r=function(){var n=Ce.createElement("script");n.type="text/javascript",n.src=e,n.onload=function(o){return t(void 0,o)},n.onerror=function(o){return t(o)};var i,s=Ce.querySelectorAll("body > script");s.length>0?(i=s[0].parentNode)===null||i===void 0||i.insertBefore(n,s[0]):Ce.body.appendChild(n)};Ce.body?r():Ce.addEventListener("DOMContentLoaded",r)}function Ao(e){switch(nc(e.className)){case"string":return e.className;case"object":return("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function Oo(e){var t="";return ao(e)&&!lp(e)&&e.childNodes&&e.childNodes.length&&be(e.childNodes,function(r){ap(r)&&r.textContent&&(t+=lc(r.textContent).split(/(\s+)/).filter($n).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),lc(t)}function ad(e){return!!e&&e.nodeType===1}function an(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ap(e){return!!e&&e.nodeType===3}function ld(e){return!!e&&e.nodeType===11}var nl=["a","button","form","input","select","textarea","label"];function ao(e){for(var t=e;t.parentNode&&!an(t,"body");t=t.parentNode){var r=Ao(t).split(" ");if(de(r,"ph-sensitive")||de(r,"ph-no-capture"))return!1}if(de(Ao(e).split(" "),"ph-include"))return!0;var n=e.type||"";if(gt(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!(gt(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function lp(e){return!!(an(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||an(e,"select")||an(e,"textarea")||e.getAttribute("contenteditable")==="true")}function $n(e){return!(Wt(e)||se(e)||gt(e)&&(e=lc(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))}function cd(e){var t=Oo(e);return $n(t="".concat(t," ").concat(cp(e)).trim())?t:""}function cp(e){var t="";return e&&e.childNodes&&e.childNodes.length&&be(e.childNodes,function(r){var n;if(r&&((n=r.tagName)===null||n===void 0?void 0:n.toLowerCase())==="span")try{var i=Oo(r);t="".concat(t," ").concat(i).trim(),r.childNodes&&r.childNodes.length&&(t="".concat(t," ").concat(cp(r)).trim())}catch(s){j.error(s)}}),t}var ob=function(){function e(t){Me(this,e),this.clicks=[],this.enabled=t}return Ie(e,[{key:"isRageClick",value:function(t,r,n){if(!this.enabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(r-i.y)<30&&n-i.timestamp<1e3){if(this.clicks.push({x:t,y:r,timestamp:n}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:r,timestamp:n}];return!1}}]),e}(),up="$people_distinct_id",lo="__alias",Di="__timers",ud="$autocapture_disabled_server_side",uc="$session_recording_enabled_server_side",dd="$console_log_recording_enabled_server_side",fd="$session_recording_recorder_version_server_side",Mo="$sesid",co="$session_is_sampled",Fn="$enabled_feature_flags",dc="$early_access_features",Rn="$stored_person_properties",wr="$stored_group_properties",fc="$surveys",Io="$flag_call_reported",hc="$user_state",pc="$posthog_quota_limited",ab=[up,lo,"__cmpns",Di,uc,Mo,Fn,hc,pc,dc,wr,Rn,fc,Io];function il(e,t){return t.length>e?t.slice(0,e)+"...":t}var xr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(e){var t,r=Wt(this._isDisabledServerSide)?!((t=e.persistence)===null||t===void 0||!t.props[ud]):this._isDisabledServerSide,n=!!e.config.autocapture;this._isAutocaptureEnabled=n&&!r},_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ad(t));return t},_getAugmentPropertiesFromElement:function(e){if(!ao(e))return{};var t={};return be(e.attributes,function(r){if(r.name.indexOf("data-ph-capture-attribute")===0){var n=r.name.replace("data-ph-capture-attribute-",""),i=r.value;n&&i&&$n(i)&&(t[n]=i)}}),t},_getPropertiesFromElement:function(e,t,r){var n,i=e.tagName.toLowerCase(),s={tag_name:i};nl.indexOf(i)>-1&&!r&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=il(1024,cd(e)):s.$el_text=il(1024,Oo(e)));var o=Ao(e);o.length>0&&(s.classes=o.split(" ").filter(function(h){return h!==""}));var a=(n=this.config)===null||n===void 0?void 0:n.element_attribute_ignorelist;be(e.attributes,function(h){var m;lp(e)&&["name","id","class"].indexOf(h.name)===-1||a!=null&&a.includes(h.name)||!t&&$n(h.value)&&(m=h.name,!gt(m)||m.substring(0,10)!=="_ngcontent"&&m.substring(0,7)!=="_nghost")&&(s["attr__"+h.name]=il(1024,h.value))});for(var l=1,u=1,c=e;c=this._previousElementSibling(c);)l++,c.tagName===e.tagName&&u++;return s.nth_child=l,s.nth_of_type=u,s},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return be(document.querySelectorAll(e.css_selector),function(r){var n;["input","select"].indexOf(r.tagName.toLowerCase())>-1?n=r.value:r.textContent&&(n=r.textContent),$n(n)&&t.push(n)}),t.join(", ")},_getCustomProperties:function(e){var t=this,r={};return be(this._customProperties,function(n){be(n.event_selectors,function(i){be(document.querySelectorAll(i),function(s){de(e,s)&&ao(s)&&(r[n.name]=t._extractCustomPropertyValue(n))})})}),r},_getEventTarget:function(e){return se(e.target)?e.srcElement||null:(t=e.target)!==null&&t!==void 0&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t},_captureEvent:function(e,t){var r,n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(e);if(ap(s)&&(s=s.parentNode||null),i==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,t,"$rageclick"),s&&function(v,x){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!v||an(v,"html")||!ad(v))return!1;if(S!=null&&S.url_allowlist){var k=window.location.href,T=S.url_allowlist;if(T&&!T.some(function(q){return k.match(q)}))return!1}if(S!=null&&S.dom_event_allowlist){var P=S.dom_event_allowlist;if(P&&!P.some(function(q){return x.type===q}))return!1}if(S!=null&&S.element_allowlist){var y=S.element_allowlist;if(y&&!y.some(function(q){return v.tagName.toLowerCase()===q}))return!1}if(S!=null&&S.css_selector_allowlist){var O=S.css_selector_allowlist;if(O&&!O.some(function(q){return v.matches(q)}))return!1}for(var M=!1,E=[v],I=!0,R=v;R.parentNode&&!an(R,"body");)if(ld(R.parentNode))E.push(R.parentNode.host),R=R.parentNode.host;else{if(!(I=R.parentNode||!1))break;if(nl.indexOf(I.tagName.toLowerCase())>-1)M=!0;else{var N=window.getComputedStyle(I);N&&N.getPropertyValue("cursor")==="pointer"&&(M=!0)}E.push(I),R=I}var z=window.getComputedStyle(v);if(z&&z.getPropertyValue("cursor")==="pointer"&&x.type==="click")return!0;var Y=v.tagName.toLowerCase();switch(Y){case"html":return!1;case"form":return x.type==="submit";case"input":case"select":case"textarea":return x.type==="change"||x.type==="click";default:return M?x.type==="click":x.type==="click"&&(nl.indexOf(Y)>-1||v.getAttribute("contenteditable")==="true")}}(s,e,this.config)){for(var o,a,l=[s],u=s;u.parentNode&&!an(u,"body");)ld(u.parentNode)?(l.push(u.parentNode.host),u=u.parentNode.host):(l.push(u.parentNode),u=u.parentNode);var c,h=[],m={},f=!1;if(be(l,function(v){var x=ao(v);v.tagName.toLowerCase()==="a"&&(c=v.getAttribute("href"),c=x&&$n(c)&&c),de(Ao(v).split(" "),"ph-no-capture")&&(f=!0),h.push(n._getPropertiesFromElement(v,t.config.mask_all_element_attributes,t.config.mask_all_text));var S=n._getAugmentPropertiesFromElement(v);Xe(m,S)}),t.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?h[0].$el_text=cd(s):h[0].$el_text=Oo(s)),c&&(h[0].attr__href=c),f)return!1;var p=Xe(this._getDefaultProperties(e.type),{$elements:h},(o=h[0])!==null&&o!==void 0&&o.$el_text?{$el_text:(a=h[0])===null||a===void 0?void 0:a.$el_text}:{},this._getCustomProperties(l),m);return t.capture(i,p),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=this,r=function(n){n=n||window.event,t._captureEvent(n,e)};Bi(document,"submit",r,!1,!0),Bi(document,"change",r,!1,!0),Bi(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;ac(e.__autocapture)||(this.config=e.__autocapture),(t=this.config)!==null&&t!==void 0&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(r){return new RegExp(r)})),this.rageclicks=new ob(e.config.rageclick)},afterDecideResponse:function(e,t){var r=t.config.token;this._initializedTokens.indexOf(r)>-1?j.info('autocapture already initialized for token "'+r+'"'):(t.persistence&&t.persistence.register(H({},ud,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this._setIsAutocaptureEnabled(t),this._initializedTokens.push(r),e&&e.config&&e.config.enable_collect_everything&&this._isAutocaptureEnabled?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,r){if(!e)return!0;t=se(t)?10:t,r=se(r)?10:r;for(var n=0,i=0;i<e.length;i++)n+=e.charCodeAt(i);return n%t<r},isBrowserSupported:function(){return hn(document.querySelectorAll)}};(function(e){for(var t in e)hn(e[t])&&(e[t]=e[t].bind(e))})(xr),function(e){for(var t in e)hn(e[t])&&(e[t]=op(e[t]))}(xr);var sl="$active_feature_flags",Vs="$override_feature_flags",hd="$feature_flag_payloads",pd=function(e){var t,r={},n=dn(function(a){for(var l=Object.keys(a),u=l.length,c=new Array(u);u--;)c[u]=[l[u],a[l[u]]];return c}(e||{}));try{for(n.s();!(t=n.n()).done;){var i=ws(t.value,2),s=i[0],o=i[1];o&&(r[s]=o)}}catch(a){n.e(a)}finally{n.f()}return r},lb=function(){function e(t){Me(this,e),this.instance=t,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Ie(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var t=this.instance.get_property(Fn),r=this.instance.get_property(Vs);if(!r)return t||{};for(var n=Xe({},t),i=Object.keys(r),s=0;s<i.length;s++)r[i[s]]===!1?delete n[i[s]]:n[i[s]]=r[i[s]];return this._override_warning||(j.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:r,finalFlags:n}),this._override_warning=!0),n}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(hd)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(t){this.$anon_distinct_id=t}},{key:"setReloadingPaused",value:function(t){this.reloadFeatureFlagsInAction=t}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var t=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!t.reloadFeatureFlagsInAction&&t.reloadFeatureFlagsQueued&&(t.reloadFeatureFlagsQueued=!1,t._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var t=this;this.setReloadingPaused(!0);var r=this.instance.config.token,n=this.instance.get_property(Rn),i=this.instance.get_property(wr),s=qc(JSON.stringify({token:r,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:n,group_properties:i,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(o){t.$anon_distinct_id=void 0,t.receivedFeatureFlags(o),t.setReloadingPaused(!1),t._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var n,i=this.getFlagVariants()[t],s="".concat(i),o=this.instance.get_property(Io)||{};return(r.send_event||!("send_event"in r))&&(!(t in o)||!o[t].includes(s))&&(Ge(o[t])?o[t].push(s):o[t]=[s],(n=this.instance.persistence)===null||n===void 0||n.register(H({},Io,o)),this.instance.capture("$feature_flag_called",{$feature_flag:t,$feature_flag_response:i})),i}j.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(t){return this.getFlagPayloads()[t]}},{key:"isFeatureEnabled",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(t,r);j.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers.push(t)}},{key:"removeFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(r){return r!==t})}},{key:"receivedFeatureFlags",value:function(t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var r=this.getFlagVariants(),n=this.getFlagPayloads();(function(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=i.featureFlags,u=i.featureFlagPayloads;if(l)if(Ge(l)){var c,h={};if(l)for(var m=0;m<l.length;m++)h[l[m]]=!0;s&&s.register((H(c={},sl,l),H(c,Fn,h),c))}else{var f,p=l,v=u;i.errorsWhileComputingFlags&&(p=J(J({},o),p),v=J(J({},a),v)),s&&s.register((H(f={},sl,Object.keys(pd(p))),H(f,Fn,p||{}),H(f,hd,v||{}),f))}})(t,this.instance.persistence,r,n),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(t){if(!this.instance.__loaded||!this.instance.persistence)return j.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,t===!1)this.instance.persistence.unregister(Vs);else if(Ge(t)){for(var r={},n=0;n<t.length;n++)r[t[n]]=!0;this.instance.persistence.register(H({},Vs,r))}else this.instance.persistence.register(H({},Vs,t))}},{key:"onFeatureFlags",value:function(t){var r=this;if(this.addFeatureFlagsHandler(t),this.instance.decideEndpointWasHit){var n=this._prepareFeatureFlagsForCallbacks(),i=n.flags,s=n.flagVariants;t(i,s)}return function(){return r.removeFeatureFlagsHandler(t)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,r){var n,i,s=H({},"$feature_enrollment/".concat(t),r);this.instance.capture("$feature_enrollment_update",{$feature_flag:t,$feature_enrollment:r,$set:s}),this.setPersonPropertiesForFlags(s,!1);var o=J(J({},this.getFlagVariants()),{},H({},t,r));(n=this.instance.persistence)===null||n===void 0||n.register((H(i={},sl,Object.keys(pd(o))),H(i,Fn,o),i)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(dc);if(i&&!n)return t(i);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var o,a=s.earlyAccessFeatures;return(o=r.instance.persistence)===null||o===void 0||o.register(H({},dc,a)),t(a)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var t=this.getFlags(),r=this.getFlagVariants();return{flags:t.filter(function(n){return r[n]}),flagVariants:Object.keys(r).filter(function(n){return r[n]}).reduce(function(n,i){return n[i]=r[i],n},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var t=this._prepareFeatureFlagsForCallbacks(),r=t.flags,n=t.flagVariants;this.featureFlagEventHandlers.forEach(function(i){return i(r,n)})}},{key:"setPersonPropertiesForFlags",value:function(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property(Rn)||{};this.instance.register(H({},Rn,J(J({},n),t))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Rn)}},{key:"setGroupPropertiesForFlags",value:function(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property(wr)||{};Object.keys(n).length!==0&&Object.keys(n).forEach(function(i){n[i]=J(J({},n[i]),t[i]),delete t[i]}),this.instance.register(H({},wr,J(J({},n),t))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(t){if(t){var r=this.instance.get_property(wr)||{};this.instance.register(H({},wr,J(J({},r),{},H({},t,{}))))}else this.instance.unregister(wr)}}]),e}(),cb=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,cr={is_supported:function(){return!0},error:function(e){j.error("cookieStore error: "+e)},get:function(e){try{for(var t=e+"=",r=document.cookie.split(";").filter(function(s){return s.length}),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null},parse:function(e){var t;try{t=JSON.parse(cr.get(e))||{}}catch{}return t},set:function(e,t,r,n,i){try{var s="",o="",a="";if(n){var l=document.location.hostname.match(cb),u=l?l[0]:"";s=u?"; domain=."+u:""}if(r){var c=new Date;c.setTime(c.getTime()+24*r*60*60*1e3),o="; expires="+c.toUTCString()}i&&(a="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+s+a;return document.cookie=h,h}catch{return}},remove:function(e,t){try{cr.set(e,"",-1,t)}catch{return}}},ol=null,Ae={is_supported:function(){if(!Wt(ol))return ol;var e=!0;if(se(window))e=!1;else try{var t="__mplssupport__";Ae.set(t,"xyz"),Ae.get(t)!=='"xyz"'&&(e=!1),Ae.remove(t)}catch{e=!1}return e||j.error("localStorage unsupported; falling back to cookie store"),ol=e,e},error:function(e){j.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(t){Ae.error(t)}return null},parse:function(e){try{return JSON.parse(Ae.get(e))||{}}catch{}return null},set:function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(r){Ae.error(r)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){Ae.error(t)}}},ub=["distinct_id",Mo,co],mc=J(J({},Ae),{},{parse:function(e){try{var t={};try{t=cr.parse(e)||{}}catch{}var r=Xe(t,JSON.parse(Ae.get(e)||"{}"));return Ae.set(e,r),r}catch{}return null},set:function(e,t,r,n,i){try{Ae.set(e,t);var s={};ub.forEach(function(o){t[o]&&(s[o]=t[o])}),Object.keys(s).length&&cr.set(e,s,r,n,i)}catch(o){Ae.error(o)}},remove:function(e,t){try{window.localStorage.removeItem(e),cr.remove(e,t)}catch(r){Ae.error(r)}}}),Qs={},db={is_supported:function(){return!0},error:function(e){j.error("memoryStorage error: "+e)},get:function(e){return Qs[e]||null},parse:function(e){return Qs[e]||null},set:function(e,t){Qs[e]=t},remove:function(e){delete Qs[e]}},Vr=null,Ue={is_supported:function(){if(!Wt(Vr))return Vr;if(Vr=!0,se(window))Vr=!1;else try{var e="__support__";Ue.set(e,"xyz"),Ue.get(e)!=='"xyz"'&&(Vr=!1),Ue.remove(e)}catch{Vr=!1}return Vr},error:function(e){j.error("sessionStorage error: ",e)},get:function(e){try{return window.sessionStorage.getItem(e)}catch(t){Ue.error(t)}return null},parse:function(e){try{return JSON.parse(Ue.get(e))||null}catch{}return null},set:function(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(r){Ue.error(r)}},remove:function(e){try{window.sessionStorage.removeItem(e)}catch(t){Ue.error(t)}}},fb=["localhost","127.0.0.1"],hb=function(e,t){return!!function(r){try{new RegExp(r)}catch{return!1}return!0}(t)&&new RegExp(t).test(e)},md=function(e,t){for(var r,n=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<n.length;i++){var s=n[i].split("=");if(s[0]===t){r=s;break}}if(!Ge(r)||r.length<2)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{j.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},$o=function(e,t){var r=e.match(new RegExp(t+"=([^&]*)"));return r?r[1]:null},Be={campaignParams:function(e){var t=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(e||[]),r={};return be(t,function(n){var i=md(Ce.URL,n);i.length&&(r[n]=i)}),r},searchEngine:function(){var e=Ce.referrer;return e?e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var e=Be.searchEngine(),t=e!="yahoo"?"q":"p",r={};if(!Wt(e)){r.$search_engine=e;var n=md(Ce.referrer,t);n.length&&(r.ph_keyword=n)}return r},browser:function(e,t,r){return t=t||"",r||de(e," OPR/")?de(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":de(e,"IEMobile")||de(e,"WPDesktop")?"Internet Explorer Mobile":de(e,"SamsungBrowser/")?"Samsung Internet":de(e,"Edge")||de(e,"Edg/")?"Microsoft Edge":de(e,"FBIOS")?"Facebook Mobile":de(e,"Chrome")?"Chrome":de(e,"CriOS")?"Chrome iOS":de(e,"UCWEB")||de(e,"UCBrowser")?"UC Browser":de(e,"FxiOS")?"Firefox iOS":de(t,"Apple")||function(n){return de(n,"Safari")&&!de(n,"Chrome")&&!de(n,"Android")}(e)?de(e,"Mobile")?"Mobile Safari":"Safari":de(e,"Android")?"Android Mobile":de(e,"Konqueror")||de(e,"konqueror")?"Konqueror":de(e,"Firefox")?"Firefox":de(e,"MSIE")||de(e,"Trident/")?"Internet Explorer":de(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n={"Internet Explorer Mobile":[/rv:(\d+(\.\d+)?)/],"Microsoft Edge":[/Edge?\/(\d+(\.\d+)?)/],Chrome:[/Chrome\/(\d+(\.\d+)?)/],"Chrome iOS":[/CriOS\/(\d+(\.\d+)?)/],"UC Browser":[/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/],Safari:[/Version\/(\d+(\.\d+)?)/],"Mobile Safari":[/Version\/(\d+(\.\d+)?)/],Opera:[/(Opera|OPR)\/(\d+(\.\d+)?)/],Firefox:[/Firefox\/(\d+(\.\d+)?)/],"Firefox iOS":[/FxiOS\/(\d+(\.\d+)?)/],Konqueror:[/Konqueror[:/]?(\d+(\.\d+)?)/i],BlackBerry:[/BlackBerry (\d+(\.\d+)?)/,/Version\/(\d+(\.\d+)?)/],"Android Mobile":[/android\s(\d+(\.\d+)?)/],"Samsung Internet":[/SamsungBrowser\/(\d+(\.\d+)?)/],"Internet Explorer":[/(rv:|MSIE )(\d+(\.\d+)?)/],Mozilla:[/rv:(\d+(\.\d+)?)/]}[Be.browser(e,t,r)];if(se(n))return null;for(var i=0;i<n.length;i++){var s=n[i],o=e.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){if(/Windows/i.test(e)){if(/Phone/.test(e)||/WPDesktop/.test(e))return{os_name:"Windows Phone",os_version:""};var t=/Windows NT ([0-9.]+)/i.exec(e);return t&&t[1]?{os_name:"Windows",os_version:t[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(e)){var r=/OS (\d+)_(\d+)_?(\d+)?/i.exec(e);return r&&r[1]?{os_name:"iOS",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(e)){var n=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(e);return n&&n[1]?{os_name:"Android",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(e))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(e)){var i=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(e);return i&&i[1]?{os_name:"Mac OS X",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(e)?{os_name:"Linux",os_version:""}:/CrOS/.test(e)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return t==="iPad"||t==="Android Tablet"?"Tablet":t?"Mobile":"Desktop"},referrer:function(){return Ce.referrer||"$direct"},referringDomain:function(){if(!Ce.referrer)return"$direct";var e=Ce.createElement("a");return e.href=Ce.referrer,e.host},properties:function(){var e,t,r,n,i,s,o,a=Be.os(dt),l=a.os_name,u=a.os_version;return Xe(cc({$os:l,$os_version:u,$browser:Be.browser(dt,navigator.vendor,window.opera),$device:Be.device(dt),$device_type:Be.deviceType(dt)}),{$current_url:(e=window)===null||e===void 0?void 0:e.location.href,$host:(t=window)===null||t===void 0?void 0:t.location.host,$pathname:(r=window)===null||r===void 0?void 0:r.location.pathname,$raw_user_agent:dt.length>1e3?dt.substring(0,997)+"...":dt,$browser_version:Be.browserVersion(dt,navigator.vendor,window.opera),$browser_language:Be.browserLanguage(),$screen_height:(n=window)===null||n===void 0?void 0:n.screen.height,$screen_width:(i=window)===null||i===void 0?void 0:i.screen.width,$viewport_height:(s=window)===null||s===void 0?void 0:s.innerHeight,$viewport_width:(o=window)===null||o===void 0?void 0:o.innerWidth,$lib:"web",$lib_version:fn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:sp()/1e3})},people_properties:function(){var e=Be.os(dt),t=e.os_name,r=e.os_version;return Xe(cc({$os:t,$os_version:r,$browser:Be.browser(dt,navigator.vendor,window.opera)}),{$browser_version:Be.browserVersion(dt,navigator.vendor,window.opera)})}},pb=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],gd=function(){function e(t){Me(this,e);var r="";t.token&&(r=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=t.custom_campaign_params||[],t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+r+"_posthog",pb.indexOf(t.persistence.toLowerCase())===-1&&(j.critical("Unknown persistence type "+t.persistence+"; falling back to cookie"),t.persistence="cookie");var n=t.persistence.toLowerCase();n==="localstorage"&&Ae.is_supported()?this.storage=Ae:n==="localstorage+cookie"&&mc.is_supported()?this.storage=mc:n==="sessionstorage"&&Ue.is_supported()?this.storage=Ue:this.storage=n==="memory"?db:cr,this.user_state="anonymous",this.load(),this.update_config(t),this.save()}return Ie(e,[{key:"properties",value:function(){var t={};return be(this.props,function(r,n){if(n===Fn&&Rr(r))for(var i=Object.keys(r),s=0;s<i.length;s++)t["$feature/".concat(i[s])]=r[i[s]];else a=n,l=!1,(Wt(o=ab)?l:id&&o.indexOf===id?o.indexOf(a)!=-1:(be(o,function(u){if(l||(l=u===a))return zc}),l))||(t[n]=r);var o,a,l}),t}},{key:"load",value:function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=Xe({},t))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(t,r,n){var i=this;if(Rr(t)){se(r)&&(r="None"),this.expire_days=se(n)?this.default_expiry:n;var s=!1;if(be(t,function(o,a){i.props.hasOwnProperty(a)&&i.props[a]!==r||(i.props[a]=o,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(t,r){var n=this;if(Rr(t)){this.expire_days=se(r)?this.default_expiry:r;var i=!1;if(be(t,function(s,o){t.hasOwnProperty(o)&&n.props[o]!==s&&(n.props[o]=s,i=!0)}),i)return this.save(),!0}return!1}},{key:"unregister",value:function(t){t in this.props&&(delete this.props[t],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(Be.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Be.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Be.referrer(),$referring_domain:this.props.$referring_domain||Be.referringDomain()})}},{key:"get_referrer_info",value:function(){return cc({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(t){return be(this.props,function(r,n){n in t||(t[n]=r)}),t}},{key:"update_config",value:function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)}},{key:"set_disabled",value:function(t){this.disabled=t,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(t){t!==this.secure&&(this.secure=t,this.remove(),this.save())}},{key:"set_event_timer",value:function(t,r){var n=this.props[Di]||{};n[t]=r,this.props[Di]=n,this.save()}},{key:"remove_event_timer",value:function(t){var r=(this.props[Di]||{})[t];return se(r)||(delete this.props[Di][t],this.save()),r}},{key:"get_user_state",value:function(){return this.props[hc]||"anonymous"}},{key:"set_user_state",value:function(t){this.props[hc]=t,this.save()}},{key:"get_quota_limits",value:function(){return this.props[pc]||{}}},{key:"set_quota_limits",value:function(t){this.props[pc]=t,this.save()}}]),e}(),vd=2,mb=4,dp=3,gb=6,vb=0,_b="rrweb/console@1",Nt,yb=Ie(function e(t){var r,n,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Me(this,e),H(this,"bucketSize",100),H(this,"refillRate",10),H(this,"mutationBuckets",{}),H(this,"loggedTracker",{}),H(this,"refillBuckets",function(){Object.keys(i.mutationBuckets).forEach(function(o){i.mutationBuckets[o]=i.mutationBuckets[o]+i.refillRate,i.mutationBuckets[o]>=i.bucketSize&&delete i.mutationBuckets[o]})}),H(this,"getNodeOrRelevantParent",function(o){var a=i.rrweb.mirror.getNode(o);if((a==null?void 0:a.nodeName)!=="svg"&&a instanceof Element){var l=a.closest("svg");if(l)return[i.rrweb.mirror.getId(l),l]}return[o,a]}),H(this,"numberOfChanges",function(o){var a,l,u,c,h,m,f,p;return((a=(l=o.removes)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)+((u=(c=o.attributes)===null||c===void 0?void 0:c.length)!==null&&u!==void 0?u:0)+((h=(m=o.texts)===null||m===void 0?void 0:m.length)!==null&&h!==void 0?h:0)+((f=(p=o.adds)===null||p===void 0?void 0:p.length)!==null&&f!==void 0?f:0)}),H(this,"throttleMutations",function(o){if(o.type!==dp||o.data.source!==vb)return o;var a=o.data,l=i.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(c){var h,m,f,p=ws(i.getNodeOrRelevantParent(c.id),2),v=p[0],x=p[1];return i.mutationBuckets[v]===0?!1:(i.mutationBuckets[v]=(h=i.mutationBuckets[v])!==null&&h!==void 0?h:i.bucketSize,i.mutationBuckets[v]=Math.max(i.mutationBuckets[v]-1,0),i.mutationBuckets[v]===0&&(i.loggedTracker[v]||(i.loggedTracker[v]=!0,(m=(f=i.options).onBlockedNode)===null||m===void 0||m.call(f,v,x))),c)}));var u=i.numberOfChanges(a);return u!==0||l===u?o:void 0}),this.rrweb=t,this.options=s,this.refillRate=(r=this.options.refillRate)!==null&&r!==void 0?r:this.refillRate,this.bucketSize=(n=this.options.bucketSize)!==null&&n!==void 0?n:this.bucketSize,setInterval(function(){i.refillBuckets()},1e3)}),fp=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(fp||{}),bb="/s/";(function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Nt||(Nt={}));var wb=[Nt.MouseMove,Nt.MouseInteraction,Nt.Scroll,Nt.ViewportResize,Nt.Input,Nt.TouchMove,Nt.MediaInteraction,Nt.Drag],xb=function(){function e(t){var r=this;if(Me(this,e),H(this,"_linkedFlagSeen",!1),H(this,"_lastActivityTimestamp",Date.now()),H(this,"isIdle",!1),H(this,"_linkedFlag",null),H(this,"_sampleRate",null),H(this,"_minimumDuration",null),this.instance=t,this._captureStarted=!1,this._endpoint=bb,this.stopRrweb=void 0,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()}),!this.instance.sessionManager)throw j.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");var n=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=n.sessionId,s=n.windowId;this.windowId=s,this.sessionId=i,this.buffer=this.clearBuffer()}return Ie(e,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw j.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){return sr(this._sampleRate)?this.instance.get_property(co):null}},{key:"sessionDuration",get:function(){var t,r,n=(t=this.buffer)===null||t===void 0?void 0:t.data[((r=this.buffer)===null||r===void 0?void 0:r.data.length)-1],i=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return n?n.timestamp-i:null}},{key:"isRecordingEnabled",get:function(){var t=!!this.instance.get_property(uc),r=!this.instance.config.disable_session_recording;return t&&r}},{key:"isConsoleLogCaptureEnabled",get:function(){var t=!!this.instance.get_property(dd),r=this.instance.config.enable_recording_console_log;return r??t}},{key:"recordingVersion",get:function(){var t,r=this.instance.get_property(fd);return((t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recorderVersion)||r||"v1"}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?gt(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":ac(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"disabled":"buffering"}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled?this.startCaptureAndTrySendingQueuedSnapshots():(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1)}},{key:"makeSamplingDecision",value:function(t){var r,n=this.sessionId!==t;if(sr(this._sampleRate)){var i,s=this.isSampled;n||!ac(s)?i=Math.random()<this._sampleRate:i=s,i||j.warn("[SessionSampling] Sample rate (".concat(this._sampleRate,") has determined that this sessionId (").concat(t,") will not be sent to the server.")),(r=this.instance.persistence)===null||r===void 0||r.register(H({},co,i))}else{var o;(o=this.instance.persistence)===null||o===void 0||o.register(H({},co,null))}}},{key:"afterDecideResponse",value:function(t){var r,n,i,s,o,a,l,u=this;this.instance.persistence&&this.instance.persistence.register((H(l={},uc,!!t.sessionRecording),H(l,dd,(o=t.sessionRecording)===null||o===void 0?void 0:o.consoleLogRecordingEnabled),H(l,fd,(a=t.sessionRecording)===null||a===void 0?void 0:a.recorderVersion),l));var c=(r=t.sessionRecording)===null||r===void 0?void 0:r.sampleRate;this._sampleRate=se(c)||Wt(c)?null:parseFloat(c);var h,m=(n=t.sessionRecording)===null||n===void 0?void 0:n.minimumDurationMilliseconds;if(this._minimumDuration=se(m)?null:m,this._linkedFlag=((i=t.sessionRecording)===null||i===void 0?void 0:i.linkedFlag)||null,(s=t.sessionRecording)!==null&&s!==void 0&&s.endpoint&&(this._endpoint=(h=t.sessionRecording)===null||h===void 0?void 0:h.endpoint),sr(this._sampleRate)&&this.sessionManager.onSessionId(function(p){u.makeSamplingDecision(p)}),gt(this._linkedFlag)){var f=this._linkedFlag;this.instance.onFeatureFlags(function(p){u._linkedFlagSeen=p.includes(f)})}this.receivedDecide=!0,this.startRecordingIfEnabled()}},{key:"log",value:function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(t)]}},timestamp:sp()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var t=this;if(!se(Object.assign)&&!this._captureStarted&&!this.instance.config.disable_session_recording){this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId();var r=this.recordingVersion==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.recordingVersion?Hi(this.instance.config.api_host+"/static/".concat(r,"?v=").concat(fn.LIB_VERSION),function(n){if(n)return j.error("Could not load ".concat(r),n);t._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(t){var r;return t.type===dp&&wb.indexOf((r=t.data)===null||r===void 0?void 0:r.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(t){var r=this._isInteractiveEvent(t);if(r||this.isIdle||t.timestamp-this._lastActivityTimestamp>3e5&&(this.isIdle=!0),r&&(this._lastActivityTimestamp=t.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var n=this.sessionManager.checkAndGetSessionAndWindowId(!r,t.timestamp),i=n.windowId,s=n.sessionId,o=this.sessionId!==s,a=this.windowId!==i;this.windowId=i,this.sessionId=s,[vd,mb].indexOf(t.type)===-1&&(a||o)&&this._tryTakeFullSnapshot()}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this._captureStarted)return!1;try{var t;return(t=this.rrwebRecord)===null||t===void 0||t.takeFullSnapshot(),!0}catch(r){return j.error("Error taking full snapshot.",r),!1}}},{key:"_onScriptLoaded",value:function(){var t,r=this,n={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var i=this.instance.config.session_recording,s=0,o=Object.entries(i||{});s<o.length;s++){var a=ws(o[s],2),l=a[0],u=a[1];l in n&&(n[l]=u)}this.rrwebRecord?(this.mutationRateLimiter=(t=this.mutationRateLimiter)!==null&&t!==void 0?t:new yb(this.rrwebRecord,{onBlockedNode:function(c,h){var m="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");j.info(m,{node:h}),r.log("[PostHog Recorder] "+m,"warn")}}),this.stopRrweb=this.rrwebRecord(J({emit:function(c){r.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},n)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var h,m=r._maskUrl(window.location.href);if(!m)return;(h=r.rrwebRecord)===null||h===void 0||h.addCustomEvent("$pageview",{href:m})}}catch(f){j.error("Could not add $pageview to rrweb session",f)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1):j.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(t){if(t&&Rr(t)){if(t.type===fp.Meta){var r=this._maskUrl(t.data.href);if(!r)return;t.data.href=r}var n=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(t):t;if(n){var i=function(o){var a=o;if(a&&Rr(a)&&a.type===gb&&Rr(a.data)&&a.data.plugin===_b){a.data.payload.payload.length>10&&(a.data.payload.payload=a.data.payload.payload.slice(0,10),a.data.payload.payload.push("...[truncated]"));for(var l=[],u=0;u<a.data.payload.payload.length;u++)a.data.payload.payload[u]&&a.data.payload.payload[u].length>2e3?l.push(a.data.payload.payload[u].slice(0,2e3)+"...[truncated]"):l.push(a.data.payload.payload[u]);return a.data.payload.payload=l,o}return o}(n),s={$snapshot_bytes:JSON.stringify(i).length,$snapshot_data:i,$session_id:this.sessionId,$window_id:this.windowId};this._updateWindowAndSessionIds(i),this.isIdle||(this.status!=="disabled"?this._captureSnapshotBuffered(s):this.clearBuffer())}}}},{key:"_maskUrl",value:function(t){var r=this.instance.config.session_recording;if(r.maskNetworkRequestFn){var n,i={url:t};return(n=i=r.maskNetworkRequestFn(i))===null||n===void 0?void 0:n.url}return t}},{key:"clearBuffer",value:function(){return this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_flushBuffer",value:function(){var t=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var r=this._minimumDuration,n=this.sessionDuration,i=sr(r)&&sr(n)&&n<r;return this.status==="buffering"||i?(this.flushBufferTimer=setTimeout(function(){t._flushBuffer()},2e3),this.buffer||this.clearBuffer()):this.buffer&&this.buffer.data.length!==0?(this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer()):this.buffer||this.clearBuffer()}},{key:"_captureSnapshotBuffered",value:function(t){var r,n=this,i=2+(((r=this.buffer)===null||r===void 0?void 0:r.data.length)||0);(!this.buffer||this.buffer.size+t.$snapshot_bytes+i>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=t.$snapshot_bytes,this.buffer.data.push(t.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){n._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(t){this.instance.capture("$snapshot",t,{transport:"XHR",method:"POST",endpoint:this._endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:t.$snapshot_data.type===vd}})}}]),e}(),Rt={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},Sb=["first-input","navigation","paint","resource"],Eb=["/s/","/e/"],kb=function(){function e(t){Me(this,e),H(this,"_forceAllowLocalhost",!1),this.instance=t}return Ie(e,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var t,r,n=this;if(!this.observer)if(se((t=window)===null||t===void 0||(r=t.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes))j.info("[PerformanceObserver] not started because PerformanceObserver is not supported by this browser.");else if(!fb.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(o){n._capturePerformanceEvent(o)})});var i=PerformanceObserver.supportedEntryTypes.filter(function(s){return Sb.includes(s)});i.forEach(function(s){var o;(o=n.observer)===null||o===void 0||o.observe({type:s,buffered:!0})})}catch(s){j.error("PostHog failed to start performance observer",s),this.stopObserving()}else j.info("[PerformanceObserver] not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var t,r;return(t=(r=this.instance.config.capture_performance)!==null&&r!==void 0?r:this.remoteEnabled)!==null&&t!==void 0&&t}},{key:"afterDecideResponse",value:function(t){this.remoteEnabled=t.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(t){if(t.name.indexOf(this.instance.config.api_host)===0){var r=t.name.replace(this.instance.config.api_host,"");if(Eb.find(function(f){return r.indexOf(f)===0}))return}var n={url:t.name},i=this.instance.config.session_recording;if(i.maskNetworkRequestFn&&(n=i.maskNetworkRequestFn(n)),n){var s=t.toJSON();s.name=n.url;var o={},a=Math.floor(Date.now()-performance.now());for(var l in o[Rt.timeOrigin]=a,o[Rt.timestamp]=Math.floor(a+t.startTime),Rt)se(s[l])||(o[Rt[l]]=s[l]);if(this.capturePerformanceEvent(o),Tb(t)){var u,c=dn(t.serverTiming||[]);try{for(c.s();!(u=c.n()).done;){var h,m=u.value;this.capturePerformanceEvent((H(h={},Rt.timeOrigin,a),H(h,Rt.timestamp,Math.floor(a+t.startTime)),H(h,Rt.name,m.name),H(h,Rt.duration,m.duration),H(h,Rt.entryType,"serverTiming"),h))}}catch(f){c.e(f)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(t){var r,n=t[Rt.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:t},timestamp:n})}}]),e}(),Tb=function(e){return e.entryType==="navigation"||e.entryType==="resource"},Cb=function(){function e(t){Me(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Ie(e,[{key:"call",value:function(){var t=this,r=qc(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Rn),group_properties:this.instance.get_property(wr),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0}));this.instance._send_request("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:r,verbose:!0},{method:"POST"},function(n){return t.parseDecideResponse(n)})}},{key:"parseDecideResponse",value:function(t){var r,n,i,s,o=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),(t==null?void 0:t.status)!==0){if(!document||!document.body)return j.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){o.parseDecideResponse(t)},500);this.instance.toolbar.afterDecideResponse(t),(r=this.instance.sessionRecording)===null||r===void 0||r.afterDecideResponse(t),xr.afterDecideResponse(t,this.instance),(n=this.instance.webPerformance)===null||n===void 0||n.afterDecideResponse(t),this.instance._afterDecideResponse(t),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(t);var a=(i=window)===null||i===void 0?void 0:i.extendPostHogWithSurveys;t.surveys&&!a&&Hi(this.instance.config.api_host+"/static/surveys.js",function(f){if(f)return j.error("Could not load surveys script",f);window.extendPostHogWithSurveys(o.instance)});var l=(s=window)===null||s===void 0?void 0:s.extendPostHogWithExceptionAutoCapture;if(t.autocaptureExceptions&&t.autocaptureExceptions&&se(l)&&Hi(this.instance.config.api_host+"/static/exception-autocapture.js",function(f){if(f)return j.error("Could not load exception autocapture script",f);window.extendPostHogWithExceptionAutocapture(o.instance,t)}),t.siteApps)if(this.instance.config.opt_in_site_apps){var u,c=this.instance.config.api_host,h=dn(t.siteApps);try{var m=function(){var f=u.value,p=f.id,v=f.url,x=[c,c[c.length-1]==="/"&&v[0]==="/"?v.substring(1):v].join("");window["__$$ph_site_app_".concat(p)]=o.instance,Hi(x,function(S){S&&j.error("Error while initializing PostHog app with config id ".concat(p),S)})};for(h.s();!(u=h.n()).done;)m()}catch(f){h.e(f)}finally{h.f()}}else t.siteApps.length>0&&j.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else j.error("Failed to fetch feature flags from PostHog.")}}]),e}(),Pb=["https://app.posthog.com","https://eu.posthog.com"],Ab=["source"],Ob=U.location?$o(U.location.hash,"__posthog")||$o(location.hash,"state"):null,Mb=function(){function e(t){Me(this,e),this.instance=t}return Ie(e,[{key:"afterDecideResponse",value:function(t){var r=t.toolbarParams||t.editorParams||(t.toolbarVersion?{toolbarVersion:t.toolbarVersion}:{});t.isAuthenticated&&r.toolbarVersion&&r.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(J({},r))}},{key:"maybeLoadToolbar",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U.history;try{if(!r){try{U.localStorage.setItem("test","test"),U.localStorage.removeItem("test")}catch{return!1}r=U.localStorage}var i,s=Ob||$o(t.hash,"__posthog")||$o(t.hash,"state"),o=s?od(function(){return JSON.parse(atob(decodeURIComponent(s)))})||od(function(){return JSON.parse(decodeURIComponent(s))}):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?t.hash=o.desiredHash:n?n.replaceState("",document.title,t.pathname+t.search):t.hash="")):((i=JSON.parse(r.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}},{key:"loadToolbar",value:function(t){var r=this;if(U._postHogToolbarLoaded)return!1;U._postHogToolbarLoaded=!0;var n=this.instance.config.api_host,i=3e5,s=Math.floor(Date.now()/i)*i,o="".concat(n).concat(n.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),a=!Pb.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=J(J({token:this.instance.config.token},t),{},{apiURL:n},a?{instrument:!1}:{});l.source;var u=Y0(l,Ab);return U.localStorage.setItem("_postHogToolbarParams",JSON.stringify(u)),Hi(o,function(c){c?j.error("Failed to load toolbar",c):(U.ph_load_toolbar||U.ph_load_editor)(l,r.instance)}),Bi(U,"turbolinks:load",function(){U._postHogToolbarLoaded=!1,r.loadToolbar(l)}),!0}},{key:"_loadEditor",value:function(t){return this.loadToolbar(t)}},{key:"maybeLoadEditor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U.history;return this.maybeLoadToolbar(t,r,n)}}]),e}(),Ib="__ph_opt_in_out_";function $b(e,t){pp(!0,e,t)}function Fb(e,t){pp(!1,e,t)}function Rb(e,t){return hp(e,t)==="1"}function _d(e,t){return!!function(r){if(r&&r.respectDnt){var n=r&&r.window||U,i=n.navigator||{},s=!1;return be([i.doNotTrack,i.msDoNotTrack,n.doNotTrack],function(o){de([!0,1,"1","yes"],o)&&(s=!0)}),s}return!1}(t)||hp(e,t)==="0"}function jb(e,t){Vc(t=t||{}).remove(Qc(e,t),!!t.crossSubdomainCookie)}function Vc(e){return(e=e||{}).persistenceType==="localStorage"?Ae:e.persistenceType==="localStorage+cookie"?mc:cr}function Qc(e,t){return((t=t||{}).persistencePrefix||Ib)+e}function hp(e,t){return Vc(t).get(Qc(e,t))}function pp(e,t,r){gt(t)&&t.length?(Vc(r=r||{}).set(Qc(t,r),e?1:0,sr(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&e&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):j.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}var mp=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Me(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return Ie(e,[{key:"setPollInterval",value:function(t){this._pollInterval=t,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),e}(),Nb=function(e){ep(r,mp);var t=tp(r);function r(n){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return Me(this,r),(i=t.call(this,s)).handlePollRequest=n,i}return Ie(r,[{key:"enqueue",value:function(n,i,s){this._event_queue.push({url:n,data:i,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var n=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(n._event_queue.length>0){var i=n.formatQueue(),s=function(a){var l=i[a],u=l.url,c=l.data,h=l.options;be(c,function(m,f){c[f].offset=Math.abs(c[f].timestamp-n.getTime()),delete c[f].timestamp}),n.handlePollRequest(u,c,h)};for(var o in i)s(o);n._event_queue.length=0,n._empty_queue_count=0}else n._empty_queue_count++;n._empty_queue_count>4&&(n.isPolling=!1,n._empty_queue_count=0),n.isPolling&&n.poll()},this._pollInterval)}},{key:"unload",value:function(){var n=this;clearTimeout(this._poller);var i=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(i);[].concat(sc(s.filter(function(o){return o.url.indexOf("/e")===0})),sc(s.filter(function(o){return o.url.indexOf("/e")!==0}))).map(function(o){var a=o.url,l=o.data,u=o.options;n.handlePollRequest(a,l,J(J({},u),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var n={};return be(this._event_queue,function(i){var s=i.url,o=i.data,a=i.options,l=(a?a._batchKey:null)||s;se(n[l])&&(n[l]={data:[],url:s,options:a}),a&&n[l].options&&n[l].options._metrics&&!n[l].options._metrics.rrweb_full_snapshot&&(n[l].options._metrics.rrweb_full_snapshot=a._metrics.rrweb_full_snapshot),n[l].data.push(o)}),n}}]),r}(),vt=Uint8Array,ot=Uint16Array,di=Uint32Array,Wc=new vt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xc=new vt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yd=new vt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),gp=function(e,t){for(var r=new ot(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var i=new di(r[30]);for(n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return[r,i]},vp=gp(Wc,2),Lb=vp[0],gc=vp[1];Lb[28]=258,gc[258]=28;for(var bd=gp(Xc,0)[1],vc=new ot(32768),ke=0;ke<32768;++ke){var Qr=(43690&ke)>>>1|(21845&ke)<<1;Qr=(61680&(Qr=(52428&Qr)>>>2|(13107&Qr)<<2))>>>4|(3855&Qr)<<4,vc[ke]=((65280&Qr)>>>8|(255&Qr)<<8)>>>1}var Ui=function(e,t,r){for(var n=e.length,i=0,s=new ot(t);i<n;++i)++s[e[i]-1];var o,a=new ot(t);for(i=0;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(r){o=new ot(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,m=h|(1<<c)-1;h<=m;++h)o[vc[h]>>>l]=u}else for(o=new ot(n),i=0;i<n;++i)o[i]=vc[a[e[i]-1]++]>>>15-e[i];return o},pn=new vt(288);for(ke=0;ke<144;++ke)pn[ke]=8;for(ke=144;ke<256;++ke)pn[ke]=9;for(ke=256;ke<280;++ke)pn[ke]=7;for(ke=280;ke<288;++ke)pn[ke]=8;var Fo=new vt(32);for(ke=0;ke<32;++ke)Fo[ke]=5;var Xr,Db=Ui(pn,9,0),Bb=Ui(Fo,5,0),_p=function(e){return(e/8>>0)+(7&e&&1)},yp=function(e,t,r){(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof ot?ot:e instanceof di?di:vt)(r-t);return n.set(e.subarray(t,r)),n},tr=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8},Ri=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},al=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return[new vt(0),0];if(i==1){var o=new vt(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort(function(y,O){return y.f-O.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],u=0,c=1,h=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=r[r[u].f<r[h].f?u++:h++],l=r[u!=c&&r[u].f<r[h].f?u++:h++],r[c++]={s:-1,f:a.f+l.f,l:a,r:l};var m=s[0].s;for(n=1;n<i;++n)s[n].s>m&&(m=s[n].s);var f=new ot(m+1),p=Hb(r[c-1],f,0);if(p>t){n=0;var v=0,x=p-t,S=1<<x;for(s.sort(function(y,O){return f[O.s]-f[y.s]||y.f-O.f});n<i;++n){var k=s[n].s;if(!(f[k]>t))break;v+=S-(1<<p-f[k]),f[k]=t}for(v>>>=x;v>0;){var T=s[n].s;f[T]<t?v-=1<<t-f[T]++-1:++n}for(;n>=0&&v;--n){var P=s[n].s;f[P]==t&&(--f[P],++v)}p=t}return[new vt(f),p]},Hb=function e(t,r,n){return t.s==-1?Math.max(e(t.l,r,n+1),e(t.r,r,n+1)):r[t.s]=n},wd=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ot(++t),n=0,i=e[0],s=1,o=function(l){r[n++]=l},a=1;a<=t;++a)if(e[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[a]}return[r.subarray(0,n),t]},ji=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},uo=function(e,t,r){var n=r.length,i=_p(t+2);e[i]=255&n,e[i+1]=n>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s<n;++s)e[i+s+4]=r[s];return 8*(i+4+n)},xd=function(e,t,r,n,i,s,o,a,l,u,c){tr(t,c++,r),++i[256];for(var h=al(i,15),m=h[0],f=h[1],p=al(s,15),v=p[0],x=p[1],S=wd(m),k=S[0],T=S[1],P=wd(v),y=P[0],O=P[1],M=new ot(19),E=0;E<k.length;++E)M[31&k[E]]++;for(E=0;E<y.length;++E)M[31&y[E]]++;for(var I=al(M,7),R=I[0],N=I[1],z=19;z>4&&!R[yd[z-1]];--z);var Y,q,ae,ge,Se=u+5<<3,ve=ji(i,pn)+ji(s,Fo)+o,ye=ji(i,m)+ji(s,v)+o+14+3*z+ji(M,R)+(2*M[16]+3*M[17]+7*M[18]);if(Se<=ve&&Se<=ye)return uo(t,c,e.subarray(l,l+u));if(tr(t,c,1+(ye<ve)),c+=2,ye<ve){Y=Ui(m,f,0),q=m,ae=Ui(v,x,0),ge=v;var V=Ui(R,N,0);for(tr(t,c,T-257),tr(t,c+5,O-1),tr(t,c+10,z-4),c+=14,E=0;E<z;++E)tr(t,c+3*E,R[yd[E]]);c+=3*z;for(var Z=[k,y],ce=0;ce<2;++ce){var ue=Z[ce];for(E=0;E<ue.length;++E){var Te=31&ue[E];tr(t,c,V[Te]),c+=R[Te],Te>15&&(tr(t,c,ue[E]>>>5&127),c+=ue[E]>>>12)}}}else Y=Db,q=pn,ae=Bb,ge=Fo;for(E=0;E<a;++E)if(n[E]>255){Te=n[E]>>>18&31,Ri(t,c,Y[Te+257]),c+=q[Te+257],Te>7&&(tr(t,c,n[E]>>>23&31),c+=Wc[Te]);var ee=31&n[E];Ri(t,c,ae[ee]),c+=ge[ee],ee>3&&(Ri(t,c,n[E]>>>5&8191),c+=Xc[ee])}else Ri(t,c,Y[n[E]]),c+=q[n[E]];return Ri(t,c,Y[256]),c+q[256]},Ub=new di([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gb=new vt(0),zb=function(){for(var e=new di(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e}(),qb=function(){var e=4294967295;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=zb[255&r^t[n]]^r>>>8;e=r},d:function(){return 4294967295^e}}},Vb=function(e,t,r,n,i){return function(s,o,a,l,u,c){var h=s.length,m=new vt(l+h+5*(1+Math.floor(h/7e3))+u),f=m.subarray(l,m.length-u),p=0;if(!o||h<8)for(var v=0;v<=h;v+=65535){var x=v+65535;x<h?p=uo(f,p,s.subarray(v,x)):(f[v]=c,p=uo(f,p,s.subarray(v,h)))}else{for(var S=Ub[o-1],k=S>>>13,T=8191&S,P=(1<<a)-1,y=new ot(32768),O=new ot(P+1),M=Math.ceil(a/3),E=2*M,I=function(pr){return(s[pr]^s[pr+1]<<M^s[pr+2]<<E)&P},R=new di(25e3),N=new ot(288),z=new ot(32),Y=0,q=0,ae=(v=0,0),ge=0,Se=0;v<h;++v){var ve=I(v),ye=32767&v,V=O[ve];if(y[ye]=V,O[ve]=ye,ge<=v){var Z=h-v;if((Y>7e3||ae>24576)&&Z>423){p=xd(s,f,0,R,N,z,q,ae,Se,v-Se,p),ae=Y=q=0,Se=v;for(var ce=0;ce<286;++ce)N[ce]=0;for(ce=0;ce<30;++ce)z[ce]=0}var ue=2,Te=0,ee=T,Ke=ye-V&32767;if(Z>2&&ve==I(v-Ke))for(var Nr=Math.min(k,Z)-1,Ze=Math.min(32767,v),fr=Math.min(258,Z);Ke<=Ze&&--ee&&ye!=V;){if(s[v+ue]==s[v+ue-Ke]){for(var et=0;et<fr&&s[v+et]==s[v+et-Ke];++et);if(et>ue){if(ue=et,Te=Ke,et>Nr)break;var Xt=Math.min(Ke,et-2),D=0;for(ce=0;ce<Xt;++ce){var _t=v-Ke+ce+32768&32767,pt=_t-y[_t]+32768&32767;pt>D&&(D=pt,V=_t)}}}Ke+=(ye=V)-(V=y[ye])+32768&32767}if(Te){R[ae++]=268435456|gc[ue]<<18|bd[Te];var Ot=31&gc[ue],hr=31&bd[Te];q+=Wc[Ot]+Xc[hr],++N[257+Ot],++z[hr],ge=v+ue,++Y}else R[ae++]=s[v],++N[s[v]]}}p=xd(s,f,c,R,N,z,q,ae,Se,v-Se,p),c||(p=uo(f,p,Gb))}return yp(m,0,l+_p(p)+u)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,n,!i)},_c=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Qb=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&_c(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},Wb=function(e){return 10+(e.filename&&e.filename.length+1||0)};function Xb(e,t){t===void 0&&(t={});var r=qb(),n=e.length;r.p(e);var i=Vb(e,t,Wb(t),8),s=i.length;return Qb(i,t),_c(i,s-8,r.d()),_c(i,s-4,n),i}function Yb(e,t){var r=e.length;if(!t&&typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var n=new vt(e.length+(e.length>>>1)),i=0,s=function(u){n[i++]=u},o=0;o<r;++o){if(i+5>n.length){var a=new vt(i+8+(r-o<<1));a.set(n),n=a}var l=e.charCodeAt(o);l<128||t?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return yp(n,0,i)}(function(e){e.GZipJS="gzip-js",e.Base64="base64"})(Xr||(Xr={}));var bp=function(e,t,r){var n=t||{};n.ip=r.ip?1:0,n._=new Date().getTime().toString(),n.ver=fn.LIB_VERSION;var i=e.split("?");if(i.length>1){var s,o=dn(i[1].split("&"));try{for(o.s();!(s=o.n()).done;){var a=s.value.split("=")[0];se(n[a])||delete n[a]}}catch(u){o.e(u)}finally{o.f()}}var l=e.indexOf("?")>-1?"&":"?";return e+l+function(u){var c,h,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return be(u,function(p,v){se(p)||se(v)||v==="undefined"||(c=encodeURIComponent(p.toString()),h=encodeURIComponent(v),f[f.length]=h+"="+c)}),f.join(m)}(n)},Yc=function e(t,r){if(r.blob&&t.buffer)return new Blob([rd(t)?t:t.buffer],{type:"text/plain"});if(r.sendBeacon||r.blob){var n=e(t,{method:"POST"});return new Blob([n],{type:"application/x-www-form-urlencoded"})}return r.method!=="POST"?null:(i=Ge(t)||rd(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(i+="&compression="+t.compression),i);var i},wp=function(e){var t=e.url,r=e.data,n=e.headers,i=e.options,s=e.callback,o=e.retriesPerformedSoFar,a=e.retryQueue,l=e.onXHRError,u=e.timeout,c=u===void 0?6e4:u,h=e.onResponse;sr(o)&&o>0&&(t=bp(t,{retry_count:o},{}));var m=new XMLHttpRequest;m.open(i.method||"GET",t,!0);var f=Yc(r,i);be(n,function(p,v){m.setRequestHeader(v,p)}),i.method!=="POST"||i.blob||m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.timeout=c,m.withCredentials=!0,m.onreadystatechange=function(){if(m.readyState===4)if(h==null||h(m),m.status===200){if(s){var p;try{p=JSON.parse(m.responseText)}catch(v){return void j.error(v)}s(p)}}else hn(l)&&l(m),(m.status<400||m.status>500)&&a.enqueue({url:t,data:r,options:i,headers:n,retriesPerformedSoFar:(o||0)+1,callback:s}),s==null||s({status:0})},m.send(f)},Jb=18e5,Kb=function(e){ep(r,mp);var t=tp(r);function r(n,i){var s;return Me(this,r),(s=t.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=n,s.rateLimiter=i,!se(window)&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Ie(r,[{key:"enqueue",value:function(n){var i=n.retriesPerformedSoFar||0;if(!(i>=10)){var s=function(l){var u=3e3*Math.pow(2,l),c=u/2,h=Math.min(Jb,u),m=(Math.random()-.5)*(h-c);return Math.ceil(h+m)}(i),o=new Date(Date.now()+s);this.queue.push({retryAt:o,requestData:n});var a="Enqueued failed request for retry in ".concat(s);navigator.onLine||(a+=" (Browser is offline)"),j.warn(a),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var n=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){n.areWeOnline&&n.queue.length>0&&n.flush(),n.poll()},this._pollInterval)}},{key:"flush",value:function(){var n=new Date(Date.now()),i=this.queue.filter(function(l){return l.retryAt<n});if(i.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=n});var s,o=dn(i);try{for(o.s();!(s=o.n()).done;){var a=s.value.requestData;this._executeXhrRequest(a)}}catch(l){o.e(l)}finally{o.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var n,i=dn(this.queue);try{for(i.s();!(n=i.n()).done;){var s=n.value.requestData,o=s.url,a=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))j.warn("[RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(o,Yc(a,J(J({},l),{},{sendBeacon:!0})))}catch(u){j.error(u)}}}catch(u){i.e(u)}finally{i.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(n){var i=n.url,s=n.data,o=n.options,a=n.headers,l=n.callback,u=n.retriesPerformedSoFar;this.rateLimiter.isRateLimited(o._batchKey)||wp({url:i,data:s||{},options:o||{},headers:a||{},retriesPerformedSoFar:u||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}();Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return sr(e)&&isFinite(e)&&Math.floor(e)===e});var Sd="0123456789abcdef",Zb=function(){function e(t){if(Me(this,e),this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}return Ie(e,[{key:"toString",value:function(){for(var t="",r=0;r<this.bytes.length;r++)t=t+Sd.charAt(this.bytes[r]>>>4)+Sd.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}},{key:"clone",value:function(){return new e(this.bytes.slice(0))}},{key:"equals",value:function(t){return this.compareTo(t)===0}},{key:"compareTo",value:function(t){for(var r=0;r<16;r++){var n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}}],[{key:"fromFieldsV7",value:function(t,r,n,i){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(i)||t<0||r<0||n<0||i<0||t>0xffffffffffff||r>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|r>>>8,s[7]=r,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new e(s)}}]),e}(),ew=function(){function e(){Me(this,e),H(this,"timestamp",0),H(this,"counter",0),H(this,"random",new tw)}return Ie(e,[{key:"generate",value:function(){var t=this.generateOrAbort();if(se(t)){this.timestamp=0;var r=this.generateOrAbort();if(se(r))throw new Error("Could not generate UUID after timestamp reset");return r}return t}},{key:"generateOrAbort",value:function(){var t=Date.now();if(t>this.timestamp)this.timestamp=t,this.resetCounter();else{if(!(t+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return Zb.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),e}(),xp=function(e){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};!se(U.crypto)&&crypto.getRandomValues&&(xp=function(e){return crypto.getRandomValues(e)});var Ed,tw=function(){function e(){Me(this,e),H(this,"buffer",new Uint32Array(8)),H(this,"cursor",1/0)}return Ie(e,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(xp(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),e}(),jn=function(){return rw().toString()},rw=function(){return(Ed||(Ed=new ew)).generate()},Ws=1800,kd=60,nw=864e5,iw=function(){function e(t,r,n,i){Me(this,e),H(this,"_sessionIdChangedHandlers",[]),this.config=t,this.persistence=r,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=n||jn,this._windowIdGenerator=i||jn;var s=t.persistence_name||t.token,o=t.session_idle_timeout_seconds||Ws;if(sr(o)?o>Ws?j.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):o<kd&&j.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(j.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),o=Ws),this._sessionTimeoutMs=1e3*Math.min(Math.max(o,kd),Ws),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var a=Ue.parse(this._window_id_storage_key),l=Ue.parse(this._primary_window_exists_storage_key);a&&!l?this._windowId=a:Ue.remove(this._window_id_storage_key),Ue.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Ie(e,[{key:"onSessionId",value:function(t){var r=this;return se(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(t),this._sessionId&&t(this._sessionId,this._windowId),function(){r._sessionIdChangedHandlers=r._sessionIdChangedHandlers.filter(function(n){return n!==t})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ue.is_supported()}},{key:"_setWindowId",value:function(t){t!==this._windowId&&(this._windowId=t,this._canUseSessionStorage()&&Ue.set(this._window_id_storage_key,t))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ue.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(t,r,n){t===this._sessionId&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this._sessionId=t,this.persistence.register(H({},Mo,[r,t,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var t=this.persistence.props[Mo];return Ge(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var t=this;U.addEventListener("beforeunload",function(){t._canUseSessionStorage()&&Ue.remove(t._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),n=ws(this._getSessionId(),3),i=n[0],s=n[1],o=n[2],a=this._getWindowId(),l=o&&o>0&&Math.abs(r-o)>nw,u=!1,c=!s,h=!t&&Math.abs(r-i)>this._sessionTimeoutMs;c||h||l?(s=this._sessionIdGenerator(),a=this._windowIdGenerator(),o=r,u=!0):a||(a=this._windowIdGenerator(),u=!0);var m=i===0||!t||l?r:i,f=o===0?new Date().getTime():o;return this._setWindowId(a),this._setSessionId(s,m,f),u&&this._sessionIdChangedHandlers.forEach(function(p){return p(s,a)}),{sessionId:s,windowId:a,sessionStartTimestamp:f}}}]),e}(),sw=Ie(function e(t,r,n,i){Me(this,e),this.name="posthog-js",this.setupOnce=function(s){s(function(o){var a,l,u,c,h;if(o.level!=="error"||!t.__loaded)return o;o.tags||(o.tags={});var m=t.config.ui_host||t.config.api_host;o.tags["PostHog Person URL"]=m+"/person/"+t.get_distinct_id(),t.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var f=((a=o.exception)===null||a===void 0?void 0:a.values)||[],p={$exception_message:(l=f[0])===null||l===void 0?void 0:l.value,$exception_type:(u=f[0])===null||u===void 0?void 0:u.type,$exception_personURL:m+"/person/"+t.get_distinct_id(),$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:(c=f[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(h=f[0])===null||h===void 0?void 0:h.type,$sentry_tags:o.tags};return r&&n&&(p.$sentry_url=(i||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+o.event_id),t.capture("$exception",p),o})}}),ow=function(e){Promise&&Promise.resolve||j.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(r,n){r.event.userId||r.event.anonymousId===e.get_distinct_id()||e.reset(),r.event.userId&&r.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:r.event.userId}),e.reloadFeatureFlags());var i=e._calculate_event_properties(n,r.event.properties);return r.event.properties=Object.assign({},i,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(r){return t(r,r.event.event)},page:function(r){return t(r,"$pageview")},identify:function(r){return t(r,"$identify")},screen:function(r){return t(r,"$screen")}}},aw=function(){function e(){var t=this;Me(this,e),H(this,"_hasSeenPageView",!1),H(this,"_updateScrollData",function(){var r,n,i,s;t._pageViewData||(t._pageViewData=t._createPageViewData());var o=t._pageViewData,a=t._scrollY(),l=t._scrollHeight(),u=t._contentY(),c=t._contentHeight();o.lastScrollY=a,o.maxScrollY=Math.max(a,(r=o.maxScrollY)!==null&&r!==void 0?r:0),o.maxScrollHeight=Math.max(l,(n=o.maxScrollHeight)!==null&&n!==void 0?n:0),o.lastContentY=u,o.maxContentY=Math.max(u,(i=o.maxContentY)!==null&&i!==void 0?i:0),o.maxContentHeight=Math.max(c,(s=o.maxContentHeight)!==null&&s!==void 0?s:0)})}return Ie(e,[{key:"_createPageViewData",value:function(){return{pathname:U.location.pathname}}},{key:"doPageView",value:function(){var t,r;return this._hasSeenPageView?(r=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,r=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),J({$prev_pageview_pathname:(t=r)===null||t===void 0?void 0:t.pathname},this._calculatePrevPageScrollProperties(r))}},{key:"doPageLeave",value:function(){var t=this._pageViewData;return J({$prev_pageview_pathname:t==null?void 0:t.pathname},this._calculatePrevPageScrollProperties(t))}},{key:"_calculatePrevPageScrollProperties",value:function(t){if(!t||t.maxScrollHeight==null||t.lastScrollY==null||t.maxScrollY==null||t.maxContentHeight==null||t.lastContentY==null||t.maxContentY==null)return{};var r=t.maxScrollHeight,n=t.lastScrollY,i=t.maxScrollY,s=t.maxContentHeight,o=t.lastContentY,a=t.maxContentY;return r=Math.ceil(r),n=Math.ceil(n),i=Math.ceil(i),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),{$prev_pageview_last_scroll:n,$prev_pageview_last_scroll_percentage:r<=1?1:Xs(n/r,0,1),$prev_pageview_max_scroll:i,$prev_pageview_max_scroll_percentage:r<=1?1:Xs(i/r,0,1),$prev_pageview_last_content:o,$prev_pageview_last_content_percentage:s<=1?1:Xs(o/s,0,1),$prev_pageview_max_content:a,$prev_pageview_max_content_percentage:s<=1?1:Xs(a/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){U.addEventListener("scroll",this._updateScrollData),U.addEventListener("scrollend",this._updateScrollData),U.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){U.removeEventListener("scroll",this._updateScrollData),U.removeEventListener("scrollend",this._updateScrollData),U.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,U.document.documentElement.scrollHeight-U.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return U.scrollY||U.pageYOffset||U.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return U.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var t=U.document.documentElement.clientHeight||0;return this._scrollY()+t}}]),e}();function Xs(e,t,r){return Math.max(t,Math.min(e,r))}var Yi,Jc,He,lw={icontains:function(e){return window.location.href.toLowerCase().indexOf(e.toLowerCase())>-1},regex:function(e){return hb(window.location.href,e)},exact:function(e){return window.location.href===e}},cw=function(){function e(t){Me(this,e),this.instance=t}return Ie(e,[{key:"getSurveys",value:function(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(fc);if(i&&!n)return t(i);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var o,a=s.surveys||[];return(o=r.instance.persistence)===null||o===void 0||o.register(H({},fc,a)),t(a)})}},{key:"getActiveMatchingSurveys",value:function(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(i){var s=i.filter(function(o){return!(!o.start_date||o.end_date)}).filter(function(o){var a,l,u,c;if(!o.conditions)return!0;var h=(a=o.conditions)===null||a===void 0||!a.url||lw[(l=(u=o.conditions)===null||u===void 0?void 0:u.urlMatchType)!==null&&l!==void 0?l:"icontains"](o.conditions.url),m=(c=o.conditions)===null||c===void 0||!c.selector||document.querySelector(o.conditions.selector);return h&&m}).filter(function(o){if(!o.linked_flag_key&&!o.targeting_flag_key)return!0;var a=!o.linked_flag_key||r.instance.featureFlags.isFeatureEnabled(o.linked_flag_key),l=!o.targeting_flag_key||r.instance.featureFlags.isFeatureEnabled(o.targeting_flag_key);return a&&l});return t(s)},n)}}]),e}(),uw=6e4,dw=function(){function e(){var t=this;Me(this,e),H(this,"limits",{}),H(this,"checkForLimiting",function(r){try{var n=r.responseText;if(!n||!n.length)return;(JSON.parse(n).quota_limited||[]).forEach(function(i){j.info("[RateLimiter] ".concat(i||"events"," is quota limited.")),t.limits[i]=new Date().getTime()+uw})}catch(i){return void j.error(i)}})}return Ie(e,[{key:"isRateLimited",value:function(t){var r=this.limits[t||"events"]||!1;return r!==!1&&new Date().getTime()<r}}]),e}();(function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"})(Yi||(Yi={}));var yc=function(){},Ys={},ht="posthog",fo=U.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Sp=!fo&&dt.indexOf("MSIE")===-1&&dt.indexOf("Mozilla")===-1,Td=function(){var e,t,r;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(t=Ce==null?void 0:Ce.location,r=t==null?void 0:t.hostname,!!gt(r)&&r.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:yc,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(U==null||(e=U.location)===null||e===void 0?void 0:e.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(n){var i="Bad HTTP status: "+n.status+" "+n.statusText;j.error(i)},get_device_id:function(n){return n},_onCapture:yc,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},bc=function(e,t,r,n){var i,s=r!==ht&&He?r?He[r]:void 0:He,o={initComplete:!1,syncCode:!1},a=function(l){return function(u){o[l]||(o[l]=!0,o.initComplete&&o.syncCode&&(n==null||n(u)))}};if(s&&Jc===Yi.INIT_MODULE)i=s;else{if(s&&!Ge(s))return void j.error("You have already initialized "+r);i=new Kc}return i._init(e,t,r,a("initComplete")),i.toolbar.maybeLoadToolbar(),i.sessionRecording=new xb(i),i.sessionRecording.startRecordingIfEnabled(),i.webPerformance=new kb(i),i.webPerformance.startObservingIfEnabled(),i.config.__preview_measure_pageview_stats&&i.pageViewManager.startMeasuringScrollPosition(),i.__autocapture=i.config.autocapture,xr._setIsAutocaptureEnabled(i),xr._isAutocaptureEnabled&&(i.__autocapture=i.config.autocapture,xr.enabledForProject(i.config.token,100,100)?xr.isBrowserSupported()?xr.init(i):(i.__autocapture=!1,j.info("Disabling Automatic Event Collection because this browser is not supported")):(i.__autocapture=!1,j.info("Not in active bucket: disabling Automatic Event Collection."))),fn.DEBUG=fn.DEBUG||i.config.debug,!se(s)&&Ge(s)&&(i._execute_array.call(i.people,s.people),i._execute_array(s)),a("syncCode")(i),i},Kc=function(){function e(){var t=this;Me(this,e),this.config=Td(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=sw,this.segmentIntegration=function(){return ow(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.analyticsDefaultEndpoint="/e/",this.featureFlags=new lb(this),this.toolbar=new Mb(this),this.pageViewManager=new aw,this.surveys=new cw(this),this.rateLimiter=new dw,this.people={set:function(r,n,i){var s=gt(r)?H({},r,n):r;t.setPersonProperties(s),i==null||i({})},set_once:function(r,n,i){var s=gt(r)?H({},r,n):r;t.setPersonProperties(void 0,s),i==null||i({})}}}return Ie(e,[{key:"init",value:function(t,r,n){if(se(n))j.critical("You must name your new library: init(token, config, name)");else{if(n!==ht){var i=bc(t,r,n,function(s){He[n]=s,s._loaded()});return He[n]=i,i}j.critical("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(t){var r,n,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,u={segmentRegister:!1,syncCode:!1},c=function(P){return function(){u[P]||(u[P]=!0,u.segmentRegister&&u.syncCode&&(a==null||a(i)))}};if(this.set_config(Xe({},Td(),s,{name:o,token:t,callback_fn:(o===ht?o:ht+"."+o)+"._jsc"})),this._jsc=function(){},(U!=null&&(r=U.rrweb)!==null&&r!==void 0&&r.record||U!=null&&U.rrwebRecord)&&(this.__loaded_recorder_version=U==null||(l=U.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new gd(this.config),this._requestQueue=new Nb(this._handle_queued_event.bind(this)),this._retryQueue=new Kb(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new iw(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new gd(J(J({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((n=s.bootstrap)===null||n===void 0?void 0:n.distinctID)!==void 0){var h,m,f=this.config.get_device_id(jn()),p=(h=s.bootstrap)!==null&&h!==void 0&&h.isIdentifiedID?f:s.bootstrap.distinctID;this.persistence.set_user_state((m=s.bootstrap)!==null&&m!==void 0&&m.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:p})}if(this._hasBootstrappedFeatureFlags()){var v,x,S=Object.keys(((v=s.bootstrap)===null||v===void 0?void 0:v.featureFlags)||{}).filter(function(P){var y,O;return!((y=s.bootstrap)===null||y===void 0||(O=y.featureFlags)===null||O===void 0||!O[P])}).reduce(function(P,y){var O,M;return P[y]=((O=s.bootstrap)===null||O===void 0||(M=O.featureFlags)===null||M===void 0?void 0:M[y])||!1,P},{}),k=Object.keys(((x=s.bootstrap)===null||x===void 0?void 0:x.featureFlagPayloads)||{}).filter(function(P){return S[P]}).reduce(function(P,y){var O,M,E,I;return(O=s.bootstrap)!==null&&O!==void 0&&(M=O.featureFlagPayloads)!==null&&M!==void 0&&M[y]&&(P[y]=(E=s.bootstrap)===null||E===void 0||(I=E.featureFlagPayloads)===null||I===void 0?void 0:I[y]),P},{});this.featureFlags.receivedFeatureFlags({featureFlags:S,featureFlagPayloads:k})}if(!this.get_distinct_id()){var T=this.config.get_device_id(jn());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_user_state("anonymous")}U.addEventListener&&U.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_afterDecideResponse",value:function(t){var r;if(this.compression={},t.supportedCompression&&!this.config.disable_compression){var n,i={},s=dn(t.supportedCompression);try{for(s.s();!(n=s.n()).done;)i[n.value]=!0}catch(o){s.e(o)}finally{s.f()}this.compression=i}(r=t.analytics)!==null&&r!==void 0&&r.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint)}},{key:"_loaded",value:function(){var t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(r){j.critical("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Ce.title},{send_instantly:!0}),t||(new Cb(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var t;this.has_opted_out_capturing()||this.config.request_batching&&((t=this._requestQueue)===null||t===void 0||t.poll())}},{key:"_dom_loaded",value:function(){var t=this;this.has_opted_out_capturing()||Ln(this.__request_queue,function(r){t._send_request.apply(t,sc(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(t,r){if(se(t))return null;if(fo)return function(o){t(o,r)};var n=this._jsc,i=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+i+"]";return n[i]=function(o){delete n[i],t(o,r)},s}},{key:"_handle_unload",value:function(){var t,r;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(t=this._requestQueue)===null||t===void 0||t.unload(),(r=this._retryQueue)===null||r===void 0||r.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(t,r,n){var i=JSON.stringify(r);this.__compress_and_send_json_request(t,i,n||Ys,yc)}},{key:"__compress_and_send_json_request",value:function(t,r,n,i){var s=function(u,c,h){return u===Xr.GZipJS?[Xb(Yb(c),{mtime:0}),J(J({},h),{},{blob:!0,urlQueryArgs:{compression:Xr.GZipJS}})]:[{data:qc(c)},h]}(this.compression[Xr.GZipJS]?Xr.GZipJS:Xr.Base64,r,n),o=ws(s,2),a=o[0],l=o[1];this._send_request(t,a,l,i)}},{key:"_send_request",value:function(t,r,n,i){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(n._batchKey))if(Sp)this.__request_queue.push([t,r,n,i]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};n=Xe(s,n||{}),fo||(n.method="GET");var o="sendBeacon"in U.navigator&&n.transport==="sendBeacon";if(t=bp(t,n.urlQueryArgs||{},{ip:this.config.ip}),o)try{U.navigator.sendBeacon(t,Yc(r,J(J({},n),{},{sendBeacon:!0})))}catch{}else if(fo)try{wp({url:t,data:r,headers:this.config.xhr_headers,options:n,callback:i,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){j.error(c)}else{var a,l=Ce.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=t;var u=Ce.getElementsByTagName("script")[0];(a=u.parentNode)===null||a===void 0||a.insertBefore(l,u)}}}},{key:"_execute_array",value:function(t){var r,n=this,i=[],s=[],o=[];Ln(t,function(l){l&&(r=l[0],Ge(r)?o.push(l):hn(l)?l.call(n):Ge(l)&&r==="alias"?i.push(l):Ge(l)&&r.indexOf("capture")!==-1&&hn(n[r])?o.push(l):s.push(l))});var a=function(l,u){Ln(l,function(c){if(Ge(c[0])){var h=u;be(c,function(m){h=h[m[0]].apply(h,m.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};a(i,this),a(s,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var t,r;return((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags)&&Object.keys((r=this.config.bootstrap)===null||r===void 0?void 0:r.featureFlags).length>0||!1}},{key:"push",value:function(t){this._execute_array([t])}},{key:"capture",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ys;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return j.uninitializedWarning("posthog.capture");if(!function(c){var h=!1;try{var m=c.config.token,f=c.config.respect_dnt,p=c.config.opt_out_capturing_persistence_type,v=c.config.opt_out_capturing_cookie_prefix||void 0,x=c.config.window;m&&(h=_d(m,{respectDnt:f,persistenceType:p,persistencePrefix:v,window:x}))}catch(S){j.error("Unexpected error when checking capturing opt-out status: "+S)}return h}(this)){var i=(n=n||Ys).transport;if(i&&(n.transport=i),!se(t)&&gt(t)){if(!sb(dt,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:jn(),event:t,properties:this._calculate_event_properties(t,r||{})};t==="$identify"&&(s.$set=n.$set,s.$set_once=n.$set_once),(s=rb(s,n._noTruncate?null:this.config.properties_string_max_length)).timestamp=n.timestamp||new Date;var o=J(J({},s.properties.$set),s.$set);Z0(o)||this.setPersonPropertiesForFlags(o),j.info("send",s);var a=JSON.stringify(s),l=this.config.api_host+(n.endpoint||this.analyticsDefaultEndpoint),u=n!==Ys;return!this.config.request_batching||u&&!n._batchKey||n.send_instantly?this.__compress_and_send_json_request(l,a,n):this._requestQueue.enqueue(l,s,n),this._invokeCaptureHooks(t,s),s}}else j.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(t){this.__captureHooks.push(t)}},{key:"_invokeCaptureHooks",value:function(t,r){this.config._onCapture(t,r),be(this.__captureHooks,function(n){return n(t)})}},{key:"_calculate_event_properties",value:function(t,r){if(!this.persistence||!this.sessionPersistence)return r;var n=this.persistence.remove_event_timer(t),i=J({},r);if(i.token=this.config.token,t==="$snapshot"){var s=J(J({},this.persistence.properties()),this.sessionPersistence.properties());return i.distinct_id=s.distinct_id,i}var o=Be.properties();if(this.sessionManager){var a=this.sessionManager.checkAndGetSessionAndWindowId(),l=a.sessionId,u=a.windowId;i.$session_id=l,i.$window_id=u}if(this.config.__preview_measure_pageview_stats){var c={};t==="$pageview"?c=this.pageViewManager.doPageView():t==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),i=Xe(i,c)}if(t==="$pageview"&&(i.title=Ce.title),t==="$performance_event"){var h=this.persistence.properties();return i.distinct_id=h.distinct_id,i.$current_url=o.$current_url,i}if(!se(n)){var m=new Date().getTime()-n;i.$duration=parseFloat((m/1e3).toFixed(3))}i=Xe({},Be.properties(),this.persistence.properties(),this.sessionPersistence.properties(),i);var f=this.config.property_blacklist;Ge(f)?be(f,function(v){delete i[v]}):j.error("Invalid value for property_blacklist config: "+f);var p=this.config.sanitize_properties;return p&&(i=p(i,t)),i}},{key:"register",value:function(t,r){var n;(n=this.persistence)===null||n===void 0||n.register(t,r)}},{key:"register_once",value:function(t,r,n){var i;(i=this.persistence)===null||i===void 0||i.register_once(t,r,n)}},{key:"register_for_session",value:function(t){var r;(r=this.sessionPersistence)===null||r===void 0||r.register(t)}},{key:"unregister",value:function(t){var r;(r=this.persistence)===null||r===void 0||r.unregister(t)}},{key:"unregister_for_session",value:function(t){var r;(r=this.sessionPersistence)===null||r===void 0||r.unregister(t)}},{key:"_register_single",value:function(t,r){this.register(H({},t,r))}},{key:"getFeatureFlag",value:function(t,r){return this.featureFlags.getFeatureFlag(t,r)}},{key:"getFeatureFlagPayload",value:function(t){var r=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(r)}catch{return r}}},{key:"isFeatureEnabled",value:function(t,r){return this.featureFlags.isFeatureEnabled(t,r)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,r)}},{key:"getEarlyAccessFeatures",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(t,r)}},{key:"onFeatureFlags",value:function(t){return this.featureFlags.onFeatureFlags(t)}},{key:"onSessionId",value:function(t){var r,n;return(r=(n=this.sessionManager)===null||n===void 0?void 0:n.onSessionId(t))!==null&&r!==void 0?r:function(){}}},{key:"getSurveys",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(t,r)}},{key:"getActiveMatchingSurveys",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(t,r)}},{key:"identify",value:function(t,r,n){if(!this.__loaded||!this.persistence)return j.uninitializedWarning("posthog.identify");if(t){var i=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}t!==i&&t!==this.get_property(lo)&&(this.unregister(lo),this.register({distinct_id:t}));var o=this.persistence.get_user_state()==="anonymous";t!==i&&o?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(r||{},!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:i},{$set:r||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(i)):(r||n)&&this.setPersonProperties(r,n),t!==i&&(this.reloadFeatureFlags(),this.unregister(Io))}else j.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(t,r){(t||r)&&(this.setPersonPropertiesForFlags(t||{}),this.capture("$set",{$set:t||{},$set_once:r||{}}))}},{key:"group",value:function(t,r,n){if(t&&r){var i=this.getGroups();i[t]!==r&&this.resetGroupPropertiesForFlags(t),this.register({$groups:J(J({},i),{},H({},t,r))}),n&&(this.capture("$groupidentify",{$group_type:t,$group_key:r,$group_set:n}),this.setGroupPropertiesForFlags(H({},t,n))),i[t]===r||n||this.reloadFeatureFlags()}else j.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(t,r)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(t,r)}},{key:"resetGroupPropertiesForFlags",value:function(t){this.featureFlags.resetGroupPropertiesForFlags(t)}},{key:"reset",value:function(t){var r,n,i,s;if(!this.__loaded)return j.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");(r=this.persistence)===null||r===void 0||r.clear(),(n=this.sessionPersistence)===null||n===void 0||n.clear(),(i=this.persistence)===null||i===void 0||i.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var a=this.config.get_device_id(jn());this.register_once({distinct_id:a,$device_id:t?a:o},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var t,r;return(t=(r=this.sessionManager)===null||r===void 0?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}},{key:"get_session_replay_url",value:function(t){if(!this.sessionManager)return"";var r=this.config.ui_host||this.config.api_host,n=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=n.sessionId,s=n.sessionStartTimestamp,o=r+"/replay/"+i;if(t!=null&&t.withTimestamp&&s){var a,l=(a=t.timestampLookBack)!==null&&a!==void 0?a:10;if(!s)return o;var u=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);o+="?t=".concat(u)}return o}},{key:"alias",value:function(t,r){return t===this.get_property(up)?(j.critical("Attempting to create alias for existing People user - aborting."),-2):(se(r)&&(r=this.get_distinct_id()),t!==r?(this._register_single(lo,t),this.capture("$create_alias",{alias:t,distinct_id:r})):(j.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1))}},{key:"set_config",value:function(t){var r,n,i=J({},this.config);Rr(t)&&(Xe(this.config,t),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(r=this.persistence)===null||r===void 0||r.update_config(this.config),(n=this.sessionPersistence)===null||n===void 0||n.update_config(this.config),Ae.is_supported()&&Ae.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(fn.DEBUG=!0),this.sessionRecording&&!se(t.disable_session_recording)&&i.disable_session_recording!==t.disable_session_recording&&(t.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var t;return!((t=this.sessionRecording)===null||t===void 0||!t.started)}},{key:"loadToolbar",value:function(t){return this.toolbar.loadToolbar(t)}},{key:"get_property",value:function(t){var r;return(r=this.persistence)===null||r===void 0?void 0:r.props[t]}},{key:"getSessionProperty",value:function(t){var r;return(r=this.sessionPersistence)===null||r===void 0?void 0:r.props[t]}},{key:"toString",value:function(){var t,r=(t=this.config.name)!==null&&t!==void 0?t:ht;return r!==ht&&(r=ht+"."+r),r}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&Ae.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!cr.get("ph_optout")||(cr.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(t){var r,n,i,s,o;if(t&&t.clear_persistence)i=!0;else{if(!t||!t.enable_persistence)return;i=!1}this.config.disable_persistence||((r=this.persistence)===null||r===void 0?void 0:r.disabled)===i||(s=this.persistence)===null||s===void 0||s.set_disabled(i),this.config.disable_persistence||((n=this.sessionPersistence)===null||n===void 0?void 0:n.disabled)===i||(o=this.sessionPersistence)===null||o===void 0||o.set_disabled(i)}},{key:"_gdpr_call_func",value:function(t,r){return r=Xe({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},r||{}),Ae.is_supported()||r.persistence_type!=="localStorage"||(r.persistence_type="cookie"),t(this.config.token,{capture:r.capture,captureEventName:r.capture_event_name,captureProperties:r.capture_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieExpiration:r.cookie_expiration,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie})}},{key:"opt_in_capturing",value:function(t){t=Xe({enable_persistence:!0},t||{}),this._gdpr_call_func($b,t),this._gdpr_update_persistence(t)}},{key:"opt_out_capturing",value:function(t){var r=Xe({clear_persistence:!0},t||{});this._gdpr_call_func(Fb,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(t){return this._gdpr_call_func(Rb,t)}},{key:"has_opted_out_capturing",value:function(t){return this._gdpr_call_func(_d,t)}},{key:"clear_opt_in_out_capturing",value:function(t){var r=Xe({enable_persistence:!0},t??{});this._gdpr_call_func(jb,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(t){t===!1?(U.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(U.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),e}();(function(e,t){for(var r=0;r<t.length;r++)e.prototype[t[r]]=op(e.prototype[t[r]])})(Kc,["identify"]);var Cd,Pd,br={},fw=function(){He.init=function(e,t,r){if(r)return He[r]||(He[r]=br[r]=bc(e||"",t||{},r,function(i){He[r]=br[r]=i,i._loaded()})),He[r];var n=He;return br[ht]?n=br[ht]:e&&(n=bc(e,t||{},ht,function(i){br[ht]=i,i._loaded()}),br[ht]=n),He=n,Jc===Yi.INIT_SNIPPET&&(U[ht]=He),be(br,function(i,s){s!==ht&&(He[s]=i)}),n}},hw=function(){function e(){e.done||(e.done=!0,Sp=!1,be(br,function(t){t._dom_loaded()}))}Ce.addEventListener&&(Ce.readyState==="complete"?e():Ce.addEventListener("DOMContentLoaded",e,!1)),Bi(U,"load",e,!0)};(function(e){e.Popover="popover",e.API="api"})(Cd||(Cd={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(Pd||(Pd={}));var ho=(Jc=Yi.INIT_MODULE,He=new Kc,fw(),He.init(),hw(),He),pw=C.createContext({client:ho});function mw(e){var t=e.children,r=e.client,n=e.apiKey,i=e.options,s=C.useMemo(function(){return r&&n&&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."),r&&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."),r||(n&&(ho.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),ho.init(n,i)),ho)},[r,n]);return C.createElement(pw.Provider,{value:{client:s}},t)}const Ep=({children:e,user:t})=>g.jsx(mw,{apiKey:process.env.REACT_APP_PUBLIC_POSTHOG_KEY,options:{api_host:process.env.REACT_APP_PUBLIC_POSTHOG_HOST,autocapture:!1,secure_cookie:!0,bootstrap:{distinctID:(t==null?void 0:t.id)||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!(t!=null&&t.id)}},children:e}),kp=({children:e,locale:t,messages:r})=>{const n=t||"en",i={...pg[n],...r||{}};return g.jsx(Gv,{locale:n,messages:i,children:e})},dr=C.createContext(null),Tp=({children:e,user:t})=>g.jsx(dr.Provider,{value:t,children:e}),gw=({children:e,intl:t,user:r})=>g.jsx(kp,{locale:t==null?void 0:t.locale,messages:t==null?void 0:t.messages,children:g.jsx(Tp,{user:r,children:g.jsx(Zh,{children:g.jsx(Ep,{user:r,children:e})})})});const ll="joinCommunityButton",Zc=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const i=te(),s=C.useContext(dr),o=s&&typeof s.id=="string",[a,l]=C.useState(e),[u,c]=C.useState(e?"joined":"notJoined");C.useEffect(()=>{u==="joining"?c("joined"):u==="leaving"&&c("notJoined")},[a]);const h={},m={};return a&&u!=="leaving"&&(h["data-hover-text"]=i.formatMessage({id:`${ll}_leave`}),h["aria-label"]=i.formatMessage({id:`${ll}_member_aria`}),m["aria-hidden"]="true"),g.jsx(Oe,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&u!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async f=>{o&&(f.currentTarget.blur(),a?(c("leaving"),typeof n=="function"&&await n()):(c("joining"),typeof r=="function"&&await r()),l(!a))},className:L("join-community-button",u,{active:u==="joining"}),disabled:!o,...h,children:g.jsx("span",{className:"text",...m,children:i.formatMessage({id:`${ll}${["joining","leaving"].includes(u)?`_${u}`:a?"_member":t?"_short":""}`})})})};const cl="communityDetails_",vw=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:i="",...s})=>{const o=te(),a=r||(n==null?void 0:n.length)||0;return g.jsxs("div",{className:L("community-details",i),children:[g.jsx(go,{}),g.jsxs("div",{className:"member-details",children:[g.jsxs("div",{className:"top",children:[g.jsxs("h3",{children:[o.formatMessage({id:`${cl}members`}),g.jsx("span",{className:"count",children:a})]}),g.jsx("p",{className:"text-small",children:g.jsx("a",{href:`/communities/${t}/members`,children:o.formatMessage({id:`${cl}viewAll`})})})]}),g.jsx(Sh,{contributors:{total:r,data:n!=null&&n.length?n:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),g.jsx(Zc,{isMember:e,...s}),e&&g.jsx(Oe,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:o.formatMessage({id:`${cl}invite`})})]})};const _w=({breadcrumbs:e,cutoff:t=20,className:r=""})=>{const n=te();return g.jsxs(g.Fragment,{children:[g.jsx(ze,{element:"p",children:n.formatMessage({id:"breadcrumbs_label"})}),g.jsx("ul",{className:L("breadcrumbs text-small",r),children:e.map(({text:i,href:s,current:o=!1},a)=>g.jsxs("li",{children:[o&&g.jsx(ze,{element:"span",children:n.formatMessage({id:"breadcrumbs_currentPage"})}),g.jsx(vs,{href:o?void 0:s,children:Ic(i,t)})]},`${window.btoa(i)}_${a}`))})]})};const yw=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:i=""})=>{const s=te(),o=t?[{id:"all",text:typeof t!="boolean"&&t.text||s.formatMessage({id:"filters_all"})},...e]:e,[a,l]=C.useState(t?["all"]:[]),u=(c,h)=>{let m=[];a.includes(c)?m=a.filter(f=>f!==c):c==="all"?m=["all"]:r?m=[...a.filter(f=>f!=="all"),c]:m=[c],l(f=>(n&&typeof n=="function"&&n({current:m,previous:f}),m)),h&&typeof h=="function"&&h()};return g.jsx("ul",{className:L("filters",i),children:o.map(({id:c,text:h,disabled:m=!1,callback:f=()=>{}})=>{let p={};return m&&(p={disabled:!0,"aria-label":s.formatMessage({id:"filters_disabled"},{name:h})}),g.jsx("li",{children:g.jsx("button",{className:L(c,{selected:a.includes(c)}),onClick:v=>{v.preventDefault(),v.stopPropagation(),u(c,f)},...p,children:h})},c)})})},bw=(e,t)=>{const r=String(e);if(!t||!t.length)return`/${r}`;let n="";return t.forEach(({url:i,position:s})=>{s==="before-lang"?n+=`/${i}`:(n.includes(`/${r}/`)||(n+=`/${r}`),n+=`/${i}`)}),n.includes(`/${r}/`)||(n+=`/${r}`),n};const ul={en:"English",es:"Español",fr:"Français",pt:"Português"},Js="languageSwitcher_",ww=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:r=!1,translations:n,onChange:i=()=>{},urlParts:s,variant:o="default",label:a,className:l=""})=>{const u=te(),[c,h]=C.useState(e);if(C.useEffect(()=>{e!==c&&h(e)},[e]),!n||!Object.values(n).some(v=>v&&v.post_name))return null;const f=Object.keys(n),p=c!==e;return g.jsxs("div",{className:L("language-switcher text-small",o,l),children:[g.jsxs("nav",{children:[o!=="short"&&g.jsx("p",{children:a||u.formatMessage({id:`${Js}label`})}),g.jsx("ul",{children:f.map(v=>{if(!ul[v])return null;let x={className:v};return c===v?x["aria-label"]=u.formatMessage({id:`${Js}selected`},{language:ul[v]}):x={...x,href:bw(v,s),onClick:S=>{S.preventDefault(),S.stopPropagation(),h(v),i(v)}},g.jsx("li",{children:g.jsx(vs,{...x,fallbackElement:"span",children:ul[v]})},v)})}),o!=="short"&&!p&&g.jsx("p",{children:u.formatMessage({id:`${Js}translation_${t?"original":r?"human":"machine"}`})})]}),o!=="short"&&!p&&!t&&!r&&g.jsx("small",{children:u.formatMessage({id:`${Js}disclaimer`},{email:In.support,link:v=>{const x=`mailto:${v}`;return g.jsx("a",{href:x,children:v})}})})]})};const dl=Fl({locale:"en",messages:Tc}),Cp=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:i=!1,messages:s={button:dl.formatMessage({id:"loadMore_button"}),endOfFeed:dl.formatMessage({id:"loadMore_endOfFeed"}),error:dl.formatMessage({id:"loadMore_error"})},className:o="",gtmContext:a="LoadMore"})=>{const[l,u]=C.useState(!1),[c,h]=C.useState(!1);if(t<=0||t<r*e)return null;const m=async f=>{try{await n(f)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):u(!0)}};return g.jsxs("footer",{className:L("load-more",o),children:[l&&g.jsx("p",{className:"error",children:s.error}),c?g.jsx("p",{children:s.endOfFeed}):g.jsx(Oe,{variant:"secondary",icon:i,onClick:m,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:s.button})]})};let Ks=!1;const Pp=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const i=te(),s=C.useRef(null),[o,a]=C.useState(!1),l=u=>{s.current&&u.target instanceof HTMLElement&&!s.current.contains(u.target)&&a(!1)};return C.useEffect(()=>(document.addEventListener("click",l,!0),()=>{document.removeEventListener("click",l,!0)})),C.createElement(e,{ref:s,className:L("more-menu text-medium",n),children:g.jsxs(g.Fragment,{children:[g.jsx(Oe,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!o),"aria-haspopup":"true","aria-expanded":o,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),g.jsx("ul",{id:t,hidden:!o,children:r.map(({href:u,onClick:c,text:h,icon:m,...f},p)=>{const v={...f,onClick:x=>{a(!1),typeof c=="function"&&c(x)},onFocus:()=>{Ks&&(clearTimeout(Ks),Ks=!1)},onBlur:()=>{Ks=setTimeout(()=>{a(!1)},100)}};return u&&(v.href=u),g.jsx("li",{children:g.jsx(Oe,{variant:"tertiary",size:"medium",icon:m?{icon:m,position:"left"}:!1,...v,children:h})},`${window.btoa(h)}_${p}`)})})]})})};const eu=({variant:e="default",version:t="default",className:r="",...n})=>g.jsx("p",{className:"logo-wrapper",children:g.jsx("a",{href:"/home/",className:L("logo",e,t,r),...n,children:g.jsx(ze,{children:g.jsx(Mr,{id:"apolitical"})})})});const xw={"2-1":901},Sw=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const i=ms(!0);let s=n;return C.Children.count(n)===1&&(s=C.Children.toArray(n)[0],s.props&&(s=s.props.children)),g.jsx("section",{className:L("columns",`layout-${e}`,r),children:C.Children.map(s,(o,a)=>t!==!1&&a===t&&i&&i<xw[e]?null:o)})};/*!
65
+ * cookie
66
+ * Copyright(c) 2012-2014 Roman Shtylman
67
+ * Copyright(c) 2015 Douglas Christopher Wilson
68
+ * MIT Licensed
69
+ */var Ap=kw,Ad=Tw,Ew=Object.prototype.toString,Zs=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function kw(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},i=n.decode||Cw,s=0;s<e.length;){var o=e.indexOf("=",s);if(o===-1)break;var a=e.indexOf(";",s);if(a===-1)a=e.length;else if(a<o){s=e.lastIndexOf(";",o-1)+1;continue}var l=e.slice(s,o).trim();if(r[l]===void 0){var u=e.slice(o+1,a).trim();u.charCodeAt(0)===34&&(u=u.slice(1,-1)),r[l]=Ow(u,i)}s=a+1}return r}function Tw(e,t,r){var n=r||{},i=n.encode||Pw;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Zs.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!Zs.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Zs.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!Zs.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){var l=n.expires;if(!Aw(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+l.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.priority){var u=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(u){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var c=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(c){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Cw(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Pw(e){return encodeURIComponent(e)}function Aw(e){return Ew.call(e)==="[object Date]"||e instanceof Date}function Ow(e,t){try{return t(e)}catch{return e}}function Mw(){return typeof document=="object"&&typeof document.cookie=="string"}function Iw(e){return typeof e=="string"?Ap(e):typeof e=="object"&&e!==null?e:{}}function fl(e,t={}){const r=$w(e);if(!t.doNotParse)try{return JSON.parse(r)}catch{}return e}function $w(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Op{constructor(t,r={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const i=this.cookies;this.cookies=Ap(document.cookie),this._checkChanges(i)};const n=typeof document>"u"?"":document.cookie;this.cookies=Iw(t||n),this.defaultSetOptions=r,this.HAS_DOCUMENT_COOKIE=Mw()}_emitChange(t){for(let r=0;r<this.changeListeners.length;++r)this.changeListeners[r](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:fl(t[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,r={}){return r.doNotUpdate||this.update(),fl(this.cookies[t],r)}getAll(t={}){t.doNotUpdate||this.update();const r={};for(let n in this.cookies)r[n]=fl(this.cookies[n],t);return r}set(t,r,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const i=typeof r=="string"?r:JSON.stringify(r);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:i}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Ad(t,i,n)),this._emitChange({name:t,value:r,options:n})}remove(t,r){const n=r=Object.assign(Object.assign({},r),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Ad(t,"",n)),this._emitChange({name:t,value:void 0,options:r})}addChangeListener(t){this.changeListeners.push(t),this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const r=this.changeListeners.indexOf(t);r>=0&&this.changeListeners.splice(r,1),this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const Mp=Q.createContext(new Op),{Provider:Fw,Consumer:R1}=Mp,Rw=Mp;class jw extends Q.Component{constructor(t){super(t),t.cookies?this.cookies=t.cookies:this.cookies=new Op(void 0,t.defaultSetOptions)}render(){return Q.createElement(Fw,{value:this.cookies},this.props.children)}}function Nw(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Lw(e){const t=C.useContext(Rw);if(!t)throw new Error("Missing <CookiesProvider>");const[r,n]=C.useState(()=>t.getAll());Nw()&&C.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Dw(e||null,l,r)&&n(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,r]);const i=C.useMemo(()=>t.set.bind(t),[t]),s=C.useMemo(()=>t.remove.bind(t),[t]),o=C.useMemo(()=>t.update.bind(t),[t]);return[r,i,s,o]}function Dw(e,t,r){if(!e)return!0;for(let n of e)if(t[n]!==r[n])return!0;return!1}const hl="cookieBanner_",pl=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],ml=new Date(Date.now()+12*30*24*60*60*1e3),Ip=()=>{const e=te(),[t,r,n]=Lw(pl),[i,s]=C.useState(!t["apol-cookie-banner"]),o=()=>{pl.forEach(c=>{r(c,!0,{path:"/",expires:ml,domain:c==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),s(!1),window.location.reload()},a=()=>{r("apol-cookie-banner",!0,{path:"/",expires:ml}),pl.forEach(c=>{if(c==="apol-cookie-banner"){r(c,!0,{path:"/",expires:ml});return}n(c)}),s(!1)};if(!i)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:o,gtmType:"accepted-all"}],u=[];return l.forEach(c=>{u.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:`${hl}buttons_${c.id}`})})}),g.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[g.jsx("h6",{children:e.formatMessage({id:`${hl}title`})}),g.jsx("p",{children:e.formatMessage({id:`${hl}text`})}),g.jsx(gs,{buttons:u})]})},or={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:In["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:In["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:In.support,gtmType:"concierge-email-click"},business:{email:In.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 Nn="footer_",Ro="SiteFooter",Od=({group:e})=>{const t=or[e].order||[];let r=!1;return"text"in or[e]&&(r=or[e].text),g.jsxs(C.Fragment,{children:[g.jsx("p",{className:"pre-title",children:g.jsx(Mr,{id:`${Nn}${e}`})}),Array.isArray(t)&&t.length>0&&g.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:i,gtmType:s}=or[e][n],o={};return["legal"].includes(e)&&(o.target="_blank",o.rel="noopener"),g.jsx("li",{children:g.jsx("a",{href:i,className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":s,...o,children:g.jsx(Mr,{id:`${Nn}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&g.jsx("dl",{className:"text-medium",children:r.order.map(n=>g.jsxs(C.Fragment,{children:[g.jsx("dt",{children:g.jsx(Mr,{id:`${Nn}${e}_${n}`})}),g.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&g.jsx("address",{children:g.jsx(Mr,{id:`${Nn}${e}_${n}_address`,values:{br:g.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&g.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},tu=()=>g.jsx("div",{id:"footer",children:g.jsxs("div",{className:"wrapper",children:[g.jsx(xc,{element:"hr"}),g.jsx(eu,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":"logo-homepage-link"}),g.jsx("footer",{children:["platform","community","company","contact"].map(e=>g.jsxs("div",{className:"group",children:[g.jsx(Od,{group:e}),Object.keys(or[e]).includes("child")&&g.jsx(Od,{group:or[e].child})]},e))}),g.jsx("hr",{}),g.jsxs("div",{className:"sub-footer",children:[g.jsx("ul",{children:Array.isArray(or.social.order)&&or.social.order.map(e=>{const t=or.social[e];return g.jsx("li",{className:e,children:g.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":"social-click",children:g.jsx("span",{className:"hidden",children:g.jsx(Mr,{id:`${Nn}social_${e}`})})})},e)})}),g.jsx("small",{children:g.jsx(Mr,{id:`${Nn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const eo="emailHelperTextBox_",Bw=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const i=te(),[s,o]=C.useState({path:`${eo}default`,type:"default",link:{},mail:{},error:""}),[a,l]=C.useState(!1),u=C.useCallback(f=>{f.preventDefault(),f.stopPropagation();const p=v=>{o({path:`${eo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:x=>u(x),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:v})};if(typeof n!="function"){p(i.formatMessage({id:`${eo}error_noFunction`}));return}l(!0),n(t).then(()=>{localStorage.setItem("email",t),window.location.href=r||"/signup/verify-email"}).catch(v=>{p(v.message)}).finally(()=>{l(!1)})},[t,r,n]);C.useEffect(()=>{let f=eo,p="default",v={},x={};switch(e){case"gov":f+="autoApproved",p="success";break;case"nonGov":f+="unrecognisedEmail",p="error",v={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":f+="pendingApproval",p="error",x={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":f+="emailUnverified",p="error",v={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:S=>u(S),"data-testid":"send-verify-email-click"};break;case"exists":f+="emailAlreadyExists",p="error",v={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},x={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:f+="default",v={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}o({...s,path:f,type:p,link:v,mail:x})},[e]);const c={};return["link","mail"].forEach(f=>{c[f]=Object.keys(s[f]).length?p=>g.jsx("a",{...s[f],children:p}):p=>p}),g.jsx(gh,{type:s.type,heading:a?!1:i.formatMessage({id:`${s.path}_title`}),children:a?g.jsxs(g.Fragment,{children:[g.jsx(Vt,{element:"span"}),g.jsx(Vt,{element:"span"})]}):i.formatMessage({id:`${s.path}_text`},{...c,strong:f=>g.jsx("strong",{children:f}),em:f=>g.jsx("em",{children:f}),br:g.jsxs(g.Fragment,{children:[g.jsx("br",{}),g.jsx("br",{})]}),error:s.error})})};const to="passwordRules_",$p="isMoreThanEightCharacters",Fp="includesNumberAndSymbol",Rp="includesLowerAndUppercase",Hw={[$p]:"8Characters",[Fp]:"numberSymbol",[Rp]:"lowercaseUppercase"},Uw=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=te();return g.jsxs("aside",{className:L("password-rules",t),children:[g.jsx("small",{children:r.formatMessage({id:`${to}intro`})}),g.jsx("ul",{children:[$p,Fp,Rp].map(n=>g.jsxs("li",{className:L({matches:e[n]}),children:[g.jsxs(ze,{children:[r.formatMessage({id:`${to}rule_label`})," "]}),g.jsx("span",{children:r.formatMessage({id:`${to}rule_${Hw[n]}`})}),!e[n]&&g.jsxs(ze,{element:"strong",children:[" "," ",r.formatMessage({id:`${to}notMet`})]})]},`rule-${n}`))})]})},Gw=C.memo(Uw);const zw=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:i=()=>{}},className:s="",hasLoaded:o=!1})=>{const a=te(),[l,u]=C.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const S=await r();u(k=>({...k,setUp:!0,id:S&&S.id,disabled:!1}))}catch(S){u(k=>({...k,setUp:!0,disabled:!0})),i(S)}};if(C.useEffect(()=>{o&&!l.setUp&&c()},[o]),!o)return g.jsx(Vt,{className:"rating-placeholder"});const{id:h,rating:m,disabled:f}=l,p="ratings_",v={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},x=async S=>{if(!(!h||f))try{u(k=>({...k,rating:S,disabled:!0})),await n({id:h,value:S})}catch(k){u(T=>({...T,rating:null})),i(k)}finally{u(k=>({...k,disabled:!1}))}};return g.jsxs("div",{className:L("rating",s),children:[g.jsx("span",{className:"label",children:v[m?"success":"text"]}),g.jsx("ol",{children:Array.from(new Array(t).keys()).map(S=>{const k=S+1;return g.jsx("li",{className:L({selected:m&&k<=m}),children:g.jsx(Oe,{variant:"tertiary",size:"small",icon:{icon:`star${!m||k>m?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:k,total:t})}${k===1||k===t?` - ${v[k===1?"low":"high"]}`:""}`,onClick:T=>{T.preventDefault(),T.stopPropagation(),x(k)},disabled:f})},`rating-${k}`)})})]})};const jp=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:i="search-bar",gtmEvent:s="form-submission"})=>{const{searchIsOpen:o=!0,isDesktopVersion:a=!1}=r||{},l=te(),u=C.useRef(null);ln(()=>{!r||a||!o||u.current&&u.current.focus()},[o]);const c=h=>{h.preventDefault(),h.stopPropagation(),!(!u.current||!u.current.value||u.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(u.current.value)}`)};return g.jsx("form",{onSubmit:c,className:L("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":s,children:g.jsx("fieldset",{id:`${e}-form`,hidden:r?!o:!1,role:"search",children:g.jsxs("p",{children:[g.jsx(ze,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),g.jsx("input",{ref:u,type:"search",id:e,name:e,defaultValue:n,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&c(h)}}),g.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),u.current&&u.current.value&&(u.current.value="")},children:g.jsx(ze,{children:l.formatMessage({id:"search_clear"})})}),g.jsx("button",{className:"search",onClick:c,children:g.jsx(ze,{children:l.formatMessage({id:"search_cta"})})})]})})})};var qw="Expected a function",Np="__lodash_hash_undefined__",Lp=1/0,Vw="[object Function]",Qw="[object GeneratorFunction]",Ww="[object Symbol]",Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yw=/^\w*$/,Jw=/^\./,Kw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zw=/[\\^$.*+?()[\]{}|]/g,ex=/\\(\\)?/g,tx=/^\[object .+?Constructor\]$/,rx=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,nx=typeof self=="object"&&self&&self.Object===Object&&self,ru=rx||nx||Function("return this")();function ix(e,t){return e==null?void 0:e[t]}function sx(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var ox=Array.prototype,ax=Function.prototype,Dp=Object.prototype,gl=ru["__core-js_shared__"],Md=function(){var e=/[^.]+$/.exec(gl&&gl.keys&&gl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Bp=ax.toString,nu=Dp.hasOwnProperty,Hp=Dp.toString,lx=RegExp("^"+Bp.call(nu).replace(Zw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Id=ru.Symbol,cx=ox.splice,ux=Up(ru,"Map"),Ji=Up(Object,"create"),$d=Id?Id.prototype:void 0,Fd=$d?$d.toString:void 0;function mn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dx(){this.__data__=Ji?Ji(null):{}}function fx(e){return this.has(e)&&delete this.__data__[e]}function hx(e){var t=this.__data__;if(Ji){var r=t[e];return r===Np?void 0:r}return nu.call(t,e)?t[e]:void 0}function px(e){var t=this.__data__;return Ji?t[e]!==void 0:nu.call(t,e)}function mx(e,t){var r=this.__data__;return r[e]=Ji&&t===void 0?Np:t,this}mn.prototype.clear=dx;mn.prototype.delete=fx;mn.prototype.get=hx;mn.prototype.has=px;mn.prototype.set=mx;function vi(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function gx(){this.__data__=[]}function vx(e){var t=this.__data__,r=Yo(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():cx.call(t,r,1),!0}function _x(e){var t=this.__data__,r=Yo(t,e);return r<0?void 0:t[r][1]}function yx(e){return Yo(this.__data__,e)>-1}function bx(e,t){var r=this.__data__,n=Yo(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}vi.prototype.clear=gx;vi.prototype.delete=vx;vi.prototype.get=_x;vi.prototype.has=yx;vi.prototype.set=bx;function _n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function wx(){this.__data__={hash:new mn,map:new(ux||vi),string:new mn}}function xx(e){return Jo(this,e).delete(e)}function Sx(e){return Jo(this,e).get(e)}function Ex(e){return Jo(this,e).has(e)}function kx(e,t){return Jo(this,e).set(e,t),this}_n.prototype.clear=wx;_n.prototype.delete=xx;_n.prototype.get=Sx;_n.prototype.has=Ex;_n.prototype.set=kx;function Yo(e,t){for(var r=e.length;r--;)if(jx(e[r][0],t))return r;return-1}function Tx(e,t){t=Ox(t,e)?[t]:Ax(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Fx(t[r++])];return r&&r==n?e:void 0}function Cx(e){if(!zp(e)||Ix(e))return!1;var t=Nx(e)||sx(e)?lx:tx;return t.test(Rx(e))}function Px(e){if(typeof e=="string")return e;if(su(e))return Fd?Fd.call(e):"";var t=e+"";return t=="0"&&1/e==-Lp?"-0":t}function Ax(e){return Gp(e)?e:$x(e)}function Jo(e,t){var r=e.__data__;return Mx(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Up(e,t){var r=ix(e,t);return Cx(r)?r:void 0}function Ox(e,t){if(Gp(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||su(e)?!0:Yw.test(e)||!Xw.test(e)||t!=null&&e in Object(t)}function Mx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ix(e){return!!Md&&Md in e}var $x=iu(function(e){e=Dx(e);var t=[];return Jw.test(e)&&t.push(""),e.replace(Kw,function(r,n,i,s){t.push(i?s.replace(ex,"$1"):n||r)}),t});function Fx(e){if(typeof e=="string"||su(e))return e;var t=e+"";return t=="0"&&1/e==-Lp?"-0":t}function Rx(e){if(e!=null){try{return Bp.call(e)}catch{}try{return e+""}catch{}}return""}function iu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(qw);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o),o};return r.cache=new(iu.Cache||_n),r}iu.Cache=_n;function jx(e,t){return e===t||e!==e&&t!==t}var Gp=Array.isArray;function Nx(e){var t=zp(e)?Hp.call(e):"";return t==Vw||t==Qw}function zp(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Lx(e){return!!e&&typeof e=="object"}function su(e){return typeof e=="symbol"||Lx(e)&&Hp.call(e)==Ww}function Dx(e){return e==null?"":Px(e)}function Bx(e,t,r){var n=e==null?void 0:Tx(e,t);return n===void 0?r:n}var Hx=Bx;const qp=fi(Hx),_e={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=s=>{const o=`logged${e?"In":"Out"}`;return t>=r[s][o]};let i={};return["navigation","search"].forEach(s=>{i[s]=n(s)}),i},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(i=>i===!0).length||r([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:r,dispatch:n})=>{if(r[e]===t||e==="account"&&t===!1&&r.navigation===!0)return;const i=Date.now();if(!t&&_e.handlerCalled[e]&&i-_e.handlerCalled[e]<500)return;_e.handlerCalled[e]=i;let s=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(o=>{o===e||r[o]===!1||s.push({type:`menus.${o}`,value:!1})}),n(s)},findFirstChild:(e,t,r=!1)=>{if(!e||!e[0])return!1;for(let n=0;n<=e.length;n++){if(!e[n])continue;if(e[n][t]&&(!r||e[n][t].includes(r)))return e[n];if(!t.includes("."))continue;const i=qp(e[n],t);if(!(typeof i>"u")&&(!r||i[t]&&i[t].includes(r)||i.value&&i.value.includes(r)||i.toString().includes(r)))return e[n]}return e[0].children?_e.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:i})=>{if(!t.current||!t.current.children)return;const s=r?"desktop":"default";if(n[e][s]){n[e][s].focus();return}let o,a;switch(e){case"navigation":if(r){const l=_e.findFirstChild(t.current.children,"attributes.aria-controls","navigation");o=_e.findFirstChild(l.children,"href")}else o=_e.findFirstChild(t.current.children,"href");o||(o=t.current);break;case"account":if(a=_e.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;o=_e.findFirstChild(a.children,"href");break;default:return}o&&(i([{type:`focusElements.${e}.${s}`,value:o}]),o.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(_e.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(_e.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(_e.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{_e.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Ki={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"}}}},jo=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:i=()=>{},doTrack:s=null})=>{const o=te(),a=qp(Ki,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,u=s===null?l?a.doTrack:!0:s,c=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let m=!1;if(a.href){let k=a.gtmType||`${e}-click`;if(k.includes(".")){const T=k.split("."),P=T[T.length-2];k=`${P==="topics"?`${P}-`:""}${T[T.length-1]}`}m={href:a.href,role:"menuitem"},u&&(m={...m,className:"gtm-trackable","data-gtm-event-type":k,"data-gtm-event-context":"HeaderButtons"}),c&&(m={...m,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const f=a.order&&a.order[0]&&a[a.order[0]],p=f&&a[a.order[0]].order,v=m&&window.location.pathname===a.href;let x={},S={};if(f){const k=a.menuId||e,T={onClick:P=>_e.events.onClick(P,{id:k,callback:i,isOpen:n[k]}),onFocus:()=>_e.events.onFocus({id:k}),onBlur:()=>_e.events.onBlur({id:k,callback:i}),onMouseLeave:()=>_e.events.onBlur({id:k,callback:i}),onMouseEnter:()=>_e.events.onMouseEnter({id:k,callback:i})};r&&(p&&(x={...T,onKeyPress:P=>{P.key==="Enter"&&_e.events.onClick(P,{id:k,callback:i,isOpen:n[k]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[k],"aria-controls":k}),S={hidden:k in n?!n[k]:!0}),p||(S={...S,...T})}return g.jsxs("li",{className:L({[a.className]:a.className,"has-submenu":f,parent:p,active:v}),role:"none",...x,children:[m?C.createElement(c?Oe:"a",m,o.formatMessage({id:h})):o.formatMessage({id:h}),a.order&&g.jsx("ul",{...S,children:a.order.map(k=>{if(!a[k])return null;const T={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:i,doTrack:l?u:null};return a[k].order?g.jsxs("li",{className:L({[a[k].className]:a[k].className}),children:[o.formatMessage({id:`${h}_${k}`}),g.jsx("ul",{children:a[k].order.map(P=>g.jsx(jo,{id:`${e}.${k}.${P}`,...T},P))})]},k):g.jsx(jo,{id:`${e}.${k}`,...T},k)})})]},e)};const Ux={height:67,height_desktop:83},ou=()=>{const e=te(),t=C.useContext(dr),r=ms(!0,!0),n=t&&typeof t.id=="string",i=C.useMemo(()=>_e.getIsDesktopVersion(n,r),[n,r]),[s,o]=C.useReducer(ag,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:l,focusElements:u}=s;rf({scrollPosition:Ux[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&l.navigation||_e.shouldChangeHeaderIsVisible(!0,l,o)},scrollDown:()=>{!i&&l.navigation||_e.shouldChangeHeaderIsVisible(!1,l,o)}}});const c=(m,f)=>{_e.handleMenus({id:m,value:f,menus:l,dispatch:o})},h=C.useRef(null);return ln(()=>{l.navigation&&_e.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:i.navigation,focusElements:u,dispatch:o})},[l.navigation]),ln(()=>{l.account&&_e.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:i.navigation,focusElements:u,dispatch:o})},[l.account]),t&&t.isLoading?null:g.jsxs(g.Fragment,{children:[g.jsxs("nav",{id:"header",className:L({"logged-in":n,"logged-out":!n,visible:a}),children:[g.jsx(ze,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),g.jsx(eu,{}),!i.navigation&&g.jsx("button",{className:"menu-button gtm-trackable",onClick:m=>{m.preventDefault(),m.stopPropagation(),c("navigation",!l.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":l.navigation,"aria-controls":"navigation",children:g.jsx(ze,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),g.jsx("ul",{ref:h,id:"navigation",hidden:i.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!i.navigation&&l.account?"account":"default",children:Ki.order.map(m=>g.jsx(jo,{id:m,isLoggedIn:n,isDesktopVersion:i.navigation,menus:{navigation:l.navigation,account:l.account},callback:c},m))}),!i.search&&g.jsx("button",{className:"search toggle-search-button",onClick:m=>{m.preventDefault(),m.stopPropagation(),c("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:g.jsx(ze,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),g.jsx(jp,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?g.jsxs("button",{className:"account-button",onClick:m=>_e.events.onClick(m,{id:"account",callback:c,isOpen:l.account}),onMouseEnter:()=>_e.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>_e.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[g.jsx(ze,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),g.jsx(zo,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):g.jsx("ul",{className:"sign-in-buttons",children:Ki.buttons.order.map(m=>g.jsx(jo,{id:`buttons.${m}`},m))})]}),g.jsx("hr",{id:"content-of-page"}),g.jsx("div",{className:L("overlay",{open:l.navigation||l.account||!i.search&&l.search})})]})},Gx=C.createContext(null),vl={didCatch:!1,error:null};class zx extends C.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=vl}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:s,reason:"imperative-api"}),this.setState(vl)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&qx(t.resetKeys,i)){var s,o;(s=(o=this.props).onReset)===null||s===void 0||s.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(vl)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:s,error:o}=this.state;let a=t;if(s){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(C.isValidElement(i))a=i;else if(typeof r=="function")a=r(l);else if(n)a=C.createElement(n,l);else throw o}return C.createElement(Gx.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}}function qx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const Vx=()=>{const e=te();return g.jsxs(g.Fragment,{children:[g.jsx(ou,{}),g.jsx("div",{className:"content",children:g.jsx(bs,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),g.jsx(tu,{})]})},Qx=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:i="",locale:s="en"})=>{const o=ef();C.useEffect(()=>{window.scrollTo(0,0)},[o]);const a=pf(e,{locale:s});return g.jsx(zx,{onError:t,fallback:g.jsx(Vx,{}),children:g.jsx(C.Suspense,{fallback:g.jsx(wh,{layout:"overview-page"}),children:g.jsx("div",{id:"wrapper",className:L(i,{[n]:n!=="default"}),children:g.jsxs(jw,{children:[g.jsx(ou,{}),g.jsx("div",{className:"content",children:a}),r&&g.jsx(tu,{}),g.jsx(Ip,{})]})})})})},Rd={default:"tags_",headerTopics:"header_topics_topics_"},_l={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"},Wx={getTagDetails:e=>{if(e.includes("topic_")){if(e=_l.topic[e.replace("topic_","")],e){const t=Ki.topics.topics[e].href;return t?{id:e,href:t,text:`${Rd.headerTopics}${e}`}:null}return null}return _l[e]?(e=_l[e],{id:e,text:`${Rd.default}${e}`}):null}};const Xx=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:i="",gtmType:s="tag-click",gtmContext:o="tags"})=>{const a=te();if(!e||e.length<1)return null;const l=[];return e.forEach(u=>{if(!u)return;const c=Wx.getTagDetails(u);c&&l.push(c)}),l.length<1?null:g.jsx("ul",{className:L("tags text-small",t,i,{"one-line":r}),children:l.map(u=>{const c=a.formatMessage({id:u.text});return g.jsx("li",{children:u.href&&n?g.jsx("a",{href:u.href,className:"gtm-trackable","data-gtm-event-type":s,"data-gtm-event-context":o,children:c}):c},u.id)})})};const Yx=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:i="member-click",className:s=""})=>{const o=te();return t.length===0?null:(e||(e=t.length),g.jsxs("div",{className:L("members-list",s),children:[g.jsxs("h1",{children:[o.formatMessage({id:"membersList"}),g.jsx("span",{className:"count",children:e})]}),g.jsx("ul",{children:t.map((a,l)=>g.jsxs("li",{children:[g.jsx(qo,{member:a,gtmContext:n,gtmType:i}),a.isAdmin&&g.jsx(_h,{children:o.formatMessage({id:"membersList_admin"})})]},l))}),r&&g.jsx(Cp,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))};function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wc.apply(this,arguments)}function Jx(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Kx=C.useLayoutEffect,Zx=function(t){var r=Q.useRef(t);return Kx(function(){r.current=t}),r},jd=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},e1=function(t,r){var n=C.useRef();return C.useCallback(function(i){t.current=i,n.current&&jd(n.current,null),n.current=r,r&&jd(r,i)},[r])},Nd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},t1=function(t){Object.keys(Nd).forEach(function(r){t.style.setProperty(r,Nd[r],"important")})},Ld=t1,rt=null,Dd=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function r1(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),rt||(rt=document.createElement("textarea"),rt.setAttribute("tabindex","-1"),rt.setAttribute("aria-hidden","true"),Ld(rt)),rt.parentNode===null&&document.body.appendChild(rt);var i=e.paddingSize,s=e.borderSize,o=e.sizingStyle,a=o.boxSizing;Object.keys(o).forEach(function(m){var f=m;rt.style[f]=o[f]}),Ld(rt),rt.value=t;var l=Dd(rt,e);rt.value=t,l=Dd(rt,e),rt.value="x";var u=rt.scrollHeight-i,c=u*r;a==="border-box"&&(c=c+i+s),l=Math.max(c,l);var h=u*n;return a==="border-box"&&(h=h+i+s),l=Math.min(h,l),[l,u]}var Bd=function(){},n1=function(t,r){return t.reduce(function(n,i){return n[i]=r[i],n},{})},i1=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],s1=!!document.documentElement.currentStyle,o1=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=n1(i1,r),i=n.boxSizing;if(i==="")return null;s1&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var s=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),o=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:s,borderSize:o}},a1=o1;function Vp(e,t,r){var n=Zx(r);Q.useLayoutEffect(function(){var i=function(o){return n.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var l1=function(t){Vp(window,"resize",t)},c1=function(t){Vp(document.fonts,"loadingdone",t)},u1=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],d1=function(t,r){var n=t.cacheMeasurements,i=t.maxRows,s=t.minRows,o=t.onChange,a=o===void 0?Bd:o,l=t.onHeightChange,u=l===void 0?Bd:l,c=Jx(t,u1),h=c.value!==void 0,m=Q.useRef(null),f=e1(m,r),p=Q.useRef(0),v=Q.useRef(),x=function(){var T=m.current,P=n&&v.current?v.current:a1(T);if(P){v.current=P;var y=r1(P,T.value||T.placeholder||"x",s,i),O=y[0],M=y[1];p.current!==O&&(p.current=O,T.style.setProperty("height",O+"px","important"),u(O,{rowHeight:M}))}},S=function(T){h||x(),a(T)};return Q.useLayoutEffect(x),l1(x),c1(x),Q.createElement("textarea",wc({},c,{onChange:S,ref:f}))},f1=Q.forwardRef(d1);let ro=null;const ut="discussion_form_",au=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:r={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:n,maxLength:i=5e4,minRows:s=4,forceShow:o={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:l="DiscussionForm"})=>{var I,R;const u=te(),c=C.useContext(dr),[h,m]=C.useState(r.isEditing&&r.isEditing.text||""),[f,p]=C.useState(o.error||!1),[v,x]=C.useState(!1),S=C.useRef(null);if(n||(n=S),r.isLoading)return g.jsx(Vt,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const k=N=>{const z=N.target.value;m(z);let Y;!c||!c.id?Y=jt(u.formatMessage,`${ut}error_loggedOut`,e.type,"action"):t?z.length>=i&&(Y=`${ut}error_tooLong`):Y=jt(u.formatMessage,`${ut}error_noPermission`,e.type,"action"),Y?p(Y):f&&p(!1)};let T=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const N=e.type==="response"?((I=e.slugs)==null?void 0:I.question)||"":((R=e.slugs)==null?void 0:R.answer)||"";N&&(T=`${T}-${N.slice(-15)}`)}const P=async N=>{var Y;if(N.preventDefault(),N.stopPropagation(),!c||!c.id||!t||O)return;ro&&clearTimeout(ro),x("submitting");const z=window.location.pathname;try{let q;switch(e.type){case"post":q=await a.create({content:h});break;case"question":q=await a.create({title:h,authorId:c&&c.id,...(Y=a.props)==null?void 0:Y.create});break;case"response":q=await a.create({question:e.slugs.question},{body:h,authorId:c&&c.id,contentPath:z});break;case"reply":q=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:h,authorId:c&&c.id,contentPath:z});break;default:break}await ug(1e3),a.callback&&await a.callback(q),ro=setTimeout(()=>{m(""),x("submitted"),y()},500)}catch(q){const ae=q;let ge=`${ut}error`;ae.message.includes("entry already exists")&&(ge=jt(u.formatMessage,`${ut}error_alreadyExists`,e.type,"action")),ae.message.includes("429")?ge=jt(u.formatMessage,`${ut}error_tooMany`,e.type,"action"):ae.message.includes("400")&&(ge=`${ut}error`),p(ge),y()}},y=()=>{ro=setTimeout(()=>{p(!1),x(!1)},5e3)},O=!h||!gg(h),M=v==="submitting",E=[];return(r.isEditing&&!M||o.cancel)&&E.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!o.cancel&&(!c||!c.id||!h),children:u.formatMessage({id:`${ut}cancel`})}),E.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:N=>{if(r.isEditing){x("submitting"),a.handleSaveEdit&&a.handleSaveEdit(S.current&&"value"in S.current?S.current.value:"");return}P(N)},className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`${r.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!c||!c.id||!t||O||M||r.isEditing&&h===r.isEditing.text,children:u.formatMessage({id:`${ut}${M?r.isEditing?"saving":"posting":r.isEditing?"save":"post"}`})}),g.jsxs("form",{id:T,className:L("discussion-card discussion-form",{"no-styling":r.isInWrapper&&r.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(r==null?void 0:r.showTitle)&&!r.isEditing&&["question"].includes(e.type)&&g.jsx("h2",{children:jt(u.formatMessage,`${ut}title`,e.type,"action")}),g.jsx(qo,{member:c||"community",gtmContext:l,gtmType:"profile-click"}),g.jsx(ze,{element:"label",showOnFocus:!1,htmlFor:`${T}-input`,children:jt(u.formatMessage,`${ut}label`,e.type,"action")}),g.jsx(f1,{ref:n,id:`${T}-input`,name:e.type,placeholder:jt(u.formatMessage,`${ut}placeholder`,e.type,"action"),onChange:k,value:h,maxLength:i,"aria-invalid":!!f,"aria-errormessage":"error-message",minRows:s,autoFocus:!!r.isEditing}),g.jsx("small",{children:jt(u.formatMessage,`${ut}explainer`,e.type,"action",{a:N=>g.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":"community-guidelines-link",children:N})})}),g.jsx(gs,{buttons:E}),v==="submitted"&&g.jsx(_o,{className:"success","data-testid":"success",children:jt(u.formatMessage,`${ut}success`,e.type,"action")}),f&&g.jsx(_o,{id:"error-message",className:"error","data-testid":"error",children:o.error?o.error:typeof f=="string"?f.includes(" ")?f:u.formatMessage({id:f},{action:u.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):f})]})},lu=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:r,required:n,join:i,leave:s,notMemberStateText:o}})=>n&&!r?g.jsx(bs,{text:o,button:{component:g.jsx(Zc,{functions:{join:i,leave:s}})}}):g.jsx(au,{content:{type:e,slugs:{}},functions:{create:t}}),h1={showThread:!1,showForm:!1},cu=C.createContext(h1),p1=({children:e})=>{const[t,r]=C.useState({showThread:!1,showForm:!1});return g.jsx(cu.Provider,{value:{...t,updateConversation:r},children:e})},m1=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),g1=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Gi=!1;const yl=()=>{Gi!==!1&&(clearTimeout(Gi),Gi=!1)},bl=10,Qp=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:i=!1,content:s={type:"reply",slugs:{}},canLike:o=!0,functions:{createLike:a=()=>{},deleteLike:l=()=>{}}={}})=>{const u=te();C.useEffect(()=>{f(i)},[i]);const[c,h]=C.useState(t),[m,f]=C.useState(i),[p,v]=C.useState(!1),[x,S]=C.useState(!1),k=C.useMemo(()=>g1(r,bl),[r]),T=y=>{if(y.preventDefault(),y.stopPropagation(),S(!1),Gi)return yl(),!1;if(yl(),p||!o)return!1;Gi=setTimeout(P,350)},P=async()=>{if(yl(),p||!o)return!1;let y=m?c-1:c+1;y<0&&(y=0),v(!0),h(y),f(!m);try{if(s&&s.slugs){const O=m1(s.slugs);m?await l(O):await a(O,{contentPath:window.location.pathname})}}catch{h(t),f(i)}finally{v(!1)}};return C.createElement(e,{className:L("likes-wrapper text-medium action-button",{"show-spinner":p,"is-liked":m,disabled:!o}),onClick:T,onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},children:g.jsxs(g.Fragment,{children:[g.jsx(Oe,{variant:"tertiary",size:"medium",icon:{icon:m?"heart":"heart_empty",animate:"bounce"},className:L({"do-animation":m&&!i}),screenreaderText:o?u.formatMessage({id:`discussion_likes_${m?"unlike":"like"}`},{action:u.formatMessage({id:`discussion_action_${s.type}`})}):!1,onClick:T,disabled:!o,"aria-hidden":!o,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${s.type}-click`}),g.jsx("span",{className:L("number-of-likes",{"no-likes":c===0}),"data-testid":"number-of-likes",children:u.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:c})}),r&&g.jsx(Wf,{isOpen:x,isLoading:r.length===0,children:r.length&&g.jsxs("ul",{children:[k.map(y=>typeof y=="string"||!y.name?null:g.jsx("li",{children:g.jsx(vs,{href:y.id?`/profiles/${y.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:y.name})},y.id||window.btoa(y.name))),r.length>bl&&g.jsx("li",{children:u.formatMessage({id:"discussion_likes_more"},{number:r.length-bl})})]})})]})})};var No={exports:{}};No.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",m="[object Error]",f="[object Function]",p="[object GeneratorFunction]",v="[object Map]",x="[object Number]",S="[object Null]",k="[object Object]",T="[object Promise]",P="[object Proxy]",y="[object RegExp]",O="[object Set]",M="[object String]",E="[object Symbol]",I="[object Undefined]",R="[object WeakMap]",N="[object ArrayBuffer]",z="[object DataView]",Y="[object Float32Array]",q="[object Float64Array]",ae="[object Int8Array]",ge="[object Int16Array]",Se="[object Int32Array]",ve="[object Uint8Array]",ye="[object Uint8ClampedArray]",V="[object Uint16Array]",Z="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,Te=/^(?:0|[1-9]\d*)$/,ee={};ee[Y]=ee[q]=ee[ae]=ee[ge]=ee[Se]=ee[ve]=ee[ye]=ee[V]=ee[Z]=!0,ee[a]=ee[l]=ee[N]=ee[c]=ee[z]=ee[h]=ee[m]=ee[f]=ee[v]=ee[x]=ee[k]=ee[y]=ee[O]=ee[M]=ee[R]=!1;var Ke=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Nr=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Ke||Nr||Function("return this")(),fr=t&&!t.nodeType&&t,et=fr&&!0&&e&&!e.nodeType&&e,Xt=et&&et.exports===fr,D=Xt&&Ke.process,_t=function(){try{return D&&D.binding&&D.binding("util")}catch{}}(),pt=_t&&_t.isTypedArray;function Ot(d,_){for(var w=-1,A=d==null?0:d.length,W=0,G=[];++w<A;){var re=d[w];_(re,w,d)&&(G[W++]=re)}return G}function hr(d,_){for(var w=-1,A=_.length,W=d.length;++w<A;)d[W+w]=_[w];return d}function pr(d,_){for(var w=-1,A=d==null?0:d.length;++w<A;)if(_(d[w],w,d))return!0;return!1}function Zo(d,_){for(var w=-1,A=Array(d);++w<d;)A[w]=_(w);return A}function ea(d){return function(_){return d(_)}}function yn(d,_){return d.has(_)}function _i(d,_){return d==null?void 0:d[_]}function Ss(d){var _=-1,w=Array(d.size);return d.forEach(function(A,W){w[++_]=[W,A]}),w}function Es(d,_){return function(w){return d(_(w))}}function Mt(d){var _=-1,w=Array(d.size);return d.forEach(function(A){w[++_]=A}),w}var bn=Array.prototype,ta=Function.prototype,Lr=Object.prototype,wn=Ze["__core-js_shared__"],yi=ta.toString,yt=Lr.hasOwnProperty,ks=function(){var d=/[^.]+$/.exec(wn&&wn.keys&&wn.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Ts=Lr.toString,ra=RegExp("^"+yi.call(yt).replace(ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bi=Xt?Ze.Buffer:void 0,xn=Ze.Symbol,Cs=Ze.Uint8Array,Sn=Lr.propertyIsEnumerable,Dr=bn.splice,Ct=xn?xn.toStringTag:void 0,En=Object.getOwnPropertySymbols,wi=bi?bi.isBuffer:void 0,Br=Es(Object.keys,Object),xi=Jt(Ze,"DataView"),Hr=Jt(Ze,"Map"),Si=Jt(Ze,"Promise"),Ei=Jt(Ze,"Set"),ki=Jt(Ze,"WeakMap"),mr=Jt(Object,"create"),Ps=tt(xi),Yt=tt(Hr),na=tt(Si),ia=tt(Ei),sa=tt(ki),As=xn?xn.prototype:void 0,Ti=As?As.valueOf:void 0;function Le(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function oa(){this.__data__=mr?mr(null):{},this.size=0}function aa(d){var _=this.has(d)&&delete this.__data__[d];return this.size-=_?1:0,_}function la(d){var _=this.__data__;if(mr){var w=_[d];return w===n?void 0:w}return yt.call(_,d)?_[d]:void 0}function ca(d){var _=this.__data__;return mr?_[d]!==void 0:yt.call(_,d)}function ua(d,_){var w=this.__data__;return this.size+=this.has(d)?0:1,w[d]=mr&&_===void 0?n:_,this}Le.prototype.clear=oa,Le.prototype.delete=aa,Le.prototype.get=la,Le.prototype.has=ca,Le.prototype.set=ua;function qe(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function da(){this.__data__=[],this.size=0}function fa(d){var _=this.__data__,w=Cn(_,d);if(w<0)return!1;var A=_.length-1;return w==A?_.pop():Dr.call(_,w,1),--this.size,!0}function ha(d){var _=this.__data__,w=Cn(_,d);return w<0?void 0:_[w][1]}function pa(d){return Cn(this.__data__,d)>-1}function ma(d,_){var w=this.__data__,A=Cn(w,d);return A<0?(++this.size,w.push([d,_])):w[A][1]=_,this}qe.prototype.clear=da,qe.prototype.delete=fa,qe.prototype.get=ha,qe.prototype.has=pa,qe.prototype.set=ma;function lt(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function ga(){this.size=0,this.__data__={hash:new Le,map:new(Hr||qe),string:new Le}}function va(d){var _=Pt(this,d).delete(d);return this.size-=_?1:0,_}function _a(d){return Pt(this,d).get(d)}function ya(d){return Pt(this,d).has(d)}function ba(d,_){var w=Pt(this,d),A=w.size;return w.set(d,_),this.size+=w.size==A?0:1,this}lt.prototype.clear=ga,lt.prototype.delete=va,lt.prototype.get=_a,lt.prototype.has=ya,lt.prototype.set=ba;function kn(d){var _=-1,w=d==null?0:d.length;for(this.__data__=new lt;++_<w;)this.add(d[_])}function Os(d){return this.__data__.set(d,n),this}function Tn(d){return this.__data__.has(d)}kn.prototype.add=kn.prototype.push=Os,kn.prototype.has=Tn;function It(d){var _=this.__data__=new qe(d);this.size=_.size}function Ci(){this.__data__=new qe,this.size=0}function wa(d){var _=this.__data__,w=_.delete(d);return this.size=_.size,w}function xa(d){return this.__data__.get(d)}function Sa(d){return this.__data__.has(d)}function Ea(d,_){var w=this.__data__;if(w instanceof qe){var A=w.__data__;if(!Hr||A.length<r-1)return A.push([d,_]),this.size=++w.size,this;w=this.__data__=new lt(A)}return w.set(d,_),this.size=w.size,this}It.prototype.clear=Ci,It.prototype.delete=wa,It.prototype.get=xa,It.prototype.has=Sa,It.prototype.set=Ea;function ka(d,_){var w=Pn(d),A=!w&&Rs(d),W=!w&&!A&&An(d),G=!w&&!A&&!W&&Ls(d),re=w||A||W||G,le=re?Zo(d.length,String):[],Pe=le.length;for(var fe in d)(_||yt.call(d,fe))&&!(re&&(fe=="length"||W&&(fe=="offset"||fe=="parent")||G&&(fe=="buffer"||fe=="byteLength"||fe=="byteOffset")||$a(fe,Pe)))&&le.push(fe);return le}function Cn(d,_){for(var w=d.length;w--;)if(Fs(d[w][0],_))return w;return-1}function Pi(d,_,w){var A=_(d);return Pn(d)?A:hr(A,w(d))}function Ur(d){return d==null?d===void 0?I:S:Ct&&Ct in Object(d)?Kt(d):$s(d)}function Ms(d){return Ft(d)&&Ur(d)==a}function Is(d,_,w,A,W){return d===_?!0:d==null||_==null||!Ft(d)&&!Ft(_)?d!==d&&_!==_:Ta(d,_,w,A,Is,W)}function Ta(d,_,w,A,W,G){var re=Pn(d),le=Pn(_),Pe=re?l:$t(d),fe=le?l:$t(_);Pe=Pe==a?k:Pe,fe=fe==a?k:fe;var Ve=Pe==k,ct=fe==k,$e=Pe==fe;if($e&&An(d)){if(!An(_))return!1;re=!0,Ve=!1}if($e&&!Ve)return G||(G=new It),re||Ls(d)?Ai(d,_,w,A,W,G):Oa(d,_,Pe,w,A,W,G);if(!(w&i)){var Qe=Ve&&yt.call(d,"__wrapped__"),De=ct&&yt.call(_,"__wrapped__");if(Qe||De){var gr=Qe?d.value():d,Zt=De?_.value():_;return G||(G=new It),W(gr,Zt,w,A,G)}}return $e?(G||(G=new It),Ma(d,_,w,A,W,G)):!1}function Ca(d){if(!Ns(d)||Ra(d))return!1;var _=js(d)?ra:ue;return _.test(tt(d))}function Pa(d){return Ft(d)&&Mi(d.length)&&!!ee[Ur(d)]}function Aa(d){if(!ja(d))return Br(d);var _=[];for(var w in Object(d))yt.call(d,w)&&w!="constructor"&&_.push(w);return _}function Ai(d,_,w,A,W,G){var re=w&i,le=d.length,Pe=_.length;if(le!=Pe&&!(re&&Pe>le))return!1;var fe=G.get(d);if(fe&&G.get(_))return fe==_;var Ve=-1,ct=!0,$e=w&s?new kn:void 0;for(G.set(d,_),G.set(_,d);++Ve<le;){var Qe=d[Ve],De=_[Ve];if(A)var gr=re?A(De,Qe,Ve,_,d,G):A(Qe,De,Ve,d,_,G);if(gr!==void 0){if(gr)continue;ct=!1;break}if($e){if(!pr(_,function(Zt,zr){if(!yn($e,zr)&&(Qe===Zt||W(Qe,Zt,w,A,G)))return $e.push(zr)})){ct=!1;break}}else if(!(Qe===De||W(Qe,De,w,A,G))){ct=!1;break}}return G.delete(d),G.delete(_),ct}function Oa(d,_,w,A,W,G,re){switch(w){case z:if(d.byteLength!=_.byteLength||d.byteOffset!=_.byteOffset)return!1;d=d.buffer,_=_.buffer;case N:return!(d.byteLength!=_.byteLength||!G(new Cs(d),new Cs(_)));case c:case h:case x:return Fs(+d,+_);case m:return d.name==_.name&&d.message==_.message;case y:case M:return d==_+"";case v:var le=Ss;case O:var Pe=A&i;if(le||(le=Mt),d.size!=_.size&&!Pe)return!1;var fe=re.get(d);if(fe)return fe==_;A|=s,re.set(d,_);var Ve=Ai(le(d),le(_),A,W,G,re);return re.delete(d),Ve;case E:if(Ti)return Ti.call(d)==Ti.call(_)}return!1}function Ma(d,_,w,A,W,G){var re=w&i,le=Gr(d),Pe=le.length,fe=Gr(_),Ve=fe.length;if(Pe!=Ve&&!re)return!1;for(var ct=Pe;ct--;){var $e=le[ct];if(!(re?$e in _:yt.call(_,$e)))return!1}var Qe=G.get(d);if(Qe&&G.get(_))return Qe==_;var De=!0;G.set(d,_),G.set(_,d);for(var gr=re;++ct<Pe;){$e=le[ct];var Zt=d[$e],zr=_[$e];if(A)var uu=re?A(zr,Zt,$e,_,d,G):A(Zt,zr,$e,d,_,G);if(!(uu===void 0?Zt===zr||W(Zt,zr,w,A,G):uu)){De=!1;break}gr||(gr=$e=="constructor")}if(De&&!gr){var Ds=d.constructor,Bs=_.constructor;Ds!=Bs&&"constructor"in d&&"constructor"in _&&!(typeof Ds=="function"&&Ds instanceof Ds&&typeof Bs=="function"&&Bs instanceof Bs)&&(De=!1)}return G.delete(d),G.delete(_),De}function Gr(d){return Pi(d,Ii,Ia)}function Pt(d,_){var w=d.__data__;return Fa(_)?w[typeof _=="string"?"string":"hash"]:w.map}function Jt(d,_){var w=_i(d,_);return Ca(w)?w:void 0}function Kt(d){var _=yt.call(d,Ct),w=d[Ct];try{d[Ct]=void 0;var A=!0}catch{}var W=Ts.call(d);return A&&(_?d[Ct]=w:delete d[Ct]),W}var Ia=En?function(d){return d==null?[]:(d=Object(d),Ot(En(d),function(_){return Sn.call(d,_)}))}:La,$t=Ur;(xi&&$t(new xi(new ArrayBuffer(1)))!=z||Hr&&$t(new Hr)!=v||Si&&$t(Si.resolve())!=T||Ei&&$t(new Ei)!=O||ki&&$t(new ki)!=R)&&($t=function(d){var _=Ur(d),w=_==k?d.constructor:void 0,A=w?tt(w):"";if(A)switch(A){case Ps:return z;case Yt:return v;case na:return T;case ia:return O;case sa:return R}return _});function $a(d,_){return _=_??o,!!_&&(typeof d=="number"||Te.test(d))&&d>-1&&d%1==0&&d<_}function Fa(d){var _=typeof d;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?d!=="__proto__":d===null}function Ra(d){return!!ks&&ks in d}function ja(d){var _=d&&d.constructor,w=typeof _=="function"&&_.prototype||Lr;return d===w}function $s(d){return Ts.call(d)}function tt(d){if(d!=null){try{return yi.call(d)}catch{}try{return d+""}catch{}}return""}function Fs(d,_){return d===_||d!==d&&_!==_}var Rs=Ms(function(){return arguments}())?Ms:function(d){return Ft(d)&&yt.call(d,"callee")&&!Sn.call(d,"callee")},Pn=Array.isArray;function Oi(d){return d!=null&&Mi(d.length)&&!js(d)}var An=wi||Da;function Na(d,_){return Is(d,_)}function js(d){if(!Ns(d))return!1;var _=Ur(d);return _==f||_==p||_==u||_==P}function Mi(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=o}function Ns(d){var _=typeof d;return d!=null&&(_=="object"||_=="function")}function Ft(d){return d!=null&&typeof d=="object"}var Ls=pt?ea(pt):Pa;function Ii(d){return Oi(d)?ka(d):Aa(d)}function La(){return[]}function Da(){return!1}e.exports=Na})(No,No.exports);var v1=No.exports;const _1=fi(v1);const Wp=({element:e="section",children:t,className:r,...n})=>C.createElement(e,{className:L("modal",r),children:typeof t=="string"?g.jsx("p",{children:t}):t,...n});const Xp=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:i=()=>{}}={},forceShow:{error:s=!1}={},title:o,children:a,buttons:l,className:u="",gtmContext:c="Modal"})=>{const h=te(),[m,f]=C.useState(t),p=x=>{f(x),x?(n(),document.body.classList.add("has-overlay")):(i(),document.body.classList.remove("has-overlay"))};C.useEffect(()=>{p(t)},[t]);const v=r?{"--max-width":`${r/16}rem`}:{};return g.jsx("div",{className:L("overlay",{open:m}),children:g.jsx(Wp,{id:e,className:L("overlay-modal",u,{"has-max-width":r}),hidden:!m,style:v,children:t&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"top",children:[g.jsx("h2",{children:o}),g.jsx(Oe,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":c,screenreaderText:h.formatMessage({id:"overlay_button"})})]}),g.jsx(go,{}),a,l&&g.jsxs("div",{className:"bottom",children:[g.jsx(go,{}),g.jsx(gs,{buttons:l})]}),s&&g.jsx(_o,{className:"error",children:s})]})})})},Yp=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Hd=e=>{const t={};return Object.keys(e).forEach(r=>{t[`${r}Slug`]=e[r]}),t};const rr="discussion_",Ko=({element:e="div",content:t,userHasPermissions:r=!0,isLoading:n=!1,originalAuthorId:i,functions:{content:{createContent:s,deleteContent:o,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:l,deleteLike:u}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:c}={openComments:()=>{}}},links:h={},className:m,gtmContext:f="DiscussionAnswer",children:p})=>{const v=te(),x=C.useContext(dr),S=C.useContext(cu),[k,T]=C.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[P,y]=C.useState(!1),[O,M]=C.useState("");if(C.useEffect(()=>{T({...k,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),n||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return g.jsx(Vt,{className:"discussion-card discussion-post"});const{author:E,canLike:I,createdAt:R,id:N,likes:z=0,userLiked:Y,comments:q=0}=t,ae=x&&x.id&&typeof E!="string"&&E.id&&E.id===x.id||!1,ge=typeof I=="boolean"?I:r?!ae:!1,Se=async Z=>{Z||(Z=""),M("");try{if(!_1(Z,k.body)){const ce=t.type==="question"?{title:Z}:{body:Z};await a(Hd(t.slugs),ce)}T({body:Z,isEditing:!1,didEdit:!0})}catch{M(`${rr}form_error`)}},ve=()=>{S&&S.updateConversation&&S.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ce=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,ue=document.getElementById(ce),Te=document.getElementById(`${ce}-input`);Te&&Te.focus(),ue&&ue.scrollIntoView({behavior:"smooth"})},0)},ye=()=>{try{o(Hd(t.slugs))}catch{M("delete-error")}},V=[{text:v.formatMessage({id:`${rr}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(v.formatMessage({id:`${rr}report_subject`}))}&body=${encodeURI(v.formatMessage({id:`${rr}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return r&&ae&&V.push({text:v.formatMessage({id:`${rr}moreMenu_edit`}),onClick:()=>T({...k,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`edit-${t.type}-click`},{text:v.formatMessage({id:`${rr}moreMenu_delete`}),onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),y(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`delete-${t.type}-click`,...Yp(`delete-${t.slug}-modal`,P)}),C.createElement(e,{className:L("discussion-post",m),"data-testid":`discussion-${t.type}-thread`,children:g.jsxs(g.Fragment,{children:[g.jsxs("div",{id:N||t.slug,className:L("discussion-card",t.type,{editing:k.isEditing,"has-link":h.post&&!k.isEditing}),onClick:Z=>{!h.post||k.isEditing||(Z.preventDefault(),Z.stopPropagation(),window.location.href=h.post)},children:[!k.isEditing&&g.jsx(qo,{member:E,additionalContent:{createdAt:R,didEdit:k.didEdit},className:typeof E!="string"&&E.id===i?"highlighted":"",gtmContext:f,gtmType:"profile-click"}),k.isEditing?g.jsx(au,{content:{type:t.type,slugs:t.slugs},userHasPermissions:r,meta:{isLoading:n,isInWrapper:!0,isEditing:{text:k.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:O!==""&&O!=="delete-error"?v.formatMessage({id:O},{action:v.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:s,handleSaveEdit:Se,handleCancel:()=>{M(""),T({...k,isEditing:!1})}},gtmContext:`${f}Form`}):h.post?g.jsx("a",{href:h.post,className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":"title-click",children:g.jsx(Ll,{options:{overrides:{a:vh}},children:k.body})}):g.jsx(Ll,{options:{wrapper:t.type==="question"?"h1":C.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:k.body}),!k.isEditing&&g.jsxs("ul",{className:L("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[g.jsx(Qp,{element:"li",likes:z,isShort:!1,userLiked:Y,content:{type:t.type,slugs:t.slugs},canLike:ge,functions:{createLike:l,deleteLike:u}}),(["question","post"].includes(t.type)||h.comments||typeof c=="function")&&g.jsxs("li",{className:"action-button",onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),h.comments&&(window.location.href=h.comments),typeof c=="function"&&c()},children:[g.jsx(Oe,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:h.comments?h.comments:!1,onClick:h.comments||typeof c!="function"?!1:c,className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:v.formatMessage({id:`${rr}comments_screenReader`},{count:q})}),g.jsx("span",{children:v.formatMessage({id:`${rr}comments`},{count:q})})]}),(t.type==="answer"||t.type==="reply")&&g.jsx("li",{children:g.jsx(Oe,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:ve,children:v.formatMessage({id:`${rr}reply`})})}),g.jsx(Pp,{element:"li",id:`more-${t.slug}`,options:V})]})]}),p,g.jsx(Xp,{id:`delete-${t.slug}-modal`,isOpen:P,functions:{onOpen:()=>{},onClose:()=>y(!1)},forceShow:{error:O==="delete-error"?v.formatMessage({id:"discussion_delete_error"},{action:v.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:v.formatMessage({id:"discussion_delete_title"},{action:v.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>y(!1),children:v.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ye,children:v.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:g.jsx(Mr,{id:"discussion_delete_text",values:{p:Z=>g.jsx("p",{children:Z}),action:v.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const wl="discussion_responses_",y1=({type:e="answer",responses:t=0})=>{const r=te();return g.jsxs("div",{className:"responses-heading",children:[g.jsx("h3",{children:r.formatMessage({id:`${wl}title`},{action:r.formatMessage({id:`${wl}${e}`}),count:t})}),t===0&&g.jsx("p",{children:jt(r.formatMessage,`${wl}empty`,e,e)})]})};const b1=({isOpen:e=!1,count:t=0,children:r})=>{const n=te(),i=C.useRef(null),[s,o]=C.useState(e),[a,l]=C.useState("closed");C.useEffect(()=>{const m=i.current;if(m)return m.addEventListener("transitionend",u),()=>{m.removeEventListener("transitionend",u)}},[]),ln(()=>{a==="closed"&&!s||l(["opening","open"].includes(a)?"ready-to-close":"opening")},[s]),C.useEffect(()=>{a==="ready-to-close"&&l("closing")},[a]);const u=({propertyName:m})=>{m==="max-height"&&l(f=>f==="opening"?"open":f==="closing"?"closed":f)},c=["opening","open"].includes(a),h=pf(r,{element:"li"});return g.jsxs("div",{className:"thread-wrapper",children:[g.jsx(Oe,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${c?"left":"right"}`},onClick:()=>{o(!s)},children:n.formatMessage({id:`discussion_thread_${c?"hide":"show"}`},{count:t})}),g.jsx("ul",{ref:i,className:L("thread",a),hidden:!s,children:h})]})},w1=({user:e,content:t,verb:r="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:r}),x1=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({content:a})=>{if(!r)return;const l=w1({user:r,content:a,verb:"post"});await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return e.setQueryData(t,c=>[...c,l]),{previousActivities:u}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),S1=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const l=e.getQueryData(t),u=l==null?void 0:l.map(c=>{var h;return(c==null?void 0:c.id)===a&&((h=c.reaction_counts)!=null&&h.like?c.reaction_counts.like+=1:c.reaction_counts.like=1),c});return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivities)},onSuccess:a=>{const l=e.getQueryData(t),u=l==null?void 0:l.map(c=>((c==null?void 0:c.id)===(a==null?void 0:a.activity_id)&&(c.latest_reactions.like?c.latest_reactions.like.push(a):c.latest_reactions.like=[a]),c));return e.setQueryData(t,()=>u&&[...u]),{previousActivities:l}},onSettled:(a,l,u)=>{e.invalidateQueries({queryKey:[...t,u.activityId]})}}),E1=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:l})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(h=>{var m;return(h==null?void 0:h.id)===l&&(m=h.reaction_counts)!=null&&m.like&&(h.reaction_counts.like-=1),h});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(l,u,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:(l,{activityId:u})=>{const c=e.getQueryData(t),h=c==null?void 0:c.map(m=>{var f,p,v,x;if(m.id===u){const S=(v=(p=(f=m.latest_reactions)==null?void 0:f.like)==null?void 0:p.find(k=>k.user_id===(r==null?void 0:r.id)))==null?void 0:v.id;return m.latest_reactions.like=(x=m.latest_reactions.like)==null?void 0:x.filter(k=>k.id!==S),m}else return m});return e.setQueryData(t,()=>h&&[...h]),{previousActivities:c}},onSettled:(l,u,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),k1=({basePath:e,parentId:t,isMember:r,functions:{list:n,create:i,like:s,unlike:o,join:a,leave:l}})=>{const u=te(),c=mi(),h=C.useContext(dr),{data:m,error:f,isLoading:p,isFetching:v}=Rh({queryKey:[e,t],queryFn:n}),x=x1({queryClient:c,queryKey:[e,t],user:h,mutationFn:i}),{mutate:S}=Ir(x),k=S1({queryClient:c,queryKey:[e,t],mutationFn:s}),{mutate:T}=Ir(k),P=E1({queryClient:c,queryKey:[e,t],user:h,mutationFn:async({activityId:E})=>{var N,z,Y;const I=m&&(m==null?void 0:m.find(q=>q.id===E)),R=(Y=(z=(N=I==null?void 0:I.latest_reactions)==null?void 0:N.like)==null?void 0:z.find(q=>q.user_id===(h==null?void 0:h.id)))==null?void 0:Y.id;await o({reactionId:R||"",activityId:E})}}),{mutate:y}=Ir(P),O=C.useCallback(({activityId:E})=>T({activityId:E}),[T]),M=C.useCallback(({activityId:E})=>y({activityId:E}),[y]);return f?g.jsx(bs,{variant:"error",text:f.message}):p?g.jsx(Vt,{style:{height:"400px"}}):g.jsxs(g.Fragment,{children:[g.jsx(lu,{contentType:"post",createPost:S,membershipRequiredToPost:{isMember:r,required:!0,join:a,leave:l,notMemberStateText:u.formatMessage({id:"community_joinToPost"})}}),!v&&Array.isArray(m)&&(m==null?void 0:m.map(E=>{var I,R,N,z,Y,q,ae,ge,Se,ve,ye;return g.jsx(Ko,{content:{type:"post",body:E==null?void 0:E.content,createdAt:(E==null?void 0:E.time)||"",slugs:{question:t},slug:E==null?void 0:E.id,author:{id:(I=E==null?void 0:E.actor)==null?void 0:I.id,name:(N=(R=E==null?void 0:E.actor)==null?void 0:R.data)==null?void 0:N.name,organization:(Y=(z=E==null?void 0:E.actor)==null?void 0:z.data)==null?void 0:Y.organization,jobTitle:(ae=(q=E==null?void 0:E.actor)==null?void 0:q.data)==null?void 0:ae.jobTitle,image:{thumbnail:((Se=(ge=E==null?void 0:E.actor)==null?void 0:ge.data)==null?void 0:Se.thumbnail)||void 0}},userLiked:((ve=E==null?void 0:E.own_reactions)==null?void 0:ve.like)&&((ye=E==null?void 0:E.own_reactions)==null?void 0:ye.like.length)>0,likes:(E==null?void 0:E.reaction_counts.like)||0,comments:(E==null?void 0:E.reaction_counts.reply)||0},links:{post:`${e}/${t}/${E==null?void 0:E.id}`,comments:`${e}/${t}/${E==null?void 0:E.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:()=>null},likes:{createLike:()=>{O({activityId:E==null?void 0:E.id})},deleteLike:()=>{M({activityId:E==null?void 0:E.id})}},comments:{openComments:()=>null}}},E==null?void 0:E.id)}))]})},T1=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{var u;const l=e.getQueryData(t);if(l)return(u=l==null?void 0:l.latest_reactions)!=null&&u.reply?(l.latest_reactions.reply.unshift(a),l&&(l.reaction_counts={reply:l.latest_reactions.reply.length})):(l.latest_reactions={reply:[a]},l.reaction_counts={reply:1}),e.setQueryData(t,()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),C1=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:o})=>{var u,c;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),l=(c=(u=a==null?void 0:a.latest_reactions)==null?void 0:u.reply)==null?void 0:c.map(h=>{var m;return h.id===o&&((m=h.children_counts)!=null&&m.like?h.children_counts.like+=1:h.children_counts={like:1}),h});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:l}})),{previousActivity:a}},onError:(o,a,l)=>{e.setQueryData(t,l.previousActivity)},onSuccess:o=>{var u;const a=e.getQueryData(t),l=(u=a==null?void 0:a.latest_reactions.reply)==null?void 0:u.map(c=>(c.id===o.id&&(c.latest_children.like?c.latest_children.like.push(o):c.latest_children.like=[o]),c));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:l}})),{previousActivity:a}}}),P1=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:a})=>{var c;await e.cancelQueries({queryKey:t});const l=e.getQueryData(t);if(!l)return;const u=(c=l.latest_reactions.reply)==null?void 0:c.map(h=>(h.id===a&&h.children_counts.like&&(h.children_counts.like-=1),h));return e.setQueryData(t,()=>({...l,latest_reactions:{reply:u}})),{previousActivity:l}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:(a,{replyId:l})=>{var h;const u=e.getQueryData(t);if(!u)return;const c=(h=u.latest_reactions.reply)==null?void 0:h.map(m=>{var f;return m.id===l?(f=m.latest_children.reply)==null?void 0:f.filter(v=>v.user_id!==(r==null?void 0:r.id)):m});return e.setQueryData(t,()=>({...u,latest_reactions:{reply:c}})),{previousActivity:u}}}),Jp=({basePath:e,parentId:t,activityId:r,repliesList:n,isMember:i,functions:{createReply:s,like:o,unlike:a,join:l,leave:u}})=>{const c=te(),h=mi(),m=C.useContext(dr),f=T1({queryClient:h,queryKey:[e,t,r],mutationFn:s}),{mutate:p}=Ir(f),v=C1({queryClient:h,queryKey:[e,t,r],mutationFn:o}),{mutate:x}=Ir(v),S=P1({queryClient:h,queryKey:[e,t,r],user:m,mutationFn:a}),{mutate:k}=Ir(S),T=C.useCallback(({replyId:y})=>x({replyId:y}),[x]),P=C.useCallback(({replyId:y})=>k({replyId:y}),[k]);return g.jsxs(g.Fragment,{children:[g.jsx(lu,{contentType:"post",createPost:p,membershipRequiredToPost:{isMember:i,required:!0,join:l,leave:u,notMemberStateText:c.formatMessage({id:"community_joinToPost"})}}),(n==null?void 0:n.length)===0||(n==null?void 0:n.map(y=>{var M,E,I,R,N,z,Y,q,ae,ge,Se,ve,ye,V,Z,ce;const O=((M=y==null?void 0:y.latest_children)==null?void 0:M.like)&&((E=y==null?void 0:y.latest_children)==null?void 0:E.like.filter(ue=>ue.user_id===(m==null?void 0:m.id)));return g.jsx(Ko,{content:{type:"post",body:typeof y.data.content=="string"?(I=y==null?void 0:y.data)==null?void 0:I.content:((N=(R=y==null?void 0:y.data)==null?void 0:R.content)==null?void 0:N.text)||"",createdAt:y==null?void 0:y.created_at,slugs:{question:`${e}/${t}/${r}`,reply:y==null?void 0:y.id},slug:`${e}/${t}/${r}#${y==null?void 0:y.id}`,author:{id:(z=y==null?void 0:y.user)==null?void 0:z.id,name:(q=(Y=y==null?void 0:y.user)==null?void 0:Y.data)==null?void 0:q.name,organization:(ge=(ae=y==null?void 0:y.user)==null?void 0:ae.data)==null?void 0:ge.organization,jobTitle:(ve=(Se=y==null?void 0:y.user)==null?void 0:Se.data)==null?void 0:ve.jobTitle,image:{thumbnail:((V=(ye=y==null?void 0:y.user)==null?void 0:ye.data)==null?void 0:V.thumbnail)||void 0}},userLiked:!!(O!=null&&O.length),likes:((Z=y==null?void 0:y.children_counts)==null?void 0:Z.like)||0,comments:((ce=y==null?void 0:y.children_counts)==null?void 0:ce.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>T({replyId:y==null?void 0:y.id}),deleteLike:()=>P({replyId:y==null?void 0:y.id})},comments:{openComments:()=>{}}}},y==null?void 0:y.id)}))]})},A1=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async()=>{var l;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return(l=a==null?void 0:a.reaction_counts)!=null&&l.like?a.reaction_counts.like+=1:a&&(a.reaction_counts={like:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{const l=e.getQueryData(t);return l!=null&&l.latest_reactions.like?l.latest_reactions.like.push(a):l&&(l.latest_reactions={like:[a]}),e.setQueryData(t,()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),O1=({queryClient:e,queryKey:t,user:r,activity:n,mutationFn:i})=>({mutationFn:i,onMutate:async()=>{var c;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return(c=u==null?void 0:u.reaction_counts)!=null&&c.like&&u.reaction_counts.like>0&&(u.reaction_counts.like-=1),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(u,c,h)=>{e.setQueryData(t,h.previousActivity)},onSuccess:()=>{var h,m,f;if(!n)return;const u=(f=(m=(h=n.latest_reactions)==null?void 0:h.like)==null?void 0:m.find(p=>p.user_id===(r==null?void 0:r.id)))==null?void 0:f.id,c=e.getQueryData(t);if(c!=null&&c.latest_reactions.like)return c.latest_reactions.like=c.latest_reactions.like.filter(p=>p.id!==u),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),M1=({basePath:e,parentId:t,activityId:r,isMember:n,functions:{get:i,likeActivity:s,unlikeActivity:o,createReply:a,likeReply:l,unlikeReply:u,join:c,leave:h}})=>{var E,I,R,N,z,Y,q,ae,ge,Se;const m=C.useContext(dr),f=mi(),{data:p,error:v,isLoading:x,isFetching:S}=Rh({queryKey:[e,t,r],queryFn:i}),k=A1({queryClient:f,queryKey:[e,t,r],mutationFn:s}),{mutate:T}=Ir(k),P=O1({queryClient:f,queryKey:[e,t,r],user:m,mutationFn:async()=>{var ye,V,Z;const ve=(Z=(V=(ye=p==null?void 0:p.latest_reactions)==null?void 0:ye.like)==null?void 0:V.find(ce=>ce.user_id===(m==null?void 0:m.id)))==null?void 0:Z.id;await o({activityId:r,reactionId:ve})},activity:p}),{mutate:y}=Ir(P),O=C.useCallback(({activityId:ve})=>T({activityId:ve}),[T]),M=C.useCallback(async({activityId:ve})=>y({activityId:ve}),[y]);return v?g.jsx(bs,{variant:"error",text:v.message}):x||S?g.jsx(Vt,{style:{height:"400px"}}):g.jsx(Ko,{content:{type:"post",body:p==null?void 0:p.content,createdAt:(p==null?void 0:p.time)||"",slugs:{question:`${t}/${r}`},slug:r,author:{id:(E=p==null?void 0:p.actor)==null?void 0:E.id,name:(I=p==null?void 0:p.actor)==null?void 0:I.data.name,organization:(R=p==null?void 0:p.actor)==null?void 0:R.data.organization,jobTitle:(N=p==null?void 0:p.actor)==null?void 0:N.data.jobTitle,image:{thumbnail:((z=p==null?void 0:p.actor)==null?void 0:z.data.thumbnail)||void 0}},userLiked:((Y=p==null?void 0:p.own_reactions)==null?void 0:Y.like)&&((q=p==null?void 0:p.own_reactions)==null?void 0:q.like.length)>0,likes:p&&(p==null?void 0:p.reaction_counts.like),comments:p&&(p==null?void 0:p.reaction_counts.reply)},originalAuthorId:(ae=p==null?void 0:p.actor)==null?void 0:ae.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>O({activityId:r}),deleteLike:()=>M({activityId:r})},comments:{openComments:()=>{}}},children:g.jsxs(g.Fragment,{children:[g.jsxs("h3",{children:["Comments (",((ge=p==null?void 0:p.reaction_counts)==null?void 0:ge.reply)||0,")"]}),g.jsx(Jp,{basePath:e,parentId:t,activityId:r,repliesList:(Se=p==null?void 0:p.latest_reactions)==null?void 0:Se.reply,isMember:n,functions:{createReply:a,like:l,unlike:u,join:c,leave:h}})]})},r)},I1=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:i}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:i}});exports.$PROXY=Wi;exports.$TRACK=Dc;exports.ASSETS_BUCKET=vo;exports.ActivitiesFeed=k1;exports.ActivitySection=M1;exports.AddPost=lu;exports.Breadcrumbs=_w;exports.Button=Oe;exports.ButtonWrapper=gs;exports.CacheProvider=Zh;exports.CollapsibleSection=$c;exports.Columns=Sw;exports.CommunityDetails=vw;exports.Contributors=Sh;exports.Conversation=p1;exports.ConversationContext=cu;exports.CookieBanner=Ip;exports.Divider=go;exports.DownloadSection=qv;exports.Dynamic=V0;exports.EMAILS=In;exports.EmailHelperTextBox=Bw;exports.EmptyStateBox=bs;exports.Filters=yw;exports.FlagsProvider=Ep;exports.Footer=tu;exports.For=_0;exports.Form=au;exports.FullWidthSection=Mc;exports.GlobalProviders=gw;exports.Header=ou;exports.HelperTextBox=gh;exports.HiddenFromScreenReaders=xc;exports.HideShowTextBox=ry;exports.HighlightedTextBoxWrapper=ar;exports.Index=y0;exports.IntlProvider=kp;exports.JoinButton=Zc;exports.LanguageSwitcher=ww;exports.Likes=Qp;exports.Link=vs;exports.LoadMore=Cp;exports.LoadingPlaceholder=Vt;exports.LoadingState=wh;exports.Logo=eu;exports.LogoSection=Vv;exports.MarkdownText=Ll;exports.MarketingBlock=Yv;exports.Match=x0;exports.Member=qo;exports.MembersList=Yx;exports.Modal=Wp;exports.MoreMenu=Pp;exports.NUMBER_OF_USERS=Kv;exports.Overlay=Xp;exports.PageLayout=Qx;exports.Pill=_h;exports.Portal=q0;exports.Post=Ko;exports.ProfilePicture=zo;exports.ProgressBar=yh;exports.Rating=zw;exports.RepliesFeed=Jp;exports.ResponsesHeading=y1;exports.ResponsiveImage=mf;exports.SearchForm=jp;exports.Show=b0;exports.Span=vh;exports.StatusBanner=_o;exports.Switch=w0;exports.Tags=Xx;exports.Thread=b1;exports.Tooltip=Wf;exports.UserContext=dr;exports.UserProvider=Tp;exports.VisuallyHidden=ze;exports.addAriaProps=Yp;exports.addEventListener=Yh;exports.bannerSection=Xv;exports.batch=Ky;exports.children=Hc;exports.className=Xh;exports.createComponent=zh;exports.createComputed=Kl;exports.createContext=s0;exports.createEffect=Bc;exports.createMemo=at;exports.createRenderEffect=Fr;exports.createRoot=$r;exports.createSignal=st;exports.createUniqueId=v0;exports.delegateEvents=Wh;exports.getListener=t0;exports.getMember=jc;exports.headerData=Ki;exports.insert=Co;exports.loadingBlock=fy;exports.mapGetSteamData=I1;exports.mergeProps=qh;exports.on=Zy;exports.onCleanup=Xi;exports.onMount=e0;exports.passwordRules=Gw;exports.setAttribute=To;exports.splitProps=Vh;exports.spread=Jh;exports.template=F0;exports.untrack=je;exports.use=L0;exports.useContext=o0;exports.useCurrentPath=ef;exports.useEffectAfterMount=ln;exports.useScreenWidth=ms;exports.useScrollListener=rf;exports.useScrollToHash=nm;exports.useTransition=i0;