@apolitical/component-library 1.12.1-beta.0 → 1.12.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.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),oa=require("react-cookie"),gp=require("lodash.clonedeep"),yp=require("lodash.set"),se=require("react-intl"),aa=require("truncate"),Gn=require("markdown-to-jsx"),Ne=require("@tanstack/react-query"),vp=require("@tanstack/react-query-devtools"),Pu=require("lodash.get"),_p=require("react-error-boundary"),Ep=require("react-textarea-autosize"),wp=require("lodash.isequal");var le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var Nu={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),ia=require("react-cookie"),fp=require("lodash.clonedeep"),dp=require("lodash.set"),ue=require("react-intl"),oa=require("truncate"),Wn=require("markdown-to-jsx"),Le=require("@tanstack/react-query"),pp=require("@tanstack/react-query-devtools"),xu=require("lodash.get"),hp=require("react-error-boundary"),mp=require("react-textarea-autosize"),gp=require("lodash.isequal");var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Au={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var l=typeof o;if(l==="string"||l==="number")n.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&n.push(i)}}else if(l==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var c in o)t.call(o,c)&&o[c]&&n.push(c)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Nu);var bp=Nu.exports;const re=Br(bp),Sp=({element:e="span",showOnFocus:t=!0,children:r,...n})=>F.createElement(e,{...n,className:re("hidden",{"show-on-focus":t}),children:r}),Le=F.memo(Sp),Tp=({element:e="span",children:t=null,...r})=>F.createElement(e,{...r,"aria-hidden":!0},t),sa=F.memo(Tp);var Bo={exports:{}},ar={};/**
5
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var l=typeof o;if(l==="string"||l==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var i=n.apply(null,o);i&&r.push(i)}}else if(l==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var u in o)t.call(o,u)&&o[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Au);var yp=Au.exports;const ne=$r(yp),vp=({element:e="span",showOnFocus:t=!0,children:n,...r})=>j.createElement(e,{...r,className:ne("hidden",{"show-on-focus":t}),children:n}),Ue=j.memo(vp),_p=({element:e="span",children:t=null,...n})=>j.createElement(e,{...n,"aria-hidden":!0},t),aa=j.memo(_p);var qo={exports:{}},ar={};/**
6
6
  * @license React
7
7
  * react-jsx-runtime.production.min.js
8
8
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
- */var qa;function Op(){if(qa)return ar;qa=1;var e=F,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(i,c,u){var a,d={},f=null,p=null;u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+c.key),c.ref!==void 0&&(p=c.ref);for(a in c)n.call(c,a)&&!o.hasOwnProperty(a)&&(d[a]=c[a]);if(i&&i.defaultProps)for(a in c=i.defaultProps,c)d[a]===void 0&&(d[a]=c[a]);return{$$typeof:t,type:i,key:f,ref:p,props:d,_owner:s.current}}return ar.Fragment=r,ar.jsx=l,ar.jsxs=l,ar}var sr={};/**
13
+ */var qa;function Ep(){if(qa)return ar;qa=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(i,u,c){var a,d={},f=null,p=null;c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(p=u.ref);for(a in u)r.call(u,a)&&!o.hasOwnProperty(a)&&(d[a]=u[a]);if(i&&i.defaultProps)for(a in u=i.defaultProps,u)d[a]===void 0&&(d[a]=u[a]);return{$$typeof:t,type:i,key:f,ref:p,props:d,_owner:s.current}}return ar.Fragment=n,ar.jsx=l,ar.jsxs=l,ar}var sr={};/**
14
14
  * @license React
15
15
  * react-jsx-runtime.development.js
16
16
  *
@@ -18,39 +18,39 @@
18
18
  *
19
19
  * This source code is licensed under the MIT license found in the
20
20
  * LICENSE file in the root directory of this source tree.
21
- */var Ha;function Ap(){return Ha||(Ha=1,process.env.NODE_ENV!=="production"&&function(){var e=F,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function _(x){if(x===null||typeof x!="object")return null;var z=h&&x[h]||x[y];return typeof z=="function"?z:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var z=arguments.length,J=new Array(z>1?z-1:0),ae=1;ae<z;ae++)J[ae-1]=arguments[ae];w("error",x,J)}}function w(x,z,J){{var ae=S.ReactDebugCurrentFrame,pe=ae.getStackAddendum();pe!==""&&(z+="%s",J=J.concat([pe]));var ge=J.map(function(fe){return String(fe)});ge.unshift("Warning: "+z),Function.prototype.apply.call(console[x],console,ge)}}var A=!1,T=!1,M=!1,D=!1,R=!1,W;W=Symbol.for("react.module.reference");function G(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===o||R||x===s||x===u||x===a||D||x===p||A||T||M||typeof x=="object"&&x!==null&&(x.$$typeof===f||x.$$typeof===d||x.$$typeof===l||x.$$typeof===i||x.$$typeof===c||x.$$typeof===W||x.getModuleId!==void 0))}function L(x,z,J){var ae=x.displayName;if(ae)return ae;var pe=z.displayName||z.name||"";return pe!==""?J+"("+pe+")":J}function $(x){return x.displayName||"Context"}function H(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case u:return"Suspense";case a:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case i:var z=x;return $(z)+".Consumer";case l:var J=x;return $(J._context)+".Provider";case c:return L(x,x.render,"ForwardRef");case d:var ae=x.displayName||null;return ae!==null?ae:H(x.type)||"Memo";case f:{var pe=x,ge=pe._payload,fe=pe._init;try{return H(fe(ge))}catch{return null}}}return null}var K=Object.assign,V=0,P,q,Y,ie,ee,Q,Z;function oe(){}oe.__reactDisabledLog=!0;function Te(){{if(V===0){P=console.log,q=console.info,Y=console.warn,ie=console.error,ee=console.group,Q=console.groupCollapsed,Z=console.groupEnd;var x={configurable:!0,enumerable:!0,value:oe,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}V++}}function ne(){{if(V--,V===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},x,{value:P}),info:K({},x,{value:q}),warn:K({},x,{value:Y}),error:K({},x,{value:ie}),group:K({},x,{value:ee}),groupCollapsed:K({},x,{value:Q}),groupEnd:K({},x,{value:Z})})}V<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var te=S.ReactCurrentDispatcher,_e;function xe(x,z,J){{if(_e===void 0)try{throw Error()}catch(pe){var ae=pe.stack.trim().match(/\n( *(at )?)/);_e=ae&&ae[1]||""}return`
22
- `+_e+x}}var He=!1,We;{var tr=typeof WeakMap=="function"?WeakMap:Map;We=new tr}function St(x,z){if(!x||He)return"";{var J=We.get(x);if(J!==void 0)return J}var ae;He=!0;var pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ge;ge=te.current,te.current=null,Te();try{if(z){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Ve){ae=Ve}Reflect.construct(x,[],fe)}else{try{fe.call()}catch(Ve){ae=Ve}x.call(fe.prototype)}}else{try{throw Error()}catch(Ve){ae=Ve}x()}}catch(Ve){if(Ve&&ae&&typeof Ve.stack=="string"){for(var ue=Ve.stack.split(`
23
- `),ke=ae.stack.split(`
24
- `),Oe=ue.length-1,Se=ke.length-1;Oe>=1&&Se>=0&&ue[Oe]!==ke[Se];)Se--;for(;Oe>=1&&Se>=0;Oe--,Se--)if(ue[Oe]!==ke[Se]){if(Oe!==1||Se!==1)do if(Oe--,Se--,Se<0||ue[Oe]!==ke[Se]){var Ue=`
25
- `+ue[Oe].replace(" at new "," at ");return x.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",x.displayName)),typeof x=="function"&&We.set(x,Ue),Ue}while(Oe>=1&&Se>=0);break}}}finally{He=!1,te.current=ge,ne(),Error.prepareStackTrace=pe}var vt=x?x.displayName||x.name:"",nn=vt?xe(vt):"";return typeof x=="function"&&We.set(x,nn),nn}function ze(x,z,J){return St(x,!1)}function rt(x){var z=x.prototype;return!!(z&&z.isReactComponent)}function ft(x,z,J){if(x==null)return"";if(typeof x=="function")return St(x,rt(x));if(typeof x=="string")return xe(x);switch(x){case u:return xe("Suspense");case a:return xe("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return ze(x.render);case d:return ft(x.type,z,J);case f:{var ae=x,pe=ae._payload,ge=ae._init;try{return ft(ge(pe),z,J)}catch{}}}return""}var dt=Object.prototype.hasOwnProperty,pt={},Ge=S.ReactDebugCurrentFrame;function ht(x){if(x){var z=x._owner,J=ft(x.type,x._source,z?z.type:null);Ge.setExtraStackFrame(J)}else Ge.setExtraStackFrame(null)}function jt(x,z,J,ae,pe){{var ge=Function.call.bind(dt);for(var fe in x)if(ge(x,fe)){var ue=void 0;try{if(typeof x[fe]!="function"){var ke=Error((ae||"React class")+": "+J+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ke.name="Invariant Violation",ke}ue=x[fe](z,fe,ae,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Oe){ue=Oe}ue&&!(ue instanceof Error)&&(ht(pe),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ae||"React class",J,fe,typeof ue),ht(null)),ue instanceof Error&&!(ue.message in pt)&&(pt[ue.message]=!0,ht(pe),v("Failed %s type: %s",J,ue.message),ht(null))}}}var mt=Array.isArray;function Ie(x){return mt(x)}function gt(x){{var z=typeof Symbol=="function"&&Symbol.toStringTag,J=z&&x[Symbol.toStringTag]||x.constructor.name||"Object";return J}}function Ft(x){try{return Be(x),!1}catch{return!0}}function Be(x){return""+x}function Dt(x){if(Ft(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gt(x)),Be(x)}var b=S.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0},g,O,C;C={};function j(x){if(dt.call(x,"ref")){var z=Object.getOwnPropertyDescriptor(x,"ref").get;if(z&&z.isReactWarning)return!1}return x.ref!==void 0}function B(x){if(dt.call(x,"key")){var z=Object.getOwnPropertyDescriptor(x,"key").get;if(z&&z.isReactWarning)return!1}return x.key!==void 0}function ce(x,z){if(typeof x.ref=="string"&&b.current&&z&&b.current.stateNode!==z){var J=H(b.current.type);C[J]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(b.current.type),x.ref),C[J]=!0)}}function Ee(x,z){{var J=function(){g||(g=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};J.isReactWarning=!0,Object.defineProperty(x,"key",{get:J,configurable:!0})}}function ye(x,z){{var J=function(){O||(O=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};J.isReactWarning=!0,Object.defineProperty(x,"ref",{get:J,configurable:!0})}}var we=function(x,z,J,ae,pe,ge,fe){var ue={$$typeof:t,type:x,key:z,ref:J,props:fe,_owner:ge};return ue._store={},Object.defineProperty(ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.defineProperty(ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.freeze&&(Object.freeze(ue.props),Object.freeze(ue)),ue};function he(x,z,J,ae,pe){{var ge,fe={},ue=null,ke=null;J!==void 0&&(Dt(J),ue=""+J),B(z)&&(Dt(z.key),ue=""+z.key),j(z)&&(ke=z.ref,ce(z,pe));for(ge in z)dt.call(z,ge)&&!m.hasOwnProperty(ge)&&(fe[ge]=z[ge]);if(x&&x.defaultProps){var Oe=x.defaultProps;for(ge in Oe)fe[ge]===void 0&&(fe[ge]=Oe[ge])}if(ue||ke){var Se=typeof x=="function"?x.displayName||x.name||"Unknown":x;ue&&Ee(fe,Se),ke&&ye(fe,Se)}return we(x,ue,ke,pe,ae,b.current,fe)}}var rr=S.ReactCurrentOwner,Jr=S.ReactDebugCurrentFrame;function yt(x){if(x){var z=x._owner,J=ft(x.type,x._source,z?z.type:null);Jr.setExtraStackFrame(J)}else Jr.setExtraStackFrame(null)}var nr;nr=!1;function ir(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Kr(){{if(rr.current){var x=H(rr.current.type);if(x)return`
21
+ */var Ha;function wp(){return Ha||(Ha=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function _(A){if(A===null||typeof A!="object")return null;var z=h&&A[h]||A[y];return typeof z=="function"?z:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(A){{for(var z=arguments.length,J=new Array(z>1?z-1:0),se=1;se<z;se++)J[se-1]=arguments[se];w("error",A,J)}}function w(A,z,J){{var se=S.ReactDebugCurrentFrame,he=se.getStackAddendum();he!==""&&(z+="%s",J=J.concat([he]));var ye=J.map(function(de){return String(de)});ye.unshift("Warning: "+z),Function.prototype.apply.call(console[A],console,ye)}}var x=!1,O=!1,F=!1,D=!1,R=!1,W;W=Symbol.for("react.module.reference");function V(A){return!!(typeof A=="string"||typeof A=="function"||A===r||A===o||R||A===s||A===c||A===a||D||A===p||x||O||F||typeof A=="object"&&A!==null&&(A.$$typeof===f||A.$$typeof===d||A.$$typeof===l||A.$$typeof===i||A.$$typeof===u||A.$$typeof===W||A.getModuleId!==void 0))}function L(A,z,J){var se=A.displayName;if(se)return se;var he=z.displayName||z.name||"";return he!==""?J+"("+he+")":J}function U(A){return A.displayName||"Context"}function $(A){if(A==null)return null;if(typeof A.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case a:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case i:var z=A;return U(z)+".Consumer";case l:var J=A;return U(J._context)+".Provider";case u:return L(A,A.render,"ForwardRef");case d:var se=A.displayName||null;return se!==null?se:$(A.type)||"Memo";case f:{var he=A,ye=he._payload,de=he._init;try{return $(de(ye))}catch{return null}}}return null}var K=Object.assign,Q=0,C,q,Y,oe,ee,G,Z;function ae(){}ae.__reactDisabledLog=!0;function Oe(){{if(Q===0){C=console.log,q=console.info,Y=console.warn,oe=console.error,ee=console.group,G=console.groupCollapsed,Z=console.groupEnd;var A={configurable:!0,enumerable:!0,value:ae,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}Q++}}function ie(){{if(Q--,Q===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},A,{value:C}),info:K({},A,{value:q}),warn:K({},A,{value:Y}),error:K({},A,{value:oe}),group:K({},A,{value:ee}),groupCollapsed:K({},A,{value:G}),groupEnd:K({},A,{value:Z})})}Q<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=S.ReactCurrentDispatcher,te;function we(A,z,J){{if(te===void 0)try{throw Error()}catch(he){var se=he.stack.trim().match(/\n( *(at )?)/);te=se&&se[1]||""}return`
22
+ `+te+A}}var Ne=!1,$e;{var Fe=typeof WeakMap=="function"?WeakMap:Map;$e=new Fe}function tt(A,z){if(!A||Ne)return"";{var J=$e.get(A);if(J!==void 0)return J}var se;Ne=!0;var he=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ye;ye=re.current,re.current=null,Oe();try{if(z){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(Ze){se=Ze}Reflect.construct(A,[],de)}else{try{de.call()}catch(Ze){se=Ze}A.call(de.prototype)}}else{try{throw Error()}catch(Ze){se=Ze}A()}}catch(Ze){if(Ze&&se&&typeof Ze.stack=="string"){for(var fe=Ze.stack.split(`
23
+ `),De=se.stack.split(`
24
+ `),Re=fe.length-1,Ae=De.length-1;Re>=1&&Ae>=0&&fe[Re]!==De[Ae];)Ae--;for(;Re>=1&&Ae>=0;Re--,Ae--)if(fe[Re]!==De[Ae]){if(Re!==1||Ae!==1)do if(Re--,Ae--,Ae<0||fe[Re]!==De[Ae]){var ze=`
25
+ `+fe[Re].replace(" at new "," at ");return A.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",A.displayName)),typeof A=="function"&&$e.set(A,ze),ze}while(Re>=1&&Ae>=0);break}}}finally{Ne=!1,re.current=ye,ie(),Error.prepareStackTrace=he}var wt=A?A.displayName||A.name:"",on=wt?we(wt):"";return typeof A=="function"&&$e.set(A,on),on}function Ge(A,z,J){return tt(A,!1)}function qe(A){var z=A.prototype;return!!(z&&z.isReactComponent)}function Ve(A,z,J){if(A==null)return"";if(typeof A=="function")return tt(A,qe(A));if(typeof A=="string")return we(A);switch(A){case c:return we("Suspense");case a:return we("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case u:return Ge(A.render);case d:return Ve(A.type,z,J);case f:{var se=A,he=se._payload,ye=se._init;try{return Ve(ye(he),z,J)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,je={},Xe=S.ReactDebugCurrentFrame;function rt(A){if(A){var z=A._owner,J=Ve(A.type,A._source,z?z.type:null);Xe.setExtraStackFrame(J)}else Xe.setExtraStackFrame(null)}function Mt(A,z,J,se,he){{var ye=Function.call.bind(ve);for(var de in A)if(ye(A,de)){var fe=void 0;try{if(typeof A[de]!="function"){var De=Error((se||"React class")+": "+J+" type `"+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[de]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw De.name="Invariant Violation",De}fe=A[de](z,de,se,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Re){fe=Re}fe&&!(fe instanceof Error)&&(rt(he),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",se||"React class",J,de,typeof fe),rt(null)),fe instanceof Error&&!(fe.message in je)&&(je[fe.message]=!0,rt(he),v("Failed %s type: %s",J,fe.message),rt(null))}}}var vt=Array.isArray;function Me(A){return vt(A)}function _t(A){{var z=typeof Symbol=="function"&&Symbol.toStringTag,J=z&&A[Symbol.toStringTag]||A.constructor.name||"Object";return J}}function Dt(A){try{return Ke(A),!1}catch{return!0}}function Ke(A){return""+A}function Ut(A){if(Dt(A))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_t(A)),Ke(A)}var b=S.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0},g,T,N;N={};function M(A){if(ve.call(A,"ref")){var z=Object.getOwnPropertyDescriptor(A,"ref").get;if(z&&z.isReactWarning)return!1}return A.ref!==void 0}function H(A){if(ve.call(A,"key")){var z=Object.getOwnPropertyDescriptor(A,"key").get;if(z&&z.isReactWarning)return!1}return A.key!==void 0}function le(A,z){if(typeof A.ref=="string"&&b.current&&z&&b.current.stateNode!==z){var J=$(b.current.type);N[J]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',$(b.current.type),A.ref),N[J]=!0)}}function be(A,z){{var J=function(){g||(g=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};J.isReactWarning=!0,Object.defineProperty(A,"key",{get:J,configurable:!0})}}function _e(A,z){{var J=function(){T||(T=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};J.isReactWarning=!0,Object.defineProperty(A,"ref",{get:J,configurable:!0})}}var Se=function(A,z,J,se,he,ye,de){var fe={$$typeof:t,type:A,key:z,ref:J,props:de,_owner:ye};return fe._store={},Object.defineProperty(fe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(fe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.defineProperty(fe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.freeze&&(Object.freeze(fe.props),Object.freeze(fe)),fe};function me(A,z,J,se,he){{var ye,de={},fe=null,De=null;J!==void 0&&(Ut(J),fe=""+J),H(z)&&(Ut(z.key),fe=""+z.key),M(z)&&(De=z.ref,le(z,he));for(ye in z)ve.call(z,ye)&&!m.hasOwnProperty(ye)&&(de[ye]=z[ye]);if(A&&A.defaultProps){var Re=A.defaultProps;for(ye in Re)de[ye]===void 0&&(de[ye]=Re[ye])}if(fe||De){var Ae=typeof A=="function"?A.displayName||A.name||"Unknown":A;fe&&be(de,Ae),De&&_e(de,Ae)}return Se(A,fe,De,he,se,b.current,de)}}var rr=S.ReactCurrentOwner,Jr=S.ReactDebugCurrentFrame;function Et(A){if(A){var z=A._owner,J=Ve(A.type,A._source,z?z.type:null);Jr.setExtraStackFrame(J)}else Jr.setExtraStackFrame(null)}var nr;nr=!1;function ir(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function Xr(){{if(rr.current){var A=$(rr.current.type);if(A)return`
26
26
 
27
- Check the render method of \``+x+"`."}return""}}function Zn(x){{if(x!==void 0){var z=x.fileName.replace(/^.*[\\\/]/,""),J=x.lineNumber;return`
27
+ Check the render method of \``+A+"`."}return""}}function Zn(A){{if(A!==void 0){var z=A.fileName.replace(/^.*[\\\/]/,""),J=A.lineNumber;return`
28
28
 
29
- Check your code at `+z+":"+J+"."}return""}}var Xr={};function ei(x){{var z=Kr();if(!z){var J=typeof x=="string"?x:x.displayName||x.name;J&&(z=`
29
+ Check your code at `+z+":"+J+"."}return""}}var Zr={};function ei(A){{var z=Xr();if(!z){var J=typeof A=="string"?A:A.displayName||A.name;J&&(z=`
30
30
 
31
- Check the top-level render call using <`+J+">.")}return z}}function Zr(x,z){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=ei(z);if(Xr[J])return;Xr[J]=!0;var ae="";x&&x._owner&&x._owner!==rr.current&&(ae=" It was passed a child from "+H(x._owner.type)+"."),yt(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ae),yt(null)}}function en(x,z){{if(typeof x!="object")return;if(Ie(x))for(var J=0;J<x.length;J++){var ae=x[J];ir(ae)&&Zr(ae,z)}else if(ir(x))x._store&&(x._store.validated=!0);else if(x){var pe=_(x);if(typeof pe=="function"&&pe!==x.entries)for(var ge=pe.call(x),fe;!(fe=ge.next()).done;)ir(fe.value)&&Zr(fe.value,z)}}}function ti(x){{var z=x.type;if(z==null||typeof z=="string")return;var J;if(typeof z=="function")J=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===c||z.$$typeof===d))J=z.propTypes;else return;if(J){var ae=H(z);jt(J,x.props,"prop",ae,x)}else if(z.PropTypes!==void 0&&!nr){nr=!0;var pe=H(z);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pe||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ri(x){{for(var z=Object.keys(x.props),J=0;J<z.length;J++){var ae=z[J];if(ae!=="children"&&ae!=="key"){yt(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ae),yt(null);break}}x.ref!==null&&(yt(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),yt(null))}}function tn(x,z,J,ae,pe,ge){{var fe=G(x);if(!fe){var ue="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ue+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ke=Zn(pe);ke?ue+=ke:ue+=Kr();var Oe;x===null?Oe="null":Ie(x)?Oe="array":x!==void 0&&x.$$typeof===t?(Oe="<"+(H(x.type)||"Unknown")+" />",ue=" Did you accidentally export a JSX literal instead of a component?"):Oe=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Oe,ue)}var Se=he(x,z,J,pe,ge);if(Se==null)return Se;if(fe){var Ue=z.children;if(Ue!==void 0)if(ae)if(Ie(Ue)){for(var vt=0;vt<Ue.length;vt++)en(Ue[vt],x);Object.freeze&&Object.freeze(Ue)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ue,x)}return x===n?ri(Se):ti(Se),Se}}function ni(x,z,J){return tn(x,z,J,!0)}function ii(x,z,J){return tn(x,z,J,!1)}var oi=ii,rn=ni;sr.Fragment=n,sr.jsx=oi,sr.jsxs=rn}()),sr}process.env.NODE_ENV==="production"?Bo.exports=Op():Bo.exports=Ap();var E=Bo.exports;const Iu=()=>{const[e,t]=F.useState(window.location.pathname),r=()=>{const n=window.location.pathname;t(n)};return F.useEffect(()=>(window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}),[]),e},Lt=(e,t)=>{const r=F.useRef(!1);F.useEffect(()=>{r.current?e():r.current=!0},t)};var ku={exports:{}},li={exports:{}},an={},sn={exports:{}},fi,Wa;function Lu(){return Wa||(Wa=1,fi=function(t,r){return function(){for(var s=new Array(arguments.length),o=0;o<s.length;o++)s[o]=arguments[o];return t.apply(r,s)}}),fi}var di,Ga;function Me(){if(Ga)return di;Ga=1;var e=Lu(),t=Object.prototype.toString,r=function(P){return function(q){var Y=t.call(q);return P[Y]||(P[Y]=Y.slice(8,-1).toLowerCase())}}(Object.create(null));function n(P){return P=P.toLowerCase(),function(Y){return r(Y)===P}}function s(P){return Array.isArray(P)}function o(P){return typeof P>"u"}function l(P){return P!==null&&!o(P)&&P.constructor!==null&&!o(P.constructor)&&typeof P.constructor.isBuffer=="function"&&P.constructor.isBuffer(P)}var i=n("ArrayBuffer");function c(P){var q;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?q=ArrayBuffer.isView(P):q=P&&P.buffer&&i(P.buffer),q}function u(P){return typeof P=="string"}function a(P){return typeof P=="number"}function d(P){return P!==null&&typeof P=="object"}function f(P){if(r(P)!=="object")return!1;var q=Object.getPrototypeOf(P);return q===null||q===Object.prototype}var p=n("Date"),h=n("File"),y=n("Blob"),_=n("FileList");function S(P){return t.call(P)==="[object Function]"}function v(P){return d(P)&&S(P.pipe)}function w(P){var q="[object FormData]";return P&&(typeof FormData=="function"&&P instanceof FormData||t.call(P)===q||S(P.toString)&&P.toString()===q)}var A=n("URLSearchParams");function T(P){return P.trim?P.trim():P.replace(/^\s+|\s+$/g,"")}function M(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function D(P,q){if(!(P===null||typeof P>"u"))if(typeof P!="object"&&(P=[P]),s(P))for(var Y=0,ie=P.length;Y<ie;Y++)q.call(null,P[Y],Y,P);else for(var ee in P)Object.prototype.hasOwnProperty.call(P,ee)&&q.call(null,P[ee],ee,P)}function R(){var P={};function q(ee,Q){f(P[Q])&&f(ee)?P[Q]=R(P[Q],ee):f(ee)?P[Q]=R({},ee):s(ee)?P[Q]=ee.slice():P[Q]=ee}for(var Y=0,ie=arguments.length;Y<ie;Y++)D(arguments[Y],q);return P}function W(P,q,Y){return D(q,function(ee,Q){Y&&typeof ee=="function"?P[Q]=e(ee,Y):P[Q]=ee}),P}function G(P){return P.charCodeAt(0)===65279&&(P=P.slice(1)),P}function L(P,q,Y,ie){P.prototype=Object.create(q.prototype,ie),P.prototype.constructor=P,Y&&Object.assign(P.prototype,Y)}function $(P,q,Y){var ie,ee,Q,Z={};q=q||{};do{for(ie=Object.getOwnPropertyNames(P),ee=ie.length;ee-- >0;)Q=ie[ee],Z[Q]||(q[Q]=P[Q],Z[Q]=!0);P=Object.getPrototypeOf(P)}while(P&&(!Y||Y(P,q))&&P!==Object.prototype);return q}function H(P,q,Y){P=String(P),(Y===void 0||Y>P.length)&&(Y=P.length),Y-=q.length;var ie=P.indexOf(q,Y);return ie!==-1&&ie===Y}function K(P){if(!P)return null;var q=P.length;if(o(q))return null;for(var Y=new Array(q);q-- >0;)Y[q]=P[q];return Y}var V=function(P){return function(q){return P&&q instanceof P}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return di={isArray:s,isArrayBuffer:i,isBuffer:l,isFormData:w,isArrayBufferView:c,isString:u,isNumber:a,isObject:d,isPlainObject:f,isUndefined:o,isDate:p,isFile:h,isBlob:y,isFunction:S,isStream:v,isURLSearchParams:A,isStandardBrowserEnv:M,forEach:D,merge:R,extend:W,trim:T,stripBOM:G,inherits:L,toFlatObject:$,kindOf:r,kindOfTest:n,endsWith:H,toArray:K,isTypedArray:V,isFileList:_},di}var pi,Va;function Mu(){if(Va)return pi;Va=1;var e=Me();function t(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return pi=function(n,s,o){if(!s)return n;var l;if(o)l=o(s);else if(e.isURLSearchParams(s))l=s.toString();else{var i=[];e.forEach(s,function(a,d){a===null||typeof a>"u"||(e.isArray(a)?d=d+"[]":a=[a],e.forEach(a,function(p){e.isDate(p)?p=p.toISOString():e.isObject(p)&&(p=JSON.stringify(p)),i.push(t(d)+"="+t(p))}))}),l=i.join("&")}if(l){var c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+l}return n},pi}var hi,Qa;function xp(){if(Qa)return hi;Qa=1;var e=Me();function t(){this.handlers=[]}return t.prototype.use=function(n,s,o){return this.handlers.push({fulfilled:n,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},t.prototype.forEach=function(n){e.forEach(this.handlers,function(o){o!==null&&n(o)})},hi=t,hi}var mi,za;function Rp(){if(za)return mi;za=1;var e=Me();return mi=function(r,n){e.forEach(r,function(o,l){l!==n&&l.toUpperCase()===n.toUpperCase()&&(r[n]=o,delete r[l])})},mi}var gi,Ya;function Kt(){if(Ya)return gi;Ya=1;var e=Me();function t(s,o,l,i,c){Error.call(this),this.message=s,this.name="AxiosError",o&&(this.code=o),l&&(this.config=l),i&&(this.request=i),c&&(this.response=c)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var r=t.prototype,n={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(s){n[s]={value:s}}),Object.defineProperties(t,n),Object.defineProperty(r,"isAxiosError",{value:!0}),t.from=function(s,o,l,i,c,u){var a=Object.create(r);return e.toFlatObject(s,a,function(f){return f!==Error.prototype}),t.call(a,s.message,o,l,i,c),a.name=s.name,u&&Object.assign(a,u),a},gi=t,gi}var yi,Ja;function ju(){return Ja||(Ja=1,yi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),yi}var vi,Ka;function Fu(){if(Ka)return vi;Ka=1;var e=Me();function t(r,n){n=n||new FormData;var s=[];function o(i){return i===null?"":e.isDate(i)?i.toISOString():e.isArrayBuffer(i)||e.isTypedArray(i)?typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function l(i,c){if(e.isPlainObject(i)||e.isArray(i)){if(s.indexOf(i)!==-1)throw Error("Circular reference detected in "+c);s.push(i),e.forEach(i,function(a,d){if(!e.isUndefined(a)){var f=c?c+"."+d:d,p;if(a&&!c&&typeof a=="object"){if(e.endsWith(d,"{}"))a=JSON.stringify(a);else if(e.endsWith(d,"[]")&&(p=e.toArray(a))){p.forEach(function(h){!e.isUndefined(h)&&n.append(f,o(h))});return}}l(a,f)}}),s.pop()}else n.append(c,o(i))}return l(r),n}return vi=t,vi}var _i,Xa;function Cp(){if(Xa)return _i;Xa=1;var e=Kt();return _i=function(r,n,s){var o=s.config.validateStatus;!s.status||!o||o(s.status)?r(s):n(new e("Request failed with status code "+s.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))},_i}var Ei,Za;function Pp(){if(Za)return Ei;Za=1;var e=Me();return Ei=e.isStandardBrowserEnv()?function(){return{write:function(n,s,o,l,i,c){var u=[];u.push(n+"="+encodeURIComponent(s)),e.isNumber(o)&&u.push("expires="+new Date(o).toGMTString()),e.isString(l)&&u.push("path="+l),e.isString(i)&&u.push("domain="+i),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){var s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ei}var wi,es;function Np(){return es||(es=1,wi=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),wi}var bi,ts;function Ip(){return ts||(ts=1,bi=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),bi}var Si,rs;function Du(){if(rs)return Si;rs=1;var e=Np(),t=Ip();return Si=function(n,s){return n&&!e(s)?t(n,s):s},Si}var Ti,ns;function kp(){if(ns)return Ti;ns=1;var e=Me(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ti=function(n){var s={},o,l,i;return n&&e.forEach(n.split(`
32
- `),function(u){if(i=u.indexOf(":"),o=e.trim(u.substr(0,i)).toLowerCase(),l=e.trim(u.substr(i+1)),o){if(s[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?s[o]=(s[o]?s[o]:[]).concat([l]):s[o]=s[o]?s[o]+", "+l:l}}),s},Ti}var Oi,is;function Lp(){if(is)return Oi;is=1;var e=Me();return Oi=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),s;function o(l){var i=l;return r&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=o(window.location.href),function(i){var c=e.isString(i)?o(i):i;return c.protocol===s.protocol&&c.host===s.host}}():function(){return function(){return!0}}(),Oi}var Ai,os;function Vn(){if(os)return Ai;os=1;var e=Kt(),t=Me();function r(n){e.call(this,n??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(r,e,{__CANCEL__:!0}),Ai=r,Ai}var xi,as;function Mp(){return as||(as=1,xi=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}),xi}var Ri,ss;function cs(){if(ss)return Ri;ss=1;var e=Me(),t=Cp(),r=Pp(),n=Mu(),s=Du(),o=kp(),l=Lp(),i=ju(),c=Kt(),u=Vn(),a=Mp();return Ri=function(f){return new Promise(function(h,y){var _=f.data,S=f.headers,v=f.responseType,w;function A(){f.cancelToken&&f.cancelToken.unsubscribe(w),f.signal&&f.signal.removeEventListener("abort",w)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete S["Content-Type"];var T=new XMLHttpRequest;if(f.auth){var M=f.auth.username||"",D=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";S.Authorization="Basic "+btoa(M+":"+D)}var R=s(f.baseURL,f.url);T.open(f.method.toUpperCase(),n(R,f.params,f.paramsSerializer),!0),T.timeout=f.timeout;function W(){if(T){var $="getAllResponseHeaders"in T?o(T.getAllResponseHeaders()):null,H=!v||v==="text"||v==="json"?T.responseText:T.response,K={data:H,status:T.status,statusText:T.statusText,headers:$,config:f,request:T};t(function(P){h(P),A()},function(P){y(P),A()},K),T=null}}if("onloadend"in T?T.onloadend=W:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(W)},T.onabort=function(){T&&(y(new c("Request aborted",c.ECONNABORTED,f,T)),T=null)},T.onerror=function(){y(new c("Network Error",c.ERR_NETWORK,f,T,T)),T=null},T.ontimeout=function(){var H=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",K=f.transitional||i;f.timeoutErrorMessage&&(H=f.timeoutErrorMessage),y(new c(H,K.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,f,T)),T=null},e.isStandardBrowserEnv()){var G=(f.withCredentials||l(R))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;G&&(S[f.xsrfHeaderName]=G)}"setRequestHeader"in T&&e.forEach(S,function(H,K){typeof _>"u"&&K.toLowerCase()==="content-type"?delete S[K]:T.setRequestHeader(K,H)}),e.isUndefined(f.withCredentials)||(T.withCredentials=!!f.withCredentials),v&&v!=="json"&&(T.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&T.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&T.upload&&T.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(w=function($){T&&(y(!$||$&&$.type?new u:$),T.abort(),T=null)},f.cancelToken&&f.cancelToken.subscribe(w),f.signal&&(f.signal.aborted?w():f.signal.addEventListener("abort",w))),_||(_=null);var L=a(R);if(L&&["http","https","file"].indexOf(L)===-1){y(new c("Unsupported protocol "+L+":",c.ERR_BAD_REQUEST,f));return}T.send(_)})},Ri}var Ci,us;function jp(){return us||(us=1,Ci=null),Ci}var Pi,ls;function ca(){if(ls)return Pi;ls=1;var e=Me(),t=Rp(),r=Kt(),n=ju(),s=Fu(),o={"Content-Type":"application/x-www-form-urlencoded"};function l(a,d){!e.isUndefined(a)&&e.isUndefined(a["Content-Type"])&&(a["Content-Type"]=d)}function i(){var a;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(a=cs()),a}function c(a,d,f){if(e.isString(a))try{return(d||JSON.parse)(a),e.trim(a)}catch(p){if(p.name!=="SyntaxError")throw p}return(f||JSON.stringify)(a)}var u={transitional:n,adapter:i(),transformRequest:[function(d,f){if(t(f,"Accept"),t(f,"Content-Type"),e.isFormData(d)||e.isArrayBuffer(d)||e.isBuffer(d)||e.isStream(d)||e.isFile(d)||e.isBlob(d))return d;if(e.isArrayBufferView(d))return d.buffer;if(e.isURLSearchParams(d))return l(f,"application/x-www-form-urlencoded;charset=utf-8"),d.toString();var p=e.isObject(d),h=f&&f["Content-Type"],y;if((y=e.isFileList(d))||p&&h==="multipart/form-data"){var _=this.env&&this.env.FormData;return s(y?{"files[]":d}:d,_&&new _)}else if(p||h==="application/json")return l(f,"application/json"),c(d);return d}],transformResponse:[function(d){var f=this.transitional||u.transitional,p=f&&f.silentJSONParsing,h=f&&f.forcedJSONParsing,y=!p&&this.responseType==="json";if(y||h&&e.isString(d)&&d.length)try{return JSON.parse(d)}catch(_){if(y)throw _.name==="SyntaxError"?r.from(_,r.ERR_BAD_RESPONSE,this,null,this.response):_}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jp()},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(d){u.headers[d]={}}),e.forEach(["post","put","patch"],function(d){u.headers[d]=e.merge(o)}),Pi=u,Pi}var Ni,fs;function Fp(){if(fs)return Ni;fs=1;var e=Me(),t=ca();return Ni=function(n,s,o){var l=this||t;return e.forEach(o,function(c){n=c.call(l,n,s)}),n},Ni}var Ii,ds;function Uu(){return ds||(ds=1,Ii=function(t){return!!(t&&t.__CANCEL__)}),Ii}var ki,ps;function Dp(){if(ps)return ki;ps=1;var e=Me(),t=Fp(),r=Uu(),n=ca(),s=Vn();function o(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new s}return ki=function(i){o(i),i.headers=i.headers||{},i.data=t.call(i,i.data,i.headers,i.transformRequest),i.headers=e.merge(i.headers.common||{},i.headers[i.method]||{},i.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(a){delete i.headers[a]});var c=i.adapter||n.adapter;return c(i).then(function(a){return o(i),a.data=t.call(i,a.data,a.headers,i.transformResponse),a},function(a){return r(a)||(o(i),a&&a.response&&(a.response.data=t.call(i,a.response.data,a.response.headers,i.transformResponse))),Promise.reject(a)})},ki}var Li,hs;function $u(){if(hs)return Li;hs=1;var e=Me();return Li=function(r,n){n=n||{};var s={};function o(d,f){return e.isPlainObject(d)&&e.isPlainObject(f)?e.merge(d,f):e.isPlainObject(f)?e.merge({},f):e.isArray(f)?f.slice():f}function l(d){if(e.isUndefined(n[d])){if(!e.isUndefined(r[d]))return o(void 0,r[d])}else return o(r[d],n[d])}function i(d){if(!e.isUndefined(n[d]))return o(void 0,n[d])}function c(d){if(e.isUndefined(n[d])){if(!e.isUndefined(r[d]))return o(void 0,r[d])}else return o(void 0,n[d])}function u(d){if(d in n)return o(r[d],n[d]);if(d in r)return o(void 0,r[d])}var a={url:i,method:i,data:i,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:u};return e.forEach(Object.keys(r).concat(Object.keys(n)),function(f){var p=a[f]||l,h=p(f);e.isUndefined(h)&&p!==u||(s[f]=h)}),s},Li}var Mi,ms;function Bu(){return ms||(ms=1,Mi={version:"0.27.2"}),Mi}var ji,gs;function Up(){if(gs)return ji;gs=1;var e=Bu().version,t=Kt(),r={};["object","boolean","number","function","string","symbol"].forEach(function(o,l){r[o]=function(c){return typeof c===o||"a"+(l<1?"n ":" ")+o}});var n={};r.transitional=function(l,i,c){function u(a,d){return"[Axios v"+e+"] Transitional option '"+a+"'"+d+(c?". "+c:"")}return function(a,d,f){if(l===!1)throw new t(u(d," has been removed"+(i?" in "+i:"")),t.ERR_DEPRECATED);return i&&!n[d]&&(n[d]=!0,console.warn(u(d," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(a,d,f):!0}};function s(o,l,i){if(typeof o!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var c=Object.keys(o),u=c.length;u-- >0;){var a=c[u],d=l[a];if(d){var f=o[a],p=f===void 0||d(f,a,o);if(p!==!0)throw new t("option "+a+" must be "+p,t.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new t("Unknown option "+a,t.ERR_BAD_OPTION)}}return ji={assertOptions:s,validators:r},ji}var Fi,ys;function $p(){if(ys)return Fi;ys=1;var e=Me(),t=Mu(),r=xp(),n=Dp(),s=$u(),o=Du(),l=Up(),i=l.validators;function c(u){this.defaults=u,this.interceptors={request:new r,response:new r}}return c.prototype.request=function(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=s(this.defaults,d),d.method?d.method=d.method.toLowerCase():this.defaults.method?d.method=this.defaults.method.toLowerCase():d.method="get";var f=d.transitional;f!==void 0&&l.assertOptions(f,{silentJSONParsing:i.transitional(i.boolean),forcedJSONParsing:i.transitional(i.boolean),clarifyTimeoutError:i.transitional(i.boolean)},!1);var p=[],h=!0;this.interceptors.request.forEach(function(M){typeof M.runWhen=="function"&&M.runWhen(d)===!1||(h=h&&M.synchronous,p.unshift(M.fulfilled,M.rejected))});var y=[];this.interceptors.response.forEach(function(M){y.push(M.fulfilled,M.rejected)});var _;if(!h){var S=[n,void 0];for(Array.prototype.unshift.apply(S,p),S=S.concat(y),_=Promise.resolve(d);S.length;)_=_.then(S.shift(),S.shift());return _}for(var v=d;p.length;){var w=p.shift(),A=p.shift();try{v=w(v)}catch(T){A(T);break}}try{_=n(v)}catch(T){return Promise.reject(T)}for(;y.length;)_=_.then(y.shift(),y.shift());return _},c.prototype.getUri=function(a){a=s(this.defaults,a);var d=o(a.baseURL,a.url);return t(d,a.params,a.paramsSerializer)},e.forEach(["delete","get","head","options"],function(a){c.prototype[a]=function(d,f){return this.request(s(f||{},{method:a,url:d,data:(f||{}).data}))}}),e.forEach(["post","put","patch"],function(a){function d(f){return function(h,y,_){return this.request(s(_||{},{method:a,headers:f?{"Content-Type":"multipart/form-data"}:{},url:h,data:y}))}}c.prototype[a]=d(),c.prototype[a+"Form"]=d(!0)}),Fi=c,Fi}var Di,vs;function Bp(){if(vs)return Di;vs=1;var e=Vn();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(l){n=l});var s=this;this.promise.then(function(o){if(s._listeners){var l,i=s._listeners.length;for(l=0;l<i;l++)s._listeners[l](o);s._listeners=null}}),this.promise.then=function(o){var l,i=new Promise(function(c){s.subscribe(c),l=c}).then(o);return i.cancel=function(){s.unsubscribe(l)},i},r(function(l){s.reason||(s.reason=new e(l),n(s.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(this._listeners){var s=this._listeners.indexOf(n);s!==-1&&this._listeners.splice(s,1)}},t.source=function(){var n,s=new t(function(l){n=l});return{token:s,cancel:n}},Di=t,Di}var Ui,_s;function qp(){return _s||(_s=1,Ui=function(t){return function(n){return t.apply(null,n)}}),Ui}var $i,Es;function Hp(){if(Es)return $i;Es=1;var e=Me();return $i=function(r){return e.isObject(r)&&r.isAxiosError===!0},$i}var ws;function Wp(){if(ws)return sn.exports;ws=1;var e=Me(),t=Lu(),r=$p(),n=$u(),s=ca();function o(i){var c=new r(i),u=t(r.prototype.request,c);return e.extend(u,r.prototype,c),e.extend(u,c),u.create=function(d){return o(n(i,d))},u}var l=o(s);return l.Axios=r,l.CanceledError=Vn(),l.CancelToken=Bp(),l.isCancel=Uu(),l.VERSION=Bu().version,l.toFormData=Fu(),l.AxiosError=Kt(),l.Cancel=l.CanceledError,l.all=function(c){return Promise.all(c)},l.spread=qp(),l.isAxiosError=Hp(),sn.exports=l,sn.exports.default=l,sn.exports}var Bi,bs;function qu(){return bs||(bs=1,Bi=Wp()),Bi}var Gp=Function.prototype.toString,qi=Object.create,Vp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,Ss=Object.getOwnPropertyNames,ua=Object.getOwnPropertySymbols,zp=Object.getPrototypeOf,Hu=Object.prototype,Yp=Hu.hasOwnProperty,Jp=Hu.propertyIsEnumerable,Wu=typeof ua=="function",Kp=typeof WeakMap=="function",Xp=function(){if(Kp)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(r){return!!~this._keys.indexOf(r)},t.prototype.get=function(r){return this._values[this._keys.indexOf(r)]},t.prototype.set=function(r,n){this._keys.push(r),this._values.push(n)},t}();return function(){return new e}}(),Gu=function(e,t){var r=e.__proto__||zp(e);if(!r)return qi(null);var n=r.constructor;if(n===t.Object)return r===t.Object.prototype?{}:qi(r);if(~Gp.call(n).indexOf("[native code]"))try{return new n}catch{}return qi(r)},Zp=function(e,t,r,n){var s=Gu(e,t);n.set(e,s);for(var o in e)Yp.call(e,o)&&(s[o]=r(e[o],n));if(Wu)for(var l=ua(e),i=0,c=l.length,u=void 0;i<c;++i)u=l[i],Jp.call(e,u)&&(s[u]=r(e[u],n));return s},Ts=function(e,t,r,n){var s=Gu(e,t);n.set(e,s);for(var o=Wu?Ss(e).concat(ua(e)):Ss(e),l=0,i=o.length,c=void 0,u=void 0;l<i;++l)if(c=o[l],c!=="callee"&&c!=="caller")if(u=Qp(e,c),u){!u.get&&!u.set&&(u.value=r(e[c],n));try{Vp(s,c,u)}catch{s[c]=u.value}}else s[c]=r(e[c],n);return s},eh=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},th=Array.isArray,rh=Object.getPrototypeOf,nh=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function wt(e,t){var r=!!(t&&t.isStrict),n=t&&t.realm||nh,s=r?Ts:Zp,o=function(l,i){if(!l||typeof l!="object")return l;if(i.has(l))return i.get(l);var c=l.__proto__||rh(l),u=c&&c.constructor;if(!u||u===n.Object)return s(l,n,o,i);var a;if(th(l)){if(r)return Ts(l,n,o,i);a=new u,i.set(l,a);for(var d=0,f=l.length;d<f;++d)a[d]=o(l[d],i);return a}if(l instanceof n.Date)return new u(l.getTime());if(l instanceof n.RegExp)return a=new u(l.source,l.flags||eh(l)),a.lastIndex=l.lastIndex,a;if(n.Map&&l instanceof n.Map)return a=new u,i.set(l,a),l.forEach(function(p,h){a.set(h,o(p,i))}),a;if(n.Set&&l instanceof n.Set)return a=new u,i.set(l,a),l.forEach(function(p){a.add(o(p,i))}),a;if(n.Blob&&l instanceof n.Blob)return l.slice(0,l.size,l.type);if(n.Buffer&&n.Buffer.isBuffer(l))return a=n.Buffer.allocUnsafe?n.Buffer.allocUnsafe(l.length):new u(l.length),i.set(l,a),l.copy(a),a;if(n.ArrayBuffer){if(n.ArrayBuffer.isView(l))return a=new u(l.buffer.slice(0)),i.set(l,a),a;if(l instanceof n.ArrayBuffer)return a=l.slice(0),i.set(l,a),a}return typeof l.then=="function"||l instanceof Error||n.WeakMap&&l instanceof n.WeakMap||n.WeakSet&&l instanceof n.WeakSet?l:s(l,n,o,i)};return o(e,Xp())}wt.default=wt;wt.strict=function(t,r){return wt(t,{isStrict:!0,realm:r?r.realm:void 0})};var ih=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;t[r]=s;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==s||l.enumerable!==!0)return!1}return!0},Os=typeof Symbol<"u"&&Symbol,oh=ih,ah=function(){return typeof Os!="function"||typeof Symbol!="function"||typeof Os("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oh()},As={foo:{}},sh=Object,ch=function(){return{__proto__:As}.foo===As.foo&&!({__proto__:null}instanceof sh)},uh="Function.prototype.bind called on incompatible ",lh=Object.prototype.toString,fh=Math.max,dh="[object Function]",xs=function(t,r){for(var n=[],s=0;s<t.length;s+=1)n[s]=t[s];for(var o=0;o<r.length;o+=1)n[o+t.length]=r[o];return n},ph=function(t,r){for(var n=[],s=r||0,o=0;s<t.length;s+=1,o+=1)n[o]=t[s];return n},hh=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},mh=function(t){var r=this;if(typeof r!="function"||lh.apply(r)!==dh)throw new TypeError(uh+r);for(var n=ph(arguments,1),s,o=function(){if(this instanceof s){var a=r.apply(this,xs(n,arguments));return Object(a)===a?a:this}return r.apply(t,xs(n,arguments))},l=fh(0,r.length-n.length),i=[],c=0;c<l;c++)i[c]="$"+c;if(s=Function("binder","return function ("+hh(i,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var u=function(){};u.prototype=r.prototype,s.prototype=new u,u.prototype=null}return s},gh=mh,la=Function.prototype.bind||gh,yh=Function.prototype.call,vh=Object.prototype.hasOwnProperty,_h=la,Eh=_h.call(yh,vh),de,zt=SyntaxError,Vu=Function,Qt=TypeError,Hi=function(e){try{return Vu('"use strict"; return ('+e+").constructor;")()}catch{}},It=Object.getOwnPropertyDescriptor;if(It)try{It({},"")}catch{It=null}var Wi=function(){throw new Qt},wh=It?function(){try{return arguments.callee,Wi}catch{try{return It(arguments,"callee").get}catch{return Wi}}}():Wi,$t=ah(),bh=ch(),Pe=Object.getPrototypeOf||(bh?function(e){return e.__proto__}:null),Ht={},Sh=typeof Uint8Array>"u"||!Pe?de:Pe(Uint8Array),kt={"%AggregateError%":typeof AggregateError>"u"?de:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?de:ArrayBuffer,"%ArrayIteratorPrototype%":$t&&Pe?Pe([][Symbol.iterator]()):de,"%AsyncFromSyncIteratorPrototype%":de,"%AsyncFunction%":Ht,"%AsyncGenerator%":Ht,"%AsyncGeneratorFunction%":Ht,"%AsyncIteratorPrototype%":Ht,"%Atomics%":typeof Atomics>"u"?de:Atomics,"%BigInt%":typeof BigInt>"u"?de:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?de:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?de:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?de:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?de:Float32Array,"%Float64Array%":typeof Float64Array>"u"?de:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?de:FinalizationRegistry,"%Function%":Vu,"%GeneratorFunction%":Ht,"%Int8Array%":typeof Int8Array>"u"?de:Int8Array,"%Int16Array%":typeof Int16Array>"u"?de:Int16Array,"%Int32Array%":typeof Int32Array>"u"?de:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$t&&Pe?Pe(Pe([][Symbol.iterator]())):de,"%JSON%":typeof JSON=="object"?JSON:de,"%Map%":typeof Map>"u"?de:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$t||!Pe?de:Pe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?de:Promise,"%Proxy%":typeof Proxy>"u"?de:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?de:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?de:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$t||!Pe?de:Pe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?de:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$t&&Pe?Pe(""[Symbol.iterator]()):de,"%Symbol%":$t?Symbol:de,"%SyntaxError%":zt,"%ThrowTypeError%":wh,"%TypedArray%":Sh,"%TypeError%":Qt,"%Uint8Array%":typeof Uint8Array>"u"?de:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?de:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?de:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?de:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?de:WeakMap,"%WeakRef%":typeof WeakRef>"u"?de:WeakRef,"%WeakSet%":typeof WeakSet>"u"?de:WeakSet};if(Pe)try{null.error}catch(e){var Th=Pe(Pe(e));kt["%Error.prototype%"]=Th}var Oh=function e(t){var r;if(t==="%AsyncFunction%")r=Hi("async function () {}");else if(t==="%GeneratorFunction%")r=Hi("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Hi("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&Pe&&(r=Pe(s.prototype))}return kt[t]=r,r},Rs={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Hr=la,Ln=Eh,Ah=Hr.call(Function.call,Array.prototype.concat),xh=Hr.call(Function.apply,Array.prototype.splice),Cs=Hr.call(Function.call,String.prototype.replace),Mn=Hr.call(Function.call,String.prototype.slice),Rh=Hr.call(Function.call,RegExp.prototype.exec),Ch=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ph=/\\(\\)?/g,Nh=function(t){var r=Mn(t,0,1),n=Mn(t,-1);if(r==="%"&&n!=="%")throw new zt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new zt("invalid intrinsic syntax, expected opening `%`");var s=[];return Cs(t,Ch,function(o,l,i,c){s[s.length]=i?Cs(c,Ph,"$1"):l||o}),s},Ih=function(t,r){var n=t,s;if(Ln(Rs,n)&&(s=Rs[n],n="%"+s[0]+"%"),Ln(kt,n)){var o=kt[n];if(o===Ht&&(o=Oh(n)),typeof o>"u"&&!r)throw new Qt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:o}}throw new zt("intrinsic "+t+" does not exist!")},Mt=function(t,r){if(typeof t!="string"||t.length===0)throw new Qt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Qt('"allowMissing" argument must be a boolean');if(Rh(/^%?[^%]*%?$/,t)===null)throw new zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Nh(t),s=n.length>0?n[0]:"",o=Ih("%"+s+"%",r),l=o.name,i=o.value,c=!1,u=o.alias;u&&(s=u[0],xh(n,Ah([0,1],u)));for(var a=1,d=!0;a<n.length;a+=1){var f=n[a],p=Mn(f,0,1),h=Mn(f,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new zt("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),s+="."+f,l="%"+s+"%",Ln(kt,l))i=kt[l];else if(i!=null){if(!(f in i)){if(!r)throw new Qt("base intrinsic for "+t+" exists, but the property is not available.");return}if(It&&a+1>=n.length){var y=It(i,f);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?i=y.get:i=i[f]}else d=Ln(i,f),i=i[f];d&&!c&&(kt[l]=i)}}return i},Qu={exports:{}},kh=Mt,qo=kh("%Object.defineProperty%",!0),Ho=function(){if(qo)try{return qo({},"a",{value:1}),!0}catch{return!1}return!1};Ho.hasArrayLengthDefineBug=function(){if(!Ho())return null;try{return qo([],"length",{value:1}).length!==1}catch{return!0}};var zu=Ho,Lh=Mt,In=Lh("%Object.getOwnPropertyDescriptor%",!0);if(In)try{In([],"length")}catch{In=null}var Yu=In,Mh=zu(),fa=Mt,Lr=Mh&&fa("%Object.defineProperty%",!0);if(Lr)try{Lr({},"a",{value:1})}catch{Lr=!1}var jh=fa("%SyntaxError%"),Bt=fa("%TypeError%"),Ps=Yu,Fh=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Bt("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Bt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Bt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Bt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Bt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Bt("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,c=!!Ps&&Ps(t,r);if(Lr)Lr(t,r,{configurable:l===null&&c?c.configurable:!l,enumerable:s===null&&c?c.enumerable:!s,value:n,writable:o===null&&c?c.writable:!o});else if(i||!s&&!o&&!l)t[r]=n;else throw new jh("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ju=Mt,Ns=Fh,Dh=zu(),Is=Yu,ks=Ju("%TypeError%"),Uh=Ju("%Math.floor%"),$h=function(t,r){if(typeof t!="function")throw new ks("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Uh(r)!==r)throw new ks("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],s=!0,o=!0;if("length"in t&&Is){var l=Is(t,"length");l&&!l.configurable&&(s=!1),l&&!l.writable&&(o=!1)}return(s||o||!n)&&(Dh?Ns(t,"length",r,!0,!0):Ns(t,"length",r)),t};(function(e){var t=la,r=Mt,n=$h,s=r("%TypeError%"),o=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(l,o),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}e.exports=function(f){if(typeof f!="function")throw new s("a function is required");var p=i(t,l,arguments);return n(p,1+u(0,f.length-(arguments.length-1)),!0)};var a=function(){return i(t,o,arguments)};c?c(e.exports,"apply",{value:a}):e.exports.apply=a})(Qu);var Bh=Qu.exports,Ku=Mt,Xu=Bh,qh=Xu(Ku("String.prototype.indexOf")),Hh=function(t,r){var n=Ku(t,!!r);return typeof n=="function"&&qh(t,".prototype.")>-1?Xu(n):n};const Wh={},Gh=Object.freeze(Object.defineProperty({__proto__:null,default:Wh},Symbol.toStringTag,{value:"Module"})),Vh=qr(Gh);var da=typeof Map=="function"&&Map.prototype,Gi=Object.getOwnPropertyDescriptor&&da?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jn=da&&Gi&&typeof Gi.get=="function"?Gi.get:null,Ls=da&&Map.prototype.forEach,pa=typeof Set=="function"&&Set.prototype,Vi=Object.getOwnPropertyDescriptor&&pa?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fn=pa&&Vi&&typeof Vi.get=="function"?Vi.get:null,Ms=pa&&Set.prototype.forEach,Qh=typeof WeakMap=="function"&&WeakMap.prototype,Mr=Qh?WeakMap.prototype.has:null,zh=typeof WeakSet=="function"&&WeakSet.prototype,jr=zh?WeakSet.prototype.has:null,Yh=typeof WeakRef=="function"&&WeakRef.prototype,js=Yh?WeakRef.prototype.deref:null,Jh=Boolean.prototype.valueOf,Kh=Object.prototype.toString,Xh=Function.prototype.toString,Zh=String.prototype.match,ha=String.prototype.slice,Et=String.prototype.replace,em=String.prototype.toUpperCase,Fs=String.prototype.toLowerCase,Zu=RegExp.prototype.test,Ds=Array.prototype.concat,Xe=Array.prototype.join,tm=Array.prototype.slice,Us=Math.floor,Wo=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Qi=Object.getOwnPropertySymbols,Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Fe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yt||"symbol")?Symbol.toStringTag:null,el=Object.prototype.propertyIsEnumerable,$s=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Bs(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Zu.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Us(-e):Us(e);if(n!==e){var s=String(n),o=ha.call(t,s.length+1);return Et.call(s,r,"$&_")+"."+Et.call(Et.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Et.call(t,r,"$&_")}var Vo=Vh,qs=Vo.custom,Hs=rl(qs)?qs:null,rm=function e(t,r,n,s){var o=r||{};if(_t(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_t(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=_t(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(_t(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(_t(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var i=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return il(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return i?Bs(t,c):c}if(typeof t=="bigint"){var u=String(t)+"n";return i?Bs(t,u):u}var a=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=a&&a>0&&typeof t=="object")return Qo(t)?"[Array]":"[Object]";var d=Em(o,n);if(typeof s>"u")s=[];else if(nl(s,t)>=0)return"[Circular]";function f(H,K,V){if(K&&(s=tm.call(s),s.push(K)),V){var P={depth:o.depth};return _t(o,"quoteStyle")&&(P.quoteStyle=o.quoteStyle),e(H,P,n+1,s)}return e(H,o,n+1,s)}if(typeof t=="function"&&!Ws(t)){var p=fm(t),h=cn(t,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+Xe.call(h,", ")+" }":"")}if(rl(t)){var y=Yt?Et.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Go.call(t);return typeof t=="object"&&!Yt?cr(y):y}if(ym(t)){for(var _="<"+Fs.call(String(t.nodeName)),S=t.attributes||[],v=0;v<S.length;v++)_+=" "+S[v].name+"="+tl(nm(S[v].value),"double",o);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Fs.call(String(t.nodeName))+">",_}if(Qo(t)){if(t.length===0)return"[]";var w=cn(t,f);return d&&!_m(w)?"["+zo(w,d)+"]":"[ "+Xe.call(w,", ")+" ]"}if(om(t)){var A=cn(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!el.call(t,"cause")?"{ ["+String(t)+"] "+Xe.call(Ds.call("[cause]: "+f(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Xe.call(A,", ")+" }"}if(typeof t=="object"&&l){if(Hs&&typeof t[Hs]=="function"&&Vo)return Vo(t,{depth:a-n});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(dm(t)){var T=[];return Ls&&Ls.call(t,function(H,K){T.push(f(K,t,!0)+" => "+f(H,t))}),Gs("Map",jn.call(t),T,d)}if(mm(t)){var M=[];return Ms&&Ms.call(t,function(H){M.push(f(H,t))}),Gs("Set",Fn.call(t),M,d)}if(pm(t))return zi("WeakMap");if(gm(t))return zi("WeakSet");if(hm(t))return zi("WeakRef");if(sm(t))return cr(f(Number(t)));if(um(t))return cr(f(Wo.call(t)));if(cm(t))return cr(Jh.call(t));if(am(t))return cr(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===le)return"{ [object globalThis] }";if(!im(t)&&!Ws(t)){var D=cn(t,f),R=$s?$s(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",G=!R&&Fe&&Object(t)===t&&Fe in t?ha.call(bt(t),8,-1):W?"Object":"",L=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$=L+(G||W?"["+Xe.call(Ds.call([],G||[],W||[]),": ")+"] ":"");return D.length===0?$+"{}":d?$+"{"+zo(D,d)+"}":$+"{ "+Xe.call(D,", ")+" }"}return String(t)};function tl(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function nm(e){return Et.call(String(e),/"/g,"&quot;")}function Qo(e){return bt(e)==="[object Array]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function im(e){return bt(e)==="[object Date]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function Ws(e){return bt(e)==="[object RegExp]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function om(e){return bt(e)==="[object Error]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function am(e){return bt(e)==="[object String]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function sm(e){return bt(e)==="[object Number]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function cm(e){return bt(e)==="[object Boolean]"&&(!Fe||!(typeof e=="object"&&Fe in e))}function rl(e){if(Yt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Go)return!1;try{return Go.call(e),!0}catch{}return!1}function um(e){if(!e||typeof e!="object"||!Wo)return!1;try{return Wo.call(e),!0}catch{}return!1}var lm=Object.prototype.hasOwnProperty||function(e){return e in this};function _t(e,t){return lm.call(e,t)}function bt(e){return Kh.call(e)}function fm(e){if(e.name)return e.name;var t=Zh.call(Xh.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function nl(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function dm(e){if(!jn||!e||typeof e!="object")return!1;try{jn.call(e);try{Fn.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function pm(e){if(!Mr||!e||typeof e!="object")return!1;try{Mr.call(e,Mr);try{jr.call(e,jr)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function hm(e){if(!js||!e||typeof e!="object")return!1;try{return js.call(e),!0}catch{}return!1}function mm(e){if(!Fn||!e||typeof e!="object")return!1;try{Fn.call(e);try{jn.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function gm(e){if(!jr||!e||typeof e!="object")return!1;try{jr.call(e,jr);try{Mr.call(e,Mr)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ym(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function il(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return il(ha.call(e,0,t.maxStringLength),t)+n}var s=Et.call(Et.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,vm);return tl(s,"single",t)}function vm(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+em.call(t.toString(16))}function cr(e){return"Object("+e+")"}function zi(e){return e+" { ? }"}function Gs(e,t,r,n){var s=n?zo(r,n):Xe.call(r,", ");return e+" ("+t+") {"+s+"}"}function _m(e){for(var t=0;t<e.length;t++)if(nl(e[t],`
33
- `)>=0)return!1;return!0}function Em(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Xe.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Xe.call(Array(t+1),r)}}function zo(e,t){if(e.length===0)return"";var r=`
34
- `+t.prev+t.base;return r+Xe.call(e,","+r)+`
35
- `+t.prev}function cn(e,t){var r=Qo(e),n=[];if(r){n.length=e.length;for(var s=0;s<e.length;s++)n[s]=_t(e,s)?t(e[s],e):""}var o=typeof Qi=="function"?Qi(e):[],l;if(Yt){l={};for(var i=0;i<o.length;i++)l["$"+o[i]]=o[i]}for(var c in e)_t(e,c)&&(r&&String(Number(c))===c&&c<e.length||Yt&&l["$"+c]instanceof Symbol||(Zu.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof Qi=="function")for(var u=0;u<o.length;u++)el.call(e,o[u])&&n.push("["+t(o[u])+"]: "+t(e[o[u]],e));return n}var ma=Mt,Xt=Hh,wm=rm,bm=ma("%TypeError%"),un=ma("%WeakMap%",!0),ln=ma("%Map%",!0),Sm=Xt("WeakMap.prototype.get",!0),Tm=Xt("WeakMap.prototype.set",!0),Om=Xt("WeakMap.prototype.has",!0),Am=Xt("Map.prototype.get",!0),xm=Xt("Map.prototype.set",!0),Rm=Xt("Map.prototype.has",!0),ga=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Cm=function(e,t){var r=ga(e,t);return r&&r.value},Pm=function(e,t,r){var n=ga(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Nm=function(e,t){return!!ga(e,t)},Im=function(){var t,r,n,s={assert:function(o){if(!s.has(o))throw new bm("Side channel does not contain "+wm(o))},get:function(o){if(un&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Sm(t,o)}else if(ln){if(r)return Am(r,o)}else if(n)return Cm(n,o)},has:function(o){if(un&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Om(t,o)}else if(ln){if(r)return Rm(r,o)}else if(n)return Nm(n,o);return!1},set:function(o,l){un&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new un),Tm(t,o,l)):ln?(r||(r=new ln),xm(r,o,l)):(n||(n={key:{},next:null}),Pm(n,o,l))}};return s},km=String.prototype.replace,Lm=/%20/g,Yi={RFC1738:"RFC1738",RFC3986:"RFC3986"},ya={default:Yi.RFC3986,formatters:{RFC1738:function(e){return km.call(e,Lm,"+")},RFC3986:function(e){return String(e)}},RFC1738:Yi.RFC1738,RFC3986:Yi.RFC3986},Mm=ya,Ji=Object.prototype.hasOwnProperty,Nt=Array.isArray,Je=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jm=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Nt(n)){for(var s=[],o=0;o<n.length;++o)typeof n[o]<"u"&&s.push(n[o]);r.obj[r.prop]=s}}},ol=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(n[s]=t[s]);return n},Fm=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Nt(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ji.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var s=t;return Nt(t)&&!Nt(r)&&(s=ol(t,n)),Nt(t)&&Nt(r)?(r.forEach(function(o,l){if(Ji.call(t,l)){var i=t[l];i&&typeof i=="object"&&o&&typeof o=="object"?t[l]=e(i,o,n):t.push(o)}else t[l]=o}),t):Object.keys(r).reduce(function(o,l){var i=r[l];return Ji.call(o,l)?o[l]=e(o[l],i,n):o[l]=i,o},s)},Dm=function(t,r){return Object.keys(r).reduce(function(n,s){return n[s]=r[s],n},t)},Um=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},$m=function(t,r,n,s,o){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(a){return"%26%23"+parseInt(a.slice(2),16)+"%3B"});for(var i="",c=0;c<l.length;++c){var u=l.charCodeAt(c);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===Mm.RFC1738&&(u===40||u===41)){i+=l.charAt(c);continue}if(u<128){i=i+Je[u];continue}if(u<2048){i=i+(Je[192|u>>6]+Je[128|u&63]);continue}if(u<55296||u>=57344){i=i+(Je[224|u>>12]+Je[128|u>>6&63]+Je[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|l.charCodeAt(c)&1023),i+=Je[240|u>>18]+Je[128|u>>12&63]+Je[128|u>>6&63]+Je[128|u&63]}return i},Bm=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],s=0;s<r.length;++s)for(var o=r[s],l=o.obj[o.prop],i=Object.keys(l),c=0;c<i.length;++c){var u=i[c],a=l[u];typeof a=="object"&&a!==null&&n.indexOf(a)===-1&&(r.push({obj:l,prop:u}),n.push(a))}return jm(r),t},qm=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Hm=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Wm=function(t,r){return[].concat(t,r)},Gm=function(t,r){if(Nt(t)){for(var n=[],s=0;s<t.length;s+=1)n.push(r(t[s]));return n}return r(t)},al={arrayToObject:ol,assign:Dm,combine:Wm,compact:Bm,decode:Um,encode:$m,isBuffer:Hm,isRegExp:qm,maybeMap:Gm,merge:Fm},sl=Im,kn=al,Fr=ya,Vm=Object.prototype.hasOwnProperty,Vs={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},st=Array.isArray,Qm=Array.prototype.push,cl=function(e,t){Qm.apply(e,st(t)?t:[t])},zm=Date.prototype.toISOString,Qs=Fr.default,je={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:kn.encode,encodeValuesOnly:!1,format:Qs,formatter:Fr.formatters[Qs],indices:!1,serializeDate:function(t){return zm.call(t)},skipNulls:!1,strictNullHandling:!1},Ym=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ki={},Jm=function e(t,r,n,s,o,l,i,c,u,a,d,f,p,h,y,_){for(var S=t,v=_,w=0,A=!1;(v=v.get(Ki))!==void 0&&!A;){var T=v.get(t);if(w+=1,typeof T<"u"){if(T===w)throw new RangeError("Cyclic object value");A=!0}typeof v.get(Ki)>"u"&&(w=0)}if(typeof c=="function"?S=c(r,S):S instanceof Date?S=d(S):n==="comma"&&st(S)&&(S=kn.maybeMap(S,function(P){return P instanceof Date?d(P):P})),S===null){if(o)return i&&!h?i(r,je.encoder,y,"key",f):r;S=""}if(Ym(S)||kn.isBuffer(S)){if(i){var M=h?r:i(r,je.encoder,y,"key",f);return[p(M)+"="+p(i(S,je.encoder,y,"value",f))]}return[p(r)+"="+p(String(S))]}var D=[];if(typeof S>"u")return D;var R;if(n==="comma"&&st(S))h&&i&&(S=kn.maybeMap(S,i)),R=[{value:S.length>0?S.join(",")||null:void 0}];else if(st(c))R=c;else{var W=Object.keys(S);R=u?W.sort(u):W}for(var G=s&&st(S)&&S.length===1?r+"[]":r,L=0;L<R.length;++L){var $=R[L],H=typeof $=="object"&&typeof $.value<"u"?$.value:S[$];if(!(l&&H===null)){var K=st(S)?typeof n=="function"?n(G,$):G:G+(a?"."+$:"["+$+"]");_.set(t,w);var V=sl();V.set(Ki,_),cl(D,e(H,K,n,s,o,l,n==="comma"&&h&&st(S)?null:i,c,u,a,d,f,p,h,y,V))}}return D},Km=function(t){if(!t)return je;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||je.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Fr.default;if(typeof t.format<"u"){if(!Vm.call(Fr.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var s=Fr.formatters[n],o=je.filter;return(typeof t.filter=="function"||st(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:je.addQueryPrefix,allowDots:typeof t.allowDots>"u"?je.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:je.charsetSentinel,delimiter:typeof t.delimiter>"u"?je.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:je.encode,encoder:typeof t.encoder=="function"?t.encoder:je.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:je.encodeValuesOnly,filter:o,format:n,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:je.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:je.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:je.strictNullHandling}},Xm=function(e,t){var r=e,n=Km(t),s,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):st(n.filter)&&(o=n.filter,s=o);var l=[];if(typeof r!="object"||r===null)return"";var i;t&&t.arrayFormat in Vs?i=t.arrayFormat:t&&"indices"in t?i=t.indices?"indices":"repeat":i="indices";var c=Vs[i];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=c==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(r)),n.sort&&s.sort(n.sort);for(var a=sl(),d=0;d<s.length;++d){var f=s[d];n.skipNulls&&r[f]===null||cl(l,Jm(r[f],f,c,u,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,a))}var p=l.join(n.delimiter),h=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),p.length>0?h+p:""},Jt=al,Yo=Object.prototype.hasOwnProperty,Zm=Array.isArray,Ce={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Jt.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},eg=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},ul=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},tg="utf8=%26%2310003%3B",rg="utf8=%E2%9C%93",ng=function(t,r){var n={__proto__:null},s=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,l=s.split(r.delimiter,o),i=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<l.length;++c)l[c].indexOf("utf8=")===0&&(l[c]===rg?u="utf-8":l[c]===tg&&(u="iso-8859-1"),i=c,c=l.length);for(c=0;c<l.length;++c)if(c!==i){var a=l[c],d=a.indexOf("]="),f=d===-1?a.indexOf("="):d+1,p,h;f===-1?(p=r.decoder(a,Ce.decoder,u,"key"),h=r.strictNullHandling?null:""):(p=r.decoder(a.slice(0,f),Ce.decoder,u,"key"),h=Jt.maybeMap(ul(a.slice(f+1),r),function(y){return r.decoder(y,Ce.decoder,u,"value")})),h&&r.interpretNumericEntities&&u==="iso-8859-1"&&(h=eg(h)),a.indexOf("[]=")>-1&&(h=Zm(h)?[h]:h),Yo.call(n,p)?n[p]=Jt.combine(n[p],h):n[p]=h}return n},ig=function(e,t,r,n){for(var s=n?t:ul(t,r),o=e.length-1;o>=0;--o){var l,i=e[o];if(i==="[]"&&r.parseArrays)l=[].concat(s);else{l=r.plainObjects?Object.create(null):{};var c=i.charAt(0)==="["&&i.charAt(i.length-1)==="]"?i.slice(1,-1):i,u=parseInt(c,10);!r.parseArrays&&c===""?l={0:s}:!isNaN(u)&&i!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(l=[],l[u]=s):c!=="__proto__"&&(l[c]=s)}s=l}return s},og=function(t,r,n,s){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,c=n.depth>0&&l.exec(o),u=c?o.slice(0,c.index):o,a=[];if(u){if(!n.plainObjects&&Yo.call(Object.prototype,u)&&!n.allowPrototypes)return;a.push(u)}for(var d=0;n.depth>0&&(c=i.exec(o))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&Yo.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;a.push(c[1])}return c&&a.push("["+o.slice(c.index)+"]"),ig(a,r,n,s)}},ag=function(t){if(!t)return Ce;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ce.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ce.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ce.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ce.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ce.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ce.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ce.comma,decoder:typeof t.decoder=="function"?t.decoder:Ce.decoder,delimiter:typeof t.delimiter=="string"||Jt.isRegExp(t.delimiter)?t.delimiter:Ce.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ce.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ce.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ce.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ce.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ce.strictNullHandling}},sg=function(e,t){var r=ag(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?ng(e,r):e,s=r.plainObjects?Object.create(null):{},o=Object.keys(n),l=0;l<o.length;++l){var i=o[l],c=og(i,n[i],r,typeof e=="string");s=Jt.merge(s,c,r)}return r.allowSparse===!0?s:Jt.compact(s)},cg=Xm,ug=sg,lg=ya,fg={formats:lg,parse:ug,stringify:cg};const dg=Br(fg);var pg="[object String]",hg=Object.prototype,mg=hg.toString,gg=Array.isArray;function yg(e){return!!e&&typeof e=="object"}function vg(e){return typeof e=="string"||!gg(e)&&yg(e)&&mg.call(e)==pg}var _g=vg;const zs=Br(_g);var va={exports:{}};class ll extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const Eg=({limit:e,interval:t,strict:r})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const n=new Map;let s=0,o=0;function l(){const a=Date.now();return a-s>t?(o=1,s=a,0):(o<e?o++:(s+=t,o=1),s-a)}const i=[];function c(){const a=Date.now();if(i.length<e)return i.push(a),0;const d=i.shift()+t;return a>=d?(i.push(a),0):(i.push(d),d-a)}const u=r?c:l;return a=>{const d=function(...f){if(!d.isEnabled)return(async()=>a.apply(this,f))();let p;return new Promise((h,y)=>{p=setTimeout(()=>{h(a.apply(this,f)),n.delete(p)},u()),n.set(p,y)})};return d.abort=()=>{for(const f of n.keys())clearTimeout(f),n.get(f)(new ll);n.clear(),i.splice(0,i.length)},d.isEnabled=!0,d}};va.exports=Eg;va.exports.AbortError=ll;var wg=va.exports;const bg=Br(wg);var Sg="[object Object]";function Tg(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Og(e,t){return function(r){return e(t(r))}}var Ag=Function.prototype,fl=Object.prototype,dl=Ag.toString,xg=fl.hasOwnProperty,Rg=dl.call(Object),Cg=fl.toString,Pg=Og(Object.getPrototypeOf,Object);function Ng(e){return!!e&&typeof e=="object"}function Ig(e){if(!Ng(e)||Cg.call(e)!=Sg||Tg(e))return!1;var t=Pg(e);if(t===null)return!0;var r=xg.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&dl.call(r)==Rg}var kg=Ig;const fn=Br(kg);function Lg(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,s,o,l,i=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(a){u=!0,s=a}finally{try{if(!c&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return i}}function Ys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ys(Object(r),!0).forEach(function(n){Mg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ys(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jo(e){"@babel/helpers - typeof";return Jo=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},Jo(e)}function Ko(){Ko=function(s,o){return new r(s,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function r(s,o,l){var i=new RegExp(s,o);return t.set(i,l||t.get(s)),Dn(i,r.prototype)}function n(s,o){var l=t.get(o);return Object.keys(l).reduce(function(i,c){var u=l[c];if(typeof u=="number")i[c]=s[u];else{for(var a=0;s[u[a]]===void 0&&a+1<u.length;)a++;i[c]=s[u[a]]}return i},Object.create(null))}return jg(r,RegExp),r.prototype.exec=function(s){var o=e.exec.call(this,s);if(o){o.groups=n(o,this);var l=o.indices;l&&(l.groups=n(l,this))}return o},r.prototype[Symbol.replace]=function(s,o){if(typeof o=="string"){var l=t.get(this);return e[Symbol.replace].call(this,s,o.replace(/\$<([^>]+)>/g,function(c,u){var a=l[u];return"$"+(Array.isArray(a)?a.join("$"):a)}))}if(typeof o=="function"){var i=this;return e[Symbol.replace].call(this,s,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,i)),o.apply(this,c)})}return e[Symbol.replace].call(this,s,o)},Ko.apply(this,arguments)}function Mg(e,t,r){return t=qg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jg(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&&Dn(e,t)}function Dn(e,t){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Dn(e,t)}function Fg(e,t){return Dg(e)||Lg(e,t)||pl(e,t)||Ug()}function Dg(e){if(Array.isArray(e))return e}function pl(e,t){if(e){if(typeof e=="string")return Js(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Js(e,t)}}function Js(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 Ug(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
36
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $g(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=pl(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,i;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return o=c.done,c},e:function(c){l=!0,i=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(l)throw i}}}}function Bg(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qg(e){var t=Bg(e,"string");return typeof t=="symbol"?t:String(t)}function Hg(){return typeof process<"u"&&!process.browser}function Wg(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function Gg(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function Vg(){return window}function Xo(){}var Zo=Ko(/(\d+)(%)/,{value:1});function Xi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,r=t;if(Zo.test(e)){var n,s=(n=e.match(Zo))===null||n===void 0?void 0:n.groups;if(s&&s.value){var o=parseInt(s.value)/100;r=Math.round(t*o)}}return Math.min(30,Math.max(1,r))}function Ks(e,t){return t("info","Throttle request to ".concat(e,"/s")),bg({limit:e,interval:1e3,strict:!1})}var Qg=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",r=e.defaults.logHandler,n=r===void 0?Xo:r,s=zs(t)?Xi(t):Xi("auto",t),o=Ks(s,n),l=!1,i=e.interceptors.request.use(function(u){return o(function(){return u})()},function(u){return Promise.reject(u)}),c=e.interceptors.response.use(function(u){if(!l&&zs(t)&&(t==="auto"||Zo.test(t))&&u.headers&&u.headers["x-contentful-ratelimit-second-limit"]){var a=parseInt(u.headers["x-contentful-ratelimit-second-limit"]),d=Xi(t,a);d!==s&&(i&&e.interceptors.request.eject(i),s=d,o=Ks(d,n),i=e.interceptors.request.use(function(f){return o(function(){return f})()},function(f){return Promise.reject(f)})),l=!0}return u},function(u){return Promise.reject(u)});return function(){e.interceptors.request.eject(i),e.interceptors.response.eject(c)}},zg=function(t){return new Promise(function(r){setTimeout(r,t)})},Yg=function(t){return Math.pow(Math.SQRT2,t)};function Jg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,r=e.defaults,n=r.responseLogger,s=n===void 0?Xo:n,o=r.requestLogger,l=o===void 0?Xo:o;e.interceptors.request.use(function(i){return l(i),i},function(i){return l(i),Promise.reject(i)}),e.interceptors.response.use(function(i){return s(i),i},function(i){var c=i.response,u=i.config;if(s(i),!u||!e.defaults.retryOnError)return Promise.reject(i);var a=u.attempts||1;if(a>t)return i.attempts=u.attempts,Promise.reject(i);var d=null,f=Yg(a);return c?c.status>=500&&c.status<600?d="Server ".concat(c.status):c.status===429&&(d="Rate limit",c.headers&&i.response.headers["x-contentful-ratelimit-reset"]&&(f=c.headers["x-contentful-ratelimit-reset"])):d="Connection",d?(f=Math.floor(f*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(d," error occurred. Waiting for ").concat(f," ms before retrying...")),u.attempts=a+1,delete u.httpAgent,delete u.httpsAgent,zg(f).then(function(){return e(u)})):Promise.reject(i)})}function Kg(e,t){e.interceptors.request.use(function(r){return t().then(function(n){return r.headers=Wt(Wt({},r.headers),{},{Authorization:"Bearer ".concat(n)}),r})})}var Xg=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function hl(e,t){var r={insecure:!1,retryOnError:!0,logHandler:function(y,_){if(y==="error"&&_){var S=[_.name,_.message].filter(function(v){return v}).join(" - ");console.error("[error] ".concat(S)),console.error(_);return}console.log("[".concat(y,"] ").concat(_))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},n=Wt(Wt({},r),t);if(!n.accessToken){var s=new TypeError("Expected parameter accessToken");throw n.logHandler("error",s),s}var o=n.insecure?"http":"https",l=n.space?"".concat(n.space,"/"):"",i=n.defaultHostname,c=n.insecure?80:443;if(n.host&&Xg.test(n.host)){var u=n.host.split(":");if(u.length===2){var a=Fg(u,2);i=a[0],c=a[1]}else i=u[0]}n.basePath&&(n.basePath="/".concat(n.basePath.split("/").filter(Boolean).join("/")));var d=t.baseURL||"".concat(o,"://").concat(i,":").concat(c).concat(n.basePath,"/spaces/").concat(l);!n.headers.Authorization&&typeof n.accessToken!="function"&&(n.headers.Authorization="Bearer "+n.accessToken);var f={baseURL:d,headers:n.headers,httpAgent:n.httpAgent,httpsAgent:n.httpsAgent,paramsSerializer:dg.stringify,proxy:n.proxy,timeout:n.timeout,adapter:n.adapter,maxContentLength:n.maxContentLength,maxBodyLength:n.maxBodyLength,logHandler:n.logHandler,responseLogger:n.responseLogger,requestLogger:n.requestLogger,retryOnError:n.retryOnError},p=e.create(f);return p.httpClientParams=t,p.cloneWithNewParams=function(h){return hl(e,Wt(Wt({},wt(t)),h))},n.onBeforeRequest&&p.interceptors.request.use(n.onBeforeRequest),typeof n.accessToken=="function"&&Kg(p,n.accessToken),n.throttle&&Qg(p,n.throttle),Jg(p,n.retryLimit),n.onError&&p.interceptors.response.use(function(h){return h},n.onError),p}function Zg(e){var t=e.query,r={};return delete t.resolveLinks,r.params=wt(t),r}function ey(e,t){if(!(t in e)){var r=new Error;throw r.name="PropertyMissing",r.message="Required property ".concat(t,` missing from:
31
+ Check the top-level render call using <`+J+">.")}return z}}function en(A,z){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var J=ei(z);if(Zr[J])return;Zr[J]=!0;var se="";A&&A._owner&&A._owner!==rr.current&&(se=" It was passed a child from "+$(A._owner.type)+"."),Et(A),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,se),Et(null)}}function tn(A,z){{if(typeof A!="object")return;if(Me(A))for(var J=0;J<A.length;J++){var se=A[J];ir(se)&&en(se,z)}else if(ir(A))A._store&&(A._store.validated=!0);else if(A){var he=_(A);if(typeof he=="function"&&he!==A.entries)for(var ye=he.call(A),de;!(de=ye.next()).done;)ir(de.value)&&en(de.value,z)}}}function ti(A){{var z=A.type;if(z==null||typeof z=="string")return;var J;if(typeof z=="function")J=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===u||z.$$typeof===d))J=z.propTypes;else return;if(J){var se=$(z);Mt(J,A.props,"prop",se,A)}else if(z.PropTypes!==void 0&&!nr){nr=!0;var he=$(z);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",he||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ri(A){{for(var z=Object.keys(A.props),J=0;J<z.length;J++){var se=z[J];if(se!=="children"&&se!=="key"){Et(A),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Et(null);break}}A.ref!==null&&(Et(A),v("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}function rn(A,z,J,se,he,ye){{var de=V(A);if(!de){var fe="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(fe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var De=Zn(he);De?fe+=De:fe+=Xr();var Re;A===null?Re="null":Me(A)?Re="array":A!==void 0&&A.$$typeof===t?(Re="<"+($(A.type)||"Unknown")+" />",fe=" Did you accidentally export a JSX literal instead of a component?"):Re=typeof A,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Re,fe)}var Ae=me(A,z,J,he,ye);if(Ae==null)return Ae;if(de){var ze=z.children;if(ze!==void 0)if(se)if(Me(ze)){for(var wt=0;wt<ze.length;wt++)tn(ze[wt],A);Object.freeze&&Object.freeze(ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(ze,A)}return A===r?ri(Ae):ti(Ae),Ae}}function ni(A,z,J){return rn(A,z,J,!0)}function ii(A,z,J){return rn(A,z,J,!1)}var oi=ii,nn=ni;sr.Fragment=r,sr.jsx=oi,sr.jsxs=nn}()),sr}process.env.NODE_ENV==="production"?qo.exports=Ep():qo.exports=wp();var E=qo.exports;const Ru=()=>{const[e,t]=j.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return j.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},jt=(e,t)=>{const n=j.useRef(!1);j.useEffect(()=>{n.current?e():n.current=!0},t)};var Cu={exports:{}},li={exports:{}},sn={},cn={exports:{}},fi,Wa;function Nu(){return Wa||(Wa=1,fi=function(t,n){return function(){for(var s=new Array(arguments.length),o=0;o<s.length;o++)s[o]=arguments[o];return t.apply(n,s)}}),fi}var di,Ga;function Be(){if(Ga)return di;Ga=1;var e=Nu(),t=Object.prototype.toString,n=function(C){return function(q){var Y=t.call(q);return C[Y]||(C[Y]=Y.slice(8,-1).toLowerCase())}}(Object.create(null));function r(C){return C=C.toLowerCase(),function(Y){return n(Y)===C}}function s(C){return Array.isArray(C)}function o(C){return typeof C>"u"}function l(C){return C!==null&&!o(C)&&C.constructor!==null&&!o(C.constructor)&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}var i=r("ArrayBuffer");function u(C){var q;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?q=ArrayBuffer.isView(C):q=C&&C.buffer&&i(C.buffer),q}function c(C){return typeof C=="string"}function a(C){return typeof C=="number"}function d(C){return C!==null&&typeof C=="object"}function f(C){if(n(C)!=="object")return!1;var q=Object.getPrototypeOf(C);return q===null||q===Object.prototype}var p=r("Date"),h=r("File"),y=r("Blob"),_=r("FileList");function S(C){return t.call(C)==="[object Function]"}function v(C){return d(C)&&S(C.pipe)}function w(C){var q="[object FormData]";return C&&(typeof FormData=="function"&&C instanceof FormData||t.call(C)===q||S(C.toString)&&C.toString()===q)}var x=r("URLSearchParams");function O(C){return C.trim?C.trim():C.replace(/^\s+|\s+$/g,"")}function F(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function D(C,q){if(!(C===null||typeof C>"u"))if(typeof C!="object"&&(C=[C]),s(C))for(var Y=0,oe=C.length;Y<oe;Y++)q.call(null,C[Y],Y,C);else for(var ee in C)Object.prototype.hasOwnProperty.call(C,ee)&&q.call(null,C[ee],ee,C)}function R(){var C={};function q(ee,G){f(C[G])&&f(ee)?C[G]=R(C[G],ee):f(ee)?C[G]=R({},ee):s(ee)?C[G]=ee.slice():C[G]=ee}for(var Y=0,oe=arguments.length;Y<oe;Y++)D(arguments[Y],q);return C}function W(C,q,Y){return D(q,function(ee,G){Y&&typeof ee=="function"?C[G]=e(ee,Y):C[G]=ee}),C}function V(C){return C.charCodeAt(0)===65279&&(C=C.slice(1)),C}function L(C,q,Y,oe){C.prototype=Object.create(q.prototype,oe),C.prototype.constructor=C,Y&&Object.assign(C.prototype,Y)}function U(C,q,Y){var oe,ee,G,Z={};q=q||{};do{for(oe=Object.getOwnPropertyNames(C),ee=oe.length;ee-- >0;)G=oe[ee],Z[G]||(q[G]=C[G],Z[G]=!0);C=Object.getPrototypeOf(C)}while(C&&(!Y||Y(C,q))&&C!==Object.prototype);return q}function $(C,q,Y){C=String(C),(Y===void 0||Y>C.length)&&(Y=C.length),Y-=q.length;var oe=C.indexOf(q,Y);return oe!==-1&&oe===Y}function K(C){if(!C)return null;var q=C.length;if(o(q))return null;for(var Y=new Array(q);q-- >0;)Y[q]=C[q];return Y}var Q=function(C){return function(q){return C&&q instanceof C}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return di={isArray:s,isArrayBuffer:i,isBuffer:l,isFormData:w,isArrayBufferView:u,isString:c,isNumber:a,isObject:d,isPlainObject:f,isUndefined:o,isDate:p,isFile:h,isBlob:y,isFunction:S,isStream:v,isURLSearchParams:x,isStandardBrowserEnv:F,forEach:D,merge:R,extend:W,trim:O,stripBOM:V,inherits:L,toFlatObject:U,kindOf:n,kindOfTest:r,endsWith:$,toArray:K,isTypedArray:Q,isFileList:_},di}var pi,Va;function Pu(){if(Va)return pi;Va=1;var e=Be();function t(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return pi=function(r,s,o){if(!s)return r;var l;if(o)l=o(s);else if(e.isURLSearchParams(s))l=s.toString();else{var i=[];e.forEach(s,function(a,d){a===null||typeof a>"u"||(e.isArray(a)?d=d+"[]":a=[a],e.forEach(a,function(p){e.isDate(p)?p=p.toISOString():e.isObject(p)&&(p=JSON.stringify(p)),i.push(t(d)+"="+t(p))}))}),l=i.join("&")}if(l){var u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+l}return r},pi}var hi,Qa;function bp(){if(Qa)return hi;Qa=1;var e=Be();function t(){this.handlers=[]}return t.prototype.use=function(r,s,o){return this.handlers.push({fulfilled:r,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},t.prototype.forEach=function(r){e.forEach(this.handlers,function(o){o!==null&&r(o)})},hi=t,hi}var mi,za;function Sp(){if(za)return mi;za=1;var e=Be();return mi=function(n,r){e.forEach(n,function(o,l){l!==r&&l.toUpperCase()===r.toUpperCase()&&(n[r]=o,delete n[l])})},mi}var gi,Ya;function Xt(){if(Ya)return gi;Ya=1;var e=Be();function t(s,o,l,i,u){Error.call(this),this.message=s,this.name="AxiosError",o&&(this.code=o),l&&(this.config=l),i&&(this.request=i),u&&(this.response=u)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(s){r[s]={value:s}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(s,o,l,i,u,c){var a=Object.create(n);return e.toFlatObject(s,a,function(f){return f!==Error.prototype}),t.call(a,s.message,o,l,i,u),a.name=s.name,c&&Object.assign(a,c),a},gi=t,gi}var yi,Ka;function Iu(){return Ka||(Ka=1,yi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),yi}var vi,Ja;function ku(){if(Ja)return vi;Ja=1;var e=Be();function t(n,r){r=r||new FormData;var s=[];function o(i){return i===null?"":e.isDate(i)?i.toISOString():e.isArrayBuffer(i)||e.isTypedArray(i)?typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function l(i,u){if(e.isPlainObject(i)||e.isArray(i)){if(s.indexOf(i)!==-1)throw Error("Circular reference detected in "+u);s.push(i),e.forEach(i,function(a,d){if(!e.isUndefined(a)){var f=u?u+"."+d:d,p;if(a&&!u&&typeof a=="object"){if(e.endsWith(d,"{}"))a=JSON.stringify(a);else if(e.endsWith(d,"[]")&&(p=e.toArray(a))){p.forEach(function(h){!e.isUndefined(h)&&r.append(f,o(h))});return}}l(a,f)}}),s.pop()}else r.append(u,o(i))}return l(n),r}return vi=t,vi}var _i,Xa;function Op(){if(Xa)return _i;Xa=1;var e=Xt();return _i=function(n,r,s){var o=s.config.validateStatus;!s.status||!o||o(s.status)?n(s):r(new e("Request failed with status code "+s.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))},_i}var Ei,Za;function Tp(){if(Za)return Ei;Za=1;var e=Be();return Ei=e.isStandardBrowserEnv()?function(){return{write:function(r,s,o,l,i,u){var c=[];c.push(r+"="+encodeURIComponent(s)),e.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),e.isString(l)&&c.push("path="+l),e.isString(i)&&c.push("domain="+i),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var s=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ei}var wi,es;function xp(){return es||(es=1,wi=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),wi}var bi,ts;function Ap(){return ts||(ts=1,bi=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),bi}var Si,rs;function Lu(){if(rs)return Si;rs=1;var e=xp(),t=Ap();return Si=function(r,s){return r&&!e(s)?t(r,s):s},Si}var Oi,ns;function Rp(){if(ns)return Oi;ns=1;var e=Be(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Oi=function(r){var s={},o,l,i;return r&&e.forEach(r.split(`
32
+ `),function(c){if(i=c.indexOf(":"),o=e.trim(c.substr(0,i)).toLowerCase(),l=e.trim(c.substr(i+1)),o){if(s[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?s[o]=(s[o]?s[o]:[]).concat([l]):s[o]=s[o]?s[o]+", "+l:l}}),s},Oi}var Ti,is;function Cp(){if(is)return Ti;is=1;var e=Be();return Ti=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),s;function o(l){var i=l;return n&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return s=o(window.location.href),function(i){var u=e.isString(i)?o(i):i;return u.protocol===s.protocol&&u.host===s.host}}():function(){return function(){return!0}}(),Ti}var xi,os;function Gn(){if(os)return xi;os=1;var e=Xt(),t=Be();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),xi=n,xi}var Ai,as;function Np(){return as||(as=1,Ai=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Ai}var Ri,ss;function cs(){if(ss)return Ri;ss=1;var e=Be(),t=Op(),n=Tp(),r=Pu(),s=Lu(),o=Rp(),l=Cp(),i=Iu(),u=Xt(),c=Gn(),a=Np();return Ri=function(f){return new Promise(function(h,y){var _=f.data,S=f.headers,v=f.responseType,w;function x(){f.cancelToken&&f.cancelToken.unsubscribe(w),f.signal&&f.signal.removeEventListener("abort",w)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete S["Content-Type"];var O=new XMLHttpRequest;if(f.auth){var F=f.auth.username||"",D=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";S.Authorization="Basic "+btoa(F+":"+D)}var R=s(f.baseURL,f.url);O.open(f.method.toUpperCase(),r(R,f.params,f.paramsSerializer),!0),O.timeout=f.timeout;function W(){if(O){var U="getAllResponseHeaders"in O?o(O.getAllResponseHeaders()):null,$=!v||v==="text"||v==="json"?O.responseText:O.response,K={data:$,status:O.status,statusText:O.statusText,headers:U,config:f,request:O};t(function(C){h(C),x()},function(C){y(C),x()},K),O=null}}if("onloadend"in O?O.onloadend=W:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(W)},O.onabort=function(){O&&(y(new u("Request aborted",u.ECONNABORTED,f,O)),O=null)},O.onerror=function(){y(new u("Network Error",u.ERR_NETWORK,f,O,O)),O=null},O.ontimeout=function(){var $=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",K=f.transitional||i;f.timeoutErrorMessage&&($=f.timeoutErrorMessage),y(new u($,K.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,f,O)),O=null},e.isStandardBrowserEnv()){var V=(f.withCredentials||l(R))&&f.xsrfCookieName?n.read(f.xsrfCookieName):void 0;V&&(S[f.xsrfHeaderName]=V)}"setRequestHeader"in O&&e.forEach(S,function($,K){typeof _>"u"&&K.toLowerCase()==="content-type"?delete S[K]:O.setRequestHeader(K,$)}),e.isUndefined(f.withCredentials)||(O.withCredentials=!!f.withCredentials),v&&v!=="json"&&(O.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&O.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&O.upload&&O.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(w=function(U){O&&(y(!U||U&&U.type?new c:U),O.abort(),O=null)},f.cancelToken&&f.cancelToken.subscribe(w),f.signal&&(f.signal.aborted?w():f.signal.addEventListener("abort",w))),_||(_=null);var L=a(R);if(L&&["http","https","file"].indexOf(L)===-1){y(new u("Unsupported protocol "+L+":",u.ERR_BAD_REQUEST,f));return}O.send(_)})},Ri}var Ci,us;function Pp(){return us||(us=1,Ci=null),Ci}var Ni,ls;function sa(){if(ls)return Ni;ls=1;var e=Be(),t=Sp(),n=Xt(),r=Iu(),s=ku(),o={"Content-Type":"application/x-www-form-urlencoded"};function l(a,d){!e.isUndefined(a)&&e.isUndefined(a["Content-Type"])&&(a["Content-Type"]=d)}function i(){var a;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(a=cs()),a}function u(a,d,f){if(e.isString(a))try{return(d||JSON.parse)(a),e.trim(a)}catch(p){if(p.name!=="SyntaxError")throw p}return(f||JSON.stringify)(a)}var c={transitional:r,adapter:i(),transformRequest:[function(d,f){if(t(f,"Accept"),t(f,"Content-Type"),e.isFormData(d)||e.isArrayBuffer(d)||e.isBuffer(d)||e.isStream(d)||e.isFile(d)||e.isBlob(d))return d;if(e.isArrayBufferView(d))return d.buffer;if(e.isURLSearchParams(d))return l(f,"application/x-www-form-urlencoded;charset=utf-8"),d.toString();var p=e.isObject(d),h=f&&f["Content-Type"],y;if((y=e.isFileList(d))||p&&h==="multipart/form-data"){var _=this.env&&this.env.FormData;return s(y?{"files[]":d}:d,_&&new _)}else if(p||h==="application/json")return l(f,"application/json"),u(d);return d}],transformResponse:[function(d){var f=this.transitional||c.transitional,p=f&&f.silentJSONParsing,h=f&&f.forcedJSONParsing,y=!p&&this.responseType==="json";if(y||h&&e.isString(d)&&d.length)try{return JSON.parse(d)}catch(_){if(y)throw _.name==="SyntaxError"?n.from(_,n.ERR_BAD_RESPONSE,this,null,this.response):_}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pp()},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(d){c.headers[d]={}}),e.forEach(["post","put","patch"],function(d){c.headers[d]=e.merge(o)}),Ni=c,Ni}var Pi,fs;function Ip(){if(fs)return Pi;fs=1;var e=Be(),t=sa();return Pi=function(r,s,o){var l=this||t;return e.forEach(o,function(u){r=u.call(l,r,s)}),r},Pi}var Ii,ds;function Fu(){return ds||(ds=1,Ii=function(t){return!!(t&&t.__CANCEL__)}),Ii}var ki,ps;function kp(){if(ps)return ki;ps=1;var e=Be(),t=Ip(),n=Fu(),r=sa(),s=Gn();function o(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new s}return ki=function(i){o(i),i.headers=i.headers||{},i.data=t.call(i,i.data,i.headers,i.transformRequest),i.headers=e.merge(i.headers.common||{},i.headers[i.method]||{},i.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(a){delete i.headers[a]});var u=i.adapter||r.adapter;return u(i).then(function(a){return o(i),a.data=t.call(i,a.data,a.headers,i.transformResponse),a},function(a){return n(a)||(o(i),a&&a.response&&(a.response.data=t.call(i,a.response.data,a.response.headers,i.transformResponse))),Promise.reject(a)})},ki}var Li,hs;function ju(){if(hs)return Li;hs=1;var e=Be();return Li=function(n,r){r=r||{};var s={};function o(d,f){return e.isPlainObject(d)&&e.isPlainObject(f)?e.merge(d,f):e.isPlainObject(f)?e.merge({},f):e.isArray(f)?f.slice():f}function l(d){if(e.isUndefined(r[d])){if(!e.isUndefined(n[d]))return o(void 0,n[d])}else return o(n[d],r[d])}function i(d){if(!e.isUndefined(r[d]))return o(void 0,r[d])}function u(d){if(e.isUndefined(r[d])){if(!e.isUndefined(n[d]))return o(void 0,n[d])}else return o(void 0,r[d])}function c(d){if(d in r)return o(n[d],r[d]);if(d in n)return o(void 0,n[d])}var a={url:i,method:i,data:i,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(f){var p=a[f]||l,h=p(f);e.isUndefined(h)&&p!==c||(s[f]=h)}),s},Li}var Fi,ms;function Mu(){return ms||(ms=1,Fi={version:"0.27.2"}),Fi}var ji,gs;function Lp(){if(gs)return ji;gs=1;var e=Mu().version,t=Xt(),n={};["object","boolean","number","function","string","symbol"].forEach(function(o,l){n[o]=function(u){return typeof u===o||"a"+(l<1?"n ":" ")+o}});var r={};n.transitional=function(l,i,u){function c(a,d){return"[Axios v"+e+"] Transitional option '"+a+"'"+d+(u?". "+u:"")}return function(a,d,f){if(l===!1)throw new t(c(d," has been removed"+(i?" in "+i:"")),t.ERR_DEPRECATED);return i&&!r[d]&&(r[d]=!0,console.warn(c(d," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(a,d,f):!0}};function s(o,l,i){if(typeof o!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var u=Object.keys(o),c=u.length;c-- >0;){var a=u[c],d=l[a];if(d){var f=o[a],p=f===void 0||d(f,a,o);if(p!==!0)throw new t("option "+a+" must be "+p,t.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new t("Unknown option "+a,t.ERR_BAD_OPTION)}}return ji={assertOptions:s,validators:n},ji}var Mi,ys;function Fp(){if(ys)return Mi;ys=1;var e=Be(),t=Pu(),n=bp(),r=kp(),s=ju(),o=Lu(),l=Lp(),i=l.validators;function u(c){this.defaults=c,this.interceptors={request:new n,response:new n}}return u.prototype.request=function(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=s(this.defaults,d),d.method?d.method=d.method.toLowerCase():this.defaults.method?d.method=this.defaults.method.toLowerCase():d.method="get";var f=d.transitional;f!==void 0&&l.assertOptions(f,{silentJSONParsing:i.transitional(i.boolean),forcedJSONParsing:i.transitional(i.boolean),clarifyTimeoutError:i.transitional(i.boolean)},!1);var p=[],h=!0;this.interceptors.request.forEach(function(F){typeof F.runWhen=="function"&&F.runWhen(d)===!1||(h=h&&F.synchronous,p.unshift(F.fulfilled,F.rejected))});var y=[];this.interceptors.response.forEach(function(F){y.push(F.fulfilled,F.rejected)});var _;if(!h){var S=[r,void 0];for(Array.prototype.unshift.apply(S,p),S=S.concat(y),_=Promise.resolve(d);S.length;)_=_.then(S.shift(),S.shift());return _}for(var v=d;p.length;){var w=p.shift(),x=p.shift();try{v=w(v)}catch(O){x(O);break}}try{_=r(v)}catch(O){return Promise.reject(O)}for(;y.length;)_=_.then(y.shift(),y.shift());return _},u.prototype.getUri=function(a){a=s(this.defaults,a);var d=o(a.baseURL,a.url);return t(d,a.params,a.paramsSerializer)},e.forEach(["delete","get","head","options"],function(a){u.prototype[a]=function(d,f){return this.request(s(f||{},{method:a,url:d,data:(f||{}).data}))}}),e.forEach(["post","put","patch"],function(a){function d(f){return function(h,y,_){return this.request(s(_||{},{method:a,headers:f?{"Content-Type":"multipart/form-data"}:{},url:h,data:y}))}}u.prototype[a]=d(),u.prototype[a+"Form"]=d(!0)}),Mi=u,Mi}var Di,vs;function jp(){if(vs)return Di;vs=1;var e=Gn();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(l){r=l});var s=this;this.promise.then(function(o){if(s._listeners){var l,i=s._listeners.length;for(l=0;l<i;l++)s._listeners[l](o);s._listeners=null}}),this.promise.then=function(o){var l,i=new Promise(function(u){s.subscribe(u),l=u}).then(o);return i.cancel=function(){s.unsubscribe(l)},i},n(function(l){s.reason||(s.reason=new e(l),r(s.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},t.prototype.unsubscribe=function(r){if(this._listeners){var s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}},t.source=function(){var r,s=new t(function(l){r=l});return{token:s,cancel:r}},Di=t,Di}var Ui,_s;function Mp(){return _s||(_s=1,Ui=function(t){return function(r){return t.apply(null,r)}}),Ui}var Bi,Es;function Dp(){if(Es)return Bi;Es=1;var e=Be();return Bi=function(n){return e.isObject(n)&&n.isAxiosError===!0},Bi}var ws;function Up(){if(ws)return cn.exports;ws=1;var e=Be(),t=Nu(),n=Fp(),r=ju(),s=sa();function o(i){var u=new n(i),c=t(n.prototype.request,u);return e.extend(c,n.prototype,u),e.extend(c,u),c.create=function(d){return o(r(i,d))},c}var l=o(s);return l.Axios=n,l.CanceledError=Gn(),l.CancelToken=jp(),l.isCancel=Fu(),l.VERSION=Mu().version,l.toFormData=ku(),l.AxiosError=Xt(),l.Cancel=l.CanceledError,l.all=function(u){return Promise.all(u)},l.spread=Mp(),l.isAxiosError=Dp(),cn.exports=l,cn.exports.default=l,cn.exports}var $i,bs;function Du(){return bs||(bs=1,$i=Up()),$i}var Bp=Function.prototype.toString,qi=Object.create,$p=Object.defineProperty,qp=Object.getOwnPropertyDescriptor,Ss=Object.getOwnPropertyNames,ca=Object.getOwnPropertySymbols,Hp=Object.getPrototypeOf,Uu=Object.prototype,Wp=Uu.hasOwnProperty,Gp=Uu.propertyIsEnumerable,Bu=typeof ca=="function",Vp=typeof WeakMap=="function",Qp=function(){if(Vp)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(n){return!!~this._keys.indexOf(n)},t.prototype.get=function(n){return this._values[this._keys.indexOf(n)]},t.prototype.set=function(n,r){this._keys.push(n),this._values.push(r)},t}();return function(){return new e}}(),$u=function(e,t){var n=e.__proto__||Hp(e);if(!n)return qi(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:qi(n);if(~Bp.call(r).indexOf("[native code]"))try{return new r}catch{}return qi(n)},zp=function(e,t,n,r){var s=$u(e,t);r.set(e,s);for(var o in e)Wp.call(e,o)&&(s[o]=n(e[o],r));if(Bu)for(var l=ca(e),i=0,u=l.length,c=void 0;i<u;++i)c=l[i],Gp.call(e,c)&&(s[c]=n(e[c],r));return s},Os=function(e,t,n,r){var s=$u(e,t);r.set(e,s);for(var o=Bu?Ss(e).concat(ca(e)):Ss(e),l=0,i=o.length,u=void 0,c=void 0;l<i;++l)if(u=o[l],u!=="callee"&&u!=="caller")if(c=qp(e,u),c){!c.get&&!c.set&&(c.value=n(e[u],r));try{$p(s,u,c)}catch{s[u]=c.value}}else s[u]=n(e[u],r);return s},Yp=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Kp=Array.isArray,Jp=Object.getPrototypeOf,Xp=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function Ot(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||Xp,s=n?Os:zp,o=function(l,i){if(!l||typeof l!="object")return l;if(i.has(l))return i.get(l);var u=l.__proto__||Jp(l),c=u&&u.constructor;if(!c||c===r.Object)return s(l,r,o,i);var a;if(Kp(l)){if(n)return Os(l,r,o,i);a=new c,i.set(l,a);for(var d=0,f=l.length;d<f;++d)a[d]=o(l[d],i);return a}if(l instanceof r.Date)return new c(l.getTime());if(l instanceof r.RegExp)return a=new c(l.source,l.flags||Yp(l)),a.lastIndex=l.lastIndex,a;if(r.Map&&l instanceof r.Map)return a=new c,i.set(l,a),l.forEach(function(p,h){a.set(h,o(p,i))}),a;if(r.Set&&l instanceof r.Set)return a=new c,i.set(l,a),l.forEach(function(p){a.add(o(p,i))}),a;if(r.Blob&&l instanceof r.Blob)return l.slice(0,l.size,l.type);if(r.Buffer&&r.Buffer.isBuffer(l))return a=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(l.length):new c(l.length),i.set(l,a),l.copy(a),a;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(l))return a=new c(l.buffer.slice(0)),i.set(l,a),a;if(l instanceof r.ArrayBuffer)return a=l.slice(0),i.set(l,a),a}return typeof l.then=="function"||l instanceof Error||r.WeakMap&&l instanceof r.WeakMap||r.WeakSet&&l instanceof r.WeakSet?l:s(l,r,o,i)};return o(e,Qp())}Ot.default=Ot;Ot.strict=function(t,n){return Ot(t,{isStrict:!0,realm:n?n.realm:void 0})};var Zp=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==s||l.enumerable!==!0)return!1}return!0},Ts=typeof Symbol<"u"&&Symbol,eh=Zp,th=function(){return typeof Ts!="function"||typeof Symbol!="function"||typeof Ts("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:eh()},xs={foo:{}},rh=Object,nh=function(){return{__proto__:xs}.foo===xs.foo&&!({__proto__:null}instanceof rh)},ih="Function.prototype.bind called on incompatible ",Hi=Array.prototype.slice,oh=Object.prototype.toString,ah="[object Function]",sh=function(t){var n=this;if(typeof n!="function"||oh.call(n)!==ah)throw new TypeError(ih+n);for(var r=Hi.call(arguments,1),s,o=function(){if(this instanceof s){var a=n.apply(this,r.concat(Hi.call(arguments)));return Object(a)===a?a:this}else return n.apply(t,r.concat(Hi.call(arguments)))},l=Math.max(0,n.length-r.length),i=[],u=0;u<l;u++)i.push("$"+u);if(s=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var c=function(){};c.prototype=n.prototype,s.prototype=new c,c.prototype=null}return s},ch=sh,ua=Function.prototype.bind||ch,uh=ua,lh=uh.call(Function.call,Object.prototype.hasOwnProperty),pe,zt=SyntaxError,qu=Function,Qt=TypeError,Wi=function(e){try{return qu('"use strict"; return ('+e+").constructor;")()}catch{}},Lt=Object.getOwnPropertyDescriptor;if(Lt)try{Lt({},"")}catch{Lt=null}var Gi=function(){throw new Qt},fh=Lt?function(){try{return arguments.callee,Gi}catch{try{return Lt(arguments,"callee").get}catch{return Gi}}}():Gi,$t=th(),dh=nh(),ke=Object.getPrototypeOf||(dh?function(e){return e.__proto__}:null),Ht={},ph=typeof Uint8Array>"u"||!ke?pe:ke(Uint8Array),Ft={"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":$t&&ke?ke([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Ht,"%AsyncGenerator%":Ht,"%AsyncGeneratorFunction%":Ht,"%AsyncIteratorPrototype%":Ht,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":qu,"%GeneratorFunction%":Ht,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$t&&ke?ke(ke([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$t||!ke?pe:ke(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$t||!ke?pe:ke(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$t&&ke?ke(""[Symbol.iterator]()):pe,"%Symbol%":$t?Symbol:pe,"%SyntaxError%":zt,"%ThrowTypeError%":fh,"%TypedArray%":ph,"%TypeError%":Qt,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(ke)try{null.error}catch(e){var hh=ke(ke(e));Ft["%Error.prototype%"]=hh}var mh=function e(t){var n;if(t==="%AsyncFunction%")n=Wi("async function () {}");else if(t==="%GeneratorFunction%")n=Wi("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Wi("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&ke&&(n=ke(s.prototype))}return Ft[t]=n,n},As={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Hr=ua,Ln=lh,gh=Hr.call(Function.call,Array.prototype.concat),yh=Hr.call(Function.apply,Array.prototype.splice),Rs=Hr.call(Function.call,String.prototype.replace),Fn=Hr.call(Function.call,String.prototype.slice),vh=Hr.call(Function.call,RegExp.prototype.exec),_h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Eh=/\\(\\)?/g,wh=function(t){var n=Fn(t,0,1),r=Fn(t,-1);if(n==="%"&&r!=="%")throw new zt("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zt("invalid intrinsic syntax, expected opening `%`");var s=[];return Rs(t,_h,function(o,l,i,u){s[s.length]=i?Rs(u,Eh,"$1"):l||o}),s},bh=function(t,n){var r=t,s;if(Ln(As,r)&&(s=As[r],r="%"+s[0]+"%"),Ln(Ft,r)){var o=Ft[r];if(o===Ht&&(o=mh(r)),typeof o>"u"&&!n)throw new Qt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:r,value:o}}throw new zt("intrinsic "+t+" does not exist!")},la=function(t,n){if(typeof t!="string"||t.length===0)throw new Qt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Qt('"allowMissing" argument must be a boolean');if(vh(/^%?[^%]*%?$/,t)===null)throw new zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=wh(t),s=r.length>0?r[0]:"",o=bh("%"+s+"%",n),l=o.name,i=o.value,u=!1,c=o.alias;c&&(s=c[0],yh(r,gh([0,1],c)));for(var a=1,d=!0;a<r.length;a+=1){var f=r[a],p=Fn(f,0,1),h=Fn(f,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new zt("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(u=!0),s+="."+f,l="%"+s+"%",Ln(Ft,l))i=Ft[l];else if(i!=null){if(!(f in i)){if(!n)throw new Qt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Lt&&a+1>=r.length){var y=Lt(i,f);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?i=y.get:i=i[f]}else d=Ln(i,f),i=i[f];d&&!u&&(Ft[l]=i)}}return i},Hu={exports:{}};(function(e){var t=ua,n=la,r=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(s,r),l=n("%Object.getOwnPropertyDescriptor%",!0),i=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(i)try{i({},"a",{value:1})}catch{i=null}e.exports=function(d){var f=o(t,s,arguments);if(l&&i){var p=l(f,"length");p.configurable&&i(f,"length",{value:1+u(0,d.length-(arguments.length-1))})}return f};var c=function(){return o(t,r,arguments)};i?i(e.exports,"apply",{value:c}):e.exports.apply=c})(Hu);var Sh=Hu.exports,Wu=la,Gu=Sh,Oh=Gu(Wu("String.prototype.indexOf")),Th=function(t,n){var r=Wu(t,!!n);return typeof r=="function"&&Oh(t,".prototype.")>-1?Gu(r):r};const xh={},Ah=Object.freeze(Object.defineProperty({__proto__:null,default:xh},Symbol.toStringTag,{value:"Module"})),Rh=qr(Ah);var fa=typeof Map=="function"&&Map.prototype,Vi=Object.getOwnPropertyDescriptor&&fa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jn=fa&&Vi&&typeof Vi.get=="function"?Vi.get:null,Cs=fa&&Map.prototype.forEach,da=typeof Set=="function"&&Set.prototype,Qi=Object.getOwnPropertyDescriptor&&da?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mn=da&&Qi&&typeof Qi.get=="function"?Qi.get:null,Ns=da&&Set.prototype.forEach,Ch=typeof WeakMap=="function"&&WeakMap.prototype,Fr=Ch?WeakMap.prototype.has:null,Nh=typeof WeakSet=="function"&&WeakSet.prototype,jr=Nh?WeakSet.prototype.has:null,Ph=typeof WeakRef=="function"&&WeakRef.prototype,Ps=Ph?WeakRef.prototype.deref:null,Ih=Boolean.prototype.valueOf,kh=Object.prototype.toString,Lh=Function.prototype.toString,Fh=String.prototype.match,pa=String.prototype.slice,St=String.prototype.replace,jh=String.prototype.toUpperCase,Is=String.prototype.toLowerCase,Vu=RegExp.prototype.test,ks=Array.prototype.concat,at=Array.prototype.join,Mh=Array.prototype.slice,Ls=Math.floor,Ho=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zi=Object.getOwnPropertySymbols,Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",We=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yt||"symbol")?Symbol.toStringTag:null,Qu=Object.prototype.propertyIsEnumerable,Fs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function js(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vu.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ls(-e):Ls(e);if(r!==e){var s=String(r),o=pa.call(t,s.length+1);return St.call(s,n,"$&_")+"."+St.call(St.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return St.call(t,n,"$&_")}var Go=Rh,Ms=Go.custom,Ds=Yu(Ms)?Ms:null,Dh=function e(t,n,r,s){var o=n||{};if(bt(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bt(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=bt(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(bt(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(bt(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var i=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ju(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return i?js(t,u):u}if(typeof t=="bigint"){var c=String(t)+"n";return i?js(t,c):c}var a=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=a&&a>0&&typeof t=="object")return Vo(t)?"[Array]":"[Object]";var d=rm(o,r);if(typeof s>"u")s=[];else if(Ku(s,t)>=0)return"[Circular]";function f($,K,Q){if(K&&(s=Mh.call(s),s.push(K)),Q){var C={depth:o.depth};return bt(o,"quoteStyle")&&(C.quoteStyle=o.quoteStyle),e($,C,r+1,s)}return e($,o,r+1,s)}if(typeof t=="function"&&!Us(t)){var p=Qh(t),h=un(t,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+at.call(h,", ")+" }":"")}if(Yu(t)){var y=Yt?St.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wo.call(t);return typeof t=="object"&&!Yt?cr(y):y}if(Zh(t)){for(var _="<"+Is.call(String(t.nodeName)),S=t.attributes||[],v=0;v<S.length;v++)_+=" "+S[v].name+"="+zu(Uh(S[v].value),"double",o);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Is.call(String(t.nodeName))+">",_}if(Vo(t)){if(t.length===0)return"[]";var w=un(t,f);return d&&!tm(w)?"["+Qo(w,d)+"]":"[ "+at.call(w,", ")+" ]"}if($h(t)){var x=un(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Qu.call(t,"cause")?"{ ["+String(t)+"] "+at.call(ks.call("[cause]: "+f(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+at.call(x,", ")+" }"}if(typeof t=="object"&&l){if(Ds&&typeof t[Ds]=="function"&&Go)return Go(t,{depth:a-r});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(zh(t)){var O=[];return Cs&&Cs.call(t,function($,K){O.push(f(K,t,!0)+" => "+f($,t))}),Bs("Map",jn.call(t),O,d)}if(Jh(t)){var F=[];return Ns&&Ns.call(t,function($){F.push(f($,t))}),Bs("Set",Mn.call(t),F,d)}if(Yh(t))return Yi("WeakMap");if(Xh(t))return Yi("WeakSet");if(Kh(t))return Yi("WeakRef");if(Hh(t))return cr(f(Number(t)));if(Gh(t))return cr(f(Ho.call(t)));if(Wh(t))return cr(Ih.call(t));if(qh(t))return cr(f(String(t)));if(!Bh(t)&&!Us(t)){var D=un(t,f),R=Fs?Fs(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",V=!R&&We&&Object(t)===t&&We in t?pa.call(Tt(t),8,-1):W?"Object":"",L=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",U=L+(V||W?"["+at.call(ks.call([],V||[],W||[]),": ")+"] ":"");return D.length===0?U+"{}":d?U+"{"+Qo(D,d)+"}":U+"{ "+at.call(D,", ")+" }"}return String(t)};function zu(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Uh(e){return St.call(String(e),/"/g,"&quot;")}function Vo(e){return Tt(e)==="[object Array]"&&(!We||!(typeof e=="object"&&We in e))}function Bh(e){return Tt(e)==="[object Date]"&&(!We||!(typeof e=="object"&&We in e))}function Us(e){return Tt(e)==="[object RegExp]"&&(!We||!(typeof e=="object"&&We in e))}function $h(e){return Tt(e)==="[object Error]"&&(!We||!(typeof e=="object"&&We in e))}function qh(e){return Tt(e)==="[object String]"&&(!We||!(typeof e=="object"&&We in e))}function Hh(e){return Tt(e)==="[object Number]"&&(!We||!(typeof e=="object"&&We in e))}function Wh(e){return Tt(e)==="[object Boolean]"&&(!We||!(typeof e=="object"&&We in e))}function Yu(e){if(Yt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Wo)return!1;try{return Wo.call(e),!0}catch{}return!1}function Gh(e){if(!e||typeof e!="object"||!Ho)return!1;try{return Ho.call(e),!0}catch{}return!1}var Vh=Object.prototype.hasOwnProperty||function(e){return e in this};function bt(e,t){return Vh.call(e,t)}function Tt(e){return kh.call(e)}function Qh(e){if(e.name)return e.name;var t=Fh.call(Lh.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Ku(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function zh(e){if(!jn||!e||typeof e!="object")return!1;try{jn.call(e);try{Mn.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Yh(e){if(!Fr||!e||typeof e!="object")return!1;try{Fr.call(e,Fr);try{jr.call(e,jr)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Kh(e){if(!Ps||!e||typeof e!="object")return!1;try{return Ps.call(e),!0}catch{}return!1}function Jh(e){if(!Mn||!e||typeof e!="object")return!1;try{Mn.call(e);try{jn.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Xh(e){if(!jr||!e||typeof e!="object")return!1;try{jr.call(e,jr);try{Fr.call(e,Fr)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Zh(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ju(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ju(pa.call(e,0,t.maxStringLength),t)+r}var s=St.call(St.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,em);return zu(s,"single",t)}function em(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+jh.call(t.toString(16))}function cr(e){return"Object("+e+")"}function Yi(e){return e+" { ? }"}function Bs(e,t,n,r){var s=r?Qo(n,r):at.call(n,", ");return e+" ("+t+") {"+s+"}"}function tm(e){for(var t=0;t<e.length;t++)if(Ku(e[t],`
33
+ `)>=0)return!1;return!0}function rm(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=at.call(Array(e.indent+1)," ");else return null;return{base:n,prev:at.call(Array(t+1),n)}}function Qo(e,t){if(e.length===0)return"";var n=`
34
+ `+t.prev+t.base;return n+at.call(e,","+n)+`
35
+ `+t.prev}function un(e,t){var n=Vo(e),r=[];if(n){r.length=e.length;for(var s=0;s<e.length;s++)r[s]=bt(e,s)?t(e[s],e):""}var o=typeof zi=="function"?zi(e):[],l;if(Yt){l={};for(var i=0;i<o.length;i++)l["$"+o[i]]=o[i]}for(var u in e)bt(e,u)&&(n&&String(Number(u))===u&&u<e.length||Yt&&l["$"+u]instanceof Symbol||(Vu.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof zi=="function")for(var c=0;c<o.length;c++)Qu.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var ha=la,Zt=Th,nm=Dh,im=ha("%TypeError%"),ln=ha("%WeakMap%",!0),fn=ha("%Map%",!0),om=Zt("WeakMap.prototype.get",!0),am=Zt("WeakMap.prototype.set",!0),sm=Zt("WeakMap.prototype.has",!0),cm=Zt("Map.prototype.get",!0),um=Zt("Map.prototype.set",!0),lm=Zt("Map.prototype.has",!0),ma=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},fm=function(e,t){var n=ma(e,t);return n&&n.value},dm=function(e,t,n){var r=ma(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},pm=function(e,t){return!!ma(e,t)},hm=function(){var t,n,r,s={assert:function(o){if(!s.has(o))throw new im("Side channel does not contain "+nm(o))},get:function(o){if(ln&&o&&(typeof o=="object"||typeof o=="function")){if(t)return om(t,o)}else if(fn){if(n)return cm(n,o)}else if(r)return fm(r,o)},has:function(o){if(ln&&o&&(typeof o=="object"||typeof o=="function")){if(t)return sm(t,o)}else if(fn){if(n)return lm(n,o)}else if(r)return pm(r,o);return!1},set:function(o,l){ln&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new ln),am(t,o,l)):fn?(n||(n=new fn),um(n,o,l)):(r||(r={key:{},next:null}),dm(r,o,l))}};return s},mm=String.prototype.replace,gm=/%20/g,Ki={RFC1738:"RFC1738",RFC3986:"RFC3986"},ga={default:Ki.RFC3986,formatters:{RFC1738:function(e){return mm.call(e,gm,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ki.RFC1738,RFC3986:Ki.RFC3986},ym=ga,Ji=Object.prototype.hasOwnProperty,kt=Array.isArray,it=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),vm=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(kt(r)){for(var s=[],o=0;o<r.length;++o)typeof r[o]<"u"&&s.push(r[o]);n.obj[n.prop]=s}}},Xu=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(r[s]=t[s]);return r},_m=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(kt(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ji.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var s=t;return kt(t)&&!kt(n)&&(s=Xu(t,r)),kt(t)&&kt(n)?(n.forEach(function(o,l){if(Ji.call(t,l)){var i=t[l];i&&typeof i=="object"&&o&&typeof o=="object"?t[l]=e(i,o,r):t.push(o)}else t[l]=o}),t):Object.keys(n).reduce(function(o,l){var i=n[l];return Ji.call(o,l)?o[l]=e(o[l],i,r):o[l]=i,o},s)},Em=function(t,n){return Object.keys(n).reduce(function(r,s){return r[s]=n[s],r},t)},wm=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},bm=function(t,n,r,s,o){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),r==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(a){return"%26%23"+parseInt(a.slice(2),16)+"%3B"});for(var i="",u=0;u<l.length;++u){var c=l.charCodeAt(u);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===ym.RFC1738&&(c===40||c===41)){i+=l.charAt(u);continue}if(c<128){i=i+it[c];continue}if(c<2048){i=i+(it[192|c>>6]+it[128|c&63]);continue}if(c<55296||c>=57344){i=i+(it[224|c>>12]+it[128|c>>6&63]+it[128|c&63]);continue}u+=1,c=65536+((c&1023)<<10|l.charCodeAt(u)&1023),i+=it[240|c>>18]+it[128|c>>12&63]+it[128|c>>6&63]+it[128|c&63]}return i},Sm=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],s=0;s<n.length;++s)for(var o=n[s],l=o.obj[o.prop],i=Object.keys(l),u=0;u<i.length;++u){var c=i[u],a=l[c];typeof a=="object"&&a!==null&&r.indexOf(a)===-1&&(n.push({obj:l,prop:c}),r.push(a))}return vm(n),t},Om=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Tm=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},xm=function(t,n){return[].concat(t,n)},Am=function(t,n){if(kt(t)){for(var r=[],s=0;s<t.length;s+=1)r.push(n(t[s]));return r}return n(t)},Zu={arrayToObject:Xu,assign:Em,combine:xm,compact:Sm,decode:wm,encode:bm,isBuffer:Tm,isRegExp:Om,maybeMap:Am,merge:_m},el=hm,kn=Zu,Mr=ga,Rm=Object.prototype.hasOwnProperty,$s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},ht=Array.isArray,Cm=Array.prototype.push,tl=function(e,t){Cm.apply(e,ht(t)?t:[t])},Nm=Date.prototype.toISOString,qs=Mr.default,He={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:kn.encode,encodeValuesOnly:!1,format:qs,formatter:Mr.formatters[qs],indices:!1,serializeDate:function(t){return Nm.call(t)},skipNulls:!1,strictNullHandling:!1},Pm=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xi={},Im=function e(t,n,r,s,o,l,i,u,c,a,d,f,p,h,y,_){for(var S=t,v=_,w=0,x=!1;(v=v.get(Xi))!==void 0&&!x;){var O=v.get(t);if(w+=1,typeof O<"u"){if(O===w)throw new RangeError("Cyclic object value");x=!0}typeof v.get(Xi)>"u"&&(w=0)}if(typeof u=="function"?S=u(n,S):S instanceof Date?S=d(S):r==="comma"&&ht(S)&&(S=kn.maybeMap(S,function(C){return C instanceof Date?d(C):C})),S===null){if(o)return i&&!h?i(n,He.encoder,y,"key",f):n;S=""}if(Pm(S)||kn.isBuffer(S)){if(i){var F=h?n:i(n,He.encoder,y,"key",f);return[p(F)+"="+p(i(S,He.encoder,y,"value",f))]}return[p(n)+"="+p(String(S))]}var D=[];if(typeof S>"u")return D;var R;if(r==="comma"&&ht(S))h&&i&&(S=kn.maybeMap(S,i)),R=[{value:S.length>0?S.join(",")||null:void 0}];else if(ht(u))R=u;else{var W=Object.keys(S);R=c?W.sort(c):W}for(var V=s&&ht(S)&&S.length===1?n+"[]":n,L=0;L<R.length;++L){var U=R[L],$=typeof U=="object"&&typeof U.value<"u"?U.value:S[U];if(!(l&&$===null)){var K=ht(S)?typeof r=="function"?r(V,U):V:V+(a?"."+U:"["+U+"]");_.set(t,w);var Q=el();Q.set(Xi,_),tl(D,e($,K,r,s,o,l,r==="comma"&&h&&ht(S)?null:i,u,c,a,d,f,p,h,y,Q))}}return D},km=function(t){if(!t)return He;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||He.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Mr.default;if(typeof t.format<"u"){if(!Rm.call(Mr.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var s=Mr.formatters[r],o=He.filter;return(typeof t.filter=="function"||ht(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:He.addQueryPrefix,allowDots:typeof t.allowDots>"u"?He.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:He.charsetSentinel,delimiter:typeof t.delimiter>"u"?He.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:He.encode,encoder:typeof t.encoder=="function"?t.encoder:He.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:He.encodeValuesOnly,filter:o,format:r,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:He.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:He.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:He.strictNullHandling}},Lm=function(e,t){var n=e,r=km(t),s,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):ht(r.filter)&&(o=r.filter,s=o);var l=[];if(typeof n!="object"||n===null)return"";var i;t&&t.arrayFormat in $s?i=t.arrayFormat:t&&"indices"in t?i=t.indices?"indices":"repeat":i="indices";var u=$s[i];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=u==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(n)),r.sort&&s.sort(r.sort);for(var a=el(),d=0;d<s.length;++d){var f=s[d];r.skipNulls&&n[f]===null||tl(l,Im(n[f],f,u,c,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,a))}var p=l.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),p.length>0?h+p:""},Kt=Zu,zo=Object.prototype.hasOwnProperty,Fm=Array.isArray,Ie={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Kt.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},jm=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},rl=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Mm="utf8=%26%2310003%3B",Dm="utf8=%E2%9C%93",Um=function(t,n){var r={__proto__:null},s=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,l=s.split(n.delimiter,o),i=-1,u,c=n.charset;if(n.charsetSentinel)for(u=0;u<l.length;++u)l[u].indexOf("utf8=")===0&&(l[u]===Dm?c="utf-8":l[u]===Mm&&(c="iso-8859-1"),i=u,u=l.length);for(u=0;u<l.length;++u)if(u!==i){var a=l[u],d=a.indexOf("]="),f=d===-1?a.indexOf("="):d+1,p,h;f===-1?(p=n.decoder(a,Ie.decoder,c,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(a.slice(0,f),Ie.decoder,c,"key"),h=Kt.maybeMap(rl(a.slice(f+1),n),function(y){return n.decoder(y,Ie.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=jm(h)),a.indexOf("[]=")>-1&&(h=Fm(h)?[h]:h),zo.call(r,p)?r[p]=Kt.combine(r[p],h):r[p]=h}return r},Bm=function(e,t,n,r){for(var s=r?t:rl(t,n),o=e.length-1;o>=0;--o){var l,i=e[o];if(i==="[]"&&n.parseArrays)l=[].concat(s);else{l=n.plainObjects?Object.create(null):{};var u=i.charAt(0)==="["&&i.charAt(i.length-1)==="]"?i.slice(1,-1):i,c=parseInt(u,10);!n.parseArrays&&u===""?l={0:s}:!isNaN(c)&&i!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(l=[],l[c]=s):u!=="__proto__"&&(l[u]=s)}s=l}return s},$m=function(t,n,r,s){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,u=r.depth>0&&l.exec(o),c=u?o.slice(0,u.index):o,a=[];if(c){if(!r.plainObjects&&zo.call(Object.prototype,c)&&!r.allowPrototypes)return;a.push(c)}for(var d=0;r.depth>0&&(u=i.exec(o))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&zo.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;a.push(u[1])}return u&&a.push("["+o.slice(u.index)+"]"),Bm(a,n,r,s)}},qm=function(t){if(!t)return Ie;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ie.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ie.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ie.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ie.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ie.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ie.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ie.comma,decoder:typeof t.decoder=="function"?t.decoder:Ie.decoder,delimiter:typeof t.delimiter=="string"||Kt.isRegExp(t.delimiter)?t.delimiter:Ie.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ie.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ie.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ie.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ie.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ie.strictNullHandling}},Hm=function(e,t){var n=qm(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Um(e,n):e,s=n.plainObjects?Object.create(null):{},o=Object.keys(r),l=0;l<o.length;++l){var i=o[l],u=$m(i,r[i],n,typeof e=="string");s=Kt.merge(s,u,n)}return n.allowSparse===!0?s:Kt.compact(s)},Wm=Lm,Gm=Hm,Vm=ga,Qm={formats:Vm,parse:Gm,stringify:Wm};const zm=$r(Qm);var Ym="[object String]",Km=Object.prototype,Jm=Km.toString,Xm=Array.isArray;function Zm(e){return!!e&&typeof e=="object"}function eg(e){return typeof e=="string"||!Xm(e)&&Zm(e)&&Jm.call(e)==Ym}var tg=eg;const Hs=$r(tg);var ya={exports:{}};class nl extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const rg=({limit:e,interval:t,strict:n})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const r=new Map;let s=0,o=0;function l(){const a=Date.now();return a-s>t?(o=1,s=a,0):(o<e?o++:(s+=t,o=1),s-a)}const i=[];function u(){const a=Date.now();if(i.length<e)return i.push(a),0;const d=i.shift()+t;return a>=d?(i.push(a),0):(i.push(d),d-a)}const c=n?u:l;return a=>{const d=function(...f){if(!d.isEnabled)return(async()=>a.apply(this,f))();let p;return new Promise((h,y)=>{p=setTimeout(()=>{h(a.apply(this,f)),r.delete(p)},c()),r.set(p,y)})};return d.abort=()=>{for(const f of r.keys())clearTimeout(f),r.get(f)(new nl);r.clear(),i.splice(0,i.length)},d.isEnabled=!0,d}};ya.exports=rg;ya.exports.AbortError=nl;var ng=ya.exports;const ig=$r(ng);var og="[object Object]";function ag(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function sg(e,t){return function(n){return e(t(n))}}var cg=Function.prototype,il=Object.prototype,ol=cg.toString,ug=il.hasOwnProperty,lg=ol.call(Object),fg=il.toString,dg=sg(Object.getPrototypeOf,Object);function pg(e){return!!e&&typeof e=="object"}function hg(e){if(!pg(e)||fg.call(e)!=og||ag(e))return!1;var t=dg(e);if(t===null)return!0;var n=ug.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ol.call(n)==lg}var mg=hg;const dn=$r(mg);function gg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,l,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(a){c=!0,s=a}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw s}}return i}}function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ws(Object(n),!0).forEach(function(r){yg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yo(e){"@babel/helpers - typeof";return Yo=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},Yo(e)}function Ko(){Ko=function(s,o){return new n(s,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function n(s,o,l){var i=new RegExp(s,o);return t.set(i,l||t.get(s)),Dn(i,n.prototype)}function r(s,o){var l=t.get(o);return Object.keys(l).reduce(function(i,u){var c=l[u];if(typeof c=="number")i[u]=s[c];else{for(var a=0;s[c[a]]===void 0&&a+1<c.length;)a++;i[u]=s[c[a]]}return i},Object.create(null))}return vg(n,RegExp),n.prototype.exec=function(s){var o=e.exec.call(this,s);if(o){o.groups=r(o,this);var l=o.indices;l&&(l.groups=r(l,this))}return o},n.prototype[Symbol.replace]=function(s,o){if(typeof o=="string"){var l=t.get(this);return e[Symbol.replace].call(this,s,o.replace(/\$<([^>]+)>/g,function(u,c){var a=l[c];return"$"+(Array.isArray(a)?a.join("$"):a)}))}if(typeof o=="function"){var i=this;return e[Symbol.replace].call(this,s,function(){var u=arguments;return typeof u[u.length-1]!="object"&&(u=[].slice.call(u)).push(r(u,i)),o.apply(this,u)})}return e[Symbol.replace].call(this,s,o)},Ko.apply(this,arguments)}function yg(e,t,n){return t=Og(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vg(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&&Dn(e,t)}function Dn(e,t){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Dn(e,t)}function _g(e,t){return Eg(e)||gg(e,t)||al(e,t)||wg()}function Eg(e){if(Array.isArray(e))return e}function al(e,t){if(e){if(typeof e=="string")return Gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gs(e,t)}}function Gs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
36
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=al(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,i;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){l=!0,i=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw i}}}}function Sg(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(e){var t=Sg(e,"string");return typeof t=="symbol"?t:String(t)}function Tg(){return typeof process<"u"&&!process.browser}function xg(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function Ag(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function Rg(){return window}function Jo(){}var Xo=Ko(/(\d+)(%)/,{value:1});function Zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,n=t;if(Xo.test(e)){var r,s=(r=e.match(Xo))===null||r===void 0?void 0:r.groups;if(s&&s.value){var o=parseInt(s.value)/100;n=Math.round(t*o)}}return Math.min(30,Math.max(1,n))}function Vs(e,t){return t("info","Throttle request to ".concat(e,"/s")),ig({limit:e,interval:1e3,strict:!1})}var Cg=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",n=e.defaults.logHandler,r=n===void 0?Jo:n,s=Hs(t)?Zi(t):Zi("auto",t),o=Vs(s,r),l=!1,i=e.interceptors.request.use(function(c){return o(function(){return c})()},function(c){return Promise.reject(c)}),u=e.interceptors.response.use(function(c){if(!l&&Hs(t)&&(t==="auto"||Xo.test(t))&&c.headers&&c.headers["x-contentful-ratelimit-second-limit"]){var a=parseInt(c.headers["x-contentful-ratelimit-second-limit"]),d=Zi(t,a);d!==s&&(i&&e.interceptors.request.eject(i),s=d,o=Vs(d,r),i=e.interceptors.request.use(function(f){return o(function(){return f})()},function(f){return Promise.reject(f)})),l=!0}return c},function(c){return Promise.reject(c)});return function(){e.interceptors.request.eject(i),e.interceptors.response.eject(u)}},Ng=function(t){return new Promise(function(n){setTimeout(n,t)})},Pg=function(t){return Math.pow(Math.SQRT2,t)};function Ig(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=e.defaults,r=n.responseLogger,s=r===void 0?Jo:r,o=n.requestLogger,l=o===void 0?Jo:o;e.interceptors.request.use(function(i){return l(i),i},function(i){return l(i),Promise.reject(i)}),e.interceptors.response.use(function(i){return s(i),i},function(i){var u=i.response,c=i.config;if(s(i),!c||!e.defaults.retryOnError)return Promise.reject(i);var a=c.attempts||1;if(a>t)return i.attempts=c.attempts,Promise.reject(i);var d=null,f=Pg(a);return u?u.status>=500&&u.status<600?d="Server ".concat(u.status):u.status===429&&(d="Rate limit",u.headers&&i.response.headers["x-contentful-ratelimit-reset"]&&(f=u.headers["x-contentful-ratelimit-reset"])):d="Connection",d?(f=Math.floor(f*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(d," error occurred. Waiting for ").concat(f," ms before retrying...")),c.attempts=a+1,delete c.httpAgent,delete c.httpsAgent,Ng(f).then(function(){return e(c)})):Promise.reject(i)})}function kg(e,t){e.interceptors.request.use(function(n){return t().then(function(r){return n.headers=Wt(Wt({},n.headers),{},{Authorization:"Bearer ".concat(r)}),n})})}var Lg=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function sl(e,t){var n={insecure:!1,retryOnError:!0,logHandler:function(y,_){if(y==="error"&&_){var S=[_.name,_.message].filter(function(v){return v}).join(" - ");console.error("[error] ".concat(S)),console.error(_);return}console.log("[".concat(y,"] ").concat(_))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},r=Wt(Wt({},n),t);if(!r.accessToken){var s=new TypeError("Expected parameter accessToken");throw r.logHandler("error",s),s}var o=r.insecure?"http":"https",l=r.space?"".concat(r.space,"/"):"",i=r.defaultHostname,u=r.insecure?80:443;if(r.host&&Lg.test(r.host)){var c=r.host.split(":");if(c.length===2){var a=_g(c,2);i=a[0],u=a[1]}else i=c[0]}r.basePath&&(r.basePath="/".concat(r.basePath.split("/").filter(Boolean).join("/")));var d=t.baseURL||"".concat(o,"://").concat(i,":").concat(u).concat(r.basePath,"/spaces/").concat(l);!r.headers.Authorization&&typeof r.accessToken!="function"&&(r.headers.Authorization="Bearer "+r.accessToken);var f={baseURL:d,headers:r.headers,httpAgent:r.httpAgent,httpsAgent:r.httpsAgent,paramsSerializer:zm.stringify,proxy:r.proxy,timeout:r.timeout,adapter:r.adapter,maxContentLength:r.maxContentLength,maxBodyLength:r.maxBodyLength,logHandler:r.logHandler,responseLogger:r.responseLogger,requestLogger:r.requestLogger,retryOnError:r.retryOnError},p=e.create(f);return p.httpClientParams=t,p.cloneWithNewParams=function(h){return sl(e,Wt(Wt({},Ot(t)),h))},r.onBeforeRequest&&p.interceptors.request.use(r.onBeforeRequest),typeof r.accessToken=="function"&&kg(p,r.accessToken),r.throttle&&Cg(p,r.throttle),Ig(p,r.retryLimit),r.onError&&p.interceptors.response.use(function(h){return h},r.onError),p}function Fg(e){var t=e.query,n={};return delete t.resolveLinks,n.params=Ot(t),n}function jg(e,t){if(!(t in e)){var n=new Error;throw n.name="PropertyMissing",n.message="Required property ".concat(t,` missing from:
38
38
 
39
39
  `).concat(JSON.stringify(e),`
40
40
 
41
- `),r}return!0}function ml(e){var t=Object.getOwnPropertyNames(e),r=$g(t),n;try{for(r.s();!(n=r.n()).done;){var s=n.value,o=e[s];o&&Jo(o)==="object"&&ml(o)}}catch(l){r.e(l)}finally{r.f()}return Object.freeze(e)}function ty(e){return ml(e.sys||{}),e}function Xs(){var e=Vg();if(!e)return null;var t=e.navigator.userAgent,r=e.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],s=["Win32","Win64","Windows","WinCE"],o=["iPhone","iPad","iPod"];return n.indexOf(r)!==-1?"macOS":o.indexOf(r)!==-1?"iOS":s.indexOf(r)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(r)?"Linux":null}function ry(){var e=process.platform||"linux",t=process.version||"0.0.0",r={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in r?"".concat(r[e]||"Linux","/").concat(t):null}function ny(e,t,r,n){var s=[];t&&s.push("app ".concat(t)),r&&s.push("integration ".concat(r)),n&&s.push("feature "+n),s.push("sdk ".concat(e));var o=null;try{Wg()?(o=Xs(),s.push("platform ReactNative")):Hg()?(o=ry(),s.push("platform node.js/".concat(Gg()))):(o=Xs(),s.push("platform browser"))}catch{o=null}return o&&s.push("os ".concat(o)),"".concat(s.filter(function(l){return l!==""}).join("; "),";")}function iy(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return wt(this)}})}function oy(e){var t=e.config,r=e.response,n;if(t&&t.headers&&t.headers.Authorization){var s="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(s)}if(!fn(r)||!fn(t))throw e;var o=r==null?void 0:r.data,l={status:r==null?void 0:r.status,statusText:r==null?void 0:r.statusText,message:"",details:{}};fn(t)&&(l.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),o&&fn(o)&&("requestId"in o&&(l.requestId=o.requestId||"UNKNOWN"),"message"in o&&(l.message=o.message||""),"details"in o&&(l.details=o.details||{}),"sys"in o&&"id"in o.sys&&(n=o.sys.id));var i=new Error;i.name=n&&n!=="Unknown"?n:"".concat(r==null?void 0:r.status," ").concat(r==null?void 0:r.statusText);try{i.message=JSON.stringify(l,null," ")}catch{var c;i.message=(c=l==null?void 0:l.message)!==null&&c!==void 0?c:""}throw i}const ay=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:hl,createRequestConfig:Zg,enforceObjPath:ey,errorHandler:oy,freezeSys:ty,getUserAgentHeader:ny,toPlainObject:iy},Symbol.toStringTag,{value:"Module"})),et=qr(ay);var dn={},ur={},pn={},Zs;function sy(){if(Zs)return pn;Zs=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.wrapSpace=t;var e=et;function t(r){return(0,e.freezeSys)((0,e.toPlainObject)(r))}return pn}var lr={},Zi={exports:{}},ec;function Zt(){return ec||(ec=1,function(e,t){(function(r,n){e.exports=n()})(le,function(){var r=Function.prototype.toString,n=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,c=Object.getPrototypeOf,u=Object.prototype,a=u.hasOwnProperty,d=u.propertyIsEnumerable,f=typeof i=="function",p=typeof WeakMap=="function",h=function(){if(p)return function(){return new WeakMap};var D=function(){function R(){this._keys=[],this._values=[]}return R.prototype.has=function(W){return!!~this._keys.indexOf(W)},R.prototype.get=function(W){return this._values[this._keys.indexOf(W)]},R.prototype.set=function(W,G){this._keys.push(W),this._values.push(G)},R}();return function(){return new D}}(),y=function(D,R){var W=D.__proto__||c(D);if(!W)return n(null);var G=W.constructor;if(G===R.Object)return W===R.Object.prototype?{}:n(W);if(~r.call(G).indexOf("[native code]"))try{return new G}catch{}return n(W)},_=function(D,R,W,G){var L=y(D,R);G.set(D,L);for(var $ in D)a.call(D,$)&&(L[$]=W(D[$],G));if(f)for(var H=i(D),K=0,V=H.length,P=void 0;K<V;++K)P=H[K],d.call(D,P)&&(L[P]=W(D[P],G));return L},S=function(D,R,W,G){var L=y(D,R);G.set(D,L);for(var $=f?l(D).concat(i(D)):l(D),H=0,K=$.length,V=void 0,P=void 0;H<K;++H)if(V=$[H],V!=="callee"&&V!=="caller")if(P=o(D,V),P){!P.get&&!P.set&&(P.value=W(D[V],G));try{s(L,V,P)}catch{L[V]=P.value}}else L[V]=W(D[V],G);return L},v=function(D){var R="";return D.global&&(R+="g"),D.ignoreCase&&(R+="i"),D.multiline&&(R+="m"),D.unicode&&(R+="u"),D.sticky&&(R+="y"),R},w=Array.isArray,A=Object.getPrototypeOf,T=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof le<"u"?le:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function M(D,R){var W=!!(R&&R.isStrict),G=R&&R.realm||T,L=W?S:_,$=function(H,K){if(!H||typeof H!="object")return H;if(K.has(H))return K.get(H);var V=H.__proto__||A(H),P=V&&V.constructor;if(!P||P===G.Object)return L(H,G,$,K);var q;if(w(H)){if(W)return S(H,G,$,K);q=new P,K.set(H,q);for(var Y=0,ie=H.length;Y<ie;++Y)q[Y]=$(H[Y],K);return q}if(H instanceof G.Date)return new P(H.getTime());if(H instanceof G.RegExp)return q=new P(H.source,H.flags||v(H)),q.lastIndex=H.lastIndex,q;if(G.Map&&H instanceof G.Map)return q=new P,K.set(H,q),H.forEach(function(ee,Q){q.set(Q,$(ee,K))}),q;if(G.Set&&H instanceof G.Set)return q=new P,K.set(H,q),H.forEach(function(ee){q.add($(ee,K))}),q;if(G.Blob&&H instanceof G.Blob)return H.slice(0,H.size,H.type);if(G.Buffer&&G.Buffer.isBuffer(H))return q=G.Buffer.allocUnsafe?G.Buffer.allocUnsafe(H.length):new P(H.length),K.set(H,q),H.copy(q),q;if(G.ArrayBuffer){if(G.ArrayBuffer.isView(H))return q=new P(H.buffer.slice(0)),K.set(H,q),q;if(H instanceof G.ArrayBuffer)return q=H.slice(0),K.set(H,q),q}return typeof H.then=="function"||H instanceof Error||G.WeakMap&&H instanceof G.WeakMap||G.WeakSet&&H instanceof G.WeakSet?H:L(H,G,$,K)};return $(D,h())}return M.default=M,M.strict=function(R,W){return M(R,{isStrict:!0,realm:W?W.realm:void 0})},M})}(Zi)),Zi.exports}var hn={},mn={exports:{}},tc;function cy(){return tc||(tc=1,function(e,t){t=e.exports=r,t.getSerialize=n;function r(s,o,l,i){return JSON.stringify(s,n(o,i),l)}function n(s,o){var l=[],i=[];return o==null&&(o=function(c,u){return l[0]===u?"[Circular ~]":"[Circular ~."+i.slice(0,l.indexOf(u)).join(".")+"]"}),function(c,u){if(l.length>0){var a=l.indexOf(this);~a?l.splice(a+1):l.push(this),~a?i.splice(a,1/0,c):i.push(c),~l.indexOf(u)&&(u=o.call(this,c,u))}else l.push(u);return s==null?u:s.call(this,c,u)}}}(mn,mn.exports)),mn.exports}var rc;function gl(){if(rc)return hn;rc=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=r;var e=t(cy());function t(n){return n&&n.__esModule?n:{default:n}}function r(n){return Object.defineProperty(n,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,s,o,(l,i)=>({sys:{type:"Link",linkType:"Entry",id:i.sys.id,circular:!0}}))}})}return hn}var uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ly=function(){function e(t,r){var n=[],s=!0,o=!1,l=void 0;try{for(var i=t[Symbol.iterator](),c;!(s=(c=i.next()).done)&&(n.push(c.value),!(r&&n.length===r));s=!0);}catch(u){o=!0,l=u}finally{try{!s&&i.return&&i.return()}finally{if(o)throw l}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function fr(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var Ur={},fy=function(t){return t&&t.sys&&t.sys.type==="Link"},dy=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},py=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},nc=function(t,r){var n=r.entryId,s=r.linkType,o=r.spaceId,l=r.environmentId;return o&&l?t.get(o+"!"+l+"!"+s+"!"+n):t.get(s+"!"+n)},hy=function(t){var r=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(r.test(t)){var n=t.match(r),s=ly(n,4);s[0];var o=s[1],l=s[2],i=l===void 0?"master":l,c=s[3];return{spaceId:o,environmentId:i,entryId:c}}},my=function(t,r){var n=r.sys,s=n.type,o=n.linkType;if(s==="ResourceLink"){var l=r.sys.urn,i=hy(l),c=i.spaceId,u=i.environmentId,a=i.entryId,d=o.split(":")[1];return nc(t,{linkType:d,entryId:a,spaceId:c,environmentId:u})||Ur}var f=r.sys.id;return nc(t,{linkType:o,entryId:f})||Ur},gy=function(t){if(Array.isArray(t))return t.filter(function(n){return n!==Ur});for(var r in t)t[r]===Ur&&delete t[r];return t},yy=function e(t,r,n,s){if(r(t))return n(t);if(t&&(typeof t>"u"?"undefined":uy(t))==="object"){for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],r,n,s));s&&(t=gy(t))}return t},vy=function(t,r,n){var s=my(t,r);return s===Ur?n?s:r:s},_y=function(t,r){if(!Array.isArray(r))return t;var n=Object.keys(t).filter(function(s){return r.indexOf(s)!==-1});return n.reduce(function(s,o){return s[o]=t[o],s},{})},Ey=function(t,r){if(r=r||{},!t.items)return[];var n=wt(t),s=Object.keys(n.includes||{}).reduce(function(i,c){return[].concat(fr(i),fr(t.includes[c]))},[]),o=[].concat(fr(n.items),fr(s)).filter(function(i){return!!i.sys}),l=new Map(o.reduce(function(i,c){var u=py(c.sys).map(function(a){return[a,c]});return i.push.apply(i,fr(u)),i},[]));return o.forEach(function(i){var c=_y(i,r.itemEntryPoints);Object.assign(i,yy(c,function(u){return fy(u)||dy(u)},function(u){return vy(l,u,r.removeUnresolved)},r.removeUnresolved))}),n.items};const wy=Object.freeze(Object.defineProperty({__proto__:null,default:Ey},Symbol.toStringTag,{value:"Module"})),yl=qr(wy);var ic;function by(){if(ic)return lr;ic=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.wrapEntry=o,lr.wrapEntryCollection=l;var e=s(Zt()),t=et,r=s(gl()),n=s(yl);function s(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function l(i,c){let{resolveLinks:u,removeUnresolved:a}=c;const d=(0,r.default)((0,t.toPlainObject)((0,e.default)(i)));return u&&(d.items=(0,n.default)(d,{removeUnresolved:a,itemEntryPoints:["fields"]})),(0,t.freezeSys)(d)}return lr}var dr={},oc;function Sy(){if(oc)return dr;oc=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.wrapAsset=n,dr.wrapAssetCollection=s;var e=r(Zt()),t=et;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return dr}var gn={},ac;function Ty(){if(ac)return gn;ac=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.wrapAssetKey=n;var e=r(Zt()),t=et;function r(s){return s&&s.__esModule?s:{default:s}}function n(s){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(s)))}return gn}var pr={},sc;function Oy(){if(sc)return pr;sc=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.wrapContentType=n,pr.wrapContentTypeCollection=s;var e=r(Zt()),t=et;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return pr}var hr={},cc;function Ay(){if(cc)return hr;cc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.wrapLocale=n,hr.wrapLocaleCollection=s;var e=r(Zt()),t=et;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return hr}var mr={},uc;function xy(){if(uc)return mr;uc=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.wrapTag=n,mr.wrapTagCollection=s;var e=r(Zt()),t=et;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return mr}var lc;function Ry(){if(lc)return ur;lc=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=void 0;var e=c(sy()),t=c(by()),r=c(Sy()),n=c(Ty()),s=c(Oy()),o=c(Ay()),l=c(xy());function i(a){if(typeof WeakMap!="function")return null;var d=new WeakMap,f=new WeakMap;return(i=function(p){return p?f:d})(a)}function c(a,d){if(!d&&a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var f=i(d);if(f&&f.has(a))return f.get(a);var p={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in a)if(y!=="default"&&Object.prototype.hasOwnProperty.call(a,y)){var _=h?Object.getOwnPropertyDescriptor(a,y):null;_&&(_.get||_.set)?Object.defineProperty(p,y,_):p[y]=a[y]}return p.default=a,f&&f.set(a,p),p}var u={space:e,entry:t,asset:r,assetKey:n,contentType:s,locale:o,tag:l};return ur.default=u,ur}var yn={},fc;function Cy(){if(fc)return yn;fc=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=i;var e=et,t=n(yl),r=n(gl());function n(d){return d&&d.__esModule?d:{default:d}}function s(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function o(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?s(Object(p),!0).forEach(function(h){l(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function l(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}async function i(d,f){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!f||!f.initial&&!f.nextSyncToken&&!f.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(f&&f.content_type&&!f.type)f.type="Entry";else if(f&&f.content_type&&f.type&&f.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const h={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:y,removeUnresolved:_,paginate:S}=o(o({},h),p),w=await u(d,[],f,{paginate:S});y&&(w.items=(0,t.default)(w,{removeUnresolved:_,itemEntryPoints:["fields"]}));const A=c(w.items);return w.nextSyncToken&&(A.nextSyncToken=w.nextSyncToken),w.nextPageToken&&(A.nextPageToken=w.nextPageToken),(0,e.freezeSys)((0,r.default)((0,e.toPlainObject)(A)))}function c(d){const f=p=>(h,y)=>(y.sys.type===p&&h.push((0,e.toPlainObject)(y)),h);return{entries:d.reduce(f("Entry"),[]),assets:d.reduce(f("Asset"),[]),deletedEntries:d.reduce(f("DeletedEntry"),[]),deletedAssets:d.reduce(f("DeletedAsset"),[])}}async function u(d,f,p,h){let{paginate:y}=h;p.nextSyncToken&&(p.sync_token=p.nextSyncToken,delete p.nextSyncToken),p.nextPageToken&&(p.sync_token=p.nextPageToken,delete p.nextPageToken),p.sync_token&&(delete p.initial,delete p.type,delete p.content_type,delete p.limit);const S=(await d.get("sync",(0,e.createRequestConfig)({query:p}))).data||{};return f=f.concat(S.items||[]),S.nextPageUrl?y?(delete p.initial,p.sync_token=a(S.nextPageUrl),u(d,f,p,{paginate:y})):{items:f,nextPageToken:a(S.nextPageUrl)}:S.nextSyncUrl?{items:f,nextSyncToken:a(S.nextSyncUrl)}:{items:[]}}function a(d){const f=d.split("?");return f.length>0?f[1].replace("sync_token=",""):""}return yn}var vn={},dc;function Py(){if(dc)return vn;dc=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=n;function e(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);o&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(s,c).enumerable})),l.push.apply(l,i)}return l}function t(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?e(Object(l),!0).forEach(function(i){r(s,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):e(Object(l)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(l,i))})}return s}function r(s,o,l){return o in s?Object.defineProperty(s,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[o]=l,s}function n(s){if(!s.select)return s;const o=Array.isArray(s.select)?s.select:s.select.split(","),l=new Set(o);return l.has("sys")?s:(l.add("sys.id"),l.add("sys.type"),t(t({},s),{},{select:[...l].join(",")}))}return vn}var qt={},pc;function Ny(){if(pc)return qt;pc=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.ValidationError=void 0,qt.default=t;class e extends Error{constructor(n,s){super(`Invalid "${n}" provided, `+s),this.name="ValidationError"}}qt.ValidationError=e;function t(r,n,s){if(s=s||{},typeof n!="number")throw new e(r,`only numeric values are allowed for timestamps, provided type was "${typeof n}"`);if(s.maximum&&n>s.maximum)throw new e(r,`value (${n}) cannot be further in the future than expected maximum (${s.maximum})`);if(s.now&&n<s.now)throw new e(r,`value (${n}) cannot be in the past, current time was ${s.now}`)}return qt}var hc;function Iy(){if(hc)return dn;hc=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=a;var e=et,t=o(Ry()),r=o(Cy()),n=o(Py()),s=o(Ny());function o(d){return d&&d.__esModule?d:{default:d}}function l(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function i(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?l(Object(p),!0).forEach(function(h){c(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):l(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function c(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}const u=48*60*60;function a(d){let{http:f,getGlobalOptions:p}=d;const{wrapSpace:h}=t.default.space,{wrapContentType:y,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:S,wrapEntryCollection:v}=t.default.entry,{wrapAsset:w,wrapAssetCollection:A}=t.default.asset,{wrapTag:T,wrapTagCollection:M}=t.default.tag,{wrapAssetKey:D}=t.default.assetKey,{wrapLocaleCollection:R}=t.default.locale,W=ne=>{const te=new Error("The resource could not be found.");return te.sys={type:"Error",id:"NotFound"},te.details={type:"Entry",id:ne,environment:p().environment,space:p().space},te};async function G(){Te(f);try{const ne=await f.get("/");return h(ne.data)}catch(ne){(0,e.errorHandler)(ne)}}async function L(ne){oe(f);try{const te=await f.get(`content_types/${ne}`);return y(te.data)}catch(te){(0,e.errorHandler)(te)}}async function $(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(f);try{const te=await f.get("content_types",(0,e.createRequestConfig)({query:ne}));return _(te.data)}catch(te){(0,e.errorHandler)(te)}}async function H(ne){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ne)throw W(ne);try{const _e=await this.getEntries(i({"sys.id":ne},te));if(_e.items.length>0)return S(_e.items[0]);throw W(ne)}catch(_e){(0,e.errorHandler)(_e)}}async function K(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(f);const{resolveLinks:te,removeUnresolved:_e}=p(ne);ne=(0,n.default)(ne);try{const xe=await f.get("entries",(0,e.createRequestConfig)({query:ne}));return v(xe.data,{resolveLinks:te,removeUnresolved:_e})}catch(xe){(0,e.errorHandler)(xe)}}async function V(ne){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};oe(f),te=(0,n.default)(te);try{const _e=await f.get(`assets/${ne}`,(0,e.createRequestConfig)({query:te}));return w(_e.data)}catch(_e){(0,e.errorHandler)(_e)}}async function P(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(f),ne=(0,n.default)(ne);try{const te=await f.get("assets",(0,e.createRequestConfig)({query:ne}));return A(te.data)}catch(te){(0,e.errorHandler)(te)}}async function q(ne){oe(f);try{const te=await f.get(`tags/${ne}`);return T(te.data)}catch(te){(0,e.errorHandler)(te)}}async function Y(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(f),ne=(0,n.default)(ne);try{const te=await f.get("tags",(0,e.createRequestConfig)({query:ne}));return M(te.data)}catch(te){(0,e.errorHandler)(te)}}async function ie(ne){oe(f);try{const te=Math.floor(Date.now()/1e3),_e=te+u;(0,s.default)("expiresAt",ne,{maximum:_e,now:te});const xe={expiresAt:ne},He=await f.post("asset_keys",xe);return D(He.data)}catch(te){(0,e.errorHandler)(te)}}async function ee(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(f);try{const te=await f.get("locales",(0,e.createRequestConfig)({query:ne}));return R(te.data)}catch(te){(0,e.errorHandler)(te)}}async function Q(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:_e,removeUnresolved:xe}=p(ne);return oe(f),(0,r.default)(f,ne,i({resolveLinks:_e,removeUnresolved:xe},te))}function Z(ne){const{resolveLinks:te,removeUnresolved:_e}=p({});return v(ne,{resolveLinks:te,removeUnresolved:_e})}function oe(ne){ne.defaults.baseURL=p().environmentBaseUrl}function Te(ne){ne.defaults.baseURL=p().spaceBaseUrl}return{getSpace:G,getContentType:L,getContentTypes:$,getEntry:H,getEntries:K,getAsset:V,getAssets:P,getTag:q,getTags:Y,createAssetKey:ie,getLocales:ee,parseEntries:Z,sync:Q}}return dn}var _n={},mc;function ky(){if(mc)return _n;mc=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=e;function e(t){return function(n){return Object.assign({},t,n)}}return _n}var gc;function Ly(){if(gc)return an;gc=1,Object.defineProperty(an,"__esModule",{value:!0}),an.createClient=c;var e=s(qu()),t=et,r=s(Iy()),n=s(ky());function s(u){return u&&u.__esModule?u:{default:u}}function o(u,a){var d=Object.keys(u);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(u);a&&(f=f.filter(function(p){return Object.getOwnPropertyDescriptor(u,p).enumerable})),d.push.apply(d,f)}return d}function l(u){for(var a=1;a<arguments.length;a++){var d=arguments[a]!=null?arguments[a]:{};a%2?o(Object(d),!0).forEach(function(f){i(u,f,d[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(d)):o(Object(d)).forEach(function(f){Object.defineProperty(u,f,Object.getOwnPropertyDescriptor(d,f))})}return u}function i(u,a,d){return a in u?Object.defineProperty(u,a,{value:d,enumerable:!0,configurable:!0,writable:!0}):u[a]=d,u}function c(u){if(!u.accessToken)throw new TypeError("Expected parameter accessToken");if(!u.space)throw new TypeError("Expected parameter space");const d=l(l({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),u),f=(0,t.getUserAgentHeader)("contentful.js/9.1.34",d.application,d.integration);d.headers=l(l({},d.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":f});const p=(0,t.createHttpClient)(e.default,d),h=(0,n.default)({resolveLinks:d.resolveLinks,environment:d.environment,removeUnresolved:d.removeUnresolved,spaceBaseUrl:p.defaults.baseURL,environmentBaseUrl:`${p.defaults.baseURL}environments/${d.environment}`});return p.defaults.baseURL=h().environmentBaseUrl,(0,r.default)({http:p,getGlobalOptions:h})}return an}var eo={},to,yc;function My(){return yc||(yc=1,to=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),to}var ro,vc;function jy(){if(vc)return ro;vc=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function n(l,i){try{return[decodeURIComponent(l.join(""))]}catch{}if(l.length===1)return l;i=i||1;var c=l.slice(0,i),u=l.slice(i);return Array.prototype.concat.call([],n(c),n(u))}function s(l){try{return decodeURIComponent(l)}catch{for(var i=l.match(t)||[],c=1;c<i.length;c++)l=n(i,c).join(""),i=l.match(t)||[];return l}}function o(l){for(var i={"%FE%FF":"��","%FF%FE":"��"},c=r.exec(l);c;){try{i[c[0]]=decodeURIComponent(c[0])}catch{var u=s(c[0]);u!==c[0]&&(i[c[0]]=u)}c=r.exec(l)}i["%C2"]="�";for(var a=Object.keys(i),d=0;d<a.length;d++){var f=a[d];l=l.replace(new RegExp(f,"g"),i[f])}return l}return ro=function(l){if(typeof l!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof l+"`");try{return l=l.replace(/\+/g," "),decodeURIComponent(l)}catch{return o(l)}},ro}var no,_c;function Fy(){return _c||(_c=1,no=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),no}var io,Ec;function Dy(){return Ec||(Ec=1,io=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),o=0;o<n.length;o++){var l=n[o],i=e[l];(s?t.indexOf(l)!==-1:t(l,i,e))&&(r[l]=i)}return r}),io}var wc;function Uy(){return wc||(wc=1,function(e){const t=My(),r=jy(),n=Fy(),s=Dy(),o=v=>v==null,l=Symbol("encodeFragmentIdentifier");function i(v){switch(v.arrayFormat){case"index":return w=>(A,T)=>{const M=A.length;return T===void 0||v.skipNull&&T===null||v.skipEmptyString&&T===""?A:T===null?[...A,[a(w,v),"[",M,"]"].join("")]:[...A,[a(w,v),"[",a(M,v),"]=",a(T,v)].join("")]};case"bracket":return w=>(A,T)=>T===void 0||v.skipNull&&T===null||v.skipEmptyString&&T===""?A:T===null?[...A,[a(w,v),"[]"].join("")]:[...A,[a(w,v),"[]=",a(T,v)].join("")];case"colon-list-separator":return w=>(A,T)=>T===void 0||v.skipNull&&T===null||v.skipEmptyString&&T===""?A:T===null?[...A,[a(w,v),":list="].join("")]:[...A,[a(w,v),":list=",a(T,v)].join("")];case"comma":case"separator":case"bracket-separator":{const w=v.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(T,M)=>M===void 0||v.skipNull&&M===null||v.skipEmptyString&&M===""?T:(M=M===null?"":M,T.length===0?[[a(A,v),w,a(M,v)].join("")]:[[T,a(M,v)].join(v.arrayFormatSeparator)])}default:return w=>(A,T)=>T===void 0||v.skipNull&&T===null||v.skipEmptyString&&T===""?A:T===null?[...A,a(w,v)]:[...A,[a(w,v),"=",a(T,v)].join("")]}}function c(v){let w;switch(v.arrayFormat){case"index":return(A,T,M)=>{if(w=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!w){M[A]=T;return}M[A]===void 0&&(M[A]={}),M[A][w[1]]=T};case"bracket":return(A,T,M)=>{if(w=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!w){M[A]=T;return}if(M[A]===void 0){M[A]=[T];return}M[A]=[].concat(M[A],T)};case"colon-list-separator":return(A,T,M)=>{if(w=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!w){M[A]=T;return}if(M[A]===void 0){M[A]=[T];return}M[A]=[].concat(M[A],T)};case"comma":case"separator":return(A,T,M)=>{const D=typeof T=="string"&&T.includes(v.arrayFormatSeparator),R=typeof T=="string"&&!D&&d(T,v).includes(v.arrayFormatSeparator);T=R?d(T,v):T;const W=D||R?T.split(v.arrayFormatSeparator).map(G=>d(G,v)):T===null?T:d(T,v);M[A]=W};case"bracket-separator":return(A,T,M)=>{const D=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!D){M[A]=T&&d(T,v);return}const R=T===null?[]:T.split(v.arrayFormatSeparator).map(W=>d(W,v));if(M[A]===void 0){M[A]=R;return}M[A]=[].concat(M[A],R)};default:return(A,T,M)=>{if(M[A]===void 0){M[A]=T;return}M[A]=[].concat(M[A],T)}}}function u(v){if(typeof v!="string"||v.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function a(v,w){return w.encode?w.strict?t(v):encodeURIComponent(v):v}function d(v,w){return w.decode?r(v):v}function f(v){return Array.isArray(v)?v.sort():typeof v=="object"?f(Object.keys(v)).sort((w,A)=>Number(w)-Number(A)).map(w=>v[w]):v}function p(v){const w=v.indexOf("#");return w!==-1&&(v=v.slice(0,w)),v}function h(v){let w="";const A=v.indexOf("#");return A!==-1&&(w=v.slice(A)),w}function y(v){v=p(v);const w=v.indexOf("?");return w===-1?"":v.slice(w+1)}function _(v,w){return w.parseNumbers&&!Number.isNaN(Number(v))&&typeof v=="string"&&v.trim()!==""?v=Number(v):w.parseBooleans&&v!==null&&(v.toLowerCase()==="true"||v.toLowerCase()==="false")&&(v=v.toLowerCase()==="true"),v}function S(v,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),u(w.arrayFormatSeparator);const A=c(w),T=Object.create(null);if(typeof v!="string"||(v=v.trim().replace(/^[?#&]/,""),!v))return T;for(const M of v.split("&")){if(M==="")continue;let[D,R]=n(w.decode?M.replace(/\+/g," "):M,"=");R=R===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?R:d(R,w),A(d(D,w),R,T)}for(const M of Object.keys(T)){const D=T[M];if(typeof D=="object"&&D!==null)for(const R of Object.keys(D))D[R]=_(D[R],w);else T[M]=_(D,w)}return w.sort===!1?T:(w.sort===!0?Object.keys(T).sort():Object.keys(T).sort(w.sort)).reduce((M,D)=>{const R=T[D];return R&&typeof R=="object"&&!Array.isArray(R)?M[D]=f(R):M[D]=R,M},Object.create(null))}e.extract=y,e.parse=S,e.stringify=(v,w)=>{if(!v)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),u(w.arrayFormatSeparator);const A=R=>w.skipNull&&o(v[R])||w.skipEmptyString&&v[R]==="",T=i(w),M={};for(const R of Object.keys(v))A(R)||(M[R]=v[R]);const D=Object.keys(M);return w.sort!==!1&&D.sort(w.sort),D.map(R=>{const W=v[R];return W===void 0?"":W===null?a(R,w):Array.isArray(W)?W.length===0&&w.arrayFormat==="bracket-separator"?a(R,w)+"[]":W.reduce(T(R),[]).join("&"):a(R,w)+"="+a(W,w)}).filter(R=>R.length>0).join("&")},e.parseUrl=(v,w)=>{w=Object.assign({decode:!0},w);const[A,T]=n(v,"#");return Object.assign({url:A.split("?")[0]||"",query:S(y(v),w)},w&&w.parseFragmentIdentifier&&T?{fragmentIdentifier:d(T,w)}:{})},e.stringifyUrl=(v,w)=>{w=Object.assign({encode:!0,strict:!0,[l]:!0},w);const A=p(v.url).split("?")[0]||"",T=e.extract(v.url),M=e.parse(T,{sort:!1}),D=Object.assign(M,v.query);let R=e.stringify(D,w);R&&(R=`?${R}`);let W=h(v.url);return v.fragmentIdentifier&&(W=`#${w[l]?a(v.fragmentIdentifier,w):v.fragmentIdentifier}`),`${A}${R}${W}`},e.pick=(v,w,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[l]:!1},A);const{url:T,query:M,fragmentIdentifier:D}=e.parseUrl(v,A);return e.stringifyUrl({url:T,query:s(M,w),fragmentIdentifier:D},A)},e.exclude=(v,w,A)=>{const T=Array.isArray(w)?M=>!w.includes(M):(M,D)=>!w(M,D);return e.pick(v,T,A)}}(eo)),eo}var bc;function $y(){return bc||(bc=1,function(e,t){(function(r,n){e.exports=n(Ly(),Uy())})(le,function(r,n){return function(){var s={897:function(c){c.exports=r},48:function(c){c.exports=n}},o={};function l(c){var u=o[c];if(u!==void 0)return u.exports;var a=o[c]={exports:{}};return s[c](a,a.exports,l),a.exports}l.d=function(c,u){for(var a in u)l.o(u,a)&&!l.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:u[a]})},l.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},l.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var i={};return function(){l.r(i),l.d(i,{getEntries:function(){return K},getEntry:function(){return H},setContext:function(){return y}});var c=l(897),u=l(48),a={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:d,SPACE:f,HOSTS:p}}=a;let h={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:p.CDN,space:f};const y=({apiKey:V,environment:P,isPreview:q=!1,location:Y,previewKey:ie,space:ee=null})=>{h.apiKey=V,h.previewKey=ie,h.environment=(Q=>{if(!Q)throw new Error("Cannot map environment: Environment not defined");if(!d[Q])throw new Error(`Cannot map environment: No mapping found for environment ${Q}`);return d[Q]})(P),h.isPreview=q||(Q=>{let Z=!1;if(Q&&Q.search){const oe=(0,u.parse)(Q.search);Z=oe.isPreview&&oe.isPreview==="true"}return Z})(Y),h.space=ee||f},_=(V=!1)=>{const{apiKey:P,environment:q,isPreview:Y,previewKey:ie,space:ee}=h;return Y===!0||V===!0?{accessToken:ie,environment:q,host:p.PREVIEW,space:ee}:{accessToken:P,environment:q,host:p.CDN,space:ee}},S=V=>typeof V=="object"&&V!==null,v=V=>Array.isArray(V)&&V.length,w=V=>{if(!S(V))throw new Error("Cannot flatten fields");const{fields:P,sys:q}=V;if(!P)throw new Error("Cannot flatten fields");let Y={...P};if(S(q)){const{contentType:ie,createdAt:ee,updatedAt:Q}=q;ie&&Object.assign(Y,{contentType:ie.sys.id}),ee&&Object.assign(Y,{createdAt:ee}),Q&&Object.assign(Y,{updatedAt:Q})}return Y},{CONTENTFUL:{LOCALES:A}}=a,T=(V,P)=>S(V)&&((q,Y)=>Object.prototype.hasOwnProperty.call(q,Y))(V,P),M=(V,P)=>{const q=(Y=>A.SUPPORTED.includes(Y)?Y:A.DEFAULT)(P);return T(V,q)?V[q]:T(V,A.DEFAULT)?V[A.DEFAULT]:V},D=V=>S(V)&&V.sys&&V.sys.type==="Asset",R=(V,P,q)=>{const{title:Y,file:ie}=w(V);if(!ie)throw new Error("Cannot flatten asset");const{contentType:ee,fileName:Q,url:Z,details:oe}=M(ie,P);if(!Z)throw new Error("Cannot flatten asset");return q?{description:Y||Q,height:oe&&oe.image&&oe.image.height,type:ee,url:Z,width:oe&&oe.image&&oe.image.width}:Z},W=V=>S(V)&&V.sys&&V.sys.type==="Entry",G=(V,P,q)=>{const Y={},ie=((ee,Q)=>{const Z={};for(const[oe,Te]of Object.entries(ee))Z[oe]=M(Te,Q);return Z})(w(V),P);for(const[ee,Q]of Object.entries(ie))D(Q)?Y[ee]=R(Q,P,q):W(Q)?Y[ee]=G(Q,P,q):v(Q)?Y[ee]=Q.map(Z=>D(Z)?R(Z,P,q):W(Z)?G(Z,P,q):Z):Y[ee]=Q;return Y},L=({items:V})=>{if(!v(V))throw new Error("Cannot read items");return V},$=async(V,P)=>{const q=_(P);return await(await(0,c.createClient)(q)).getEntries(V)},H=async(V={},P={},q=!1)=>((Y,{flatten:ie=!0,locale:ee="en",assetDetails:Q=!1})=>{const Z=L(Y);return ie?G(Z[0],ee,Q):Z[0]})(await $(V,q),{...V,...P}),K=async(V={},P={},q=!1)=>((Y,{flatten:ie=!0,locale:ee="en",assetDetails:Q=!1})=>{const Z=L(Y);return ie?((oe,Te,ne)=>oe.map(te=>G(te,Te,ne)))(Z,ee,Q):Z})(await $(V,q),{...V,...P})}(),i}()})}(li)),li.exports}var oo={exports:{}},ao={exports:{}},so={exports:{}},co={exports:{}},Sc;function _a(){return Sc||(Sc=1,function(e,t){(function(r,n){e.exports=n()})(le,function(){function r(y){return!isNaN(parseFloat(y))&&isFinite(y)}function n(y){return y.charAt(0).toUpperCase()+y.substring(1)}function s(y){return function(){return this[y]}}var o=["isConstructor","isEval","isNative","isToplevel"],l=["columnNumber","lineNumber"],i=["fileName","functionName","source"],c=["args"],u=["evalOrigin"],a=o.concat(l,i,c,u);function d(y){if(y)for(var _=0;_<a.length;_++)y[a[_]]!==void 0&&this["set"+n(a[_])](y[a[_]])}d.prototype={getArgs:function(){return this.args},setArgs:function(y){if(Object.prototype.toString.call(y)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=y},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(y){if(y instanceof d)this.evalOrigin=y;else if(y instanceof Object)this.evalOrigin=new d(y);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var y=this.getFileName()||"",_=this.getLineNumber()||"",S=this.getColumnNumber()||"",v=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+_+":"+S+")":"[eval]:"+_+":"+S:v?v+" ("+y+":"+_+":"+S+")":y+":"+_+":"+S}},d.fromString=function(_){var S=_.indexOf("("),v=_.lastIndexOf(")"),w=_.substring(0,S),A=_.substring(S+1,v).split(","),T=_.substring(v+1);if(T.indexOf("@")===0)var M=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(T,""),D=M[1],R=M[2],W=M[3];return new d({functionName:w,args:A||void 0,fileName:D,lineNumber:R||void 0,columnNumber:W||void 0})};for(var f=0;f<o.length;f++)d.prototype["get"+n(o[f])]=s(o[f]),d.prototype["set"+n(o[f])]=function(y){return function(_){this[y]=!!_}}(o[f]);for(var p=0;p<l.length;p++)d.prototype["get"+n(l[p])]=s(l[p]),d.prototype["set"+n(l[p])]=function(y){return function(_){if(!r(_))throw new TypeError(y+" must be a Number");this[y]=Number(_)}}(l[p]);for(var h=0;h<i.length;h++)d.prototype["get"+n(i[h])]=s(i[h]),d.prototype["set"+n(i[h])]=function(y){return function(_){this[y]=String(_)}}(i[h]);return d})}(co)),co.exports}var Tc;function By(){return Tc||(Tc=1,function(e,t){(function(r,n){e.exports=n(_a())})(le,function(n){var s=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,l=/^(eval@)?(\[native code])?$/;return{parse:function(c){if(typeof c.stacktrace<"u"||typeof c["opera#sourceloc"]<"u")return this.parseOpera(c);if(c.stack&&c.stack.match(o))return this.parseV8OrIE(c);if(c.stack)return this.parseFFOrSafari(c);throw new Error("Cannot parse given Error object")},extractLocation:function(c){if(c.indexOf(":")===-1)return[c];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,a=u.exec(c.replace(/[()]/g,""));return[a[1],a[2]||void 0,a[3]||void 0]},parseV8OrIE:function(c){var u=c.stack.split(`
42
- `).filter(function(a){return!!a.match(o)},this);return u.map(function(a){a.indexOf("(eval ")>-1&&(a=a.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var d=a.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),f=d.match(/ (\(.+\)$)/);d=f?d.replace(f[0],""):d;var p=this.extractLocation(f?f[1]:d),h=f&&d||void 0,y=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:h,fileName:y,lineNumber:p[1],columnNumber:p[2],source:a})},this)},parseFFOrSafari:function(c){var u=c.stack.split(`
43
- `).filter(function(a){return!a.match(l)},this);return u.map(function(a){if(a.indexOf(" > eval")>-1&&(a=a.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),a.indexOf("@")===-1&&a.indexOf(":")===-1)return new n({functionName:a});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=a.match(d),p=f&&f[1]?f[1]:void 0,h=this.extractLocation(a.replace(d,""));return new n({functionName:p,fileName:h[0],lineNumber:h[1],columnNumber:h[2],source:a})},this)},parseOpera:function(c){return!c.stacktrace||c.message.indexOf(`
44
- `)>-1&&c.message.split(`
45
- `).length>c.stacktrace.split(`
46
- `).length?this.parseOpera9(c):c.stack?this.parseOpera11(c):this.parseOpera10(c)},parseOpera9:function(c){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,a=c.message.split(`
47
- `),d=[],f=2,p=a.length;f<p;f+=2){var h=u.exec(a[f]);h&&d.push(new n({fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera10:function(c){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,a=c.stacktrace.split(`
48
- `),d=[],f=0,p=a.length;f<p;f+=2){var h=u.exec(a[f]);h&&d.push(new n({functionName:h[3]||void 0,fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera11:function(c){var u=c.stack.split(`
49
- `).filter(function(a){return!!a.match(s)&&!a.match(/^Error created at/)},this);return u.map(function(a){var d=a.split("@"),f=this.extractLocation(d.pop()),p=d.shift()||"",h=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new n({functionName:h,args:_,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:a})},this)}}})}(so)),so.exports}var uo={exports:{}},Oc;function qy(){return Oc||(Oc=1,function(e,t){(function(r,n){e.exports=n(_a())})(le,function(r){return{backtrace:function(s){var o=[],l=10;typeof s=="object"&&typeof s.maxStackSize=="number"&&(l=s.maxStackSize);for(var i=arguments.callee;i&&o.length<l&&i.arguments;){for(var c=new Array(i.arguments.length),u=0;u<c.length;++u)c[u]=i.arguments[u];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?o.push(new r({functionName:RegExp.$1||void 0,args:c})):o.push(new r({args:c}));try{i=i.caller}catch{break}}return o}}})}(uo)),uo.exports}var lo={exports:{}},gr={},fo={},Ac;function vl(){return Ac||(Ac=1,function(e){function t(v,w,A){if(w in v)return v[w];if(arguments.length===3)return A;throw new Error('"'+w+'" is a required argument.')}e.getArg=t;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function s(v){var w=v.match(r);return w?{scheme:w[1],auth:w[2],host:w[3],port:w[4],path:w[5]}:null}e.urlParse=s;function o(v){var w="";return v.scheme&&(w+=v.scheme+":"),w+="//",v.auth&&(w+=v.auth+"@"),v.host&&(w+=v.host),v.port&&(w+=":"+v.port),v.path&&(w+=v.path),w}e.urlGenerate=o;function l(v){var w=v,A=s(v);if(A){if(!A.path)return v;w=A.path}for(var T=e.isAbsolute(w),M=w.split(/\/+/),D,R=0,W=M.length-1;W>=0;W--)D=M[W],D==="."?M.splice(W,1):D===".."?R++:R>0&&(D===""?(M.splice(W+1,R),R=0):(M.splice(W,2),R--));return w=M.join("/"),w===""&&(w=T?"/":"."),A?(A.path=w,o(A)):w}e.normalize=l;function i(v,w){v===""&&(v="."),w===""&&(w=".");var A=s(w),T=s(v);if(T&&(v=T.path||"/"),A&&!A.scheme)return T&&(A.scheme=T.scheme),o(A);if(A||w.match(n))return w;if(T&&!T.host&&!T.path)return T.host=w,o(T);var M=w.charAt(0)==="/"?w:l(v.replace(/\/+$/,"")+"/"+w);return T?(T.path=M,o(T)):M}e.join=i,e.isAbsolute=function(v){return v.charAt(0)==="/"||!!v.match(r)};function c(v,w){v===""&&(v="."),v=v.replace(/\/$/,"");for(var A=0;w.indexOf(v+"/")!==0;){var T=v.lastIndexOf("/");if(T<0||(v=v.slice(0,T),v.match(/^([^\/]+:\/)?\/*$/)))return w;++A}return Array(A+1).join("../")+w.substr(v.length+1)}e.relative=c;var u=function(){var v=Object.create(null);return!("__proto__"in v)}();function a(v){return v}function d(v){return p(v)?"$"+v:v}e.toSetString=u?a:d;function f(v){return p(v)?v.slice(1):v}e.fromSetString=u?a:f;function p(v){if(!v)return!1;var w=v.length;if(w<9||v.charCodeAt(w-1)!==95||v.charCodeAt(w-2)!==95||v.charCodeAt(w-3)!==111||v.charCodeAt(w-4)!==116||v.charCodeAt(w-5)!==111||v.charCodeAt(w-6)!==114||v.charCodeAt(w-7)!==112||v.charCodeAt(w-8)!==95||v.charCodeAt(w-9)!==95)return!1;for(var A=w-10;A>=0;A--)if(v.charCodeAt(A)!==36)return!1;return!0}function h(v,w,A){var T=v.source-w.source;return T!==0||(T=v.originalLine-w.originalLine,T!==0)||(T=v.originalColumn-w.originalColumn,T!==0||A)||(T=v.generatedColumn-w.generatedColumn,T!==0)||(T=v.generatedLine-w.generatedLine,T!==0)?T:v.name-w.name}e.compareByOriginalPositions=h;function y(v,w,A){var T=v.generatedLine-w.generatedLine;return T!==0||(T=v.generatedColumn-w.generatedColumn,T!==0||A)||(T=v.source-w.source,T!==0)||(T=v.originalLine-w.originalLine,T!==0)||(T=v.originalColumn-w.originalColumn,T!==0)?T:v.name-w.name}e.compareByGeneratedPositionsDeflated=y;function _(v,w){return v===w?0:v>w?1:-1}function S(v,w){var A=v.generatedLine-w.generatedLine;return A!==0||(A=v.generatedColumn-w.generatedColumn,A!==0)||(A=_(v.source,w.source),A!==0)||(A=v.originalLine-w.originalLine,A!==0)||(A=v.originalColumn-w.originalColumn,A!==0)?A:_(v.name,w.name)}e.compareByGeneratedPositionsInflated=S}(fo)),fo}var po={},xc;function Hy(){return xc||(xc=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(r,n,s,o,l,i){var c=Math.floor((n-r)/2)+r,u=l(s,o[c],!0);return u===0?c:u>0?n-c>1?t(c,n,s,o,l,i):i==e.LEAST_UPPER_BOUND?n<o.length?n:-1:c:c-r>1?t(r,c,s,o,l,i):i==e.LEAST_UPPER_BOUND?c:r<0?-1:r}e.search=function(n,s,o,l){if(s.length===0)return-1;var i=t(-1,s.length,n,s,o,l||e.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&o(s[i],s[i-1],!0)===0;)--i;return i}}(po)),po}var ho={},Rc;function Wy(){if(Rc)return ho;Rc=1;var e=vl(),t=Object.prototype.hasOwnProperty;function r(){this._array=[],this._set=Object.create(null)}return r.fromArray=function(s,o){for(var l=new r,i=0,c=s.length;i<c;i++)l.add(s[i],o);return l},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(s,o){var l=e.toSetString(s),i=t.call(this._set,l),c=this._array.length;(!i||o)&&this._array.push(s),i||(this._set[l]=c)},r.prototype.has=function(s){var o=e.toSetString(s);return t.call(this._set,o)},r.prototype.indexOf=function(s){var o=e.toSetString(s);if(t.call(this._set,o))return this._set[o];throw new Error('"'+s+'" is not in the set.')},r.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},r.prototype.toArray=function(){return this._array.slice()},ho.ArraySet=r,ho}var En={},wn={},Cc;function Gy(){if(Cc)return wn;Cc=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return wn.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},wn.decode=function(t){var r=65,n=90,s=97,o=122,l=48,i=57,c=43,u=47,a=26,d=52;return r<=t&&t<=n?t-r:s<=t&&t<=o?t-s+a:l<=t&&t<=i?t-l+d:t==c?62:t==u?63:-1},wn}var Pc;function Vy(){if(Pc)return En;Pc=1;var e=Gy(),t=5,r=1<<t,n=r-1,s=r;function o(i){return i<0?(-i<<1)+1:(i<<1)+0}function l(i){var c=(i&1)===1,u=i>>1;return c?-u:u}return En.encode=function(c){var u="",a,d=o(c);do a=d&n,d>>>=t,d>0&&(a|=s),u+=e.encode(a);while(d>0);return u},En.decode=function(c,u,a){var d=c.length,f=0,p=0,h,y;do{if(u>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(y=e.decode(c.charCodeAt(u++)),y===-1)throw new Error("Invalid base64 digit: "+c.charAt(u-1));h=!!(y&s),y&=n,f=f+(y<<p),p+=t}while(h);a.value=l(f),a.rest=u},En}var mo={},Nc;function Qy(){if(Nc)return mo;Nc=1;function e(n,s,o){var l=n[s];n[s]=n[o],n[o]=l}function t(n,s){return Math.round(n+Math.random()*(s-n))}function r(n,s,o,l){if(o<l){var i=t(o,l),c=o-1;e(n,i,l);for(var u=n[l],a=o;a<l;a++)s(n[a],u)<=0&&(c+=1,e(n,c,a));e(n,c+1,a);var d=c+1;r(n,s,o,d-1),r(n,s,d+1,l)}}return mo.quickSort=function(n,s){r(n,s,0,n.length-1)},mo}var Ic;function zy(){if(Ic)return gr;Ic=1;var e=vl(),t=Hy(),r=Wy().ArraySet,n=Vy(),s=Qy().quickSort;function o(u){var a=u;return typeof u=="string"&&(a=JSON.parse(u.replace(/^\)\]\}'/,""))),a.sections!=null?new c(a):new l(a)}o.fromSourceMap=function(u){return l.fromSourceMap(u)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(a,d){var f=a.charAt(d);return f===";"||f===","},o.prototype._parseMappings=function(a,d){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(a,d,f){var p=d||null,h=f||o.GENERATED_ORDER,y;switch(h){case o.GENERATED_ORDER:y=this._generatedMappings;break;case o.ORIGINAL_ORDER:y=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;y.map(function(S){var v=S.source===null?null:this._sources.at(S.source);return v!=null&&_!=null&&(v=e.join(_,v)),{source:v,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(a,p)},o.prototype.allGeneratedPositionsFor=function(a){var d=e.getArg(a,"line"),f={source:e.getArg(a,"source"),originalLine:d,originalColumn:e.getArg(a,"column",0)};if(this.sourceRoot!=null&&(f.source=e.relative(this.sourceRoot,f.source)),!this._sources.has(f.source))return[];f.source=this._sources.indexOf(f.source);var p=[],h=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(h>=0){var y=this._originalMappings[h];if(a.column===void 0)for(var _=y.originalLine;y&&y.originalLine===_;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h];else for(var S=y.originalColumn;y&&y.originalLine===d&&y.originalColumn==S;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h]}return p},gr.SourceMapConsumer=o;function l(u){var a=u;typeof u=="string"&&(a=JSON.parse(u.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sources"),p=e.getArg(a,"names",[]),h=e.getArg(a,"sourceRoot",null),y=e.getArg(a,"sourcesContent",null),_=e.getArg(a,"mappings"),S=e.getArg(a,"file",null);if(d!=this._version)throw new Error("Unsupported version: "+d);f=f.map(String).map(e.normalize).map(function(v){return h&&e.isAbsolute(h)&&e.isAbsolute(v)?e.relative(h,v):v}),this._names=r.fromArray(p.map(String),!0),this._sources=r.fromArray(f,!0),this.sourceRoot=h,this.sourcesContent=y,this._mappings=_,this.file=S}l.prototype=Object.create(o.prototype),l.prototype.consumer=o,l.fromSourceMap=function(a){var d=Object.create(l.prototype),f=d._names=r.fromArray(a._names.toArray(),!0),p=d._sources=r.fromArray(a._sources.toArray(),!0);d.sourceRoot=a._sourceRoot,d.sourcesContent=a._generateSourcesContent(d._sources.toArray(),d.sourceRoot),d.file=a._file;for(var h=a._mappings.toArray().slice(),y=d.__generatedMappings=[],_=d.__originalMappings=[],S=0,v=h.length;S<v;S++){var w=h[S],A=new i;A.generatedLine=w.generatedLine,A.generatedColumn=w.generatedColumn,w.source&&(A.source=p.indexOf(w.source),A.originalLine=w.originalLine,A.originalColumn=w.originalColumn,w.name&&(A.name=f.indexOf(w.name)),_.push(A)),y.push(A)}return s(d.__originalMappings,e.compareByOriginalPositions),d},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map(function(u){return this.sourceRoot!=null?e.join(this.sourceRoot,u):u},this)}});function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}l.prototype._parseMappings=function(a,d){for(var f=1,p=0,h=0,y=0,_=0,S=0,v=a.length,w=0,A={},T={},M=[],D=[],R,W,G,L,$;w<v;)if(a.charAt(w)===";")f++,w++,p=0;else if(a.charAt(w)===",")w++;else{for(R=new i,R.generatedLine=f,L=w;L<v&&!this._charIsMappingSeparator(a,L);L++);if(W=a.slice(w,L),G=A[W],G)w+=W.length;else{for(G=[];w<L;)n.decode(a,w,T),$=T.value,w=T.rest,G.push($);if(G.length===2)throw new Error("Found a source, but no line and column");if(G.length===3)throw new Error("Found a source and line, but no column");A[W]=G}R.generatedColumn=p+G[0],p=R.generatedColumn,G.length>1&&(R.source=_+G[1],_+=G[1],R.originalLine=h+G[2],h=R.originalLine,R.originalLine+=1,R.originalColumn=y+G[3],y=R.originalColumn,G.length>4&&(R.name=S+G[4],S+=G[4])),D.push(R),typeof R.originalLine=="number"&&M.push(R)}s(D,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,s(M,e.compareByOriginalPositions),this.__originalMappings=M},l.prototype._findMapping=function(a,d,f,p,h,y){if(a[f]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+a[f]);if(a[p]<0)throw new TypeError("Column must be greater than or equal to 0, got "+a[p]);return t.search(a,d,h,y)},l.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var d=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var f=this._generatedMappings[a+1];if(d.generatedLine===f.generatedLine){d.lastGeneratedColumn=f.generatedColumn-1;continue}}d.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=this._findMapping(d,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(f>=0){var p=this._generatedMappings[f];if(p.generatedLine===d.generatedLine){var h=e.getArg(p,"source",null);h!==null&&(h=this._sources.at(h),this.sourceRoot!=null&&(h=e.join(this.sourceRoot,h)));var y=e.getArg(p,"name",null);return y!==null&&(y=this._names.at(y)),{source:h,line:e.getArg(p,"originalLine",null),column:e.getArg(p,"originalColumn",null),name:y}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},l.prototype.sourceContentFor=function(a,d){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(a=e.relative(this.sourceRoot,a)),this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];var f;if(this.sourceRoot!=null&&(f=e.urlParse(this.sourceRoot))){var p=a.replace(/^file:\/\//,"");if(f.scheme=="file"&&this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];if((!f.path||f.path=="/")&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(a){var d=e.getArg(a,"source");if(this.sourceRoot!=null&&(d=e.relative(this.sourceRoot,d)),!this._sources.has(d))return{line:null,column:null,lastColumn:null};d=this._sources.indexOf(d);var f={source:d,originalLine:e.getArg(a,"line"),originalColumn:e.getArg(a,"column")},p=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(p>=0){var h=this._originalMappings[p];if(h.source===f.source)return{line:e.getArg(h,"generatedLine",null),column:e.getArg(h,"generatedColumn",null),lastColumn:e.getArg(h,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},gr.BasicSourceMapConsumer=l;function c(u){var a=u;typeof u=="string"&&(a=JSON.parse(u.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sections");if(d!=this._version)throw new Error("Unsupported version: "+d);this._sources=new r,this._names=new r;var p={line:-1,column:0};this._sections=f.map(function(h){if(h.url)throw new Error("Support for url field in sections not implemented.");var y=e.getArg(h,"offset"),_=e.getArg(y,"line"),S=e.getArg(y,"column");if(_<p.line||_===p.line&&S<p.column)throw new Error("Section offsets must be ordered and non-overlapping.");return p=y,{generatedOffset:{generatedLine:_+1,generatedColumn:S+1},consumer:new o(e.getArg(h,"map"))}})}return c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var u=[],a=0;a<this._sections.length;a++)for(var d=0;d<this._sections[a].consumer.sources.length;d++)u.push(this._sections[a].consumer.sources[d]);return u}}),c.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=t.search(d,this._sections,function(h,y){var _=h.generatedLine-y.generatedOffset.generatedLine;return _||h.generatedColumn-y.generatedOffset.generatedColumn}),p=this._sections[f];return p?p.consumer.originalPositionFor({line:d.generatedLine-(p.generatedOffset.generatedLine-1),column:d.generatedColumn-(p.generatedOffset.generatedLine===d.generatedLine?p.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(a,d){for(var f=0;f<this._sections.length;f++){var p=this._sections[f],h=p.consumer.sourceContentFor(a,!0);if(h)return h}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(a){for(var d=0;d<this._sections.length;d++){var f=this._sections[d];if(f.consumer.sources.indexOf(e.getArg(a,"source"))!==-1){var p=f.consumer.generatedPositionFor(a);if(p){var h={line:p.line+(f.generatedOffset.generatedLine-1),column:p.column+(f.generatedOffset.generatedLine===p.line?f.generatedOffset.generatedColumn-1:0)};return h}}}return{line:null,column:null}},c.prototype._parseMappings=function(a,d){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++)for(var p=this._sections[f],h=p.consumer._generatedMappings,y=0;y<h.length;y++){var _=h[y],S=p.consumer._sources.at(_.source);p.consumer.sourceRoot!==null&&(S=e.join(p.consumer.sourceRoot,S)),this._sources.add(S),S=this._sources.indexOf(S);var v=p.consumer._names.at(_.name);this._names.add(v),v=this._names.indexOf(v);var w={source:S,generatedLine:_.generatedLine+(p.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(p.generatedOffset.generatedLine===_.generatedLine?p.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:v};this.__generatedMappings.push(w),typeof w.originalLine=="number"&&this.__originalMappings.push(w)}s(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),s(this.__originalMappings,e.compareByOriginalPositions)},gr.IndexedSourceMapConsumer=c,gr}var kc;function Yy(){return kc||(kc=1,function(e,t){(function(r,n){e.exports=n(zy(),_a())})(le,function(r,n){function s(f){return new Promise(function(p,h){var y=new XMLHttpRequest;y.open("get",f),y.onerror=h,y.onreadystatechange=function(){y.readyState===4&&(y.status>=200&&y.status<300||f.substr(0,7)==="file://"&&y.responseText?p(y.responseText):h(new Error("HTTP status: "+y.status+" retrieving "+f)))},y.send()})}function o(f){if(typeof window<"u"&&window.atob)return window.atob(f);throw new Error("You must supply a polyfill for window.atob in this environment")}function l(f){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(f);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function i(f,p){for(var h=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],y=f.split(`
50
- `),_="",S=Math.min(p,20),v=0;v<S;++v){var w=y[p-v-1],A=w.indexOf("//");if(A>=0&&(w=w.substr(0,A)),w){_=w+_;for(var T=h.length,M=0;M<T;M++){var D=h[M].exec(_);if(D&&D[1])return D[1]}}}}function c(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function u(f){if(typeof f!="object")throw new TypeError("Given StackFrame is not an object");if(typeof f.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof f.lineNumber!="number"||f.lineNumber%1!==0||f.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof f.columnNumber!="number"||f.columnNumber%1!==0||f.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function a(f){for(var p=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,h,y;y=p.exec(f);)h=y[1];if(h)return h;throw new Error("sourceMappingURL not found")}function d(f,p,h){return new Promise(function(y,_){var S=p.originalPositionFor({line:f.lineNumber,column:f.columnNumber});if(S.source){var v=p.sourceContentFor(S.source);v&&(h[S.source]=v),y(new n({functionName:S.name||f.functionName,args:f.args,fileName:S.source,lineNumber:S.line,columnNumber:S.column}))}else _(new Error("Could not get original source for given stackframe and source map"))})}return function f(p){if(!(this instanceof f))return new f(p);p=p||{},this.sourceCache=p.sourceCache||{},this.sourceMapConsumerCache=p.sourceMapConsumerCache||{},this.ajax=p.ajax||s,this._atob=p.atob||o,this._get=function(y){return new Promise((function(_,S){var v=y.substr(0,5)==="data:";if(this.sourceCache[y])_(this.sourceCache[y]);else if(p.offline&&!v)S(new Error("Cannot make network requests in offline mode"));else if(v){var w=/^data:application\/json;([\w=:"-]+;)*base64,/,A=y.match(w);if(A){var T=A[0].length,M=y.substr(T),D=this._atob(M);this.sourceCache[y]=D,_(D)}else S(new Error("The encoding of the inline sourcemap is not supported"))}else{var R=this.ajax(y,{method:"get"});this.sourceCache[y]=R,R.then(_,S)}}).bind(this))},this._getSourceMapConsumer=function(y,_){return new Promise((function(S){if(this.sourceMapConsumerCache[y])S(this.sourceMapConsumerCache[y]);else{var v=new Promise((function(w,A){return this._get(y).then(function(T){typeof T=="string"&&(T=l(T.replace(/^\)\]\}'/,""))),typeof T.sourceRoot>"u"&&(T.sourceRoot=_),w(new r.SourceMapConsumer(T))}).catch(A)}).bind(this));this.sourceMapConsumerCache[y]=v,S(v)}}).bind(this))},this.pinpoint=function(y){return new Promise((function(_,S){this.getMappedLocation(y).then((function(v){function w(){_(v)}this.findFunctionName(v).then(_,w).catch(w)}).bind(this),S)}).bind(this))},this.findFunctionName=function(y){return new Promise((function(_,S){u(y),this._get(y.fileName).then(function(w){var A=y.lineNumber,T=y.columnNumber,M=i(w,A);_(M?new n({functionName:M,args:y.args,fileName:y.fileName,lineNumber:A,columnNumber:T}):y)},S).catch(S)}).bind(this))},this.getMappedLocation=function(y){return new Promise((function(_,S){c(),u(y);var v=this.sourceCache,w=y.fileName;this._get(w).then((function(A){var T=a(A),M=T.substr(0,5)==="data:",D=w.substring(0,w.lastIndexOf("/")+1);return T[0]!=="/"&&!M&&!/^https?:\/\/|^\/\//i.test(T)&&(T=D+T),this._getSourceMapConsumer(T,D).then(function(R){return d(y,R,v).then(_).catch(function(){_(y)})})}).bind(this),S).catch(S)}).bind(this))}}})}(lo)),lo.exports}var Lc;function Jy(){return Lc||(Lc=1,function(e,t){(function(r,n){e.exports=n(By(),qy(),Yy())})(le,function(n,s,o){var l={filter:function(d){return(d.functionName||"").indexOf("StackTrace$$")===-1&&(d.functionName||"").indexOf("ErrorStackParser$$")===-1&&(d.functionName||"").indexOf("StackTraceGPS$$")===-1&&(d.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},i=function(){try{throw new Error}catch(f){return f}};function c(d,f){var p={};return[d,f].forEach(function(h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}),p}function u(d){return d.stack||d["opera#sourceloc"]}function a(d,f){return typeof f=="function"?d.filter(f):d}return{get:function(f){var p=i();return u(p)?this.fromError(p,f):this.generateArtificially(f)},getSync:function(f){f=c(l,f);var p=i(),h=u(p)?n.parse(p):s.backtrace(f);return a(h,f.filter)},fromError:function(f,p){p=c(l,p);var h=new o(p);return new Promise((function(y){var _=a(n.parse(f),p.filter);y(Promise.all(_.map(function(S){return new Promise(function(v){function w(){v(S)}h.pinpoint(S).then(v,w).catch(w)})})))}).bind(this))},generateArtificially:function(f){f=c(l,f);var p=s.backtrace(f);return typeof f.filter=="function"&&(p=p.filter(f.filter)),Promise.resolve(p)},instrument:function(f,p,h,y){if(typeof f!="function")throw new Error("Cannot instrument non-function object");if(typeof f.__stacktraceOriginalFn=="function")return f;var _=(function(){try{return this.get().then(p,h).catch(h),f.apply(y||this,arguments)}catch(v){throw u(v)&&this.fromError(v).then(p,h).catch(h),v}}).bind(this);return _.__stacktraceOriginalFn=f,_},deinstrument:function(f){if(typeof f!="function")throw new Error("Cannot de-instrument non-function object");return typeof f.__stacktraceOriginalFn=="function"?f.__stacktraceOriginalFn:f},report:function(f,p,h,y){return new Promise(function(_,S){var v=new XMLHttpRequest;if(v.onerror=S,v.onreadystatechange=function(){v.readyState===4&&(v.status>=200&&v.status<400?_(v.responseText):S(new Error("POST to "+p+" failed with status: "+v.status)))},v.open("post",p),v.setRequestHeader("Content-Type","application/json"),y&&typeof y.headers=="object"){var w=y.headers;for(var A in w)Object.prototype.hasOwnProperty.call(w,A)&&v.setRequestHeader(A,w[A])}var T={stack:f};h!=null&&(T.message=h),v.send(JSON.stringify(T))})}}})}(ao)),ao.exports}var go,Mc;function Ky(){if(Mc)return go;Mc=1;var e=Jy(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",r=function(){};r.prototype.start=function(l){if(!l.key&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!l.projectId&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=l.customReportingFunction,this.apiKey=l.key,this.projectId=l.projectId,this.targetUrl=l.targetUrl,this.context=l.context||{},this.serviceContext={service:l.service||"web"},l.version&&(this.serviceContext.version=l.version),this.reportUncaughtExceptions=l.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=l.reportUnhandledPromiseRejections!==!1,this.disabled=!!l.disabled,n(this)};function n(l){var i=function(){};if(l.reportUncaughtExceptions){var c=window.onerror||i;window.onerror=function(a,d,f,p,h){return h&&l.report(h).catch(i),c(a,d,f,p,h),!0}}if(l.reportUnhandledPromiseRejections){var u=window.onunhandledrejection||i;window.onunhandledrejection=function(a){return a&&l.report(a.reason).catch(i),u(a.reason),!0}}}r.prototype.report=function(l,i){if(this.disabled)return Promise.resolve(null);if(!l)return Promise.reject(new Error("no error to report"));i=i||{};var c={};c.serviceContext=this.serviceContext,c.context=this.context,c.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var u=0;if(typeof l=="string"||l instanceof String){try{throw new Error(l)}catch(f){l=f}u=i.skipLocalFrames||1}var a=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,d=this.customReportingFunction;return s(l,u).then(function(f){return c.message=f,d?d(c):o(a,c)})};function s(l,i){return e.fromError(l).then(function(c){for(var u=[l.toString()],a=i;a<c.length;a++)u.push([" at ",c[a].getFunctionName()||"<anonymous>"," (",c[a].getFileName(),":",c[a].getLineNumber(),":",c[a].getColumnNumber(),")"].join(""));return u.join(`
51
- `)},function(c){return["Error extracting stack trace: ",c,`
41
+ `),n}return!0}function cl(e){var t=Object.getOwnPropertyNames(e),n=bg(t),r;try{for(n.s();!(r=n.n()).done;){var s=r.value,o=e[s];o&&Yo(o)==="object"&&cl(o)}}catch(l){n.e(l)}finally{n.f()}return Object.freeze(e)}function Mg(e){return cl(e.sys||{}),e}function Qs(){var e=Rg();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],s=["Win32","Win64","Windows","WinCE"],o=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":o.indexOf(n)!==-1?"iOS":s.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function Dg(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}function Ug(e,t,n,r){var s=[];t&&s.push("app ".concat(t)),n&&s.push("integration ".concat(n)),r&&s.push("feature "+r),s.push("sdk ".concat(e));var o=null;try{xg()?(o=Qs(),s.push("platform ReactNative")):Tg()?(o=Dg(),s.push("platform node.js/".concat(Ag()))):(o=Qs(),s.push("platform browser"))}catch{o=null}return o&&s.push("os ".concat(o)),"".concat(s.filter(function(l){return l!==""}).join("; "),";")}function Bg(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return Ot(this)}})}function $g(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var s="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(s)}if(!dn(n)||!dn(t))throw e;var o=n==null?void 0:n.data,l={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};dn(t)&&(l.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),o&&dn(o)&&("requestId"in o&&(l.requestId=o.requestId||"UNKNOWN"),"message"in o&&(l.message=o.message||""),"details"in o&&(l.details=o.details||{}),"sys"in o&&"id"in o.sys&&(r=o.sys.id));var i=new Error;i.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{i.message=JSON.stringify(l,null," ")}catch{var u;i.message=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:""}throw i}const qg=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:sl,createRequestConfig:Fg,enforceObjPath:jg,errorHandler:$g,freezeSys:Mg,getUserAgentHeader:Ug,toPlainObject:Bg},Symbol.toStringTag,{value:"Module"})),ct=qr(qg);var pn={},ur={},hn={},zs;function Hg(){if(zs)return hn;zs=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.wrapSpace=t;var e=ct;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return hn}var lr={},eo={exports:{}},Ys;function er(){return Ys||(Ys=1,function(e,t){(function(n,r){e.exports=r()})(ce,function(){var n=Function.prototype.toString,r=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,c=Object.prototype,a=c.hasOwnProperty,d=c.propertyIsEnumerable,f=typeof i=="function",p=typeof WeakMap=="function",h=function(){if(p)return function(){return new WeakMap};var D=function(){function R(){this._keys=[],this._values=[]}return R.prototype.has=function(W){return!!~this._keys.indexOf(W)},R.prototype.get=function(W){return this._values[this._keys.indexOf(W)]},R.prototype.set=function(W,V){this._keys.push(W),this._values.push(V)},R}();return function(){return new D}}(),y=function(D,R){var W=D.__proto__||u(D);if(!W)return r(null);var V=W.constructor;if(V===R.Object)return W===R.Object.prototype?{}:r(W);if(~n.call(V).indexOf("[native code]"))try{return new V}catch{}return r(W)},_=function(D,R,W,V){var L=y(D,R);V.set(D,L);for(var U in D)a.call(D,U)&&(L[U]=W(D[U],V));if(f)for(var $=i(D),K=0,Q=$.length,C=void 0;K<Q;++K)C=$[K],d.call(D,C)&&(L[C]=W(D[C],V));return L},S=function(D,R,W,V){var L=y(D,R);V.set(D,L);for(var U=f?l(D).concat(i(D)):l(D),$=0,K=U.length,Q=void 0,C=void 0;$<K;++$)if(Q=U[$],Q!=="callee"&&Q!=="caller")if(C=o(D,Q),C){!C.get&&!C.set&&(C.value=W(D[Q],V));try{s(L,Q,C)}catch{L[Q]=C.value}}else L[Q]=W(D[Q],V);return L},v=function(D){var R="";return D.global&&(R+="g"),D.ignoreCase&&(R+="i"),D.multiline&&(R+="m"),D.unicode&&(R+="u"),D.sticky&&(R+="y"),R},w=Array.isArray,x=Object.getPrototypeOf,O=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ce<"u"?ce:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function F(D,R){var W=!!(R&&R.isStrict),V=R&&R.realm||O,L=W?S:_,U=function($,K){if(!$||typeof $!="object")return $;if(K.has($))return K.get($);var Q=$.__proto__||x($),C=Q&&Q.constructor;if(!C||C===V.Object)return L($,V,U,K);var q;if(w($)){if(W)return S($,V,U,K);q=new C,K.set($,q);for(var Y=0,oe=$.length;Y<oe;++Y)q[Y]=U($[Y],K);return q}if($ instanceof V.Date)return new C($.getTime());if($ instanceof V.RegExp)return q=new C($.source,$.flags||v($)),q.lastIndex=$.lastIndex,q;if(V.Map&&$ instanceof V.Map)return q=new C,K.set($,q),$.forEach(function(ee,G){q.set(G,U(ee,K))}),q;if(V.Set&&$ instanceof V.Set)return q=new C,K.set($,q),$.forEach(function(ee){q.add(U(ee,K))}),q;if(V.Blob&&$ instanceof V.Blob)return $.slice(0,$.size,$.type);if(V.Buffer&&V.Buffer.isBuffer($))return q=V.Buffer.allocUnsafe?V.Buffer.allocUnsafe($.length):new C($.length),K.set($,q),$.copy(q),q;if(V.ArrayBuffer){if(V.ArrayBuffer.isView($))return q=new C($.buffer.slice(0)),K.set($,q),q;if($ instanceof V.ArrayBuffer)return q=$.slice(0),K.set($,q),q}return typeof $.then=="function"||$ instanceof Error||V.WeakMap&&$ instanceof V.WeakMap||V.WeakSet&&$ instanceof V.WeakSet?$:L($,V,U,K)};return U(D,h())}return F.default=F,F.strict=function(R,W){return F(R,{isStrict:!0,realm:W?W.realm:void 0})},F})}(eo)),eo.exports}var mn={},gn={exports:{}},Ks;function Wg(){return Ks||(Ks=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(s,o,l,i){return JSON.stringify(s,r(o,i),l)}function r(s,o){var l=[],i=[];return o==null&&(o=function(u,c){return l[0]===c?"[Circular ~]":"[Circular ~."+i.slice(0,l.indexOf(c)).join(".")+"]"}),function(u,c){if(l.length>0){var a=l.indexOf(this);~a?l.splice(a+1):l.push(this),~a?i.splice(a,1/0,u):i.push(u),~l.indexOf(c)&&(c=o.call(this,u,c))}else l.push(c);return s==null?c:s.call(this,u,c)}}}(gn,gn.exports)),gn.exports}var Js;function ul(){if(Js)return mn;Js=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=n;var e=t(Wg());function t(r){return r&&r.__esModule?r:{default:r}}function n(r){return Object.defineProperty(r,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,s,o,(l,i)=>({sys:{type:"Link",linkType:"Entry",id:i.sys.id,circular:!0}}))}})}return mn}var Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vg=function(){function e(t,n){var r=[],s=!0,o=!1,l=void 0;try{for(var i=t[Symbol.iterator](),u;!(s=(u=i.next()).done)&&(r.push(u.value),!(n&&r.length===n));s=!0);}catch(c){o=!0,l=c}finally{try{!s&&i.return&&i.return()}finally{if(o)throw l}}return r}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function fr(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var Ur={},Qg=function(t){return t&&t.sys&&t.sys.type==="Link"},zg=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},Yg=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},Xs=function(t,n){var r=n.entryId,s=n.linkType,o=n.spaceId,l=n.environmentId;return o&&l?t.get(o+"!"+l+"!"+s+"!"+r):t.get(s+"!"+r)},Kg=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),s=Vg(r,4);s[0];var o=s[1],l=s[2],i=l===void 0?"master":l,u=s[3];return{spaceId:o,environmentId:i,entryId:u}}},Jg=function(t,n){var r=n.sys,s=r.type,o=r.linkType;if(s==="ResourceLink"){var l=n.sys.urn,i=Kg(l),u=i.spaceId,c=i.environmentId,a=i.entryId,d=o.split(":")[1];return Xs(t,{linkType:d,entryId:a,spaceId:u,environmentId:c})||Ur}var f=n.sys.id;return Xs(t,{linkType:o,entryId:f})||Ur},Xg=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==Ur});for(var n in t)t[n]===Ur&&delete t[n];return t},Zg=function e(t,n,r,s){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":Gg(t))==="object"){for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],n,r,s));s&&(t=Xg(t))}return t},ey=function(t,n,r){var s=Jg(t,n);return s===Ur?r?s:n:s},ty=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(s){return n.indexOf(s)!==-1});return r.reduce(function(s,o){return s[o]=t[o],s},{})},ry=function(t,n){if(n=n||{},!t.items)return[];var r=Ot(t),s=Object.keys(r.includes||{}).reduce(function(i,u){return[].concat(fr(i),fr(t.includes[u]))},[]),o=[].concat(fr(r.items),fr(s)).filter(function(i){return!!i.sys}),l=new Map(o.reduce(function(i,u){var c=Yg(u.sys).map(function(a){return[a,u]});return i.push.apply(i,fr(c)),i},[]));return o.forEach(function(i){var u=ty(i,n.itemEntryPoints);Object.assign(i,Zg(u,function(c){return Qg(c)||zg(c)},function(c){return ey(l,c,n.removeUnresolved)},n.removeUnresolved))}),r.items};const ny=Object.freeze(Object.defineProperty({__proto__:null,default:ry},Symbol.toStringTag,{value:"Module"})),ll=qr(ny);var Zs;function iy(){if(Zs)return lr;Zs=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.wrapEntry=o,lr.wrapEntryCollection=l;var e=s(er()),t=ct,n=s(ul()),r=s(ll);function s(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function l(i,u){let{resolveLinks:c,removeUnresolved:a}=u;const d=(0,n.default)((0,t.toPlainObject)((0,e.default)(i)));return c&&(d.items=(0,r.default)(d,{removeUnresolved:a,itemEntryPoints:["fields"]})),(0,t.freezeSys)(d)}return lr}var dr={},ec;function oy(){if(ec)return dr;ec=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.wrapAsset=r,dr.wrapAssetCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return dr}var yn={},tc;function ay(){if(tc)return yn;tc=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.wrapAssetKey=r;var e=n(er()),t=ct;function n(s){return s&&s.__esModule?s:{default:s}}function r(s){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(s)))}return yn}var pr={},rc;function sy(){if(rc)return pr;rc=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.wrapContentType=r,pr.wrapContentTypeCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return pr}var hr={},nc;function cy(){if(nc)return hr;nc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.wrapLocale=r,hr.wrapLocaleCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return hr}var mr={},ic;function uy(){if(ic)return mr;ic=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.wrapTag=r,mr.wrapTagCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return mr}var oc;function ly(){if(oc)return ur;oc=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=void 0;var e=u(Hg()),t=u(iy()),n=u(oy()),r=u(ay()),s=u(sy()),o=u(cy()),l=u(uy());function i(a){if(typeof WeakMap!="function")return null;var d=new WeakMap,f=new WeakMap;return(i=function(p){return p?f:d})(a)}function u(a,d){if(!d&&a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var f=i(d);if(f&&f.has(a))return f.get(a);var p={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in a)if(y!=="default"&&Object.prototype.hasOwnProperty.call(a,y)){var _=h?Object.getOwnPropertyDescriptor(a,y):null;_&&(_.get||_.set)?Object.defineProperty(p,y,_):p[y]=a[y]}return p.default=a,f&&f.set(a,p),p}var c={space:e,entry:t,asset:n,assetKey:r,contentType:s,locale:o,tag:l};return ur.default=c,ur}var vn={},ac;function fy(){if(ac)return vn;ac=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=i;var e=ct,t=r(ll),n=r(ul());function r(d){return d&&d.__esModule?d:{default:d}}function s(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function o(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?s(Object(p),!0).forEach(function(h){l(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function l(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}async function i(d,f){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!f||!f.initial&&!f.nextSyncToken&&!f.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(f&&f.content_type&&!f.type)f.type="Entry";else if(f&&f.content_type&&f.type&&f.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const h={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:y,removeUnresolved:_,paginate:S}=o(o({},h),p),w=await c(d,[],f,{paginate:S});y&&(w.items=(0,t.default)(w,{removeUnresolved:_,itemEntryPoints:["fields"]}));const x=u(w.items);return w.nextSyncToken&&(x.nextSyncToken=w.nextSyncToken),w.nextPageToken&&(x.nextPageToken=w.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(x)))}function u(d){const f=p=>(h,y)=>(y.sys.type===p&&h.push((0,e.toPlainObject)(y)),h);return{entries:d.reduce(f("Entry"),[]),assets:d.reduce(f("Asset"),[]),deletedEntries:d.reduce(f("DeletedEntry"),[]),deletedAssets:d.reduce(f("DeletedAsset"),[])}}async function c(d,f,p,h){let{paginate:y}=h;p.nextSyncToken&&(p.sync_token=p.nextSyncToken,delete p.nextSyncToken),p.nextPageToken&&(p.sync_token=p.nextPageToken,delete p.nextPageToken),p.sync_token&&(delete p.initial,delete p.type,delete p.content_type,delete p.limit);const S=(await d.get("sync",(0,e.createRequestConfig)({query:p}))).data||{};return f=f.concat(S.items||[]),S.nextPageUrl?y?(delete p.initial,p.sync_token=a(S.nextPageUrl),c(d,f,p,{paginate:y})):{items:f,nextPageToken:a(S.nextPageUrl)}:S.nextSyncUrl?{items:f,nextSyncToken:a(S.nextSyncUrl)}:{items:[]}}function a(d){const f=d.split("?");return f.length>0?f[1].replace("sync_token=",""):""}return vn}var _n={},sc;function dy(){if(sc)return _n;sc=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=r;function e(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);o&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),l.push.apply(l,i)}return l}function t(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?e(Object(l),!0).forEach(function(i){n(s,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):e(Object(l)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(l,i))})}return s}function n(s,o,l){return o in s?Object.defineProperty(s,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[o]=l,s}function r(s){if(!s.select)return s;const o=Array.isArray(s.select)?s.select:s.select.split(","),l=new Set(o);return l.has("sys")?s:(l.add("sys.id"),l.add("sys.type"),t(t({},s),{},{select:[...l].join(",")}))}return _n}var qt={},cc;function py(){if(cc)return qt;cc=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.ValidationError=void 0,qt.default=t;class e extends Error{constructor(r,s){super(`Invalid "${r}" provided, `+s),this.name="ValidationError"}}qt.ValidationError=e;function t(n,r,s){if(s=s||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(s.maximum&&r>s.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${s.maximum})`);if(s.now&&r<s.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${s.now}`)}return qt}var uc;function hy(){if(uc)return pn;uc=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.default=a;var e=ct,t=o(ly()),n=o(fy()),r=o(dy()),s=o(py());function o(d){return d&&d.__esModule?d:{default:d}}function l(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function i(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?l(Object(p),!0).forEach(function(h){u(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):l(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function u(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}const c=48*60*60;function a(d){let{http:f,getGlobalOptions:p}=d;const{wrapSpace:h}=t.default.space,{wrapContentType:y,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:S,wrapEntryCollection:v}=t.default.entry,{wrapAsset:w,wrapAssetCollection:x}=t.default.asset,{wrapTag:O,wrapTagCollection:F}=t.default.tag,{wrapAssetKey:D}=t.default.assetKey,{wrapLocaleCollection:R}=t.default.locale,W=ie=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:ie,environment:p().environment,space:p().space},re};async function V(){Oe(f);try{const ie=await f.get("/");return h(ie.data)}catch(ie){(0,e.errorHandler)(ie)}}async function L(ie){ae(f);try{const re=await f.get(`content_types/${ie}`);return y(re.data)}catch(re){(0,e.errorHandler)(re)}}async function U(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);try{const re=await f.get("content_types",(0,e.createRequestConfig)({query:ie}));return _(re.data)}catch(re){(0,e.errorHandler)(re)}}async function $(ie){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ie)throw W(ie);try{const te=await this.getEntries(i({"sys.id":ie},re));if(te.items.length>0)return S(te.items[0]);throw W(ie)}catch(te){(0,e.errorHandler)(te)}}async function K(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);const{resolveLinks:re,removeUnresolved:te}=p(ie);ie=(0,r.default)(ie);try{const we=await f.get("entries",(0,e.createRequestConfig)({query:ie}));return v(we.data,{resolveLinks:re,removeUnresolved:te})}catch(we){(0,e.errorHandler)(we)}}async function Q(ie){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ae(f),re=(0,r.default)(re);try{const te=await f.get(`assets/${ie}`,(0,e.createRequestConfig)({query:re}));return w(te.data)}catch(te){(0,e.errorHandler)(te)}}async function C(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f),ie=(0,r.default)(ie);try{const re=await f.get("assets",(0,e.createRequestConfig)({query:ie}));return x(re.data)}catch(re){(0,e.errorHandler)(re)}}async function q(ie){ae(f);try{const re=await f.get(`tags/${ie}`);return O(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f),ie=(0,r.default)(ie);try{const re=await f.get("tags",(0,e.createRequestConfig)({query:ie}));return F(re.data)}catch(re){(0,e.errorHandler)(re)}}async function oe(ie){ae(f);try{const re=Math.floor(Date.now()/1e3),te=re+c;(0,s.default)("expiresAt",ie,{maximum:te,now:re});const we={expiresAt:ie},Ne=await f.post("asset_keys",we);return D(Ne.data)}catch(re){(0,e.errorHandler)(re)}}async function ee(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);try{const re=await f.get("locales",(0,e.createRequestConfig)({query:ie}));return R(re.data)}catch(re){(0,e.errorHandler)(re)}}async function G(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:te,removeUnresolved:we}=p(ie);return ae(f),(0,n.default)(f,ie,i({resolveLinks:te,removeUnresolved:we},re))}function Z(ie){const{resolveLinks:re,removeUnresolved:te}=p({});return v(ie,{resolveLinks:re,removeUnresolved:te})}function ae(ie){ie.defaults.baseURL=p().environmentBaseUrl}function Oe(ie){ie.defaults.baseURL=p().spaceBaseUrl}return{getSpace:V,getContentType:L,getContentTypes:U,getEntry:$,getEntries:K,getAsset:Q,getAssets:C,getTag:q,getTags:Y,createAssetKey:oe,getLocales:ee,parseEntries:Z,sync:G}}return pn}var En={},lc;function my(){if(lc)return En;lc=1,Object.defineProperty(En,"__esModule",{value:!0}),En.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return En}var fc;function gy(){if(fc)return sn;fc=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.createClient=u;var e=s(Du()),t=ct,n=s(hy()),r=s(my());function s(c){return c&&c.__esModule?c:{default:c}}function o(c,a){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(c);a&&(f=f.filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable})),d.push.apply(d,f)}return d}function l(c){for(var a=1;a<arguments.length;a++){var d=arguments[a]!=null?arguments[a]:{};a%2?o(Object(d),!0).forEach(function(f){i(c,f,d[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):o(Object(d)).forEach(function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))})}return c}function i(c,a,d){return a in c?Object.defineProperty(c,a,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[a]=d,c}function u(c){if(!c.accessToken)throw new TypeError("Expected parameter accessToken");if(!c.space)throw new TypeError("Expected parameter space");const d=l(l({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),c),f=(0,t.getUserAgentHeader)("contentful.js/9.1.34",d.application,d.integration);d.headers=l(l({},d.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":f});const p=(0,t.createHttpClient)(e.default,d),h=(0,r.default)({resolveLinks:d.resolveLinks,environment:d.environment,removeUnresolved:d.removeUnresolved,spaceBaseUrl:p.defaults.baseURL,environmentBaseUrl:`${p.defaults.baseURL}environments/${d.environment}`});return p.defaults.baseURL=h().environmentBaseUrl,(0,n.default)({http:p,getGlobalOptions:h})}return sn}var to={},ro,dc;function yy(){return dc||(dc=1,ro=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),ro}var no,pc;function vy(){if(pc)return no;pc=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(l,i){try{return[decodeURIComponent(l.join(""))]}catch{}if(l.length===1)return l;i=i||1;var u=l.slice(0,i),c=l.slice(i);return Array.prototype.concat.call([],r(u),r(c))}function s(l){try{return decodeURIComponent(l)}catch{for(var i=l.match(t)||[],u=1;u<i.length;u++)l=r(i,u).join(""),i=l.match(t)||[];return l}}function o(l){for(var i={"%FE%FF":"��","%FF%FE":"��"},u=n.exec(l);u;){try{i[u[0]]=decodeURIComponent(u[0])}catch{var c=s(u[0]);c!==u[0]&&(i[u[0]]=c)}u=n.exec(l)}i["%C2"]="�";for(var a=Object.keys(i),d=0;d<a.length;d++){var f=a[d];l=l.replace(new RegExp(f,"g"),i[f])}return l}return no=function(l){if(typeof l!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof l+"`");try{return l=l.replace(/\+/g," "),decodeURIComponent(l)}catch{return o(l)}},no}var io,hc;function _y(){return hc||(hc=1,io=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}),io}var oo,mc;function Ey(){return mc||(mc=1,oo=function(e,t){for(var n={},r=Object.keys(e),s=Array.isArray(t),o=0;o<r.length;o++){var l=r[o],i=e[l];(s?t.indexOf(l)!==-1:t(l,i,e))&&(n[l]=i)}return n}),oo}var gc;function wy(){return gc||(gc=1,function(e){const t=yy(),n=vy(),r=_y(),s=Ey(),o=v=>v==null,l=Symbol("encodeFragmentIdentifier");function i(v){switch(v.arrayFormat){case"index":return w=>(x,O)=>{const F=x.length;return O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),"[",F,"]"].join("")]:[...x,[a(w,v),"[",a(F,v),"]=",a(O,v)].join("")]};case"bracket":return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),"[]"].join("")]:[...x,[a(w,v),"[]=",a(O,v)].join("")];case"colon-list-separator":return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),":list="].join("")]:[...x,[a(w,v),":list=",a(O,v)].join("")];case"comma":case"separator":case"bracket-separator":{const w=v.arrayFormat==="bracket-separator"?"[]=":"=";return x=>(O,F)=>F===void 0||v.skipNull&&F===null||v.skipEmptyString&&F===""?O:(F=F===null?"":F,O.length===0?[[a(x,v),w,a(F,v)].join("")]:[[O,a(F,v)].join(v.arrayFormatSeparator)])}default:return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,a(w,v)]:[...x,[a(w,v),"=",a(O,v)].join("")]}}function u(v){let w;switch(v.arrayFormat){case"index":return(x,O,F)=>{if(w=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!w){F[x]=O;return}F[x]===void 0&&(F[x]={}),F[x][w[1]]=O};case"bracket":return(x,O,F)=>{if(w=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!w){F[x]=O;return}if(F[x]===void 0){F[x]=[O];return}F[x]=[].concat(F[x],O)};case"colon-list-separator":return(x,O,F)=>{if(w=/(:list)$/.exec(x),x=x.replace(/:list$/,""),!w){F[x]=O;return}if(F[x]===void 0){F[x]=[O];return}F[x]=[].concat(F[x],O)};case"comma":case"separator":return(x,O,F)=>{const D=typeof O=="string"&&O.includes(v.arrayFormatSeparator),R=typeof O=="string"&&!D&&d(O,v).includes(v.arrayFormatSeparator);O=R?d(O,v):O;const W=D||R?O.split(v.arrayFormatSeparator).map(V=>d(V,v)):O===null?O:d(O,v);F[x]=W};case"bracket-separator":return(x,O,F)=>{const D=/(\[\])$/.test(x);if(x=x.replace(/\[\]$/,""),!D){F[x]=O&&d(O,v);return}const R=O===null?[]:O.split(v.arrayFormatSeparator).map(W=>d(W,v));if(F[x]===void 0){F[x]=R;return}F[x]=[].concat(F[x],R)};default:return(x,O,F)=>{if(F[x]===void 0){F[x]=O;return}F[x]=[].concat(F[x],O)}}}function c(v){if(typeof v!="string"||v.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function a(v,w){return w.encode?w.strict?t(v):encodeURIComponent(v):v}function d(v,w){return w.decode?n(v):v}function f(v){return Array.isArray(v)?v.sort():typeof v=="object"?f(Object.keys(v)).sort((w,x)=>Number(w)-Number(x)).map(w=>v[w]):v}function p(v){const w=v.indexOf("#");return w!==-1&&(v=v.slice(0,w)),v}function h(v){let w="";const x=v.indexOf("#");return x!==-1&&(w=v.slice(x)),w}function y(v){v=p(v);const w=v.indexOf("?");return w===-1?"":v.slice(w+1)}function _(v,w){return w.parseNumbers&&!Number.isNaN(Number(v))&&typeof v=="string"&&v.trim()!==""?v=Number(v):w.parseBooleans&&v!==null&&(v.toLowerCase()==="true"||v.toLowerCase()==="false")&&(v=v.toLowerCase()==="true"),v}function S(v,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const x=u(w),O=Object.create(null);if(typeof v!="string"||(v=v.trim().replace(/^[?#&]/,""),!v))return O;for(const F of v.split("&")){if(F==="")continue;let[D,R]=r(w.decode?F.replace(/\+/g," "):F,"=");R=R===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?R:d(R,w),x(d(D,w),R,O)}for(const F of Object.keys(O)){const D=O[F];if(typeof D=="object"&&D!==null)for(const R of Object.keys(D))D[R]=_(D[R],w);else O[F]=_(D,w)}return w.sort===!1?O:(w.sort===!0?Object.keys(O).sort():Object.keys(O).sort(w.sort)).reduce((F,D)=>{const R=O[D];return R&&typeof R=="object"&&!Array.isArray(R)?F[D]=f(R):F[D]=R,F},Object.create(null))}e.extract=y,e.parse=S,e.stringify=(v,w)=>{if(!v)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const x=R=>w.skipNull&&o(v[R])||w.skipEmptyString&&v[R]==="",O=i(w),F={};for(const R of Object.keys(v))x(R)||(F[R]=v[R]);const D=Object.keys(F);return w.sort!==!1&&D.sort(w.sort),D.map(R=>{const W=v[R];return W===void 0?"":W===null?a(R,w):Array.isArray(W)?W.length===0&&w.arrayFormat==="bracket-separator"?a(R,w)+"[]":W.reduce(O(R),[]).join("&"):a(R,w)+"="+a(W,w)}).filter(R=>R.length>0).join("&")},e.parseUrl=(v,w)=>{w=Object.assign({decode:!0},w);const[x,O]=r(v,"#");return Object.assign({url:x.split("?")[0]||"",query:S(y(v),w)},w&&w.parseFragmentIdentifier&&O?{fragmentIdentifier:d(O,w)}:{})},e.stringifyUrl=(v,w)=>{w=Object.assign({encode:!0,strict:!0,[l]:!0},w);const x=p(v.url).split("?")[0]||"",O=e.extract(v.url),F=e.parse(O,{sort:!1}),D=Object.assign(F,v.query);let R=e.stringify(D,w);R&&(R=`?${R}`);let W=h(v.url);return v.fragmentIdentifier&&(W=`#${w[l]?a(v.fragmentIdentifier,w):v.fragmentIdentifier}`),`${x}${R}${W}`},e.pick=(v,w,x)=>{x=Object.assign({parseFragmentIdentifier:!0,[l]:!1},x);const{url:O,query:F,fragmentIdentifier:D}=e.parseUrl(v,x);return e.stringifyUrl({url:O,query:s(F,w),fragmentIdentifier:D},x)},e.exclude=(v,w,x)=>{const O=Array.isArray(w)?F=>!w.includes(F):(F,D)=>!w(F,D);return e.pick(v,O,x)}}(to)),to}var yc;function by(){return yc||(yc=1,function(e,t){(function(n,r){e.exports=r(gy(),wy())})(ce,function(n,r){return function(){var s={897:function(u){u.exports=n},48:function(u){u.exports=r}},o={};function l(u){var c=o[u];if(c!==void 0)return c.exports;var a=o[u]={exports:{}};return s[u](a,a.exports,l),a.exports}l.d=function(u,c){for(var a in c)l.o(c,a)&&!l.o(u,a)&&Object.defineProperty(u,a,{enumerable:!0,get:c[a]})},l.o=function(u,c){return Object.prototype.hasOwnProperty.call(u,c)},l.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var i={};return function(){l.r(i),l.d(i,{getEntries:function(){return K},getEntry:function(){return $},setContext:function(){return y}});var u=l(897),c=l(48),a={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:d,SPACE:f,HOSTS:p}}=a;let h={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:p.CDN,space:f};const y=({apiKey:Q,environment:C,isPreview:q=!1,location:Y,previewKey:oe,space:ee=null})=>{h.apiKey=Q,h.previewKey=oe,h.environment=(G=>{if(!G)throw new Error("Cannot map environment: Environment not defined");if(!d[G])throw new Error(`Cannot map environment: No mapping found for environment ${G}`);return d[G]})(C),h.isPreview=q||(G=>{let Z=!1;if(G&&G.search){const ae=(0,c.parse)(G.search);Z=ae.isPreview&&ae.isPreview==="true"}return Z})(Y),h.space=ee||f},_=(Q=!1)=>{const{apiKey:C,environment:q,isPreview:Y,previewKey:oe,space:ee}=h;return Y===!0||Q===!0?{accessToken:oe,environment:q,host:p.PREVIEW,space:ee}:{accessToken:C,environment:q,host:p.CDN,space:ee}},S=Q=>typeof Q=="object"&&Q!==null,v=Q=>Array.isArray(Q)&&Q.length,w=Q=>{if(!S(Q))throw new Error("Cannot flatten fields");const{fields:C,sys:q}=Q;if(!C)throw new Error("Cannot flatten fields");let Y={...C};if(S(q)){const{contentType:oe,createdAt:ee,updatedAt:G}=q;oe&&Object.assign(Y,{contentType:oe.sys.id}),ee&&Object.assign(Y,{createdAt:ee}),G&&Object.assign(Y,{updatedAt:G})}return Y},{CONTENTFUL:{LOCALES:x}}=a,O=(Q,C)=>S(Q)&&((q,Y)=>Object.prototype.hasOwnProperty.call(q,Y))(Q,C),F=(Q,C)=>{const q=(Y=>x.SUPPORTED.includes(Y)?Y:x.DEFAULT)(C);return O(Q,q)?Q[q]:O(Q,x.DEFAULT)?Q[x.DEFAULT]:Q},D=Q=>S(Q)&&Q.sys&&Q.sys.type==="Asset",R=(Q,C,q)=>{const{title:Y,file:oe}=w(Q);if(!oe)throw new Error("Cannot flatten asset");const{contentType:ee,fileName:G,url:Z,details:ae}=F(oe,C);if(!Z)throw new Error("Cannot flatten asset");return q?{description:Y||G,height:ae&&ae.image&&ae.image.height,type:ee,url:Z,width:ae&&ae.image&&ae.image.width}:Z},W=Q=>S(Q)&&Q.sys&&Q.sys.type==="Entry",V=(Q,C,q)=>{const Y={},oe=((ee,G)=>{const Z={};for(const[ae,Oe]of Object.entries(ee))Z[ae]=F(Oe,G);return Z})(w(Q),C);for(const[ee,G]of Object.entries(oe))D(G)?Y[ee]=R(G,C,q):W(G)?Y[ee]=V(G,C,q):v(G)?Y[ee]=G.map(Z=>D(Z)?R(Z,C,q):W(Z)?V(Z,C,q):Z):Y[ee]=G;return Y},L=({items:Q})=>{if(!v(Q))throw new Error("Cannot read items");return Q},U=async(Q,C)=>{const q=_(C);return await(await(0,u.createClient)(q)).getEntries(Q)},$=async(Q={},C={},q=!1)=>((Y,{flatten:oe=!0,locale:ee="en",assetDetails:G=!1})=>{const Z=L(Y);return oe?V(Z[0],ee,G):Z[0]})(await U(Q,q),{...Q,...C}),K=async(Q={},C={},q=!1)=>((Y,{flatten:oe=!0,locale:ee="en",assetDetails:G=!1})=>{const Z=L(Y);return oe?((ae,Oe,ie)=>ae.map(re=>V(re,Oe,ie)))(Z,ee,G):Z})(await U(Q,q),{...Q,...C})}(),i}()})}(li)),li.exports}var ao={exports:{}},so={exports:{}},co={exports:{}},uo={exports:{}},vc;function va(){return vc||(vc=1,function(e,t){(function(n,r){e.exports=r()})(ce,function(){function n(y){return!isNaN(parseFloat(y))&&isFinite(y)}function r(y){return y.charAt(0).toUpperCase()+y.substring(1)}function s(y){return function(){return this[y]}}var o=["isConstructor","isEval","isNative","isToplevel"],l=["columnNumber","lineNumber"],i=["fileName","functionName","source"],u=["args"],c=["evalOrigin"],a=o.concat(l,i,u,c);function d(y){if(y)for(var _=0;_<a.length;_++)y[a[_]]!==void 0&&this["set"+r(a[_])](y[a[_]])}d.prototype={getArgs:function(){return this.args},setArgs:function(y){if(Object.prototype.toString.call(y)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=y},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(y){if(y instanceof d)this.evalOrigin=y;else if(y instanceof Object)this.evalOrigin=new d(y);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var y=this.getFileName()||"",_=this.getLineNumber()||"",S=this.getColumnNumber()||"",v=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+_+":"+S+")":"[eval]:"+_+":"+S:v?v+" ("+y+":"+_+":"+S+")":y+":"+_+":"+S}},d.fromString=function(_){var S=_.indexOf("("),v=_.lastIndexOf(")"),w=_.substring(0,S),x=_.substring(S+1,v).split(","),O=_.substring(v+1);if(O.indexOf("@")===0)var F=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(O,""),D=F[1],R=F[2],W=F[3];return new d({functionName:w,args:x||void 0,fileName:D,lineNumber:R||void 0,columnNumber:W||void 0})};for(var f=0;f<o.length;f++)d.prototype["get"+r(o[f])]=s(o[f]),d.prototype["set"+r(o[f])]=function(y){return function(_){this[y]=!!_}}(o[f]);for(var p=0;p<l.length;p++)d.prototype["get"+r(l[p])]=s(l[p]),d.prototype["set"+r(l[p])]=function(y){return function(_){if(!n(_))throw new TypeError(y+" must be a Number");this[y]=Number(_)}}(l[p]);for(var h=0;h<i.length;h++)d.prototype["get"+r(i[h])]=s(i[h]),d.prototype["set"+r(i[h])]=function(y){return function(_){this[y]=String(_)}}(i[h]);return d})}(uo)),uo.exports}var _c;function Sy(){return _c||(_c=1,function(e,t){(function(n,r){e.exports=r(va())})(ce,function(r){var s=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,l=/^(eval@)?(\[native code])?$/;return{parse:function(u){if(typeof u.stacktrace<"u"||typeof u["opera#sourceloc"]<"u")return this.parseOpera(u);if(u.stack&&u.stack.match(o))return this.parseV8OrIE(u);if(u.stack)return this.parseFFOrSafari(u);throw new Error("Cannot parse given Error object")},extractLocation:function(u){if(u.indexOf(":")===-1)return[u];var c=/(.+?)(?::(\d+))?(?::(\d+))?$/,a=c.exec(u.replace(/[()]/g,""));return[a[1],a[2]||void 0,a[3]||void 0]},parseV8OrIE:function(u){var c=u.stack.split(`
42
+ `).filter(function(a){return!!a.match(o)},this);return c.map(function(a){a.indexOf("(eval ")>-1&&(a=a.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var d=a.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),f=d.match(/ (\(.+\)$)/);d=f?d.replace(f[0],""):d;var p=this.extractLocation(f?f[1]:d),h=f&&d||void 0,y=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new r({functionName:h,fileName:y,lineNumber:p[1],columnNumber:p[2],source:a})},this)},parseFFOrSafari:function(u){var c=u.stack.split(`
43
+ `).filter(function(a){return!a.match(l)},this);return c.map(function(a){if(a.indexOf(" > eval")>-1&&(a=a.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),a.indexOf("@")===-1&&a.indexOf(":")===-1)return new r({functionName:a});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=a.match(d),p=f&&f[1]?f[1]:void 0,h=this.extractLocation(a.replace(d,""));return new r({functionName:p,fileName:h[0],lineNumber:h[1],columnNumber:h[2],source:a})},this)},parseOpera:function(u){return!u.stacktrace||u.message.indexOf(`
44
+ `)>-1&&u.message.split(`
45
+ `).length>u.stacktrace.split(`
46
+ `).length?this.parseOpera9(u):u.stack?this.parseOpera11(u):this.parseOpera10(u)},parseOpera9:function(u){for(var c=/Line (\d+).*script (?:in )?(\S+)/i,a=u.message.split(`
47
+ `),d=[],f=2,p=a.length;f<p;f+=2){var h=c.exec(a[f]);h&&d.push(new r({fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera10:function(u){for(var c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,a=u.stacktrace.split(`
48
+ `),d=[],f=0,p=a.length;f<p;f+=2){var h=c.exec(a[f]);h&&d.push(new r({functionName:h[3]||void 0,fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera11:function(u){var c=u.stack.split(`
49
+ `).filter(function(a){return!!a.match(s)&&!a.match(/^Error created at/)},this);return c.map(function(a){var d=a.split("@"),f=this.extractLocation(d.pop()),p=d.shift()||"",h=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new r({functionName:h,args:_,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:a})},this)}}})}(co)),co.exports}var lo={exports:{}},Ec;function Oy(){return Ec||(Ec=1,function(e,t){(function(n,r){e.exports=r(va())})(ce,function(n){return{backtrace:function(s){var o=[],l=10;typeof s=="object"&&typeof s.maxStackSize=="number"&&(l=s.maxStackSize);for(var i=arguments.callee;i&&o.length<l&&i.arguments;){for(var u=new Array(i.arguments.length),c=0;c<u.length;++c)u[c]=i.arguments[c];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?o.push(new n({functionName:RegExp.$1||void 0,args:u})):o.push(new n({args:u}));try{i=i.caller}catch{break}}return o}}})}(lo)),lo.exports}var fo={exports:{}},gr={},po={},wc;function fl(){return wc||(wc=1,function(e){function t(v,w,x){if(w in v)return v[w];if(arguments.length===3)return x;throw new Error('"'+w+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function s(v){var w=v.match(n);return w?{scheme:w[1],auth:w[2],host:w[3],port:w[4],path:w[5]}:null}e.urlParse=s;function o(v){var w="";return v.scheme&&(w+=v.scheme+":"),w+="//",v.auth&&(w+=v.auth+"@"),v.host&&(w+=v.host),v.port&&(w+=":"+v.port),v.path&&(w+=v.path),w}e.urlGenerate=o;function l(v){var w=v,x=s(v);if(x){if(!x.path)return v;w=x.path}for(var O=e.isAbsolute(w),F=w.split(/\/+/),D,R=0,W=F.length-1;W>=0;W--)D=F[W],D==="."?F.splice(W,1):D===".."?R++:R>0&&(D===""?(F.splice(W+1,R),R=0):(F.splice(W,2),R--));return w=F.join("/"),w===""&&(w=O?"/":"."),x?(x.path=w,o(x)):w}e.normalize=l;function i(v,w){v===""&&(v="."),w===""&&(w=".");var x=s(w),O=s(v);if(O&&(v=O.path||"/"),x&&!x.scheme)return O&&(x.scheme=O.scheme),o(x);if(x||w.match(r))return w;if(O&&!O.host&&!O.path)return O.host=w,o(O);var F=w.charAt(0)==="/"?w:l(v.replace(/\/+$/,"")+"/"+w);return O?(O.path=F,o(O)):F}e.join=i,e.isAbsolute=function(v){return v.charAt(0)==="/"||!!v.match(n)};function u(v,w){v===""&&(v="."),v=v.replace(/\/$/,"");for(var x=0;w.indexOf(v+"/")!==0;){var O=v.lastIndexOf("/");if(O<0||(v=v.slice(0,O),v.match(/^([^\/]+:\/)?\/*$/)))return w;++x}return Array(x+1).join("../")+w.substr(v.length+1)}e.relative=u;var c=function(){var v=Object.create(null);return!("__proto__"in v)}();function a(v){return v}function d(v){return p(v)?"$"+v:v}e.toSetString=c?a:d;function f(v){return p(v)?v.slice(1):v}e.fromSetString=c?a:f;function p(v){if(!v)return!1;var w=v.length;if(w<9||v.charCodeAt(w-1)!==95||v.charCodeAt(w-2)!==95||v.charCodeAt(w-3)!==111||v.charCodeAt(w-4)!==116||v.charCodeAt(w-5)!==111||v.charCodeAt(w-6)!==114||v.charCodeAt(w-7)!==112||v.charCodeAt(w-8)!==95||v.charCodeAt(w-9)!==95)return!1;for(var x=w-10;x>=0;x--)if(v.charCodeAt(x)!==36)return!1;return!0}function h(v,w,x){var O=v.source-w.source;return O!==0||(O=v.originalLine-w.originalLine,O!==0)||(O=v.originalColumn-w.originalColumn,O!==0||x)||(O=v.generatedColumn-w.generatedColumn,O!==0)||(O=v.generatedLine-w.generatedLine,O!==0)?O:v.name-w.name}e.compareByOriginalPositions=h;function y(v,w,x){var O=v.generatedLine-w.generatedLine;return O!==0||(O=v.generatedColumn-w.generatedColumn,O!==0||x)||(O=v.source-w.source,O!==0)||(O=v.originalLine-w.originalLine,O!==0)||(O=v.originalColumn-w.originalColumn,O!==0)?O:v.name-w.name}e.compareByGeneratedPositionsDeflated=y;function _(v,w){return v===w?0:v>w?1:-1}function S(v,w){var x=v.generatedLine-w.generatedLine;return x!==0||(x=v.generatedColumn-w.generatedColumn,x!==0)||(x=_(v.source,w.source),x!==0)||(x=v.originalLine-w.originalLine,x!==0)||(x=v.originalColumn-w.originalColumn,x!==0)?x:_(v.name,w.name)}e.compareByGeneratedPositionsInflated=S}(po)),po}var ho={},bc;function Ty(){return bc||(bc=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,s,o,l,i){var u=Math.floor((r-n)/2)+n,c=l(s,o[u],!0);return c===0?u:c>0?r-u>1?t(u,r,s,o,l,i):i==e.LEAST_UPPER_BOUND?r<o.length?r:-1:u:u-n>1?t(n,u,s,o,l,i):i==e.LEAST_UPPER_BOUND?u:n<0?-1:n}e.search=function(r,s,o,l){if(s.length===0)return-1;var i=t(-1,s.length,r,s,o,l||e.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&o(s[i],s[i-1],!0)===0;)--i;return i}}(ho)),ho}var mo={},Sc;function xy(){if(Sc)return mo;Sc=1;var e=fl(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(s,o){for(var l=new n,i=0,u=s.length;i<u;i++)l.add(s[i],o);return l},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(s,o){var l=e.toSetString(s),i=t.call(this._set,l),u=this._array.length;(!i||o)&&this._array.push(s),i||(this._set[l]=u)},n.prototype.has=function(s){var o=e.toSetString(s);return t.call(this._set,o)},n.prototype.indexOf=function(s){var o=e.toSetString(s);if(t.call(this._set,o))return this._set[o];throw new Error('"'+s+'" is not in the set.')},n.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},n.prototype.toArray=function(){return this._array.slice()},mo.ArraySet=n,mo}var wn={},bn={},Oc;function Ay(){if(Oc)return bn;Oc=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return bn.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},bn.decode=function(t){var n=65,r=90,s=97,o=122,l=48,i=57,u=43,c=47,a=26,d=52;return n<=t&&t<=r?t-n:s<=t&&t<=o?t-s+a:l<=t&&t<=i?t-l+d:t==u?62:t==c?63:-1},bn}var Tc;function Ry(){if(Tc)return wn;Tc=1;var e=Ay(),t=5,n=1<<t,r=n-1,s=n;function o(i){return i<0?(-i<<1)+1:(i<<1)+0}function l(i){var u=(i&1)===1,c=i>>1;return u?-c:c}return wn.encode=function(u){var c="",a,d=o(u);do a=d&r,d>>>=t,d>0&&(a|=s),c+=e.encode(a);while(d>0);return c},wn.decode=function(u,c,a){var d=u.length,f=0,p=0,h,y;do{if(c>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(y=e.decode(u.charCodeAt(c++)),y===-1)throw new Error("Invalid base64 digit: "+u.charAt(c-1));h=!!(y&s),y&=r,f=f+(y<<p),p+=t}while(h);a.value=l(f),a.rest=c},wn}var go={},xc;function Cy(){if(xc)return go;xc=1;function e(r,s,o){var l=r[s];r[s]=r[o],r[o]=l}function t(r,s){return Math.round(r+Math.random()*(s-r))}function n(r,s,o,l){if(o<l){var i=t(o,l),u=o-1;e(r,i,l);for(var c=r[l],a=o;a<l;a++)s(r[a],c)<=0&&(u+=1,e(r,u,a));e(r,u+1,a);var d=u+1;n(r,s,o,d-1),n(r,s,d+1,l)}}return go.quickSort=function(r,s){n(r,s,0,r.length-1)},go}var Ac;function Ny(){if(Ac)return gr;Ac=1;var e=fl(),t=Ty(),n=xy().ArraySet,r=Ry(),s=Cy().quickSort;function o(c){var a=c;return typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,""))),a.sections!=null?new u(a):new l(a)}o.fromSourceMap=function(c){return l.fromSourceMap(c)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(a,d){var f=a.charAt(d);return f===";"||f===","},o.prototype._parseMappings=function(a,d){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(a,d,f){var p=d||null,h=f||o.GENERATED_ORDER,y;switch(h){case o.GENERATED_ORDER:y=this._generatedMappings;break;case o.ORIGINAL_ORDER:y=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;y.map(function(S){var v=S.source===null?null:this._sources.at(S.source);return v!=null&&_!=null&&(v=e.join(_,v)),{source:v,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(a,p)},o.prototype.allGeneratedPositionsFor=function(a){var d=e.getArg(a,"line"),f={source:e.getArg(a,"source"),originalLine:d,originalColumn:e.getArg(a,"column",0)};if(this.sourceRoot!=null&&(f.source=e.relative(this.sourceRoot,f.source)),!this._sources.has(f.source))return[];f.source=this._sources.indexOf(f.source);var p=[],h=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(h>=0){var y=this._originalMappings[h];if(a.column===void 0)for(var _=y.originalLine;y&&y.originalLine===_;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h];else for(var S=y.originalColumn;y&&y.originalLine===d&&y.originalColumn==S;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h]}return p},gr.SourceMapConsumer=o;function l(c){var a=c;typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sources"),p=e.getArg(a,"names",[]),h=e.getArg(a,"sourceRoot",null),y=e.getArg(a,"sourcesContent",null),_=e.getArg(a,"mappings"),S=e.getArg(a,"file",null);if(d!=this._version)throw new Error("Unsupported version: "+d);f=f.map(String).map(e.normalize).map(function(v){return h&&e.isAbsolute(h)&&e.isAbsolute(v)?e.relative(h,v):v}),this._names=n.fromArray(p.map(String),!0),this._sources=n.fromArray(f,!0),this.sourceRoot=h,this.sourcesContent=y,this._mappings=_,this.file=S}l.prototype=Object.create(o.prototype),l.prototype.consumer=o,l.fromSourceMap=function(a){var d=Object.create(l.prototype),f=d._names=n.fromArray(a._names.toArray(),!0),p=d._sources=n.fromArray(a._sources.toArray(),!0);d.sourceRoot=a._sourceRoot,d.sourcesContent=a._generateSourcesContent(d._sources.toArray(),d.sourceRoot),d.file=a._file;for(var h=a._mappings.toArray().slice(),y=d.__generatedMappings=[],_=d.__originalMappings=[],S=0,v=h.length;S<v;S++){var w=h[S],x=new i;x.generatedLine=w.generatedLine,x.generatedColumn=w.generatedColumn,w.source&&(x.source=p.indexOf(w.source),x.originalLine=w.originalLine,x.originalColumn=w.originalColumn,w.name&&(x.name=f.indexOf(w.name)),_.push(x)),y.push(x)}return s(d.__originalMappings,e.compareByOriginalPositions),d},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map(function(c){return this.sourceRoot!=null?e.join(this.sourceRoot,c):c},this)}});function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}l.prototype._parseMappings=function(a,d){for(var f=1,p=0,h=0,y=0,_=0,S=0,v=a.length,w=0,x={},O={},F=[],D=[],R,W,V,L,U;w<v;)if(a.charAt(w)===";")f++,w++,p=0;else if(a.charAt(w)===",")w++;else{for(R=new i,R.generatedLine=f,L=w;L<v&&!this._charIsMappingSeparator(a,L);L++);if(W=a.slice(w,L),V=x[W],V)w+=W.length;else{for(V=[];w<L;)r.decode(a,w,O),U=O.value,w=O.rest,V.push(U);if(V.length===2)throw new Error("Found a source, but no line and column");if(V.length===3)throw new Error("Found a source and line, but no column");x[W]=V}R.generatedColumn=p+V[0],p=R.generatedColumn,V.length>1&&(R.source=_+V[1],_+=V[1],R.originalLine=h+V[2],h=R.originalLine,R.originalLine+=1,R.originalColumn=y+V[3],y=R.originalColumn,V.length>4&&(R.name=S+V[4],S+=V[4])),D.push(R),typeof R.originalLine=="number"&&F.push(R)}s(D,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,s(F,e.compareByOriginalPositions),this.__originalMappings=F},l.prototype._findMapping=function(a,d,f,p,h,y){if(a[f]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+a[f]);if(a[p]<0)throw new TypeError("Column must be greater than or equal to 0, got "+a[p]);return t.search(a,d,h,y)},l.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var d=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var f=this._generatedMappings[a+1];if(d.generatedLine===f.generatedLine){d.lastGeneratedColumn=f.generatedColumn-1;continue}}d.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=this._findMapping(d,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(f>=0){var p=this._generatedMappings[f];if(p.generatedLine===d.generatedLine){var h=e.getArg(p,"source",null);h!==null&&(h=this._sources.at(h),this.sourceRoot!=null&&(h=e.join(this.sourceRoot,h)));var y=e.getArg(p,"name",null);return y!==null&&(y=this._names.at(y)),{source:h,line:e.getArg(p,"originalLine",null),column:e.getArg(p,"originalColumn",null),name:y}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},l.prototype.sourceContentFor=function(a,d){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(a=e.relative(this.sourceRoot,a)),this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];var f;if(this.sourceRoot!=null&&(f=e.urlParse(this.sourceRoot))){var p=a.replace(/^file:\/\//,"");if(f.scheme=="file"&&this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];if((!f.path||f.path=="/")&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(a){var d=e.getArg(a,"source");if(this.sourceRoot!=null&&(d=e.relative(this.sourceRoot,d)),!this._sources.has(d))return{line:null,column:null,lastColumn:null};d=this._sources.indexOf(d);var f={source:d,originalLine:e.getArg(a,"line"),originalColumn:e.getArg(a,"column")},p=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(p>=0){var h=this._originalMappings[p];if(h.source===f.source)return{line:e.getArg(h,"generatedLine",null),column:e.getArg(h,"generatedColumn",null),lastColumn:e.getArg(h,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},gr.BasicSourceMapConsumer=l;function u(c){var a=c;typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sections");if(d!=this._version)throw new Error("Unsupported version: "+d);this._sources=new n,this._names=new n;var p={line:-1,column:0};this._sections=f.map(function(h){if(h.url)throw new Error("Support for url field in sections not implemented.");var y=e.getArg(h,"offset"),_=e.getArg(y,"line"),S=e.getArg(y,"column");if(_<p.line||_===p.line&&S<p.column)throw new Error("Section offsets must be ordered and non-overlapping.");return p=y,{generatedOffset:{generatedLine:_+1,generatedColumn:S+1},consumer:new o(e.getArg(h,"map"))}})}return u.prototype=Object.create(o.prototype),u.prototype.constructor=o,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var c=[],a=0;a<this._sections.length;a++)for(var d=0;d<this._sections[a].consumer.sources.length;d++)c.push(this._sections[a].consumer.sources[d]);return c}}),u.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=t.search(d,this._sections,function(h,y){var _=h.generatedLine-y.generatedOffset.generatedLine;return _||h.generatedColumn-y.generatedOffset.generatedColumn}),p=this._sections[f];return p?p.consumer.originalPositionFor({line:d.generatedLine-(p.generatedOffset.generatedLine-1),column:d.generatedColumn-(p.generatedOffset.generatedLine===d.generatedLine?p.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(a,d){for(var f=0;f<this._sections.length;f++){var p=this._sections[f],h=p.consumer.sourceContentFor(a,!0);if(h)return h}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(a){for(var d=0;d<this._sections.length;d++){var f=this._sections[d];if(f.consumer.sources.indexOf(e.getArg(a,"source"))!==-1){var p=f.consumer.generatedPositionFor(a);if(p){var h={line:p.line+(f.generatedOffset.generatedLine-1),column:p.column+(f.generatedOffset.generatedLine===p.line?f.generatedOffset.generatedColumn-1:0)};return h}}}return{line:null,column:null}},u.prototype._parseMappings=function(a,d){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++)for(var p=this._sections[f],h=p.consumer._generatedMappings,y=0;y<h.length;y++){var _=h[y],S=p.consumer._sources.at(_.source);p.consumer.sourceRoot!==null&&(S=e.join(p.consumer.sourceRoot,S)),this._sources.add(S),S=this._sources.indexOf(S);var v=p.consumer._names.at(_.name);this._names.add(v),v=this._names.indexOf(v);var w={source:S,generatedLine:_.generatedLine+(p.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(p.generatedOffset.generatedLine===_.generatedLine?p.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:v};this.__generatedMappings.push(w),typeof w.originalLine=="number"&&this.__originalMappings.push(w)}s(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),s(this.__originalMappings,e.compareByOriginalPositions)},gr.IndexedSourceMapConsumer=u,gr}var Rc;function Py(){return Rc||(Rc=1,function(e,t){(function(n,r){e.exports=r(Ny(),va())})(ce,function(n,r){function s(f){return new Promise(function(p,h){var y=new XMLHttpRequest;y.open("get",f),y.onerror=h,y.onreadystatechange=function(){y.readyState===4&&(y.status>=200&&y.status<300||f.substr(0,7)==="file://"&&y.responseText?p(y.responseText):h(new Error("HTTP status: "+y.status+" retrieving "+f)))},y.send()})}function o(f){if(typeof window<"u"&&window.atob)return window.atob(f);throw new Error("You must supply a polyfill for window.atob in this environment")}function l(f){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(f);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function i(f,p){for(var h=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],y=f.split(`
50
+ `),_="",S=Math.min(p,20),v=0;v<S;++v){var w=y[p-v-1],x=w.indexOf("//");if(x>=0&&(w=w.substr(0,x)),w){_=w+_;for(var O=h.length,F=0;F<O;F++){var D=h[F].exec(_);if(D&&D[1])return D[1]}}}}function u(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function c(f){if(typeof f!="object")throw new TypeError("Given StackFrame is not an object");if(typeof f.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof f.lineNumber!="number"||f.lineNumber%1!==0||f.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof f.columnNumber!="number"||f.columnNumber%1!==0||f.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function a(f){for(var p=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,h,y;y=p.exec(f);)h=y[1];if(h)return h;throw new Error("sourceMappingURL not found")}function d(f,p,h){return new Promise(function(y,_){var S=p.originalPositionFor({line:f.lineNumber,column:f.columnNumber});if(S.source){var v=p.sourceContentFor(S.source);v&&(h[S.source]=v),y(new r({functionName:S.name||f.functionName,args:f.args,fileName:S.source,lineNumber:S.line,columnNumber:S.column}))}else _(new Error("Could not get original source for given stackframe and source map"))})}return function f(p){if(!(this instanceof f))return new f(p);p=p||{},this.sourceCache=p.sourceCache||{},this.sourceMapConsumerCache=p.sourceMapConsumerCache||{},this.ajax=p.ajax||s,this._atob=p.atob||o,this._get=function(y){return new Promise((function(_,S){var v=y.substr(0,5)==="data:";if(this.sourceCache[y])_(this.sourceCache[y]);else if(p.offline&&!v)S(new Error("Cannot make network requests in offline mode"));else if(v){var w=/^data:application\/json;([\w=:"-]+;)*base64,/,x=y.match(w);if(x){var O=x[0].length,F=y.substr(O),D=this._atob(F);this.sourceCache[y]=D,_(D)}else S(new Error("The encoding of the inline sourcemap is not supported"))}else{var R=this.ajax(y,{method:"get"});this.sourceCache[y]=R,R.then(_,S)}}).bind(this))},this._getSourceMapConsumer=function(y,_){return new Promise((function(S){if(this.sourceMapConsumerCache[y])S(this.sourceMapConsumerCache[y]);else{var v=new Promise((function(w,x){return this._get(y).then(function(O){typeof O=="string"&&(O=l(O.replace(/^\)\]\}'/,""))),typeof O.sourceRoot>"u"&&(O.sourceRoot=_),w(new n.SourceMapConsumer(O))}).catch(x)}).bind(this));this.sourceMapConsumerCache[y]=v,S(v)}}).bind(this))},this.pinpoint=function(y){return new Promise((function(_,S){this.getMappedLocation(y).then((function(v){function w(){_(v)}this.findFunctionName(v).then(_,w).catch(w)}).bind(this),S)}).bind(this))},this.findFunctionName=function(y){return new Promise((function(_,S){c(y),this._get(y.fileName).then(function(w){var x=y.lineNumber,O=y.columnNumber,F=i(w,x);_(F?new r({functionName:F,args:y.args,fileName:y.fileName,lineNumber:x,columnNumber:O}):y)},S).catch(S)}).bind(this))},this.getMappedLocation=function(y){return new Promise((function(_,S){u(),c(y);var v=this.sourceCache,w=y.fileName;this._get(w).then((function(x){var O=a(x),F=O.substr(0,5)==="data:",D=w.substring(0,w.lastIndexOf("/")+1);return O[0]!=="/"&&!F&&!/^https?:\/\/|^\/\//i.test(O)&&(O=D+O),this._getSourceMapConsumer(O,D).then(function(R){return d(y,R,v).then(_).catch(function(){_(y)})})}).bind(this),S).catch(S)}).bind(this))}}})}(fo)),fo.exports}var Cc;function Iy(){return Cc||(Cc=1,function(e,t){(function(n,r){e.exports=r(Sy(),Oy(),Py())})(ce,function(r,s,o){var l={filter:function(d){return(d.functionName||"").indexOf("StackTrace$$")===-1&&(d.functionName||"").indexOf("ErrorStackParser$$")===-1&&(d.functionName||"").indexOf("StackTraceGPS$$")===-1&&(d.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},i=function(){try{throw new Error}catch(f){return f}};function u(d,f){var p={};return[d,f].forEach(function(h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}),p}function c(d){return d.stack||d["opera#sourceloc"]}function a(d,f){return typeof f=="function"?d.filter(f):d}return{get:function(f){var p=i();return c(p)?this.fromError(p,f):this.generateArtificially(f)},getSync:function(f){f=u(l,f);var p=i(),h=c(p)?r.parse(p):s.backtrace(f);return a(h,f.filter)},fromError:function(f,p){p=u(l,p);var h=new o(p);return new Promise((function(y){var _=a(r.parse(f),p.filter);y(Promise.all(_.map(function(S){return new Promise(function(v){function w(){v(S)}h.pinpoint(S).then(v,w).catch(w)})})))}).bind(this))},generateArtificially:function(f){f=u(l,f);var p=s.backtrace(f);return typeof f.filter=="function"&&(p=p.filter(f.filter)),Promise.resolve(p)},instrument:function(f,p,h,y){if(typeof f!="function")throw new Error("Cannot instrument non-function object");if(typeof f.__stacktraceOriginalFn=="function")return f;var _=(function(){try{return this.get().then(p,h).catch(h),f.apply(y||this,arguments)}catch(v){throw c(v)&&this.fromError(v).then(p,h).catch(h),v}}).bind(this);return _.__stacktraceOriginalFn=f,_},deinstrument:function(f){if(typeof f!="function")throw new Error("Cannot de-instrument non-function object");return typeof f.__stacktraceOriginalFn=="function"?f.__stacktraceOriginalFn:f},report:function(f,p,h,y){return new Promise(function(_,S){var v=new XMLHttpRequest;if(v.onerror=S,v.onreadystatechange=function(){v.readyState===4&&(v.status>=200&&v.status<400?_(v.responseText):S(new Error("POST to "+p+" failed with status: "+v.status)))},v.open("post",p),v.setRequestHeader("Content-Type","application/json"),y&&typeof y.headers=="object"){var w=y.headers;for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&v.setRequestHeader(x,w[x])}var O={stack:f};h!=null&&(O.message=h),v.send(JSON.stringify(O))})}}})}(so)),so.exports}var yo,Nc;function ky(){if(Nc)return yo;Nc=1;var e=Iy(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",n=function(){};n.prototype.start=function(l){if(!l.key&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!l.projectId&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=l.customReportingFunction,this.apiKey=l.key,this.projectId=l.projectId,this.targetUrl=l.targetUrl,this.context=l.context||{},this.serviceContext={service:l.service||"web"},l.version&&(this.serviceContext.version=l.version),this.reportUncaughtExceptions=l.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=l.reportUnhandledPromiseRejections!==!1,this.disabled=!!l.disabled,r(this)};function r(l){var i=function(){};if(l.reportUncaughtExceptions){var u=window.onerror||i;window.onerror=function(a,d,f,p,h){return h&&l.report(h).catch(i),u(a,d,f,p,h),!0}}if(l.reportUnhandledPromiseRejections){var c=window.onunhandledrejection||i;window.onunhandledrejection=function(a){return a&&l.report(a.reason).catch(i),c(a.reason),!0}}}n.prototype.report=function(l,i){if(this.disabled)return Promise.resolve(null);if(!l)return Promise.reject(new Error("no error to report"));i=i||{};var u={};u.serviceContext=this.serviceContext,u.context=this.context,u.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var c=0;if(typeof l=="string"||l instanceof String){try{throw new Error(l)}catch(f){l=f}c=i.skipLocalFrames||1}var a=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,d=this.customReportingFunction;return s(l,c).then(function(f){return u.message=f,d?d(u):o(a,u)})};function s(l,i){return e.fromError(l).then(function(u){for(var c=[l.toString()],a=i;a<u.length;a++)c.push([" at ",u[a].getFunctionName()||"<anonymous>"," (",u[a].getFileName(),":",u[a].getLineNumber(),":",u[a].getColumnNumber(),")"].join(""));return c.join(`
51
+ `)},function(u){return["Error extracting stack trace: ",u,`
52
52
  `,l.toString(),`
53
- `," (",l.file,":",l.line,":",l.column,")"].join("")})}function o(l,i){var c=new XMLHttpRequest;return c.open("POST",l,!0),c.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(u,a){c.onreadystatechange=function(){if(c.readyState===4){var d=c.status;if(d>=200&&d<300)u({message:i.message});else if(d===429)a({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var f=d?d+" http response":"network error";a(new Error(f+" on stackdriver report"))}}},c.send(JSON.stringify(i))})}return r.prototype.setUser=function(l){this.context.user=l},go=r,go}var jc;function Xy(){return jc||(jc=1,function(e,t){(function(r,n){e.exports=n(Ky())})(le,function(r){return function(){var n={542:function(i){i.exports=r}},s={};function o(i){var c=s[i];if(c!==void 0)return c.exports;var u=s[i]={exports:{}};return n[i](u,u.exports,o),u.exports}o.n=function(i){var c=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(c,{a:c}),c},o.d=function(i,c){for(var u in c)o.o(c,u)&&!o.o(i,u)&&Object.defineProperty(i,u,{enumerable:!0,get:c[u]})},o.o=function(i,c){return Object.prototype.hasOwnProperty.call(i,c)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{reportError:function(){return f},setContext:function(){return d}});var i=o(542),c=o.n(i);const{GCP:{PROJECT_ID:u}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let a={key:null,environment:null,projectId:u};const d=({apiKey:p,environment:h,projectId:y,serviceName:_})=>{if(!p)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(a.key=p,!h)throw new Error("Cannot set context: Environment not defined");a.environment=h,a.projectId=y||u,_&&(a.service=`${_}:${a.environment}`)},f=async(p,h)=>{try{const y=new(c());y.start(a),typeof h=="string"&&y.setUser(h),await y.report(p)}catch(y){console.warn(`Cannot report error: ${y.message}`)}}}(),l}()})}(oo)),oo.exports}var yo={exports:{}},bn={},Fc;function Zy(){if(Fc)return bn;Fc=1,Object.defineProperty(bn,"__esModule",{value:!0});var e=function(r){console.warn("[react-gtm]",r)};return bn.default=e,bn}var vo,Dc;function ev(){if(Dc)return vo;Dc=1;var e=Zy(),t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}var n={tags:function(o){var l=o.id,i=o.events,c=o.dataLayer,u=o.dataLayerName,a=o.preview,d=o.auth,f="&gtm_auth="+d,p="&gtm_preview="+a;l||(0,t.default)("GTM Id is required");var h=`
53
+ `," (",l.file,":",l.line,":",l.column,")"].join("")})}function o(l,i){var u=new XMLHttpRequest;return u.open("POST",l,!0),u.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(c,a){u.onreadystatechange=function(){if(u.readyState===4){var d=u.status;if(d>=200&&d<300)c({message:i.message});else if(d===429)a({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var f=d?d+" http response":"network error";a(new Error(f+" on stackdriver report"))}}},u.send(JSON.stringify(i))})}return n.prototype.setUser=function(l){this.context.user=l},yo=n,yo}var Pc;function Ly(){return Pc||(Pc=1,function(e,t){(function(n,r){e.exports=r(ky())})(ce,function(n){return function(){var r={542:function(i){i.exports=n}},s={};function o(i){var u=s[i];if(u!==void 0)return u.exports;var c=s[i]={exports:{}};return r[i](c,c.exports,o),c.exports}o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,{a:u}),u},o.d=function(i,u){for(var c in u)o.o(u,c)&&!o.o(i,c)&&Object.defineProperty(i,c,{enumerable:!0,get:u[c]})},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{reportError:function(){return f},setContext:function(){return d}});var i=o(542),u=o.n(i);const{GCP:{PROJECT_ID:c}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let a={key:null,environment:null,projectId:c};const d=({apiKey:p,environment:h,projectId:y,serviceName:_})=>{if(!p)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(a.key=p,!h)throw new Error("Cannot set context: Environment not defined");a.environment=h,a.projectId=y||c,_&&(a.service=`${_}:${a.environment}`)},f=async(p,h)=>{try{const y=new(u());y.start(a),typeof h=="string"&&y.setUser(h),await y.report(p)}catch(y){console.warn(`Cannot report error: ${y.message}`)}}}(),l}()})}(ao)),ao.exports}var vo={exports:{}},Sn={},Ic;function Fy(){if(Ic)return Sn;Ic=1,Object.defineProperty(Sn,"__esModule",{value:!0});var e=function(n){console.warn("[react-gtm]",n)};return Sn.default=e,Sn}var _o,kc;function jy(){if(kc)return _o;kc=1;var e=Fy(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}var r={tags:function(o){var l=o.id,i=o.events,u=o.dataLayer,c=o.dataLayerName,a=o.preview,d=o.auth,f="&gtm_auth="+d,p="&gtm_preview="+a;l||(0,t.default)("GTM Id is required");var h=`
54
54
  <iframe src="https://www.googletagmanager.com/ns.html?id=`+l+f+p+`&gtm_cookies_win=x"
55
55
  height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,y=`
56
56
  (function(w,d,s,l,i){w[l]=w[l]||[];
@@ -58,17 +58,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
58
58
  var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
59
59
  j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+f+p+`&gtm_cookies_win=x';
60
60
  f.parentNode.insertBefore(j,f);
61
- })(window,document,'script','`+u+"','"+l+"');",_=this.dataLayer(c,u);return{iframe:h,script:y,dataLayerVar:_}},dataLayer:function(o,l){return`
61
+ })(window,document,'script','`+c+"','"+l+"');",_=this.dataLayer(u,c);return{iframe:h,script:y,dataLayerVar:_}},dataLayer:function(o,l){return`
62
62
  window.`+l+" = window."+l+` || [];
63
- window.`+l+".push("+JSON.stringify(o)+")"}};return vo=n,vo}var _o,Uc;function tv(){if(Uc)return _o;Uc=1;var e=ev(),t=r(e);function r(s){return s&&s.__esModule?s:{default:s}}var n={dataScript:function(o){var l=document.createElement("script");return l.innerHTML=o,l},gtm:function(o){var l=t.default.tags(o),i=function(){var d=document.createElement("noscript");return d.innerHTML=l.iframe,d},c=function(){var d=document.createElement("script");return d.innerHTML=l.script,d},u=this.dataScript(l.dataLayerVar);return{noScript:i,script:c,dataScript:u}},initialize:function(o){var l=o.gtmId,i=o.events,c=i===void 0?{}:i,u=o.dataLayer,a=o.dataLayerName,d=a===void 0?"dataLayer":a,f=o.auth,p=f===void 0?"":f,h=o.preview,y=h===void 0?"":h,_=this.gtm({id:l,events:c,dataLayer:u||void 0,dataLayerName:d,auth:p,preview:y});u&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(o){var l=o.dataLayer,i=o.dataLayerName,c=i===void 0?"dataLayer":i;if(window[c])return window[c].push(l);var u=t.default.dataLayer(l,c),a=this.dataScript(u);document.head.insertBefore(a,document.head.childNodes[0])}};return _o=n,_o}var Eo,$c;function rv(){if($c)return Eo;$c=1;var e=tv(),t=r(e);function r(n){return n&&n.__esModule?n:{default:n}}return Eo=t.default,Eo}var Bc;function nv(){return Bc||(Bc=1,function(e,t){(function(r,n){e.exports=n(rv())})(le,function(r){return function(){var n={273:function(i){i.exports=r}},s={};function o(i){var c=s[i];if(c!==void 0)return c.exports;var u=s[i]={exports:{}};return n[i](u,u.exports,o),u.exports}o.n=function(i){var c=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(c,{a:c}),c},o.d=function(i,c){for(var u in c)o.o(c,u)&&!o.o(i,u)&&Object.defineProperty(i,u,{enumerable:!0,get:c[u]})},o.o=function(i,c){return Object.prototype.hasOwnProperty.call(i,c)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{setContext:function(){return a},setupGTM:function(){return f}});var i=o(273),c=o.n(i);let u=null;const a=({configs:p,environment:h})=>{if(!h)throw new Error("Cannot set context: Environment not defined");if(!p)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!p[h])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:p,environment:h})}`);u=p[h]},d=()=>u,f=()=>{const p=d();c().initialize({gtmId:p.id})}}(),l}()})}(yo)),yo.exports}var _l=202,El=502,wl=400,bl=409,Sl=100,Tl=201,Ol=417,iv=424,Al=403,xl=504,Rl=410,Cl=505,Pl=418,Nl=419,Il=507,kl=500,Ll=411,Ml=423,jl=420,Fl=405,Dl=301,Ul=302,$l=207,Bl=300,ql=511,Hl=204,Wl=203,Gl=406,Vl=404,Ql=501,zl=304,Yl=200,Jl=206,Kl=402,Xl=308,Zl=412,ef=428,tf=102,rf=407,nf=431,of=408,af=413,sf=414,cf=416,uf=205,lf=303,ff=503,df=101,pf=307,hf=429,mf=401,gf=422,yf=415,vf=305;const ov={ACCEPTED:_l,BAD_GATEWAY:El,BAD_REQUEST:wl,CONFLICT:bl,CONTINUE:Sl,CREATED:Tl,EXPECTATION_FAILED:Ol,FORBIDDEN:Al,GATEWAY_TIMEOUT:xl,GONE:Rl,HTTP_VERSION_NOT_SUPPORTED:Cl,IM_A_TEAPOT:Pl,INSUFFICIENT_SPACE_ON_RESOURCE:Nl,INSUFFICIENT_STORAGE:Il,INTERNAL_SERVER_ERROR:kl,LENGTH_REQUIRED:Ll,LOCKED:Ml,METHOD_FAILURE:jl,METHOD_NOT_ALLOWED:Fl,MOVED_PERMANENTLY:Dl,MOVED_TEMPORARILY:Ul,MULTI_STATUS:$l,MULTIPLE_CHOICES:Bl,NETWORK_AUTHENTICATION_REQUIRED:ql,NO_CONTENT:Hl,NON_AUTHORITATIVE_INFORMATION:Wl,NOT_ACCEPTABLE:Gl,NOT_FOUND:Vl,NOT_IMPLEMENTED:Ql,NOT_MODIFIED:zl,OK:Yl,PARTIAL_CONTENT:Jl,PAYMENT_REQUIRED:Kl,PERMANENT_REDIRECT:Xl,PRECONDITION_FAILED:Zl,PRECONDITION_REQUIRED:ef,PROCESSING:tf,PROXY_AUTHENTICATION_REQUIRED:rf,REQUEST_HEADER_FIELDS_TOO_LARGE:nf,REQUEST_TIMEOUT:of,REQUEST_TOO_LONG:af,REQUEST_URI_TOO_LONG:sf,REQUESTED_RANGE_NOT_SATISFIABLE:cf,RESET_CONTENT:uf,SEE_OTHER:lf,SERVICE_UNAVAILABLE:ff,SWITCHING_PROTOCOLS:df,TEMPORARY_REDIRECT:pf,TOO_MANY_REQUESTS:hf,UNAUTHORIZED:mf,UNPROCESSABLE_ENTITY:gf,UNSUPPORTED_MEDIA_TYPE:yf,USE_PROXY:vf};var av={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},sv={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function _f(e){var t=av[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function Ef(e){var t=sv[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var wf=_f,ea;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(ea||(ea={}));var ta;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(ta||(ta={}));var Un=globalThis&&globalThis.__assign||function(){return Un=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Un.apply(this,arguments)};const cv=Un(Un({},ov),{getStatusCode:Ef,getStatusText:wf}),uv=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:_l,BAD_GATEWAY:El,BAD_REQUEST:wl,CONFLICT:bl,CONTINUE:Sl,CREATED:Tl,EXPECTATION_FAILED:Ol,FAILED_DEPENDENCY:iv,FORBIDDEN:Al,GATEWAY_TIMEOUT:xl,GONE:Rl,HTTP_VERSION_NOT_SUPPORTED:Cl,IM_A_TEAPOT:Pl,INSUFFICIENT_SPACE_ON_RESOURCE:Nl,INSUFFICIENT_STORAGE:Il,INTERNAL_SERVER_ERROR:kl,LENGTH_REQUIRED:Ll,LOCKED:Ml,METHOD_FAILURE:jl,METHOD_NOT_ALLOWED:Fl,MOVED_PERMANENTLY:Dl,MOVED_TEMPORARILY:Ul,MULTIPLE_CHOICES:Bl,MULTI_STATUS:$l,NETWORK_AUTHENTICATION_REQUIRED:ql,NON_AUTHORITATIVE_INFORMATION:Wl,NOT_ACCEPTABLE:Gl,NOT_FOUND:Vl,NOT_IMPLEMENTED:Ql,NOT_MODIFIED:zl,NO_CONTENT:Hl,OK:Yl,PARTIAL_CONTENT:Jl,PAYMENT_REQUIRED:Kl,PERMANENT_REDIRECT:Xl,PRECONDITION_FAILED:Zl,PRECONDITION_REQUIRED:ef,PROCESSING:tf,PROXY_AUTHENTICATION_REQUIRED:rf,REQUESTED_RANGE_NOT_SATISFIABLE:cf,REQUEST_HEADER_FIELDS_TOO_LARGE:nf,REQUEST_TIMEOUT:of,REQUEST_TOO_LONG:af,REQUEST_URI_TOO_LONG:sf,RESET_CONTENT:uf,get ReasonPhrases(){return ta},SEE_OTHER:lf,SERVICE_UNAVAILABLE:ff,SWITCHING_PROTOCOLS:df,get StatusCodes(){return ea},TEMPORARY_REDIRECT:pf,TOO_MANY_REQUESTS:hf,UNAUTHORIZED:mf,UNPROCESSABLE_ENTITY:gf,UNSUPPORTED_MEDIA_TYPE:yf,USE_PROXY:vf,default:cv,getReasonPhrase:_f,getStatusCode:Ef,getStatusText:wf},Symbol.toStringTag,{value:"Module"})),lv=qr(uv);var Sn={exports:{}},yr={},wo={},vr={},_r={},Tt={},Er={},bo={},Ot={},nt={},qc;function Ea(){if(qc)return nt;qc=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.ERROR_PACKET=nt.PACKET_TYPES_REVERSE=nt.PACKET_TYPES=void 0;const e=Object.create(null);nt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);nt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(n=>{t[e[n]]=n});const r={type:"error",data:"parser error"};return nt.ERROR_PACKET=r,nt}var Hc;function fv(){if(Hc)return Ot;Hc=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.encodePacket=Ot.encodePacketToBinary=void 0;const e=Ea(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",r=typeof ArrayBuffer=="function",n=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,s=({type:u,data:a},d,f)=>t&&a instanceof Blob?d?f(a):o(a,f):r&&(a instanceof ArrayBuffer||n(a))?d?f(a):o(new Blob([a]),f):f(e.PACKET_TYPES[u]+(a||""));Ot.encodePacket=s;const o=(u,a)=>{const d=new FileReader;return d.onload=function(){const f=d.result.split(",")[1];a("b"+(f||""))},d.readAsDataURL(u)};function l(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let i;function c(u,a){if(t&&u.data instanceof Blob)return u.data.arrayBuffer().then(l).then(a);if(r&&(u.data instanceof ArrayBuffer||n(u.data)))return a(l(u.data));s(u,!1,d=>{i||(i=new TextEncoder),a(i.encode(d))})}return Ot.encodePacketToBinary=c,Ot}var wr={},At={},Wc;function dv(){if(Wc)return At;Wc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.decode=At.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<e.length;s++)t[e.charCodeAt(s)]=s;const r=s=>{let o=new Uint8Array(s),l,i=o.length,c="";for(l=0;l<i;l+=3)c+=e[o[l]>>2],c+=e[(o[l]&3)<<4|o[l+1]>>4],c+=e[(o[l+1]&15)<<2|o[l+2]>>6],c+=e[o[l+2]&63];return i%3===2?c=c.substring(0,c.length-1)+"=":i%3===1&&(c=c.substring(0,c.length-2)+"=="),c};At.encode=r;const n=s=>{let o=s.length*.75,l=s.length,i,c=0,u,a,d,f;s[s.length-1]==="="&&(o--,s[s.length-2]==="="&&o--);const p=new ArrayBuffer(o),h=new Uint8Array(p);for(i=0;i<l;i+=4)u=t[s.charCodeAt(i)],a=t[s.charCodeAt(i+1)],d=t[s.charCodeAt(i+2)],f=t[s.charCodeAt(i+3)],h[c++]=u<<2|a>>4,h[c++]=(a&15)<<4|d>>2,h[c++]=(d&3)<<6|f&63;return p};return At.decode=n,At}var Gc;function pv(){if(Gc)return wr;Gc=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.decodePacket=void 0;const e=Ea(),t=dv(),r=typeof ArrayBuffer=="function",n=(l,i)=>{if(typeof l!="string")return{type:"message",data:o(l,i)};const c=l.charAt(0);return c==="b"?{type:"message",data:s(l.substring(1),i)}:e.PACKET_TYPES_REVERSE[c]?l.length>1?{type:e.PACKET_TYPES_REVERSE[c],data:l.substring(1)}:{type:e.PACKET_TYPES_REVERSE[c]}:e.ERROR_PACKET};wr.decodePacket=n;const s=(l,i)=>{if(r){const c=(0,t.decode)(l);return o(c,i)}else return{base64:!0,data:l}},o=(l,i)=>{switch(i){case"blob":return l instanceof Blob?l:new Blob([l]);case"arraybuffer":default:return l instanceof ArrayBuffer?l:l.buffer}};return wr}var Vc;function Wr(){return Vc||(Vc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=fv();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=pv();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=Ea(),s=String.fromCharCode(30),o=(f,p)=>{const h=f.length,y=new Array(h);let _=0;f.forEach((S,v)=>{(0,t.encodePacket)(S,!1,w=>{y[v]=w,++_===h&&p(y.join(s))})})};e.encodePayload=o;const l=(f,p)=>{const h=f.split(s),y=[];for(let _=0;_<h.length;_++){const S=(0,r.decodePacket)(h[_],p);if(y.push(S),S.type==="error")break}return y};e.decodePayload=l;function i(){return new TransformStream({transform(f,p){(0,t.encodePacketToBinary)(f,h=>{const y=h.length;let _;if(y<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,y);else if(y<65536){_=new Uint8Array(3);const S=new DataView(_.buffer);S.setUint8(0,126),S.setUint16(1,y)}else{_=new Uint8Array(9);const S=new DataView(_.buffer);S.setUint8(0,127),S.setBigUint64(1,BigInt(y))}f.data&&typeof f.data!="string"&&(_[0]|=128),p.enqueue(_),p.enqueue(h)})}})}e.createPacketEncoderStream=i;let c;function u(f){return f.reduce((p,h)=>p+h.length,0)}function a(f,p){if(f[0].length===p)return f.shift();const h=new Uint8Array(p);let y=0;for(let _=0;_<p;_++)h[_]=f[0][y++],y===f[0].length&&(f.shift(),y=0);return f.length&&y<f[0].length&&(f[0]=f[0].slice(y)),h}function d(f,p){c||(c=new TextDecoder);const h=[];let y=0,_=-1,S=!1;return new TransformStream({transform(v,w){for(h.push(v);;){if(y===0){if(u(h)<1)break;const A=a(h,1);S=(A[0]&128)===128,_=A[0]&127,_<126?y=3:_===126?y=1:y=2}else if(y===1){if(u(h)<2)break;const A=a(h,2);_=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),y=3}else if(y===2){if(u(h)<8)break;const A=a(h,8),T=new DataView(A.buffer,A.byteOffset,A.length),M=T.getUint32(0);if(M>Math.pow(2,53-32)-1){w.enqueue(n.ERROR_PACKET);break}_=M*Math.pow(2,32)+T.getUint32(4),y=3}else{if(u(h)<_)break;const A=a(h,_);w.enqueue((0,r.decodePacket)(S?A:c.decode(A),p)),y=0}if(_===0||_>f){w.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4}(bo)),bo}function De(e){if(e)return hv(e)}function hv(e){for(var t in De.prototype)e[t]=De.prototype[t];return e}De.prototype.on=De.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};De.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};De.prototype.off=De.prototype.removeListener=De.prototype.removeAllListeners=De.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,s=0;s<r.length;s++)if(n=r[s],n===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this};De.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,s=r.length;n<s;++n)r[n].apply(this,t)}return this};De.prototype.emitReserved=De.prototype.emit;De.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};De.prototype.hasListeners=function(e){return!!this.listeners(e).length};const mv=Object.freeze(Object.defineProperty({__proto__:null,Emitter:De},Symbol.toStringTag,{value:"Module"})),er=qr(mv);var it={},br={},Qc;function Qn(){return Qc||(Qc=1,Object.defineProperty(br,"__esModule",{value:!0}),br.globalThisShim=void 0,br.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),br}var zc;function Gr(){if(zc)return it;zc=1,Object.defineProperty(it,"__esModule",{value:!0}),it.byteLength=it.installTimerFunctions=it.pick=void 0;const e=Qn();function t(c,...u){return u.reduce((a,d)=>(c.hasOwnProperty(d)&&(a[d]=c[d]),a),{})}it.pick=t;const r=e.globalThisShim.setTimeout,n=e.globalThisShim.clearTimeout;function s(c,u){u.useNativeTimers?(c.setTimeoutFn=r.bind(e.globalThisShim),c.clearTimeoutFn=n.bind(e.globalThisShim)):(c.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),c.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}it.installTimerFunctions=s;const o=1.33;function l(c){return typeof c=="string"?i(c):Math.ceil((c.byteLength||c.size)*o)}it.byteLength=l;function i(c){let u=0,a=0;for(let d=0,f=c.length;d<f;d++)u=c.charCodeAt(d),u<128?a+=1:u<2048?a+=2:u<55296||u>=57344?a+=3:(d++,a+=4);return a}return it}var Tn={exports:{}},So,Yc;function gv(){if(Yc)return So;Yc=1;var e=1e3,t=e*60,r=t*60,n=r*24,s=n*7,o=n*365.25;So=function(a,d){d=d||{};var f=typeof a;if(f==="string"&&a.length>0)return l(a);if(f==="number"&&isFinite(a))return d.long?c(a):i(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function l(a){if(a=String(a),!(a.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(d){var f=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return f*o;case"weeks":case"week":case"w":return f*s;case"days":case"day":case"d":return f*n;case"hours":case"hour":case"hrs":case"hr":case"h":return f*r;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function i(a){var d=Math.abs(a);return d>=n?Math.round(a/n)+"d":d>=r?Math.round(a/r)+"h":d>=t?Math.round(a/t)+"m":d>=e?Math.round(a/e)+"s":a+"ms"}function c(a){var d=Math.abs(a);return d>=n?u(a,d,n,"day"):d>=r?u(a,d,r,"hour"):d>=t?u(a,d,t,"minute"):d>=e?u(a,d,e,"second"):a+" ms"}function u(a,d,f,p){var h=d>=f*1.5;return Math.round(a/f)+" "+p+(h?"s":"")}return So}var To,Jc;function yv(){if(Jc)return To;Jc=1;function e(t){n.debug=n,n.default=n,n.coerce=u,n.disable=l,n.enable=o,n.enabled=i,n.humanize=gv(),n.destroy=a,Object.keys(t).forEach(d=>{n[d]=t[d]}),n.names=[],n.skips=[],n.formatters={};function r(d){let f=0;for(let p=0;p<d.length;p++)f=(f<<5)-f+d.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=r;function n(d){let f,p=null,h,y;function _(...S){if(!_.enabled)return;const v=_,w=Number(new Date),A=w-(f||w);v.diff=A,v.prev=f,v.curr=w,f=w,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let T=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(D,R)=>{if(D==="%%")return"%";T++;const W=n.formatters[R];if(typeof W=="function"){const G=S[T];D=W.call(v,G),S.splice(T,1),T--}return D}),n.formatArgs.call(v,S),(v.log||n.log).apply(v,S)}return _.namespace=d,_.useColors=n.useColors(),_.color=n.selectColor(d),_.extend=s,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(d)),y),set:S=>{p=S}}),typeof n.init=="function"&&n.init(_),_}function s(d,f){const p=n(this.namespace+(typeof f>"u"?":":f)+d);return p.log=this.log,p}function o(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let f;const p=(typeof d=="string"?d:"").split(/[\s,]+/),h=p.length;for(f=0;f<h;f++)p[f]&&(d=p[f].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function l(){const d=[...n.names.map(c),...n.skips.map(c).map(f=>"-"+f)].join(",");return n.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let f,p;for(f=0,p=n.skips.length;f<p;f++)if(n.skips[f].test(d))return!1;for(f=0,p=n.names.length;f<p;f++)if(n.names[f].test(d))return!0;return!1}function c(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function u(d){return d instanceof Error?d.stack||d.message:d}function a(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return To=e,To}var Kc;function tt(){return Kc||(Kc=1,function(e,t){t.formatArgs=n,t.save=s,t.load=o,t.useColors=r,t.storage=l(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let a=0,d=0;c[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(a++,f==="%c"&&(d=a))}),c.splice(d,0,u)}t.log=console.debug||console.log||(()=>{});function s(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function o(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function l(){try{return localStorage}catch{}}e.exports=yv()(t);const{formatters:i}=e.exports;i.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}}(Tn,Tn.exports)),Tn.exports}var xt={},Xc;function bf(){if(Xc)return xt;Xc=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.decode=xt.encode=void 0;function e(r){let n="";for(let s in r)r.hasOwnProperty(s)&&(n.length&&(n+="&"),n+=encodeURIComponent(s)+"="+encodeURIComponent(r[s]));return n}xt.encode=e;function t(r){let n={},s=r.split("&");for(let o=0,l=s.length;o<l;o++){let i=s[o].split("=");n[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return n}return xt.decode=t,xt}var Zc;function zn(){if(Zc)return Er;Zc=1;var e=le&&le.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.Transport=void 0;const t=Wr(),r=er,n=Gr(),s=e(tt()),o=bf(),l=(0,s.default)("engine.io-client:transport");class i extends Error{constructor(a,d,f){super(a),this.description=d,this.context=f,this.type="TransportError"}}class c extends r.Emitter{constructor(a){super(),this.writable=!1,(0,n.installTimerFunctions)(this,a),this.opts=a,this.query=a.query,this.socket=a.socket}onError(a,d,f){return super.emitReserved("error",new i(a,d,f)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"?this.write(a):l("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const d=(0,t.decodePacket)(a,this.socket.binaryType);this.onPacket(d)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,d={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(d)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const d=(0,o.encode)(a);return d.length?"?"+d:""}}return Er.Transport=c,Er}var ot={},eu;function Sf(){if(eu)return ot;eu=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.yeast=ot.decode=ot.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,r={};let n=0,s=0,o;function l(u){let a="";do a=e[u%t]+a,u=Math.floor(u/t);while(u>0);return a}ot.encode=l;function i(u){let a=0;for(s=0;s<u.length;s++)a=a*t+r[u.charAt(s)];return a}ot.decode=i;function c(){const u=l(+new Date);return u!==o?(n=0,o=u):u+"."+l(n++)}for(ot.yeast=c;s<t;s++)r[e[s]]=s;return ot}var Rt={},Sr={},tu;function vv(){if(tu)return Sr;tu=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Sr.hasCORS=e,Sr}var ru;function _v(){if(ru)return Rt;ru=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.createCookieJar=Rt.XHR=void 0;const e=vv(),t=Qn();function r(s){const o=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||e.hasCORS))return new XMLHttpRequest}catch{}if(!o)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Rt.XHR=r;function n(){}return Rt.createCookieJar=n,Rt}var nu;function Ev(){if(nu)return Tt;nu=1;var e=le&&le.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Request=Tt.Polling=void 0;const t=zn(),r=e(tt()),n=Sf(),s=Wr(),o=_v(),l=er,i=Gr(),c=Qn(),u=(0,r.default)("engine.io-client:polling");function a(){}const d=function(){return new o.XHR({xdomain:!1}).responseType!=null}();class f extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const v=location.protocol==="https:";let w=location.port;w||(w=v?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||w!==_.port}const S=_&&_.forceBase64;this.supportsBinary=d&&!S,this.opts.withCredentials&&(this.cookieJar=(0,o.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const S=()=>{u("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let v=0;this.polling&&(u("we are currently polling - waiting to pause"),v++,this.once("pollComplete",function(){u("pre-pause polling complete"),--v||S()})),this.writable||(u("we are currently writing - waiting to pause"),v++,this.once("drain",function(){u("pre-pause writing complete"),--v||S()}))}else S()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){u("polling got data %s",_);const S=v=>{if(this.readyState==="opening"&&v.type==="open"&&this.onOpen(),v.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(v)};(0,s.decodePayload)(_,this.socket.binaryType).forEach(S),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{u("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(u("transport open - closing"),_()):(u("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,s.encodePayload)(_,S=>{this.doWrite(S,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",S=this.query||{};return this.opts.timestampRequests!==!1&&(S[this.opts.timestampParam]=(0,n.yeast)()),!this.supportsBinary&&!S.sid&&(S.b64=1),this.createUri(_,S)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new p(this.uri(),_)}doWrite(_,S){const v=this.request({method:"POST",data:_});v.on("success",S),v.on("error",(w,A)=>{this.onError("xhr post error",w,A)})}doPoll(){u("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(S,v)=>{this.onError("xhr poll error",S,v)}),this.pollXhr=_}}Tt.Polling=f;class p extends l.Emitter{constructor(_,S){super(),(0,i.installTimerFunctions)(this,S),this.opts=S,this.method=S.method||"GET",this.uri=_,this.data=S.data!==void 0?S.data:null,this.create()}create(){var _;const S=(0,i.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");S.xdomain=!!this.opts.xd;const v=this.xhr=new o.XHR(S);try{u("xhr open %s: %s",this.method,this.uri),v.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){v.setDisableHeaderCheck&&v.setDisableHeaderCheck(!0);for(let w in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(w)&&v.setRequestHeader(w,this.opts.extraHeaders[w])}}catch{}if(this.method==="POST")try{v.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{v.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(v),"withCredentials"in v&&(v.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(v.timeout=this.opts.requestTimeout),v.onreadystatechange=()=>{var w;v.readyState===3&&((w=this.opts.cookieJar)===null||w===void 0||w.parseCookies(v)),v.readyState===4&&(v.status===200||v.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof v.status=="number"?v.status:0)},0))},u("xhr data %s",this.data),v.send(this.data)}catch(w){this.setTimeoutFn(()=>{this.onError(w)},0);return}typeof document<"u"&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onError(_){this.emitReserved("error",_,this.xhr),this.cleanup(!0)}cleanup(_){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=a,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete p.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Tt.Request=p,p.requestsCount=0,p.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h);else if(typeof addEventListener=="function"){const y="onpagehide"in c.globalThisShim?"pagehide":"unload";addEventListener(y,h,!1)}}function h(){for(let y in p.requests)p.requests.hasOwnProperty(y)&&p.requests[y].abort()}return Tt}var Tr={},Qe={},iu;function Yn(){if(iu)return Qe;iu=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.defaultBinaryType=Qe.usingBrowserWebSocket=Qe.WebSocket=Qe.nextTick=void 0;const e=Qn();return Qe.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,n)=>n(r,0))(),Qe.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Qe.usingBrowserWebSocket=!0,Qe.defaultBinaryType="arraybuffer",Qe}var ou;function wv(){if(ou)return Tr;ou=1;var e=le&&le.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.WS=void 0;const t=zn(),r=Sf(),n=Gr(),s=Yn(),o=e(tt()),l=Wr(),i=(0,o.default)("engine.io-client:websocket"),c=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class u extends t.Transport{constructor(d){super(d),this.supportsBinary=!d.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const d=this.uri(),f=this.opts.protocols,p=c?{}:(0,n.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(p.headers=this.opts.extraHeaders);try{this.ws=s.usingBrowserWebSocket&&!c?f?new s.WebSocket(d,f):new s.WebSocket(d):new s.WebSocket(d,f,p)}catch(h){return this.emitReserved("error",h)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let f=0;f<d.length;f++){const p=d[f],h=f===d.length-1;(0,l.encodePacket)(p,this.supportsBinary,y=>{const _={};s.usingBrowserWebSocket||(p.options&&(_.compress=p.options.compress),this.opts.perMessageDeflate&&(typeof y=="string"?Buffer.byteLength(y):y.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{s.usingBrowserWebSocket?this.ws.send(y):this.ws.send(y,_)}catch{i("websocket closed before onclose event")}h&&(0,s.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",f=this.query||{};return this.opts.timestampRequests&&(f[this.opts.timestampParam]=(0,r.yeast)()),this.supportsBinary||(f.b64=1),this.createUri(d,f)}check(){return!!s.WebSocket}}return Tr.WS=u,Tr}var Or={},au;function bv(){if(au)return Or;au=1;var e=le&&le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.WT=void 0;const t=zn(),r=Yn(),n=Wr(),o=(0,e(tt()).default)("engine.io-client:webtransport");class l extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{o("transport closed gracefully"),this.onClose()}).catch(c=>{o("transport closed due to %s",c),this.onError("webtransport error",c)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(c=>{const u=(0,n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=c.readable.pipeThrough(u).getReader(),d=(0,n.createPacketEncoderStream)();d.readable.pipeTo(c.writable),this.writer=d.writable.getWriter();const f=()=>{a.read().then(({done:h,value:y})=>{if(h){o("session is closed");return}o("received chunk: %o",y),this.onPacket(y),f()}).catch(h=>{o("an error occurred while reading: %s",h)})};f();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this.writer.write(p).then(()=>this.onOpen())})}))}write(c){this.writable=!1;for(let u=0;u<c.length;u++){const a=c[u],d=u===c.length-1;this.writer.write(a).then(()=>{d&&(0,r.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var c;(c=this.transport)===null||c===void 0||c.close()}}return Or.WT=l,Or}var su;function Tf(){if(su)return _r;su=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.transports=void 0;const e=Ev(),t=wv(),r=bv();return _r.transports={websocket:t.WS,webtransport:r.WT,polling:e.Polling},_r}var Ar={},cu;function Of(){if(cu)return Ar;cu=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r(o){const l=o,i=o.indexOf("["),c=o.indexOf("]");i!=-1&&c!=-1&&(o=o.substring(0,i)+o.substring(i,c).replace(/:/g,";")+o.substring(c,o.length));let u=e.exec(o||""),a={},d=14;for(;d--;)a[t[d]]=u[d]||"";return i!=-1&&c!=-1&&(a.source=l,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=n(a,a.path),a.queryKey=s(a,a.query),a}Ar.parse=r;function n(o,l){const i=/\/{2,9}/g,c=l.replace(i,"/").split("/");return(l.slice(0,1)=="/"||l.length===0)&&c.splice(0,1),l.slice(-1)=="/"&&c.splice(c.length-1,1),c}function s(o,l){const i={};return l.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,u,a){u&&(i[u]=a)}),i}return Ar}var uu;function Sv(){if(uu)return vr;uu=1;var e=le&&le.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(vr,"__esModule",{value:!0}),vr.Socket=void 0;const t=Tf(),r=Gr(),n=bf(),s=Of(),o=e(tt()),l=er,i=Wr(),c=Yn(),u=(0,o.default)("engine.io-client:socket");class a extends l.Emitter{constructor(f,p={}){super(),this.binaryType=c.defaultBinaryType,this.writeBuffer=[],f&&typeof f=="object"&&(p=f,f=null),f?(f=(0,s.parse)(f),p.hostname=f.host,p.secure=f.protocol==="https"||f.protocol==="wss",p.port=f.port,f.query&&(p.query=f.query)):p.host&&(p.hostname=(0,s.parse)(p.host).host),(0,r.installTimerFunctions)(this,p),this.secure=p.secure!=null?p.secure:typeof location<"u"&&location.protocol==="https:",p.hostname&&!p.port&&(p.port=this.secure?"443":"80"),this.hostname=p.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=p.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=p.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},p),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,n.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(f){u('creating transport "%s"',f);const p=Object.assign({},this.opts.query);p.EIO=i.protocol,p.transport=f,this.id&&(p.sid=this.id);const h=Object.assign({},this.opts,{query:p,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[f]);return u("options: %j",h),new t.transports[f](h)}open(){let f;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)f="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else f=this.transports[0];this.readyState="opening";try{f=this.createTransport(f)}catch(p){u("error while creating transport: %s",p),this.transports.shift(),this.open();return}f.open(),this.setTransport(f)}setTransport(f){u("setting transport %s",f.name),this.transport&&(u("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",p=>this.onClose("transport close",p))}probe(f){u('probing transport "%s"',f);let p=this.createTransport(f),h=!1;a.priorWebsocketSuccess=!1;const y=()=>{h||(u('probe transport "%s" opened',f),p.send([{type:"ping",data:"probe"}]),p.once("packet",M=>{if(!h)if(M.type==="pong"&&M.data==="probe"){if(u('probe transport "%s" pong',f),this.upgrading=!0,this.emitReserved("upgrading",p),!p)return;a.priorWebsocketSuccess=p.name==="websocket",u('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{h||this.readyState!=="closed"&&(u("changing transport and sending upgrade packet"),T(),this.setTransport(p),p.send([{type:"upgrade"}]),this.emitReserved("upgrade",p),p=null,this.upgrading=!1,this.flush())})}else{u('probe transport "%s" failed',f);const D=new Error("probe error");D.transport=p.name,this.emitReserved("upgradeError",D)}}))};function _(){h||(h=!0,T(),p.close(),p=null)}const S=M=>{const D=new Error("probe error: "+M);D.transport=p.name,_(),u('probe transport "%s" failed because of error: %s',f,M),this.emitReserved("upgradeError",D)};function v(){S("transport closed")}function w(){S("socket closed")}function A(M){p&&M.name!==p.name&&(u('"%s" works - aborting "%s"',M.name,p.name),_())}const T=()=>{p.removeListener("open",y),p.removeListener("error",S),p.removeListener("close",v),this.off("close",w),this.off("upgrading",A)};p.once("open",y),p.once("error",S),p.once("close",v),this.once("close",w),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&f!=="webtransport"?this.setTimeoutFn(()=>{h||p.open()},200):p.open()}onOpen(){if(u("socket open"),this.readyState="open",a.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){u("starting upgrade probes");let f=0;const p=this.upgrades.length;for(;f<p;f++)this.probe(this.upgrades[f])}}onPacket(f){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(u('socket receive: type "%s", data "%s"',f.type,f.data),this.emitReserved("packet",f),this.emitReserved("heartbeat"),this.resetPingTimeout(),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const p=new Error("server error");p.code=f.data,this.onError(p);break;case"message":this.emitReserved("data",f.data),this.emitReserved("message",f.data);break}else u('packet received with socket readyState "%s"',this.readyState)}onHandshake(f){this.emitReserved("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.maxPayload=f.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const f=this.getWritablePackets();u("flushing %d packets in socket",f.length),this.transport.send(f),this.prevBufferLen=f.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let p=1;for(let h=0;h<this.writeBuffer.length;h++){const y=this.writeBuffer[h].data;if(y&&(p+=(0,r.byteLength)(y)),h>0&&p>this.maxPayload)return u("only send %d out of %d packets",h,this.writeBuffer.length),this.writeBuffer.slice(0,h);p+=2}return u("payload size is %d (max: %d)",p,this.maxPayload),this.writeBuffer}write(f,p,h){return this.sendPacket("message",f,p,h),this}send(f,p,h){return this.sendPacket("message",f,p,h),this}sendPacket(f,p,h,y){if(typeof p=="function"&&(y=p,p=void 0),typeof h=="function"&&(y=h,h=null),this.readyState==="closing"||this.readyState==="closed")return;h=h||{},h.compress=h.compress!==!1;const _={type:f,data:p,options:h};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),y&&this.once("flush",y),this.flush()}close(){const f=()=>{this.onClose("forced close"),u("socket closing - telling transport to close"),this.transport.close()},p=()=>{this.off("upgrade",p),this.off("upgradeError",p),f()},h=()=>{this.once("upgrade",p),this.once("upgradeError",p)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?h():f()}):this.upgrading?h():f()),this}onError(f){u("socket error %j",f),a.priorWebsocketSuccess=!1,this.emitReserved("error",f),this.onClose("transport error",f)}onClose(f,p){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(u('socket close with reason: "%s"',f),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",f,p),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(f){const p=[];let h=0;const y=f.length;for(;h<y;h++)~this.transports.indexOf(f[h])&&p.push(f[h]);return p}}return vr.Socket=a,a.protocol=i.protocol,vr}var lu;function Af(){return lu||(lu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=Sv();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=zn();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Tf();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var s=Gr();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var o=Of();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var l=Yn();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return l.nextTick}})}(wo)),wo}var fu;function Tv(){if(fu)return yr;fu=1;var e=le&&le.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.url=void 0;const t=Af(),n=e(tt()).default("socket.io-client:url");function s(o,l="",i){let c=o;i=i||typeof location<"u"&&location,o==null&&(o=i.protocol+"//"+i.host),typeof o=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=i.protocol+o:o=i.host+o),/^(https?|wss?):\/\//.test(o)||(n("protocol-less url %s",o),typeof i<"u"?o=i.protocol+"//"+o:o="https://"+o),n("parse %s",o),c=t.parse(o)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";const a=c.host.indexOf(":")!==-1?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+a+":"+c.port+l,c.href=c.protocol+"://"+a+(i&&i.port===c.port?"":":"+c.port),c}return yr.url=s,yr}var xr={},Rr={},Oo={},Ct={},Pt={},du;function xf(){if(du)return Pt;du=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.hasBinary=Pt.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,r=Object.prototype.toString,n=typeof Blob=="function"||typeof Blob<"u"&&r.call(Blob)==="[object BlobConstructor]",s=typeof File=="function"||typeof File<"u"&&r.call(File)==="[object FileConstructor]";function o(i){return e&&(i instanceof ArrayBuffer||t(i))||n&&i instanceof Blob||s&&i instanceof File}Pt.isBinary=o;function l(i,c){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let u=0,a=i.length;u<a;u++)if(l(i[u]))return!0;return!1}if(o(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return l(i.toJSON(),!0);for(const u in i)if(Object.prototype.hasOwnProperty.call(i,u)&&l(i[u]))return!0;return!1}return Pt.hasBinary=l,Pt}var pu;function Ov(){if(pu)return Ct;pu=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.reconstructPacket=Ct.deconstructPacket=void 0;const e=xf();function t(o){const l=[],i=o.data,c=o;return c.data=r(i,l),c.attachments=l.length,{packet:c,buffers:l}}Ct.deconstructPacket=t;function r(o,l){if(!o)return o;if((0,e.isBinary)(o)){const i={_placeholder:!0,num:l.length};return l.push(o),i}else if(Array.isArray(o)){const i=new Array(o.length);for(let c=0;c<o.length;c++)i[c]=r(o[c],l);return i}else if(typeof o=="object"&&!(o instanceof Date)){const i={};for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=r(o[c],l));return i}return o}function n(o,l){return o.data=s(o.data,l),delete o.attachments,o}Ct.reconstructPacket=n;function s(o,l){if(!o)return o;if(o&&o._placeholder===!0){if(typeof o.num=="number"&&o.num>=0&&o.num<l.length)return l[o.num];throw new Error("illegal attachments")}else if(Array.isArray(o))for(let i=0;i<o.length;i++)o[i]=s(o[i],l);else if(typeof o=="object")for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=s(o[i],l));return o}return Ct}var hu;function wa(){return hu||(hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=er,r=Ov(),n=xf(),o=(0,tt().default)("socket.io-parser"),l=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var i;(function(f){f[f.CONNECT=0]="CONNECT",f[f.DISCONNECT=1]="DISCONNECT",f[f.EVENT=2]="EVENT",f[f.ACK=3]="ACK",f[f.CONNECT_ERROR=4]="CONNECT_ERROR",f[f.BINARY_EVENT=5]="BINARY_EVENT",f[f.BINARY_ACK=6]="BINARY_ACK"})(i=e.PacketType||(e.PacketType={}));class c{constructor(p){this.replacer=p}encode(p){return o("encoding packet %j",p),(p.type===i.EVENT||p.type===i.ACK)&&(0,n.hasBinary)(p)?this.encodeAsBinary({type:p.type===i.EVENT?i.BINARY_EVENT:i.BINARY_ACK,nsp:p.nsp,data:p.data,id:p.id}):[this.encodeAsString(p)]}encodeAsString(p){let h=""+p.type;return(p.type===i.BINARY_EVENT||p.type===i.BINARY_ACK)&&(h+=p.attachments+"-"),p.nsp&&p.nsp!=="/"&&(h+=p.nsp+","),p.id!=null&&(h+=p.id),p.data!=null&&(h+=JSON.stringify(p.data,this.replacer)),o("encoded %j as %s",p,h),h}encodeAsBinary(p){const h=(0,r.deconstructPacket)(p),y=this.encodeAsString(h.packet),_=h.buffers;return _.unshift(y),_}}e.Encoder=c;function u(f){return Object.prototype.toString.call(f)==="[object Object]"}class a extends t.Emitter{constructor(p){super(),this.reviver=p}add(p){let h;if(typeof p=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(p);const y=h.type===i.BINARY_EVENT;y||h.type===i.BINARY_ACK?(h.type=y?i.EVENT:i.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,n.isBinary)(p)||p.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(p),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+p)}decodeString(p){let h=0;const y={type:Number(p.charAt(0))};if(i[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===i.BINARY_EVENT||y.type===i.BINARY_ACK){const S=h+1;for(;p.charAt(++h)!=="-"&&h!=p.length;);const v=p.substring(S,h);if(v!=Number(v)||p.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(p.charAt(h+1)==="/"){const S=h+1;for(;++h&&!(p.charAt(h)===","||h===p.length););y.nsp=p.substring(S,h)}else y.nsp="/";const _=p.charAt(h+1);if(_!==""&&Number(_)==_){const S=h+1;for(;++h;){const v=p.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===p.length)break}y.id=Number(p.substring(S,h+1))}if(p.charAt(++h)){const S=this.tryParse(p.substr(h));if(a.isPayloadValid(y.type,S))y.data=S;else throw new Error("invalid payload")}return o("decoded %s as %j",p,y),y}tryParse(p){try{return JSON.parse(p,this.reviver)}catch{return!1}}static isPayloadValid(p,h){switch(p){case i.CONNECT:return u(h);case i.DISCONNECT:return h===void 0;case i.CONNECT_ERROR:return typeof h=="string"||u(h);case i.EVENT:case i.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&l.indexOf(h[0])===-1);case i.ACK:case i.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=a;class d{constructor(p){this.packet=p,this.buffers=[],this.reconPack=p}takeBinaryData(p){if(this.buffers.push(p),this.buffers.length===this.reconPack.attachments){const h=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(Oo)),Oo}var Cr={},mu;function Rf(){if(mu)return Cr;mu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.on=void 0;function e(t,r,n){return t.on(r,n),function(){t.off(r,n)}}return Cr.on=e,Cr}var gu;function Cf(){if(gu)return Rr;gu=1;var e=le&&le.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.Socket=void 0;const t=wa(),r=Rf(),n=er,o=e(tt()).default("socket.io-client:socket"),l=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i extends n.Emitter{constructor(u,a,d){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=u,this.nsp=a,d&&d.auth&&(this.auth=d.auth),this._opts=Object.assign({},d),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const u=this.io;this.subs=[r.on(u,"open",this.onopen.bind(this)),r.on(u,"packet",this.onpacket.bind(this)),r.on(u,"error",this.onerror.bind(this)),r.on(u,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...u){return u.unshift("message"),this.emit.apply(this,u),this}emit(u,...a){if(l.hasOwnProperty(u))throw new Error('"'+u.toString()+'" is a reserved event name');if(a.unshift(u),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const d={type:t.PacketType.EVENT,data:a};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const h=this.ids++;o("emitting packet with ack id %d",h);const y=a.pop();this._registerAckCallback(h,y),d.id=h}const f=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!f||!this.connected)?o("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d),this.flags={},this}_registerAckCallback(u,a){var d;const f=(d=this.flags.timeout)!==null&&d!==void 0?d:this._opts.ackTimeout;if(f===void 0){this.acks[u]=a;return}const p=this.io.setTimeoutFn(()=>{delete this.acks[u];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===u&&(o("removing packet with ack id %d from the buffer",u),this.sendBuffer.splice(h,1));o("event with ack id %d has timed out after %d ms",u,f),a.call(this,new Error("operation has timed out"))},f);this.acks[u]=(...h)=>{this.io.clearTimeoutFn(p),a.apply(this,[null,...h])}}emitWithAck(u,...a){const d=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((f,p)=>{a.push((h,y)=>d?h?p(h):f(y):f(h)),this.emit(u,...a)})}_addToQueue(u){let a;typeof u[u.length-1]=="function"&&(a=u.pop());const d={id:this._queueSeq++,tryCount:0,pending:!1,args:u,flags:Object.assign({fromQueue:!0},this.flags)};u.push((f,...p)=>d!==this._queue[0]?void 0:(f!==null?d.tryCount>this._opts.retries&&(o("packet [%d] is discarded after %d tries",d.id,d.tryCount),this._queue.shift(),a&&a(f)):(o("packet [%d] was successfully sent",d.id),this._queue.shift(),a&&a(null,...p)),d.pending=!1,this._drainQueue())),this._queue.push(d),this._drainQueue()}_drainQueue(u=!1){if(o("draining queue"),!this.connected||this._queue.length===0)return;const a=this._queue[0];if(a.pending&&!u){o("packet [%d] has already been sent and is waiting for an ack",a.id);return}a.pending=!0,a.tryCount++,o("sending packet [%d] (try n°%d)",a.id,a.tryCount),this.flags=a.flags,this.emit.apply(this,a.args)}packet(u){u.nsp=this.nsp,this.io._packet(u)}onopen(){o("transport is open - connecting"),typeof this.auth=="function"?this.auth(u=>{this._sendConnectPacket(u)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(u){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},u):u})}onerror(u){this.connected||this.emitReserved("connect_error",u)}onclose(u,a){o("close (%s)",u),this.connected=!1,delete this.id,this.emitReserved("disconnect",u,a)}onpacket(u){if(u.nsp===this.nsp)switch(u.type){case t.PacketType.CONNECT:u.data&&u.data.sid?this.onconnect(u.data.sid,u.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(u);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(u);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const d=new Error(u.data.message);d.data=u.data.data,this.emitReserved("connect_error",d);break}}onevent(u){const a=u.data||[];o("emitting event %j",a),u.id!=null&&(o("attaching ack callback to event"),a.push(this.ack(u.id))),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(u){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const d of a)d.apply(this,u)}super.emit.apply(this,u),this._pid&&u.length&&typeof u[u.length-1]=="string"&&(this._lastOffset=u[u.length-1])}ack(u){const a=this;let d=!1;return function(...f){d||(d=!0,o("sending ack %j",f),a.packet({type:t.PacketType.ACK,id:u,data:f}))}}onack(u){const a=this.acks[u.id];typeof a=="function"?(o("calling ack %s with %j",u.id,u.data),a.apply(this,u.data),delete this.acks[u.id]):o("bad ack %s",u.id)}onconnect(u,a){o("socket connected with id %s",u),this.id=u,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(u=>this.emitEvent(u)),this.receiveBuffer=[],this.sendBuffer.forEach(u=>{this.notifyOutgoingListeners(u),this.packet(u)}),this.sendBuffer=[]}ondisconnect(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(u=>u()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(u){return this.flags.compress=u,this}get volatile(){return this.flags.volatile=!0,this}timeout(u){return this.flags.timeout=u,this}onAny(u){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(u),this}prependAny(u){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(u),this}offAny(u){if(!this._anyListeners)return this;if(u){const a=this._anyListeners;for(let d=0;d<a.length;d++)if(u===a[d])return a.splice(d,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(u){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(u),this}prependAnyOutgoing(u){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(u),this}offAnyOutgoing(u){if(!this._anyOutgoingListeners)return this;if(u){const a=this._anyOutgoingListeners;for(let d=0;d<a.length;d++)if(u===a[d])return a.splice(d,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(u){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const d of a)d.apply(this,u.data)}}}return Rr.Socket=i,Rr}var Pr={},yu;function Av(){if(yu)return Pr;yu=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Pr.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),n=Math.floor(r*this.jitter*t);t=Math.floor(r*10)&1?t+n:t-n}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Pr}var vu;function xv(){if(vu)return xr;vu=1;var e=le&&le.__createBinding||(Object.create?function(p,h,y,_){_===void 0&&(_=y),Object.defineProperty(p,_,{enumerable:!0,get:function(){return h[y]}})}:function(p,h,y,_){_===void 0&&(_=y),p[_]=h[y]}),t=le&&le.__setModuleDefault||(Object.create?function(p,h){Object.defineProperty(p,"default",{enumerable:!0,value:h})}:function(p,h){p.default=h}),r=le&&le.__importStar||function(p){if(p&&p.__esModule)return p;var h={};if(p!=null)for(var y in p)y!=="default"&&Object.prototype.hasOwnProperty.call(p,y)&&e(h,p,y);return t(h,p),h},n=le&&le.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(xr,"__esModule",{value:!0}),xr.Manager=void 0;const s=Af(),o=Cf(),l=r(wa()),i=Rf(),c=Av(),u=er,d=n(tt()).default("socket.io-client:manager");class f extends u.Emitter{constructor(h,y){var _;super(),this.nsps={},this.subs=[],h&&typeof h=="object"&&(y=h,h=void 0),y=y||{},y.path=y.path||"/socket.io",this.opts=y,s.installTimerFunctions(this,y),this.reconnection(y.reconnection!==!1),this.reconnectionAttempts(y.reconnectionAttempts||1/0),this.reconnectionDelay(y.reconnectionDelay||1e3),this.reconnectionDelayMax(y.reconnectionDelayMax||5e3),this.randomizationFactor((_=y.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new c.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(y.timeout==null?2e4:y.timeout),this._readyState="closed",this.uri=h;const S=y.parser||l;this.encoder=new S.Encoder,this.decoder=new S.Decoder,this._autoConnect=y.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(h){return arguments.length?(this._reconnection=!!h,this):this._reconnection}reconnectionAttempts(h){return h===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=h,this)}reconnectionDelay(h){var y;return h===void 0?this._reconnectionDelay:(this._reconnectionDelay=h,(y=this.backoff)===null||y===void 0||y.setMin(h),this)}randomizationFactor(h){var y;return h===void 0?this._randomizationFactor:(this._randomizationFactor=h,(y=this.backoff)===null||y===void 0||y.setJitter(h),this)}reconnectionDelayMax(h){var y;return h===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=h,(y=this.backoff)===null||y===void 0||y.setMax(h),this)}timeout(h){return arguments.length?(this._timeout=h,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(h){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new s.Socket(this.uri,this.opts);const y=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const S=i.on(y,"open",function(){_.onopen(),h&&h()}),v=A=>{d("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),h?h(A):this.maybeReconnectOnOpen()},w=i.on(y,"error",v);if(this._timeout!==!1){const A=this._timeout;d("connect attempt will timeout after %d",A);const T=this.setTimeoutFn(()=>{d("connect attempt timed out after %d",A),S(),v(new Error("timeout")),y.close()},A);this.opts.autoUnref&&T.unref(),this.subs.push(()=>{this.clearTimeoutFn(T)})}return this.subs.push(S),this.subs.push(w),this}connect(h){return this.open(h)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const h=this.engine;this.subs.push(i.on(h,"ping",this.onping.bind(this)),i.on(h,"data",this.ondata.bind(this)),i.on(h,"error",this.onerror.bind(this)),i.on(h,"close",this.onclose.bind(this)),i.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(h){try{this.decoder.add(h)}catch(y){this.onclose("parse error",y)}}ondecoded(h){s.nextTick(()=>{this.emitReserved("packet",h)},this.setTimeoutFn)}onerror(h){d("error",h),this.emitReserved("error",h)}socket(h,y){let _=this.nsps[h];return _?this._autoConnect&&!_.active&&_.connect():(_=new o.Socket(this,h,y),this.nsps[h]=_),_}_destroy(h){const y=Object.keys(this.nsps);for(const _ of y)if(this.nsps[_].active){d("socket %s is still active, skipping close",_);return}this._close()}_packet(h){d("writing packet %j",h);const y=this.encoder.encode(h);for(let _=0;_<y.length;_++)this.engine.write(y[_],h.options)}cleanup(){d("cleanup"),this.subs.forEach(h=>h()),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(h,y){d("closed due to %s",h),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",h,y),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const h=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const y=this.backoff.duration();d("will wait %dms before reconnect attempt",y),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{h.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",h.backoff.attempts),!h.skipReconnect&&h.open(S=>{S?(d("reconnect attempt error"),h._reconnecting=!1,h.reconnect(),this.emitReserved("reconnect_error",S)):(d("reconnect success"),h.onreconnect())}))},y);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const h=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",h)}}return xr.Manager=f,xr}var _u;function Rv(){return _u||(_u=1,function(e,t){var r=le&&le.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=Tv(),s=xv();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return s.Manager}});const o=Cf();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const i=r(tt()).default("socket.io-client"),c={};function u(d,f){typeof d=="object"&&(f=d,d=void 0),f=f||{};const p=n.url(d,f.path||"/socket.io"),h=p.source,y=p.id,_=p.path,S=c[y]&&_ in c[y].nsps,v=f.forceNew||f["force new connection"]||f.multiplex===!1||S;let w;return v?(i("ignoring socket cache for %s",h),w=new s.Manager(h,f)):(c[y]||(i("new io instance for %s",h),c[y]=new s.Manager(h,f)),w=c[y]),p.query&&!f.query&&(f.query=p.queryKey),w.socket(p.path,f)}t.io=u,t.connect=u,t.default=u,Object.assign(u,{Manager:s.Manager,Socket:o.Socket,io:u,connect:u});var a=wa();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return a.protocol}}),e.exports=u}(Sn,Sn.exports)),Sn.exports}var Ao={},Nr={},Eu;function Cv(){if(Eu)return Nr;Eu=1,Nr.byteLength=i,Nr.toByteArray=u,Nr.fromByteArray=f;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,o=n.length;s<o;++s)e[s]=n[s],t[n.charCodeAt(s)]=s;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function l(p){var h=p.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=p.indexOf("=");y===-1&&(y=h);var _=y===h?0:4-y%4;return[y,_]}function i(p){var h=l(p),y=h[0],_=h[1];return(y+_)*3/4-_}function c(p,h,y){return(h+y)*3/4-y}function u(p){var h,y=l(p),_=y[0],S=y[1],v=new r(c(p,_,S)),w=0,A=S>0?_-4:_,T;for(T=0;T<A;T+=4)h=t[p.charCodeAt(T)]<<18|t[p.charCodeAt(T+1)]<<12|t[p.charCodeAt(T+2)]<<6|t[p.charCodeAt(T+3)],v[w++]=h>>16&255,v[w++]=h>>8&255,v[w++]=h&255;return S===2&&(h=t[p.charCodeAt(T)]<<2|t[p.charCodeAt(T+1)]>>4,v[w++]=h&255),S===1&&(h=t[p.charCodeAt(T)]<<10|t[p.charCodeAt(T+1)]<<4|t[p.charCodeAt(T+2)]>>2,v[w++]=h>>8&255,v[w++]=h&255),v}function a(p){return e[p>>18&63]+e[p>>12&63]+e[p>>6&63]+e[p&63]}function d(p,h,y){for(var _,S=[],v=h;v<y;v+=3)_=(p[v]<<16&16711680)+(p[v+1]<<8&65280)+(p[v+2]&255),S.push(a(_));return S.join("")}function f(p){for(var h,y=p.length,_=y%3,S=[],v=16383,w=0,A=y-_;w<A;w+=v)S.push(d(p,w,w+v>A?A:w+v));return _===1?(h=p[y-1],S.push(e[h>>2]+e[h<<4&63]+"==")):_===2&&(h=(p[y-2]<<8)+p[y-1],S.push(e[h>>10]+e[h>>4&63]+e[h<<2&63]+"=")),S.join("")}return Nr}var On={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var wu;function Pv(){return wu||(wu=1,On.read=function(e,t,r,n,s){var o,l,i=s*8-n-1,c=(1<<i)-1,u=c>>1,a=-7,d=r?s-1:0,f=r?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-a)-1,p>>=-a,a+=i;a>0;o=o*256+e[t+d],d+=f,a-=8);for(l=o&(1<<-a)-1,o>>=-a,a+=n;a>0;l=l*256+e[t+d],d+=f,a-=8);if(o===0)o=1-u;else{if(o===c)return l?NaN:(p?-1:1)*(1/0);l=l+Math.pow(2,n),o=o-u}return(p?-1:1)*l*Math.pow(2,o-n)},On.write=function(e,t,r,n,s,o){var l,i,c,u=o*8-s-1,a=(1<<u)-1,d=a>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,h=n?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,l=a):(l=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-l))<1&&(l--,c*=2),l+d>=1?t+=f/c:t+=f*Math.pow(2,1-d),t*c>=2&&(l++,c/=2),l+d>=a?(i=0,l=a):l+d>=1?(i=(t*c-1)*Math.pow(2,s),l=l+d):(i=t*Math.pow(2,d-1)*Math.pow(2,s),l=0));s>=8;e[r+p]=i&255,p+=h,i/=256,s-=8);for(l=l<<s|i,u+=s;u>0;e[r+p]=l&255,p+=h,l/=256,u-=8);e[r+p-h]|=y*128}),On}/*!
63
+ window.`+l+".push("+JSON.stringify(o)+")"}};return _o=r,_o}var Eo,Lc;function My(){if(Lc)return Eo;Lc=1;var e=jy(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}var r={dataScript:function(o){var l=document.createElement("script");return l.innerHTML=o,l},gtm:function(o){var l=t.default.tags(o),i=function(){var d=document.createElement("noscript");return d.innerHTML=l.iframe,d},u=function(){var d=document.createElement("script");return d.innerHTML=l.script,d},c=this.dataScript(l.dataLayerVar);return{noScript:i,script:u,dataScript:c}},initialize:function(o){var l=o.gtmId,i=o.events,u=i===void 0?{}:i,c=o.dataLayer,a=o.dataLayerName,d=a===void 0?"dataLayer":a,f=o.auth,p=f===void 0?"":f,h=o.preview,y=h===void 0?"":h,_=this.gtm({id:l,events:u,dataLayer:c||void 0,dataLayerName:d,auth:p,preview:y});c&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(o){var l=o.dataLayer,i=o.dataLayerName,u=i===void 0?"dataLayer":i;if(window[u])return window[u].push(l);var c=t.default.dataLayer(l,u),a=this.dataScript(c);document.head.insertBefore(a,document.head.childNodes[0])}};return Eo=r,Eo}var wo,Fc;function Dy(){if(Fc)return wo;Fc=1;var e=My(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return wo=t.default,wo}var jc;function Uy(){return jc||(jc=1,function(e,t){(function(n,r){e.exports=r(Dy())})(ce,function(n){return function(){var r={273:function(i){i.exports=n}},s={};function o(i){var u=s[i];if(u!==void 0)return u.exports;var c=s[i]={exports:{}};return r[i](c,c.exports,o),c.exports}o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,{a:u}),u},o.d=function(i,u){for(var c in u)o.o(u,c)&&!o.o(i,c)&&Object.defineProperty(i,c,{enumerable:!0,get:u[c]})},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{setContext:function(){return a},setupGTM:function(){return f}});var i=o(273),u=o.n(i);let c=null;const a=({configs:p,environment:h})=>{if(!h)throw new Error("Cannot set context: Environment not defined");if(!p)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!p[h])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:p,environment:h})}`);c=p[h]},d=()=>c,f=()=>{const p=d();u().initialize({gtmId:p.id})}}(),l}()})}(vo)),vo.exports}var dl=202,pl=502,hl=400,ml=409,gl=100,yl=201,vl=417,By=424,_l=403,El=504,wl=410,bl=505,Sl=418,Ol=419,Tl=507,xl=500,Al=411,Rl=423,Cl=420,Nl=405,Pl=301,Il=302,kl=207,Ll=300,Fl=511,jl=204,Ml=203,Dl=406,Ul=404,Bl=501,$l=304,ql=200,Hl=206,Wl=402,Gl=308,Vl=412,Ql=428,zl=102,Yl=407,Kl=431,Jl=408,Xl=413,Zl=414,ef=416,tf=205,rf=303,nf=503,of=101,af=307,sf=429,cf=401,uf=422,lf=415,ff=305;const $y={ACCEPTED:dl,BAD_GATEWAY:pl,BAD_REQUEST:hl,CONFLICT:ml,CONTINUE:gl,CREATED:yl,EXPECTATION_FAILED:vl,FORBIDDEN:_l,GATEWAY_TIMEOUT:El,GONE:wl,HTTP_VERSION_NOT_SUPPORTED:bl,IM_A_TEAPOT:Sl,INSUFFICIENT_SPACE_ON_RESOURCE:Ol,INSUFFICIENT_STORAGE:Tl,INTERNAL_SERVER_ERROR:xl,LENGTH_REQUIRED:Al,LOCKED:Rl,METHOD_FAILURE:Cl,METHOD_NOT_ALLOWED:Nl,MOVED_PERMANENTLY:Pl,MOVED_TEMPORARILY:Il,MULTI_STATUS:kl,MULTIPLE_CHOICES:Ll,NETWORK_AUTHENTICATION_REQUIRED:Fl,NO_CONTENT:jl,NON_AUTHORITATIVE_INFORMATION:Ml,NOT_ACCEPTABLE:Dl,NOT_FOUND:Ul,NOT_IMPLEMENTED:Bl,NOT_MODIFIED:$l,OK:ql,PARTIAL_CONTENT:Hl,PAYMENT_REQUIRED:Wl,PERMANENT_REDIRECT:Gl,PRECONDITION_FAILED:Vl,PRECONDITION_REQUIRED:Ql,PROCESSING:zl,PROXY_AUTHENTICATION_REQUIRED:Yl,REQUEST_HEADER_FIELDS_TOO_LARGE:Kl,REQUEST_TIMEOUT:Jl,REQUEST_TOO_LONG:Xl,REQUEST_URI_TOO_LONG:Zl,REQUESTED_RANGE_NOT_SATISFIABLE:ef,RESET_CONTENT:tf,SEE_OTHER:rf,SERVICE_UNAVAILABLE:nf,SWITCHING_PROTOCOLS:of,TEMPORARY_REDIRECT:af,TOO_MANY_REQUESTS:sf,UNAUTHORIZED:cf,UNPROCESSABLE_ENTITY:uf,UNSUPPORTED_MEDIA_TYPE:lf,USE_PROXY:ff};var qy={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},Hy={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function df(e){var t=qy[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function pf(e){var t=Hy[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var hf=df,Zo;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(Zo||(Zo={}));var ea;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(ea||(ea={}));var Un=globalThis&&globalThis.__assign||function(){return Un=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Un.apply(this,arguments)};const Wy=Un(Un({},$y),{getStatusCode:pf,getStatusText:hf}),Gy=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:dl,BAD_GATEWAY:pl,BAD_REQUEST:hl,CONFLICT:ml,CONTINUE:gl,CREATED:yl,EXPECTATION_FAILED:vl,FAILED_DEPENDENCY:By,FORBIDDEN:_l,GATEWAY_TIMEOUT:El,GONE:wl,HTTP_VERSION_NOT_SUPPORTED:bl,IM_A_TEAPOT:Sl,INSUFFICIENT_SPACE_ON_RESOURCE:Ol,INSUFFICIENT_STORAGE:Tl,INTERNAL_SERVER_ERROR:xl,LENGTH_REQUIRED:Al,LOCKED:Rl,METHOD_FAILURE:Cl,METHOD_NOT_ALLOWED:Nl,MOVED_PERMANENTLY:Pl,MOVED_TEMPORARILY:Il,MULTIPLE_CHOICES:Ll,MULTI_STATUS:kl,NETWORK_AUTHENTICATION_REQUIRED:Fl,NON_AUTHORITATIVE_INFORMATION:Ml,NOT_ACCEPTABLE:Dl,NOT_FOUND:Ul,NOT_IMPLEMENTED:Bl,NOT_MODIFIED:$l,NO_CONTENT:jl,OK:ql,PARTIAL_CONTENT:Hl,PAYMENT_REQUIRED:Wl,PERMANENT_REDIRECT:Gl,PRECONDITION_FAILED:Vl,PRECONDITION_REQUIRED:Ql,PROCESSING:zl,PROXY_AUTHENTICATION_REQUIRED:Yl,REQUESTED_RANGE_NOT_SATISFIABLE:ef,REQUEST_HEADER_FIELDS_TOO_LARGE:Kl,REQUEST_TIMEOUT:Jl,REQUEST_TOO_LONG:Xl,REQUEST_URI_TOO_LONG:Zl,RESET_CONTENT:tf,get ReasonPhrases(){return ea},SEE_OTHER:rf,SERVICE_UNAVAILABLE:nf,SWITCHING_PROTOCOLS:of,get StatusCodes(){return Zo},TEMPORARY_REDIRECT:af,TOO_MANY_REQUESTS:sf,UNAUTHORIZED:cf,UNPROCESSABLE_ENTITY:uf,UNSUPPORTED_MEDIA_TYPE:lf,USE_PROXY:ff,default:Wy,getReasonPhrase:df,getStatusCode:pf,getStatusText:hf},Symbol.toStringTag,{value:"Module"})),Vy=qr(Gy);var On={exports:{}},yr={},bo={},vr={},_r={},xt={},Er={},So={},At={},lt={},Mc;function _a(){if(Mc)return lt;Mc=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.ERROR_PACKET=lt.PACKET_TYPES_REVERSE=lt.PACKET_TYPES=void 0;const e=Object.create(null);lt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);lt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return lt.ERROR_PACKET=n,lt}var Dc;function Qy(){if(Dc)return At;Dc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.encodePacket=At.encodePacketToBinary=void 0;const e=_a(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=c=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer,s=({type:c,data:a},d,f)=>t&&a instanceof Blob?d?f(a):o(a,f):n&&(a instanceof ArrayBuffer||r(a))?d?f(a):o(new Blob([a]),f):f(e.PACKET_TYPES[c]+(a||""));At.encodePacket=s;const o=(c,a)=>{const d=new FileReader;return d.onload=function(){const f=d.result.split(",")[1];a("b"+(f||""))},d.readAsDataURL(c)};function l(c){return c instanceof Uint8Array?c:c instanceof ArrayBuffer?new Uint8Array(c):new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}let i;function u(c,a){if(t&&c.data instanceof Blob)return c.data.arrayBuffer().then(l).then(a);if(n&&(c.data instanceof ArrayBuffer||r(c.data)))return a(l(c.data));s(c,!1,d=>{i||(i=new TextEncoder),a(i.encode(d))})}return At.encodePacketToBinary=u,At}var wr={},Rt={},Uc;function zy(){if(Uc)return Rt;Uc=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.decode=Rt.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<e.length;s++)t[e.charCodeAt(s)]=s;const n=s=>{let o=new Uint8Array(s),l,i=o.length,u="";for(l=0;l<i;l+=3)u+=e[o[l]>>2],u+=e[(o[l]&3)<<4|o[l+1]>>4],u+=e[(o[l+1]&15)<<2|o[l+2]>>6],u+=e[o[l+2]&63];return i%3===2?u=u.substring(0,u.length-1)+"=":i%3===1&&(u=u.substring(0,u.length-2)+"=="),u};Rt.encode=n;const r=s=>{let o=s.length*.75,l=s.length,i,u=0,c,a,d,f;s[s.length-1]==="="&&(o--,s[s.length-2]==="="&&o--);const p=new ArrayBuffer(o),h=new Uint8Array(p);for(i=0;i<l;i+=4)c=t[s.charCodeAt(i)],a=t[s.charCodeAt(i+1)],d=t[s.charCodeAt(i+2)],f=t[s.charCodeAt(i+3)],h[u++]=c<<2|a>>4,h[u++]=(a&15)<<4|d>>2,h[u++]=(d&3)<<6|f&63;return p};return Rt.decode=r,Rt}var Bc;function Yy(){if(Bc)return wr;Bc=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.decodePacket=void 0;const e=_a(),t=zy(),n=typeof ArrayBuffer=="function",r=(l,i)=>{if(typeof l!="string")return{type:"message",data:o(l,i)};const u=l.charAt(0);return u==="b"?{type:"message",data:s(l.substring(1),i)}:e.PACKET_TYPES_REVERSE[u]?l.length>1?{type:e.PACKET_TYPES_REVERSE[u],data:l.substring(1)}:{type:e.PACKET_TYPES_REVERSE[u]}:e.ERROR_PACKET};wr.decodePacket=r;const s=(l,i)=>{if(n){const u=(0,t.decode)(l);return o(u,i)}else return{base64:!0,data:l}},o=(l,i)=>{switch(i){case"blob":return l instanceof Blob?l:new Blob([l]);case"arraybuffer":default:return l instanceof ArrayBuffer?l:l.buffer}};return wr}var $c;function Wr(){return $c||($c=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=Qy();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=Yy();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=_a(),s=String.fromCharCode(30),o=(f,p)=>{const h=f.length,y=new Array(h);let _=0;f.forEach((S,v)=>{(0,t.encodePacket)(S,!1,w=>{y[v]=w,++_===h&&p(y.join(s))})})};e.encodePayload=o;const l=(f,p)=>{const h=f.split(s),y=[];for(let _=0;_<h.length;_++){const S=(0,n.decodePacket)(h[_],p);if(y.push(S),S.type==="error")break}return y};e.decodePayload=l;function i(){return new TransformStream({transform(f,p){(0,t.encodePacketToBinary)(f,h=>{const y=h.length;let _;if(y<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,y);else if(y<65536){_=new Uint8Array(3);const S=new DataView(_.buffer);S.setUint8(0,126),S.setUint16(1,y)}else{_=new Uint8Array(9);const S=new DataView(_.buffer);S.setUint8(0,127),S.setBigUint64(1,BigInt(y))}f.data&&typeof f.data!="string"&&(_[0]|=128),p.enqueue(_),p.enqueue(h)})}})}e.createPacketEncoderStream=i;let u;function c(f){return f.reduce((p,h)=>p+h.length,0)}function a(f,p){if(f[0].length===p)return f.shift();const h=new Uint8Array(p);let y=0;for(let _=0;_<p;_++)h[_]=f[0][y++],y===f[0].length&&(f.shift(),y=0);return f.length&&y<f[0].length&&(f[0]=f[0].slice(y)),h}function d(f,p){u||(u=new TextDecoder);const h=[];let y=0,_=-1,S=!1;return new TransformStream({transform(v,w){for(h.push(v);;){if(y===0){if(c(h)<1)break;const x=a(h,1);S=(x[0]&128)===128,_=x[0]&127,_<126?y=3:_===126?y=1:y=2}else if(y===1){if(c(h)<2)break;const x=a(h,2);_=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(c(h)<8)break;const x=a(h,8),O=new DataView(x.buffer,x.byteOffset,x.length),F=O.getUint32(0);if(F>Math.pow(2,53-32)-1){w.enqueue(r.ERROR_PACKET);break}_=F*Math.pow(2,32)+O.getUint32(4),y=3}else{if(c(h)<_)break;const x=a(h,_);w.enqueue((0,n.decodePacket)(S?x:u.decode(x),p)),y=0}if(_===0||_>f){w.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4}(So)),So}function Qe(e){if(e)return Ky(e)}function Ky(e){for(var t in Qe.prototype)e[t]=Qe.prototype[t];return e}Qe.prototype.on=Qe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Qe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Qe.prototype.off=Qe.prototype.removeListener=Qe.prototype.removeAllListeners=Qe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Qe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};Qe.prototype.emitReserved=Qe.prototype.emit;Qe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Qe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Jy=Object.freeze(Object.defineProperty({__proto__:null,Emitter:Qe},Symbol.toStringTag,{value:"Module"})),tr=qr(Jy);var ft={},br={},qc;function Vn(){return qc||(qc=1,Object.defineProperty(br,"__esModule",{value:!0}),br.globalThisShim=void 0,br.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),br}var Hc;function Gr(){if(Hc)return ft;Hc=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.byteLength=ft.installTimerFunctions=ft.pick=void 0;const e=Vn();function t(u,...c){return c.reduce((a,d)=>(u.hasOwnProperty(d)&&(a[d]=u[d]),a),{})}ft.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function s(u,c){c.useNativeTimers?(u.setTimeoutFn=n.bind(e.globalThisShim),u.clearTimeoutFn=r.bind(e.globalThisShim)):(u.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),u.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}ft.installTimerFunctions=s;const o=1.33;function l(u){return typeof u=="string"?i(u):Math.ceil((u.byteLength||u.size)*o)}ft.byteLength=l;function i(u){let c=0,a=0;for(let d=0,f=u.length;d<f;d++)c=u.charCodeAt(d),c<128?a+=1:c<2048?a+=2:c<55296||c>=57344?a+=3:(d++,a+=4);return a}return ft}var Tn={exports:{}},Oo,Wc;function Xy(){if(Wc)return Oo;Wc=1;var e=1e3,t=e*60,n=t*60,r=n*24,s=r*7,o=r*365.25;Oo=function(a,d){d=d||{};var f=typeof a;if(f==="string"&&a.length>0)return l(a);if(f==="number"&&isFinite(a))return d.long?u(a):i(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function l(a){if(a=String(a),!(a.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(d){var f=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return f*o;case"weeks":case"week":case"w":return f*s;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function i(a){var d=Math.abs(a);return d>=r?Math.round(a/r)+"d":d>=n?Math.round(a/n)+"h":d>=t?Math.round(a/t)+"m":d>=e?Math.round(a/e)+"s":a+"ms"}function u(a){var d=Math.abs(a);return d>=r?c(a,d,r,"day"):d>=n?c(a,d,n,"hour"):d>=t?c(a,d,t,"minute"):d>=e?c(a,d,e,"second"):a+" ms"}function c(a,d,f,p){var h=d>=f*1.5;return Math.round(a/f)+" "+p+(h?"s":"")}return Oo}var To,Gc;function Zy(){if(Gc)return To;Gc=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=l,r.enable=o,r.enabled=i,r.humanize=Xy(),r.destroy=a,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function n(d){let f=0;for(let p=0;p<d.length;p++)f=(f<<5)-f+d.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=n;function r(d){let f,p=null,h,y;function _(...S){if(!_.enabled)return;const v=_,w=Number(new Date),x=w-(f||w);v.diff=x,v.prev=f,v.curr=w,f=w,S[0]=r.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let O=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(D,R)=>{if(D==="%%")return"%";O++;const W=r.formatters[R];if(typeof W=="function"){const V=S[O];D=W.call(v,V),S.splice(O,1),O--}return D}),r.formatArgs.call(v,S),(v.log||r.log).apply(v,S)}return _.namespace=d,_.useColors=r.useColors(),_.color=r.selectColor(d),_.extend=s,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,y=r.enabled(d)),y),set:S=>{p=S}}),typeof r.init=="function"&&r.init(_),_}function s(d,f){const p=r(this.namespace+(typeof f>"u"?":":f)+d);return p.log=this.log,p}function o(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let f;const p=(typeof d=="string"?d:"").split(/[\s,]+/),h=p.length;for(f=0;f<h;f++)p[f]&&(d=p[f].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.slice(1)+"$")):r.names.push(new RegExp("^"+d+"$")))}function l(){const d=[...r.names.map(u),...r.skips.map(u).map(f=>"-"+f)].join(",");return r.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let f,p;for(f=0,p=r.skips.length;f<p;f++)if(r.skips[f].test(d))return!1;for(f=0,p=r.names.length;f<p;f++)if(r.names[f].test(d))return!0;return!1}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function c(d){return d instanceof Error?d.stack||d.message:d}function a(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return To=e,To}var Vc;function ut(){return Vc||(Vc=1,function(e,t){t.formatArgs=r,t.save=s,t.load=o,t.useColors=n,t.storage=l(),t.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;u.splice(1,0,c,"color: inherit");let a=0,d=0;u[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(a++,f==="%c"&&(d=a))}),u.splice(d,0,c)}t.log=console.debug||console.log||(()=>{});function s(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=process.env.DEBUG),u}function l(){try{return localStorage}catch{}}e.exports=Zy()(t);const{formatters:i}=e.exports;i.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Tn,Tn.exports)),Tn.exports}var Ct={},Qc;function mf(){if(Qc)return Ct;Qc=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.decode=Ct.encode=void 0;function e(n){let r="";for(let s in n)n.hasOwnProperty(s)&&(r.length&&(r+="&"),r+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return r}Ct.encode=e;function t(n){let r={},s=n.split("&");for(let o=0,l=s.length;o<l;o++){let i=s[o].split("=");r[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return r}return Ct.decode=t,Ct}var zc;function Qn(){if(zc)return Er;zc=1;var e=ce&&ce.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.Transport=void 0;const t=Wr(),n=tr,r=Gr(),s=e(ut()),o=mf(),l=(0,s.default)("engine.io-client:transport");class i extends Error{constructor(a,d,f){super(a),this.description=d,this.context=f,this.type="TransportError"}}class u extends n.Emitter{constructor(a){super(),this.writable=!1,(0,r.installTimerFunctions)(this,a),this.opts=a,this.query=a.query,this.socket=a.socket}onError(a,d,f){return super.emitReserved("error",new i(a,d,f)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"?this.write(a):l("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const d=(0,t.decodePacket)(a,this.socket.binaryType);this.onPacket(d)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,d={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(d)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const d=(0,o.encode)(a);return d.length?"?"+d:""}}return Er.Transport=u,Er}var dt={},Yc;function gf(){if(Yc)return dt;Yc=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.yeast=dt.decode=dt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,s=0,o;function l(c){let a="";do a=e[c%t]+a,c=Math.floor(c/t);while(c>0);return a}dt.encode=l;function i(c){let a=0;for(s=0;s<c.length;s++)a=a*t+n[c.charAt(s)];return a}dt.decode=i;function u(){const c=l(+new Date);return c!==o?(r=0,o=c):c+"."+l(r++)}for(dt.yeast=u;s<t;s++)n[e[s]]=s;return dt}var Nt={},Sr={},Kc;function ev(){if(Kc)return Sr;Kc=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Sr.hasCORS=e,Sr}var Jc;function tv(){if(Jc)return Nt;Jc=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.createCookieJar=Nt.XHR=void 0;const e=ev(),t=Vn();function n(s){const o=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||e.hasCORS))return new XMLHttpRequest}catch{}if(!o)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Nt.XHR=n;function r(){}return Nt.createCookieJar=r,Nt}var Xc;function rv(){if(Xc)return xt;Xc=1;var e=ce&&ce.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Request=xt.Polling=void 0;const t=Qn(),n=e(ut()),r=gf(),s=Wr(),o=tv(),l=tr,i=Gr(),u=Vn(),c=(0,n.default)("engine.io-client:polling");function a(){}const d=function(){return new o.XHR({xdomain:!1}).responseType!=null}();class f extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const v=location.protocol==="https:";let w=location.port;w||(w=v?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||w!==_.port}const S=_&&_.forceBase64;this.supportsBinary=d&&!S,this.opts.withCredentials&&(this.cookieJar=(0,o.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const S=()=>{c("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let v=0;this.polling&&(c("we are currently polling - waiting to pause"),v++,this.once("pollComplete",function(){c("pre-pause polling complete"),--v||S()})),this.writable||(c("we are currently writing - waiting to pause"),v++,this.once("drain",function(){c("pre-pause writing complete"),--v||S()}))}else S()}poll(){c("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){c("polling got data %s",_);const S=v=>{if(this.readyState==="opening"&&v.type==="open"&&this.onOpen(),v.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(v)};(0,s.decodePayload)(_,this.socket.binaryType).forEach(S),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():c('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{c("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(c("transport open - closing"),_()):(c("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,s.encodePayload)(_,S=>{this.doWrite(S,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",S=this.query||{};return this.opts.timestampRequests!==!1&&(S[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!S.sid&&(S.b64=1),this.createUri(_,S)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new p(this.uri(),_)}doWrite(_,S){const v=this.request({method:"POST",data:_});v.on("success",S),v.on("error",(w,x)=>{this.onError("xhr post error",w,x)})}doPoll(){c("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(S,v)=>{this.onError("xhr poll error",S,v)}),this.pollXhr=_}}xt.Polling=f;class p extends l.Emitter{constructor(_,S){super(),(0,i.installTimerFunctions)(this,S),this.opts=S,this.method=S.method||"GET",this.uri=_,this.data=S.data!==void 0?S.data:null,this.create()}create(){var _;const S=(0,i.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");S.xdomain=!!this.opts.xd;const v=this.xhr=new o.XHR(S);try{c("xhr open %s: %s",this.method,this.uri),v.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){v.setDisableHeaderCheck&&v.setDisableHeaderCheck(!0);for(let w in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(w)&&v.setRequestHeader(w,this.opts.extraHeaders[w])}}catch{}if(this.method==="POST")try{v.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{v.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(v),"withCredentials"in v&&(v.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(v.timeout=this.opts.requestTimeout),v.onreadystatechange=()=>{var w;v.readyState===3&&((w=this.opts.cookieJar)===null||w===void 0||w.parseCookies(v)),v.readyState===4&&(v.status===200||v.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof v.status=="number"?v.status:0)},0))},c("xhr data %s",this.data),v.send(this.data)}catch(w){this.setTimeoutFn(()=>{this.onError(w)},0);return}typeof document<"u"&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onError(_){this.emitReserved("error",_,this.xhr),this.cleanup(!0)}cleanup(_){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=a,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete p.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(xt.Request=p,p.requestsCount=0,p.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h);else if(typeof addEventListener=="function"){const y="onpagehide"in u.globalThisShim?"pagehide":"unload";addEventListener(y,h,!1)}}function h(){for(let y in p.requests)p.requests.hasOwnProperty(y)&&p.requests[y].abort()}return xt}var Or={},et={},Zc;function zn(){if(Zc)return et;Zc=1,Object.defineProperty(et,"__esModule",{value:!0}),et.defaultBinaryType=et.usingBrowserWebSocket=et.WebSocket=et.nextTick=void 0;const e=Vn();return et.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),et.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,et.usingBrowserWebSocket=!0,et.defaultBinaryType="arraybuffer",et}var eu;function nv(){if(eu)return Or;eu=1;var e=ce&&ce.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.WS=void 0;const t=Qn(),n=gf(),r=Gr(),s=zn(),o=e(ut()),l=Wr(),i=(0,o.default)("engine.io-client:websocket"),u=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class c extends t.Transport{constructor(d){super(d),this.supportsBinary=!d.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const d=this.uri(),f=this.opts.protocols,p=u?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(p.headers=this.opts.extraHeaders);try{this.ws=s.usingBrowserWebSocket&&!u?f?new s.WebSocket(d,f):new s.WebSocket(d):new s.WebSocket(d,f,p)}catch(h){return this.emitReserved("error",h)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let f=0;f<d.length;f++){const p=d[f],h=f===d.length-1;(0,l.encodePacket)(p,this.supportsBinary,y=>{const _={};s.usingBrowserWebSocket||(p.options&&(_.compress=p.options.compress),this.opts.perMessageDeflate&&(typeof y=="string"?Buffer.byteLength(y):y.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{s.usingBrowserWebSocket?this.ws.send(y):this.ws.send(y,_)}catch{i("websocket closed before onclose event")}h&&(0,s.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",f=this.query||{};return this.opts.timestampRequests&&(f[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(f.b64=1),this.createUri(d,f)}check(){return!!s.WebSocket}}return Or.WS=c,Or}var Tr={},tu;function iv(){if(tu)return Tr;tu=1;var e=ce&&ce.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.WT=void 0;const t=Qn(),n=zn(),r=Wr(),o=(0,e(ut()).default)("engine.io-client:webtransport");class l extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{o("transport closed gracefully"),this.onClose()}).catch(u=>{o("transport closed due to %s",u),this.onError("webtransport error",u)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(u=>{const c=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=u.readable.pipeThrough(c).getReader(),d=(0,r.createPacketEncoderStream)();d.readable.pipeTo(u.writable),this.writer=d.writable.getWriter();const f=()=>{a.read().then(({done:h,value:y})=>{if(h){o("session is closed");return}o("received chunk: %o",y),this.onPacket(y),f()}).catch(h=>{o("an error occurred while reading: %s",h)})};f();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this.writer.write(p).then(()=>this.onOpen())})}))}write(u){this.writable=!1;for(let c=0;c<u.length;c++){const a=u[c],d=c===u.length-1;this.writer.write(a).then(()=>{d&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var u;(u=this.transport)===null||u===void 0||u.close()}}return Tr.WT=l,Tr}var ru;function yf(){if(ru)return _r;ru=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.transports=void 0;const e=rv(),t=nv(),n=iv();return _r.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},_r}var xr={},nu;function vf(){if(nu)return xr;nu=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function n(o){const l=o,i=o.indexOf("["),u=o.indexOf("]");i!=-1&&u!=-1&&(o=o.substring(0,i)+o.substring(i,u).replace(/:/g,";")+o.substring(u,o.length));let c=e.exec(o||""),a={},d=14;for(;d--;)a[t[d]]=c[d]||"";return i!=-1&&u!=-1&&(a.source=l,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=r(a,a.path),a.queryKey=s(a,a.query),a}xr.parse=n;function r(o,l){const i=/\/{2,9}/g,u=l.replace(i,"/").split("/");return(l.slice(0,1)=="/"||l.length===0)&&u.splice(0,1),l.slice(-1)=="/"&&u.splice(u.length-1,1),u}function s(o,l){const i={};return l.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,c,a){c&&(i[c]=a)}),i}return xr}var iu;function ov(){if(iu)return vr;iu=1;var e=ce&&ce.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(vr,"__esModule",{value:!0}),vr.Socket=void 0;const t=yf(),n=Gr(),r=mf(),s=vf(),o=e(ut()),l=tr,i=Wr(),u=zn(),c=(0,o.default)("engine.io-client:socket");class a extends l.Emitter{constructor(f,p={}){super(),this.binaryType=u.defaultBinaryType,this.writeBuffer=[],f&&typeof f=="object"&&(p=f,f=null),f?(f=(0,s.parse)(f),p.hostname=f.host,p.secure=f.protocol==="https"||f.protocol==="wss",p.port=f.port,f.query&&(p.query=f.query)):p.host&&(p.hostname=(0,s.parse)(p.host).host),(0,n.installTimerFunctions)(this,p),this.secure=p.secure!=null?p.secure:typeof location<"u"&&location.protocol==="https:",p.hostname&&!p.port&&(p.port=this.secure?"443":"80"),this.hostname=p.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=p.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=p.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},p),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,r.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(f){c('creating transport "%s"',f);const p=Object.assign({},this.opts.query);p.EIO=i.protocol,p.transport=f,this.id&&(p.sid=this.id);const h=Object.assign({},this.opts,{query:p,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[f]);return c("options: %j",h),new t.transports[f](h)}open(){let f;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)f="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else f=this.transports[0];this.readyState="opening";try{f=this.createTransport(f)}catch(p){c("error while creating transport: %s",p),this.transports.shift(),this.open();return}f.open(),this.setTransport(f)}setTransport(f){c("setting transport %s",f.name),this.transport&&(c("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",p=>this.onClose("transport close",p))}probe(f){c('probing transport "%s"',f);let p=this.createTransport(f),h=!1;a.priorWebsocketSuccess=!1;const y=()=>{h||(c('probe transport "%s" opened',f),p.send([{type:"ping",data:"probe"}]),p.once("packet",F=>{if(!h)if(F.type==="pong"&&F.data==="probe"){if(c('probe transport "%s" pong',f),this.upgrading=!0,this.emitReserved("upgrading",p),!p)return;a.priorWebsocketSuccess=p.name==="websocket",c('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{h||this.readyState!=="closed"&&(c("changing transport and sending upgrade packet"),O(),this.setTransport(p),p.send([{type:"upgrade"}]),this.emitReserved("upgrade",p),p=null,this.upgrading=!1,this.flush())})}else{c('probe transport "%s" failed',f);const D=new Error("probe error");D.transport=p.name,this.emitReserved("upgradeError",D)}}))};function _(){h||(h=!0,O(),p.close(),p=null)}const S=F=>{const D=new Error("probe error: "+F);D.transport=p.name,_(),c('probe transport "%s" failed because of error: %s',f,F),this.emitReserved("upgradeError",D)};function v(){S("transport closed")}function w(){S("socket closed")}function x(F){p&&F.name!==p.name&&(c('"%s" works - aborting "%s"',F.name,p.name),_())}const O=()=>{p.removeListener("open",y),p.removeListener("error",S),p.removeListener("close",v),this.off("close",w),this.off("upgrading",x)};p.once("open",y),p.once("error",S),p.once("close",v),this.once("close",w),this.once("upgrading",x),this.upgrades.indexOf("webtransport")!==-1&&f!=="webtransport"?this.setTimeoutFn(()=>{h||p.open()},200):p.open()}onOpen(){if(c("socket open"),this.readyState="open",a.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){c("starting upgrade probes");let f=0;const p=this.upgrades.length;for(;f<p;f++)this.probe(this.upgrades[f])}}onPacket(f){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(c('socket receive: type "%s", data "%s"',f.type,f.data),this.emitReserved("packet",f),this.emitReserved("heartbeat"),this.resetPingTimeout(),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const p=new Error("server error");p.code=f.data,this.onError(p);break;case"message":this.emitReserved("data",f.data),this.emitReserved("message",f.data);break}else c('packet received with socket readyState "%s"',this.readyState)}onHandshake(f){this.emitReserved("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.maxPayload=f.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const f=this.getWritablePackets();c("flushing %d packets in socket",f.length),this.transport.send(f),this.prevBufferLen=f.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let p=1;for(let h=0;h<this.writeBuffer.length;h++){const y=this.writeBuffer[h].data;if(y&&(p+=(0,n.byteLength)(y)),h>0&&p>this.maxPayload)return c("only send %d out of %d packets",h,this.writeBuffer.length),this.writeBuffer.slice(0,h);p+=2}return c("payload size is %d (max: %d)",p,this.maxPayload),this.writeBuffer}write(f,p,h){return this.sendPacket("message",f,p,h),this}send(f,p,h){return this.sendPacket("message",f,p,h),this}sendPacket(f,p,h,y){if(typeof p=="function"&&(y=p,p=void 0),typeof h=="function"&&(y=h,h=null),this.readyState==="closing"||this.readyState==="closed")return;h=h||{},h.compress=h.compress!==!1;const _={type:f,data:p,options:h};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),y&&this.once("flush",y),this.flush()}close(){const f=()=>{this.onClose("forced close"),c("socket closing - telling transport to close"),this.transport.close()},p=()=>{this.off("upgrade",p),this.off("upgradeError",p),f()},h=()=>{this.once("upgrade",p),this.once("upgradeError",p)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?h():f()}):this.upgrading?h():f()),this}onError(f){c("socket error %j",f),a.priorWebsocketSuccess=!1,this.emitReserved("error",f),this.onClose("transport error",f)}onClose(f,p){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(c('socket close with reason: "%s"',f),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",f,p),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(f){const p=[];let h=0;const y=f.length;for(;h<y;h++)~this.transports.indexOf(f[h])&&p.push(f[h]);return p}}return vr.Socket=a,a.protocol=i.protocol,vr}var ou;function _f(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=ov();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Qn();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=yf();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var s=Gr();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var o=vf();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var l=zn();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return l.nextTick}})}(bo)),bo}var au;function av(){if(au)return yr;au=1;var e=ce&&ce.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.url=void 0;const t=_f(),r=e(ut()).default("socket.io-client:url");function s(o,l="",i){let u=o;i=i||typeof location<"u"&&location,o==null&&(o=i.protocol+"//"+i.host),typeof o=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=i.protocol+o:o=i.host+o),/^(https?|wss?):\/\//.test(o)||(r("protocol-less url %s",o),typeof i<"u"?o=i.protocol+"//"+o:o="https://"+o),r("parse %s",o),u=t.parse(o)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const a=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+a+":"+u.port+l,u.href=u.protocol+"://"+a+(i&&i.port===u.port?"":":"+u.port),u}return yr.url=s,yr}var Ar={},Rr={},xo={},Pt={},It={},su;function Ef(){if(su)return It;su=1,Object.defineProperty(It,"__esModule",{value:!0}),It.hasBinary=It.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",s=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function o(i){return e&&(i instanceof ArrayBuffer||t(i))||r&&i instanceof Blob||s&&i instanceof File}It.isBinary=o;function l(i,u){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let c=0,a=i.length;c<a;c++)if(l(i[c]))return!0;return!1}if(o(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return l(i.toJSON(),!0);for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&l(i[c]))return!0;return!1}return It.hasBinary=l,It}var cu;function sv(){if(cu)return Pt;cu=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.reconstructPacket=Pt.deconstructPacket=void 0;const e=Ef();function t(o){const l=[],i=o.data,u=o;return u.data=n(i,l),u.attachments=l.length,{packet:u,buffers:l}}Pt.deconstructPacket=t;function n(o,l){if(!o)return o;if((0,e.isBinary)(o)){const i={_placeholder:!0,num:l.length};return l.push(o),i}else if(Array.isArray(o)){const i=new Array(o.length);for(let u=0;u<o.length;u++)i[u]=n(o[u],l);return i}else if(typeof o=="object"&&!(o instanceof Date)){const i={};for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&(i[u]=n(o[u],l));return i}return o}function r(o,l){return o.data=s(o.data,l),delete o.attachments,o}Pt.reconstructPacket=r;function s(o,l){if(!o)return o;if(o&&o._placeholder===!0){if(typeof o.num=="number"&&o.num>=0&&o.num<l.length)return l[o.num];throw new Error("illegal attachments")}else if(Array.isArray(o))for(let i=0;i<o.length;i++)o[i]=s(o[i],l);else if(typeof o=="object")for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=s(o[i],l));return o}return Pt}var uu;function Ea(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=tr,n=sv(),r=Ef(),o=(0,ut().default)("socket.io-parser"),l=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var i;(function(f){f[f.CONNECT=0]="CONNECT",f[f.DISCONNECT=1]="DISCONNECT",f[f.EVENT=2]="EVENT",f[f.ACK=3]="ACK",f[f.CONNECT_ERROR=4]="CONNECT_ERROR",f[f.BINARY_EVENT=5]="BINARY_EVENT",f[f.BINARY_ACK=6]="BINARY_ACK"})(i=e.PacketType||(e.PacketType={}));class u{constructor(p){this.replacer=p}encode(p){return o("encoding packet %j",p),(p.type===i.EVENT||p.type===i.ACK)&&(0,r.hasBinary)(p)?this.encodeAsBinary({type:p.type===i.EVENT?i.BINARY_EVENT:i.BINARY_ACK,nsp:p.nsp,data:p.data,id:p.id}):[this.encodeAsString(p)]}encodeAsString(p){let h=""+p.type;return(p.type===i.BINARY_EVENT||p.type===i.BINARY_ACK)&&(h+=p.attachments+"-"),p.nsp&&p.nsp!=="/"&&(h+=p.nsp+","),p.id!=null&&(h+=p.id),p.data!=null&&(h+=JSON.stringify(p.data,this.replacer)),o("encoded %j as %s",p,h),h}encodeAsBinary(p){const h=(0,n.deconstructPacket)(p),y=this.encodeAsString(h.packet),_=h.buffers;return _.unshift(y),_}}e.Encoder=u;function c(f){return Object.prototype.toString.call(f)==="[object Object]"}class a extends t.Emitter{constructor(p){super(),this.reviver=p}add(p){let h;if(typeof p=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(p);const y=h.type===i.BINARY_EVENT;y||h.type===i.BINARY_ACK?(h.type=y?i.EVENT:i.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,r.isBinary)(p)||p.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(p),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+p)}decodeString(p){let h=0;const y={type:Number(p.charAt(0))};if(i[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===i.BINARY_EVENT||y.type===i.BINARY_ACK){const S=h+1;for(;p.charAt(++h)!=="-"&&h!=p.length;);const v=p.substring(S,h);if(v!=Number(v)||p.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(p.charAt(h+1)==="/"){const S=h+1;for(;++h&&!(p.charAt(h)===","||h===p.length););y.nsp=p.substring(S,h)}else y.nsp="/";const _=p.charAt(h+1);if(_!==""&&Number(_)==_){const S=h+1;for(;++h;){const v=p.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===p.length)break}y.id=Number(p.substring(S,h+1))}if(p.charAt(++h)){const S=this.tryParse(p.substr(h));if(a.isPayloadValid(y.type,S))y.data=S;else throw new Error("invalid payload")}return o("decoded %s as %j",p,y),y}tryParse(p){try{return JSON.parse(p,this.reviver)}catch{return!1}}static isPayloadValid(p,h){switch(p){case i.CONNECT:return c(h);case i.DISCONNECT:return h===void 0;case i.CONNECT_ERROR:return typeof h=="string"||c(h);case i.EVENT:case i.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&l.indexOf(h[0])===-1);case i.ACK:case i.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=a;class d{constructor(p){this.packet=p,this.buffers=[],this.reconPack=p}takeBinaryData(p){if(this.buffers.push(p),this.buffers.length===this.reconPack.attachments){const h=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(xo)),xo}var Cr={},lu;function wf(){if(lu)return Cr;lu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Cr.on=e,Cr}var fu;function bf(){if(fu)return Rr;fu=1;var e=ce&&ce.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.Socket=void 0;const t=Ea(),n=wf(),r=tr,o=e(ut()).default("socket.io-client:socket"),l=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i extends r.Emitter{constructor(c,a,d){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=c,this.nsp=a,d&&d.auth&&(this.auth=d.auth),this._opts=Object.assign({},d),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const c=this.io;this.subs=[n.on(c,"open",this.onopen.bind(this)),n.on(c,"packet",this.onpacket.bind(this)),n.on(c,"error",this.onerror.bind(this)),n.on(c,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...c){return c.unshift("message"),this.emit.apply(this,c),this}emit(c,...a){if(l.hasOwnProperty(c))throw new Error('"'+c.toString()+'" is a reserved event name');if(a.unshift(c),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const d={type:t.PacketType.EVENT,data:a};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const h=this.ids++;o("emitting packet with ack id %d",h);const y=a.pop();this._registerAckCallback(h,y),d.id=h}const f=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!f||!this.connected)?o("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d),this.flags={},this}_registerAckCallback(c,a){var d;const f=(d=this.flags.timeout)!==null&&d!==void 0?d:this._opts.ackTimeout;if(f===void 0){this.acks[c]=a;return}const p=this.io.setTimeoutFn(()=>{delete this.acks[c];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===c&&(o("removing packet with ack id %d from the buffer",c),this.sendBuffer.splice(h,1));o("event with ack id %d has timed out after %d ms",c,f),a.call(this,new Error("operation has timed out"))},f);this.acks[c]=(...h)=>{this.io.clearTimeoutFn(p),a.apply(this,[null,...h])}}emitWithAck(c,...a){const d=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((f,p)=>{a.push((h,y)=>d?h?p(h):f(y):f(h)),this.emit(c,...a)})}_addToQueue(c){let a;typeof c[c.length-1]=="function"&&(a=c.pop());const d={id:this._queueSeq++,tryCount:0,pending:!1,args:c,flags:Object.assign({fromQueue:!0},this.flags)};c.push((f,...p)=>d!==this._queue[0]?void 0:(f!==null?d.tryCount>this._opts.retries&&(o("packet [%d] is discarded after %d tries",d.id,d.tryCount),this._queue.shift(),a&&a(f)):(o("packet [%d] was successfully sent",d.id),this._queue.shift(),a&&a(null,...p)),d.pending=!1,this._drainQueue())),this._queue.push(d),this._drainQueue()}_drainQueue(c=!1){if(o("draining queue"),!this.connected||this._queue.length===0)return;const a=this._queue[0];if(a.pending&&!c){o("packet [%d] has already been sent and is waiting for an ack",a.id);return}a.pending=!0,a.tryCount++,o("sending packet [%d] (try n°%d)",a.id,a.tryCount),this.flags=a.flags,this.emit.apply(this,a.args)}packet(c){c.nsp=this.nsp,this.io._packet(c)}onopen(){o("transport is open - connecting"),typeof this.auth=="function"?this.auth(c=>{this._sendConnectPacket(c)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(c){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},c):c})}onerror(c){this.connected||this.emitReserved("connect_error",c)}onclose(c,a){o("close (%s)",c),this.connected=!1,delete this.id,this.emitReserved("disconnect",c,a)}onpacket(c){if(c.nsp===this.nsp)switch(c.type){case t.PacketType.CONNECT:c.data&&c.data.sid?this.onconnect(c.data.sid,c.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(c);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(c);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const d=new Error(c.data.message);d.data=c.data.data,this.emitReserved("connect_error",d);break}}onevent(c){const a=c.data||[];o("emitting event %j",a),c.id!=null&&(o("attaching ack callback to event"),a.push(this.ack(c.id))),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(c){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const d of a)d.apply(this,c)}super.emit.apply(this,c),this._pid&&c.length&&typeof c[c.length-1]=="string"&&(this._lastOffset=c[c.length-1])}ack(c){const a=this;let d=!1;return function(...f){d||(d=!0,o("sending ack %j",f),a.packet({type:t.PacketType.ACK,id:c,data:f}))}}onack(c){const a=this.acks[c.id];typeof a=="function"?(o("calling ack %s with %j",c.id,c.data),a.apply(this,c.data),delete this.acks[c.id]):o("bad ack %s",c.id)}onconnect(c,a){o("socket connected with id %s",c),this.id=c,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(c=>this.emitEvent(c)),this.receiveBuffer=[],this.sendBuffer.forEach(c=>{this.notifyOutgoingListeners(c),this.packet(c)}),this.sendBuffer=[]}ondisconnect(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(c=>c()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(c){return this.flags.compress=c,this}get volatile(){return this.flags.volatile=!0,this}timeout(c){return this.flags.timeout=c,this}onAny(c){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(c),this}prependAny(c){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(c),this}offAny(c){if(!this._anyListeners)return this;if(c){const a=this._anyListeners;for(let d=0;d<a.length;d++)if(c===a[d])return a.splice(d,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(c){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(c),this}prependAnyOutgoing(c){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(c),this}offAnyOutgoing(c){if(!this._anyOutgoingListeners)return this;if(c){const a=this._anyOutgoingListeners;for(let d=0;d<a.length;d++)if(c===a[d])return a.splice(d,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(c){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const d of a)d.apply(this,c.data)}}}return Rr.Socket=i,Rr}var Nr={},du;function cv(){if(du)return Nr;du=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Nr.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=Math.floor(n*10)&1?t+r:t-r}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Nr}var pu;function uv(){if(pu)return Ar;pu=1;var e=ce&&ce.__createBinding||(Object.create?function(p,h,y,_){_===void 0&&(_=y),Object.defineProperty(p,_,{enumerable:!0,get:function(){return h[y]}})}:function(p,h,y,_){_===void 0&&(_=y),p[_]=h[y]}),t=ce&&ce.__setModuleDefault||(Object.create?function(p,h){Object.defineProperty(p,"default",{enumerable:!0,value:h})}:function(p,h){p.default=h}),n=ce&&ce.__importStar||function(p){if(p&&p.__esModule)return p;var h={};if(p!=null)for(var y in p)y!=="default"&&Object.prototype.hasOwnProperty.call(p,y)&&e(h,p,y);return t(h,p),h},r=ce&&ce.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Manager=void 0;const s=_f(),o=bf(),l=n(Ea()),i=wf(),u=cv(),c=tr,d=r(ut()).default("socket.io-client:manager");class f extends c.Emitter{constructor(h,y){var _;super(),this.nsps={},this.subs=[],h&&typeof h=="object"&&(y=h,h=void 0),y=y||{},y.path=y.path||"/socket.io",this.opts=y,s.installTimerFunctions(this,y),this.reconnection(y.reconnection!==!1),this.reconnectionAttempts(y.reconnectionAttempts||1/0),this.reconnectionDelay(y.reconnectionDelay||1e3),this.reconnectionDelayMax(y.reconnectionDelayMax||5e3),this.randomizationFactor((_=y.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new u.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(y.timeout==null?2e4:y.timeout),this._readyState="closed",this.uri=h;const S=y.parser||l;this.encoder=new S.Encoder,this.decoder=new S.Decoder,this._autoConnect=y.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(h){return arguments.length?(this._reconnection=!!h,this):this._reconnection}reconnectionAttempts(h){return h===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=h,this)}reconnectionDelay(h){var y;return h===void 0?this._reconnectionDelay:(this._reconnectionDelay=h,(y=this.backoff)===null||y===void 0||y.setMin(h),this)}randomizationFactor(h){var y;return h===void 0?this._randomizationFactor:(this._randomizationFactor=h,(y=this.backoff)===null||y===void 0||y.setJitter(h),this)}reconnectionDelayMax(h){var y;return h===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=h,(y=this.backoff)===null||y===void 0||y.setMax(h),this)}timeout(h){return arguments.length?(this._timeout=h,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(h){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new s.Socket(this.uri,this.opts);const y=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const S=i.on(y,"open",function(){_.onopen(),h&&h()}),v=x=>{d("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",x),h?h(x):this.maybeReconnectOnOpen()},w=i.on(y,"error",v);if(this._timeout!==!1){const x=this._timeout;d("connect attempt will timeout after %d",x);const O=this.setTimeoutFn(()=>{d("connect attempt timed out after %d",x),S(),v(new Error("timeout")),y.close()},x);this.opts.autoUnref&&O.unref(),this.subs.push(()=>{this.clearTimeoutFn(O)})}return this.subs.push(S),this.subs.push(w),this}connect(h){return this.open(h)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const h=this.engine;this.subs.push(i.on(h,"ping",this.onping.bind(this)),i.on(h,"data",this.ondata.bind(this)),i.on(h,"error",this.onerror.bind(this)),i.on(h,"close",this.onclose.bind(this)),i.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(h){try{this.decoder.add(h)}catch(y){this.onclose("parse error",y)}}ondecoded(h){s.nextTick(()=>{this.emitReserved("packet",h)},this.setTimeoutFn)}onerror(h){d("error",h),this.emitReserved("error",h)}socket(h,y){let _=this.nsps[h];return _?this._autoConnect&&!_.active&&_.connect():(_=new o.Socket(this,h,y),this.nsps[h]=_),_}_destroy(h){const y=Object.keys(this.nsps);for(const _ of y)if(this.nsps[_].active){d("socket %s is still active, skipping close",_);return}this._close()}_packet(h){d("writing packet %j",h);const y=this.encoder.encode(h);for(let _=0;_<y.length;_++)this.engine.write(y[_],h.options)}cleanup(){d("cleanup"),this.subs.forEach(h=>h()),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(h,y){d("closed due to %s",h),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",h,y),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const h=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const y=this.backoff.duration();d("will wait %dms before reconnect attempt",y),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{h.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",h.backoff.attempts),!h.skipReconnect&&h.open(S=>{S?(d("reconnect attempt error"),h._reconnecting=!1,h.reconnect(),this.emitReserved("reconnect_error",S)):(d("reconnect success"),h.onreconnect())}))},y);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const h=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",h)}}return Ar.Manager=f,Ar}var hu;function lv(){return hu||(hu=1,function(e,t){var n=ce&&ce.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=av(),s=uv();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return s.Manager}});const o=bf();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const i=n(ut()).default("socket.io-client"),u={};function c(d,f){typeof d=="object"&&(f=d,d=void 0),f=f||{};const p=r.url(d,f.path||"/socket.io"),h=p.source,y=p.id,_=p.path,S=u[y]&&_ in u[y].nsps,v=f.forceNew||f["force new connection"]||f.multiplex===!1||S;let w;return v?(i("ignoring socket cache for %s",h),w=new s.Manager(h,f)):(u[y]||(i("new io instance for %s",h),u[y]=new s.Manager(h,f)),w=u[y]),p.query&&!f.query&&(f.query=p.queryKey),w.socket(p.path,f)}t.io=c,t.connect=c,t.default=c,Object.assign(c,{Manager:s.Manager,Socket:o.Socket,io:c,connect:c});var a=Ea();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return a.protocol}}),e.exports=c}(On,On.exports)),On.exports}var Ao={},Pr={},mu;function fv(){if(mu)return Pr;mu=1,Pr.byteLength=i,Pr.toByteArray=c,Pr.fromByteArray=f;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,o=r.length;s<o;++s)e[s]=r[s],t[r.charCodeAt(s)]=s;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function l(p){var h=p.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=p.indexOf("=");y===-1&&(y=h);var _=y===h?0:4-y%4;return[y,_]}function i(p){var h=l(p),y=h[0],_=h[1];return(y+_)*3/4-_}function u(p,h,y){return(h+y)*3/4-y}function c(p){var h,y=l(p),_=y[0],S=y[1],v=new n(u(p,_,S)),w=0,x=S>0?_-4:_,O;for(O=0;O<x;O+=4)h=t[p.charCodeAt(O)]<<18|t[p.charCodeAt(O+1)]<<12|t[p.charCodeAt(O+2)]<<6|t[p.charCodeAt(O+3)],v[w++]=h>>16&255,v[w++]=h>>8&255,v[w++]=h&255;return S===2&&(h=t[p.charCodeAt(O)]<<2|t[p.charCodeAt(O+1)]>>4,v[w++]=h&255),S===1&&(h=t[p.charCodeAt(O)]<<10|t[p.charCodeAt(O+1)]<<4|t[p.charCodeAt(O+2)]>>2,v[w++]=h>>8&255,v[w++]=h&255),v}function a(p){return e[p>>18&63]+e[p>>12&63]+e[p>>6&63]+e[p&63]}function d(p,h,y){for(var _,S=[],v=h;v<y;v+=3)_=(p[v]<<16&16711680)+(p[v+1]<<8&65280)+(p[v+2]&255),S.push(a(_));return S.join("")}function f(p){for(var h,y=p.length,_=y%3,S=[],v=16383,w=0,x=y-_;w<x;w+=v)S.push(d(p,w,w+v>x?x:w+v));return _===1?(h=p[y-1],S.push(e[h>>2]+e[h<<4&63]+"==")):_===2&&(h=(p[y-2]<<8)+p[y-1],S.push(e[h>>10]+e[h>>4&63]+e[h<<2&63]+"=")),S.join("")}return Pr}var xn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var gu;function dv(){return gu||(gu=1,xn.read=function(e,t,n,r,s){var o,l,i=s*8-r-1,u=(1<<i)-1,c=u>>1,a=-7,d=n?s-1:0,f=n?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-a)-1,p>>=-a,a+=i;a>0;o=o*256+e[t+d],d+=f,a-=8);for(l=o&(1<<-a)-1,o>>=-a,a+=r;a>0;l=l*256+e[t+d],d+=f,a-=8);if(o===0)o=1-c;else{if(o===u)return l?NaN:(p?-1:1)*(1/0);l=l+Math.pow(2,r),o=o-c}return(p?-1:1)*l*Math.pow(2,o-r)},xn.write=function(e,t,n,r,s,o){var l,i,u,c=o*8-s-1,a=(1<<c)-1,d=a>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,l=a):(l=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-l))<1&&(l--,u*=2),l+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(l++,u/=2),l+d>=a?(i=0,l=a):l+d>=1?(i=(t*u-1)*Math.pow(2,s),l=l+d):(i=t*Math.pow(2,d-1)*Math.pow(2,s),l=0));s>=8;e[n+p]=i&255,p+=h,i/=256,s-=8);for(l=l<<s|i,c+=s;c>0;e[n+p]=l&255,p+=h,l/=256,c-=8);e[n+p-h]|=y*128}),xn}/*!
64
64
  * The buffer module from node.js, for the browser.
65
65
  *
66
66
  * @author Feross Aboukhadijeh <https://feross.org>
67
67
  * @license MIT
68
- */var bu;function Nv(){return bu||(bu=1,function(e){const t=Cv(),r=Pv(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const s=2147483647;e.kMaxLength=s,i.TYPED_ARRAY_SUPPORT=o(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const b=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(b,m),b.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function l(b){if(b>s)throw new RangeError('The value "'+b+'" is invalid for option "size"');const m=new Uint8Array(b);return Object.setPrototypeOf(m,i.prototype),m}function i(b,m,g){if(typeof b=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(b)}return c(b,m,g)}i.poolSize=8192;function c(b,m,g){if(typeof b=="string")return f(b,m);if(ArrayBuffer.isView(b))return h(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Ie(b,ArrayBuffer)||b&&Ie(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(b,SharedArrayBuffer)||b&&Ie(b.buffer,SharedArrayBuffer)))return y(b,m,g);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=b.valueOf&&b.valueOf();if(O!=null&&O!==b)return i.from(O,m,g);const C=_(b);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return i.from(b[Symbol.toPrimitive]("string"),m,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}i.from=function(b,m,g){return c(b,m,g)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function u(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function a(b,m,g){return u(b),b<=0?l(b):m!==void 0?typeof g=="string"?l(b).fill(m,g):l(b).fill(m):l(b)}i.alloc=function(b,m,g){return a(b,m,g)};function d(b){return u(b),l(b<0?0:S(b)|0)}i.allocUnsafe=function(b){return d(b)},i.allocUnsafeSlow=function(b){return d(b)};function f(b,m){if((typeof m!="string"||m==="")&&(m="utf8"),!i.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const g=w(b,m)|0;let O=l(g);const C=O.write(b,m);return C!==g&&(O=O.slice(0,C)),O}function p(b){const m=b.length<0?0:S(b.length)|0,g=l(m);for(let O=0;O<m;O+=1)g[O]=b[O]&255;return g}function h(b){if(Ie(b,Uint8Array)){const m=new Uint8Array(b);return y(m.buffer,m.byteOffset,m.byteLength)}return p(b)}function y(b,m,g){if(m<0||b.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<m+(g||0))throw new RangeError('"length" is outside of buffer bounds');let O;return m===void 0&&g===void 0?O=new Uint8Array(b):g===void 0?O=new Uint8Array(b,m):O=new Uint8Array(b,m,g),Object.setPrototypeOf(O,i.prototype),O}function _(b){if(i.isBuffer(b)){const m=S(b.length)|0,g=l(m);return g.length===0||b.copy(g,0,0,m),g}if(b.length!==void 0)return typeof b.length!="number"||gt(b.length)?l(0):p(b);if(b.type==="Buffer"&&Array.isArray(b.data))return p(b.data)}function S(b){if(b>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return b|0}function v(b){return+b!=b&&(b=0),i.alloc(+b)}i.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==i.prototype},i.compare=function(m,g){if(Ie(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),Ie(g,Uint8Array)&&(g=i.from(g,g.offset,g.byteLength)),!i.isBuffer(m)||!i.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===g)return 0;let O=m.length,C=g.length;for(let j=0,B=Math.min(O,C);j<B;++j)if(m[j]!==g[j]){O=m[j],C=g[j];break}return O<C?-1:C<O?1:0},i.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(m,g){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return i.alloc(0);let O;if(g===void 0)for(g=0,O=0;O<m.length;++O)g+=m[O].length;const C=i.allocUnsafe(g);let j=0;for(O=0;O<m.length;++O){let B=m[O];if(Ie(B,Uint8Array))j+B.length>C.length?(i.isBuffer(B)||(B=i.from(B)),B.copy(C,j)):Uint8Array.prototype.set.call(C,B,j);else if(i.isBuffer(B))B.copy(C,j);else throw new TypeError('"list" argument must be an Array of Buffers');j+=B.length}return C};function w(b,m){if(i.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Ie(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const g=b.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&g===0)return 0;let C=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return pt(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return jt(b).length;default:if(C)return O?-1:pt(b).length;m=(""+m).toLowerCase(),C=!0}}i.byteLength=w;function A(b,m,g){let O=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,m>>>=0,g<=m))return"";for(b||(b="utf8");;)switch(b){case"hex":return ie(this,m,g);case"utf8":case"utf-8":return K(this,m,g);case"ascii":return q(this,m,g);case"latin1":case"binary":return Y(this,m,g);case"base64":return H(this,m,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,m,g);default:if(O)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),O=!0}}i.prototype._isBuffer=!0;function T(b,m,g){const O=b[m];b[m]=b[g],b[g]=O}i.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<m;g+=2)T(this,g,g+1);return this},i.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<m;g+=4)T(this,g,g+3),T(this,g+1,g+2);return this},i.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<m;g+=8)T(this,g,g+7),T(this,g+1,g+6),T(this,g+2,g+5),T(this,g+3,g+4);return this},i.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?K(this,0,m):A.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(m){if(!i.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:i.compare(this,m)===0},i.prototype.inspect=function(){let m="";const g=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(m+=" ... "),"<Buffer "+m+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(m,g,O,C,j){if(Ie(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),!i.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(g===void 0&&(g=0),O===void 0&&(O=m?m.length:0),C===void 0&&(C=0),j===void 0&&(j=this.length),g<0||O>m.length||C<0||j>this.length)throw new RangeError("out of range index");if(C>=j&&g>=O)return 0;if(C>=j)return-1;if(g>=O)return 1;if(g>>>=0,O>>>=0,C>>>=0,j>>>=0,this===m)return 0;let B=j-C,ce=O-g;const Ee=Math.min(B,ce),ye=this.slice(C,j),we=m.slice(g,O);for(let he=0;he<Ee;++he)if(ye[he]!==we[he]){B=ye[he],ce=we[he];break}return B<ce?-1:ce<B?1:0};function M(b,m,g,O,C){if(b.length===0)return-1;if(typeof g=="string"?(O=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,gt(g)&&(g=C?0:b.length-1),g<0&&(g=b.length+g),g>=b.length){if(C)return-1;g=b.length-1}else if(g<0)if(C)g=0;else return-1;if(typeof m=="string"&&(m=i.from(m,O)),i.isBuffer(m))return m.length===0?-1:D(b,m,g,O,C);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?C?Uint8Array.prototype.indexOf.call(b,m,g):Uint8Array.prototype.lastIndexOf.call(b,m,g):D(b,[m],g,O,C);throw new TypeError("val must be string, number or Buffer")}function D(b,m,g,O,C){let j=1,B=b.length,ce=m.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(b.length<2||m.length<2)return-1;j=2,B/=2,ce/=2,g/=2}function Ee(we,he){return j===1?we[he]:we.readUInt16BE(he*j)}let ye;if(C){let we=-1;for(ye=g;ye<B;ye++)if(Ee(b,ye)===Ee(m,we===-1?0:ye-we)){if(we===-1&&(we=ye),ye-we+1===ce)return we*j}else we!==-1&&(ye-=ye-we),we=-1}else for(g+ce>B&&(g=B-ce),ye=g;ye>=0;ye--){let we=!0;for(let he=0;he<ce;he++)if(Ee(b,ye+he)!==Ee(m,he)){we=!1;break}if(we)return ye}return-1}i.prototype.includes=function(m,g,O){return this.indexOf(m,g,O)!==-1},i.prototype.indexOf=function(m,g,O){return M(this,m,g,O,!0)},i.prototype.lastIndexOf=function(m,g,O){return M(this,m,g,O,!1)};function R(b,m,g,O){g=Number(g)||0;const C=b.length-g;O?(O=Number(O),O>C&&(O=C)):O=C;const j=m.length;O>j/2&&(O=j/2);let B;for(B=0;B<O;++B){const ce=parseInt(m.substr(B*2,2),16);if(gt(ce))return B;b[g+B]=ce}return B}function W(b,m,g,O){return mt(pt(m,b.length-g),b,g,O)}function G(b,m,g,O){return mt(Ge(m),b,g,O)}function L(b,m,g,O){return mt(jt(m),b,g,O)}function $(b,m,g,O){return mt(ht(m,b.length-g),b,g,O)}i.prototype.write=function(m,g,O,C){if(g===void 0)C="utf8",O=this.length,g=0;else if(O===void 0&&typeof g=="string")C=g,O=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(O)?(O=O>>>0,C===void 0&&(C="utf8")):(C=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const j=this.length-g;if((O===void 0||O>j)&&(O=j),m.length>0&&(O<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let B=!1;for(;;)switch(C){case"hex":return R(this,m,g,O);case"utf8":case"utf-8":return W(this,m,g,O);case"ascii":case"latin1":case"binary":return G(this,m,g,O);case"base64":return L(this,m,g,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,m,g,O);default:if(B)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),B=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(b,m,g){return m===0&&g===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(m,g))}function K(b,m,g){g=Math.min(b.length,g);const O=[];let C=m;for(;C<g;){const j=b[C];let B=null,ce=j>239?4:j>223?3:j>191?2:1;if(C+ce<=g){let Ee,ye,we,he;switch(ce){case 1:j<128&&(B=j);break;case 2:Ee=b[C+1],(Ee&192)===128&&(he=(j&31)<<6|Ee&63,he>127&&(B=he));break;case 3:Ee=b[C+1],ye=b[C+2],(Ee&192)===128&&(ye&192)===128&&(he=(j&15)<<12|(Ee&63)<<6|ye&63,he>2047&&(he<55296||he>57343)&&(B=he));break;case 4:Ee=b[C+1],ye=b[C+2],we=b[C+3],(Ee&192)===128&&(ye&192)===128&&(we&192)===128&&(he=(j&15)<<18|(Ee&63)<<12|(ye&63)<<6|we&63,he>65535&&he<1114112&&(B=he))}}B===null?(B=65533,ce=1):B>65535&&(B-=65536,O.push(B>>>10&1023|55296),B=56320|B&1023),O.push(B),C+=ce}return P(O)}const V=4096;function P(b){const m=b.length;if(m<=V)return String.fromCharCode.apply(String,b);let g="",O=0;for(;O<m;)g+=String.fromCharCode.apply(String,b.slice(O,O+=V));return g}function q(b,m,g){let O="";g=Math.min(b.length,g);for(let C=m;C<g;++C)O+=String.fromCharCode(b[C]&127);return O}function Y(b,m,g){let O="";g=Math.min(b.length,g);for(let C=m;C<g;++C)O+=String.fromCharCode(b[C]);return O}function ie(b,m,g){const O=b.length;(!m||m<0)&&(m=0),(!g||g<0||g>O)&&(g=O);let C="";for(let j=m;j<g;++j)C+=Ft[b[j]];return C}function ee(b,m,g){const O=b.slice(m,g);let C="";for(let j=0;j<O.length-1;j+=2)C+=String.fromCharCode(O[j]+O[j+1]*256);return C}i.prototype.slice=function(m,g){const O=this.length;m=~~m,g=g===void 0?O:~~g,m<0?(m+=O,m<0&&(m=0)):m>O&&(m=O),g<0?(g+=O,g<0&&(g=0)):g>O&&(g=O),g<m&&(g=m);const C=this.subarray(m,g);return Object.setPrototypeOf(C,i.prototype),C};function Q(b,m,g){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+m>g)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(m,g,O){m=m>>>0,g=g>>>0,O||Q(m,g,this.length);let C=this[m],j=1,B=0;for(;++B<g&&(j*=256);)C+=this[m+B]*j;return C},i.prototype.readUintBE=i.prototype.readUIntBE=function(m,g,O){m=m>>>0,g=g>>>0,O||Q(m,g,this.length);let C=this[m+--g],j=1;for(;g>0&&(j*=256);)C+=this[m+--g]*j;return C},i.prototype.readUint8=i.prototype.readUInt8=function(m,g){return m=m>>>0,g||Q(m,1,this.length),this[m]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(m,g){return m=m>>>0,g||Q(m,2,this.length),this[m]|this[m+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(m,g){return m=m>>>0,g||Q(m,2,this.length),this[m]<<8|this[m+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},i.prototype.readBigUInt64LE=Be(function(m){m=m>>>0,ze(m,"offset");const g=this[m],O=this[m+7];(g===void 0||O===void 0)&&rt(m,this.length-8);const C=g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,j=this[++m]+this[++m]*2**8+this[++m]*2**16+O*2**24;return BigInt(C)+(BigInt(j)<<BigInt(32))}),i.prototype.readBigUInt64BE=Be(function(m){m=m>>>0,ze(m,"offset");const g=this[m],O=this[m+7];(g===void 0||O===void 0)&&rt(m,this.length-8);const C=g*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],j=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O;return(BigInt(C)<<BigInt(32))+BigInt(j)}),i.prototype.readIntLE=function(m,g,O){m=m>>>0,g=g>>>0,O||Q(m,g,this.length);let C=this[m],j=1,B=0;for(;++B<g&&(j*=256);)C+=this[m+B]*j;return j*=128,C>=j&&(C-=Math.pow(2,8*g)),C},i.prototype.readIntBE=function(m,g,O){m=m>>>0,g=g>>>0,O||Q(m,g,this.length);let C=g,j=1,B=this[m+--C];for(;C>0&&(j*=256);)B+=this[m+--C]*j;return j*=128,B>=j&&(B-=Math.pow(2,8*g)),B},i.prototype.readInt8=function(m,g){return m=m>>>0,g||Q(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},i.prototype.readInt16LE=function(m,g){m=m>>>0,g||Q(m,2,this.length);const O=this[m]|this[m+1]<<8;return O&32768?O|4294901760:O},i.prototype.readInt16BE=function(m,g){m=m>>>0,g||Q(m,2,this.length);const O=this[m+1]|this[m]<<8;return O&32768?O|4294901760:O},i.prototype.readInt32LE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},i.prototype.readInt32BE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},i.prototype.readBigInt64LE=Be(function(m){m=m>>>0,ze(m,"offset");const g=this[m],O=this[m+7];(g===void 0||O===void 0)&&rt(m,this.length-8);const C=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(O<<24);return(BigInt(C)<<BigInt(32))+BigInt(g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),i.prototype.readBigInt64BE=Be(function(m){m=m>>>0,ze(m,"offset");const g=this[m],O=this[m+7];(g===void 0||O===void 0)&&rt(m,this.length-8);const C=(g<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(C)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O)}),i.prototype.readFloatLE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),r.read(this,m,!0,23,4)},i.prototype.readFloatBE=function(m,g){return m=m>>>0,g||Q(m,4,this.length),r.read(this,m,!1,23,4)},i.prototype.readDoubleLE=function(m,g){return m=m>>>0,g||Q(m,8,this.length),r.read(this,m,!0,52,8)},i.prototype.readDoubleBE=function(m,g){return m=m>>>0,g||Q(m,8,this.length),r.read(this,m,!1,52,8)};function Z(b,m,g,O,C,j){if(!i.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>C||m<j)throw new RangeError('"value" argument is out of bounds');if(g+O>b.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(m,g,O,C){if(m=+m,g=g>>>0,O=O>>>0,!C){const ce=Math.pow(2,8*O)-1;Z(this,m,g,O,ce,0)}let j=1,B=0;for(this[g]=m&255;++B<O&&(j*=256);)this[g+B]=m/j&255;return g+O},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(m,g,O,C){if(m=+m,g=g>>>0,O=O>>>0,!C){const ce=Math.pow(2,8*O)-1;Z(this,m,g,O,ce,0)}let j=O-1,B=1;for(this[g+j]=m&255;--j>=0&&(B*=256);)this[g+j]=m/B&255;return g+O},i.prototype.writeUint8=i.prototype.writeUInt8=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,1,255,0),this[g]=m&255,g+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,2,65535,0),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,2,65535,0),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,4,4294967295,0),this[g+3]=m>>>24,this[g+2]=m>>>16,this[g+1]=m>>>8,this[g]=m&255,g+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,4,4294967295,0),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4};function oe(b,m,g,O,C){St(m,O,C,b,g,7);let j=Number(m&BigInt(4294967295));b[g++]=j,j=j>>8,b[g++]=j,j=j>>8,b[g++]=j,j=j>>8,b[g++]=j;let B=Number(m>>BigInt(32)&BigInt(4294967295));return b[g++]=B,B=B>>8,b[g++]=B,B=B>>8,b[g++]=B,B=B>>8,b[g++]=B,g}function Te(b,m,g,O,C){St(m,O,C,b,g,7);let j=Number(m&BigInt(4294967295));b[g+7]=j,j=j>>8,b[g+6]=j,j=j>>8,b[g+5]=j,j=j>>8,b[g+4]=j;let B=Number(m>>BigInt(32)&BigInt(4294967295));return b[g+3]=B,B=B>>8,b[g+2]=B,B=B>>8,b[g+1]=B,B=B>>8,b[g]=B,g+8}i.prototype.writeBigUInt64LE=Be(function(m,g=0){return oe(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Be(function(m,g=0){return Te(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(m,g,O,C){if(m=+m,g=g>>>0,!C){const Ee=Math.pow(2,8*O-1);Z(this,m,g,O,Ee-1,-Ee)}let j=0,B=1,ce=0;for(this[g]=m&255;++j<O&&(B*=256);)m<0&&ce===0&&this[g+j-1]!==0&&(ce=1),this[g+j]=(m/B>>0)-ce&255;return g+O},i.prototype.writeIntBE=function(m,g,O,C){if(m=+m,g=g>>>0,!C){const Ee=Math.pow(2,8*O-1);Z(this,m,g,O,Ee-1,-Ee)}let j=O-1,B=1,ce=0;for(this[g+j]=m&255;--j>=0&&(B*=256);)m<0&&ce===0&&this[g+j+1]!==0&&(ce=1),this[g+j]=(m/B>>0)-ce&255;return g+O},i.prototype.writeInt8=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,1,127,-128),m<0&&(m=255+m+1),this[g]=m&255,g+1},i.prototype.writeInt16LE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,2,32767,-32768),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeInt16BE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,2,32767,-32768),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeInt32LE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,4,2147483647,-2147483648),this[g]=m&255,this[g+1]=m>>>8,this[g+2]=m>>>16,this[g+3]=m>>>24,g+4},i.prototype.writeInt32BE=function(m,g,O){return m=+m,g=g>>>0,O||Z(this,m,g,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4},i.prototype.writeBigInt64LE=Be(function(m,g=0){return oe(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Be(function(m,g=0){return Te(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(b,m,g,O,C,j){if(g+O>b.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function te(b,m,g,O,C){return m=+m,g=g>>>0,C||ne(b,m,g,4),r.write(b,m,g,O,23,4),g+4}i.prototype.writeFloatLE=function(m,g,O){return te(this,m,g,!0,O)},i.prototype.writeFloatBE=function(m,g,O){return te(this,m,g,!1,O)};function _e(b,m,g,O,C){return m=+m,g=g>>>0,C||ne(b,m,g,8),r.write(b,m,g,O,52,8),g+8}i.prototype.writeDoubleLE=function(m,g,O){return _e(this,m,g,!0,O)},i.prototype.writeDoubleBE=function(m,g,O){return _e(this,m,g,!1,O)},i.prototype.copy=function(m,g,O,C){if(!i.isBuffer(m))throw new TypeError("argument should be a Buffer");if(O||(O=0),!C&&C!==0&&(C=this.length),g>=m.length&&(g=m.length),g||(g=0),C>0&&C<O&&(C=O),C===O||m.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),m.length-g<C-O&&(C=m.length-g+O);const j=C-O;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,O,C):Uint8Array.prototype.set.call(m,this.subarray(O,C),g),j},i.prototype.fill=function(m,g,O,C){if(typeof m=="string"){if(typeof g=="string"?(C=g,g=0,O=this.length):typeof O=="string"&&(C=O,O=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!i.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(m.length===1){const B=m.charCodeAt(0);(C==="utf8"&&B<128||C==="latin1")&&(m=B)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(g<0||this.length<g||this.length<O)throw new RangeError("Out of range index");if(O<=g)return this;g=g>>>0,O=O===void 0?this.length:O>>>0,m||(m=0);let j;if(typeof m=="number")for(j=g;j<O;++j)this[j]=m;else{const B=i.isBuffer(m)?m:i.from(m,C),ce=B.length;if(ce===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(j=0;j<O-g;++j)this[j+g]=B[j%ce]}return this};const xe={};function He(b,m,g){xe[b]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}He("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),He("ERR_INVALID_ARG_TYPE",function(b,m){return`The "${b}" argument must be of type number. Received type ${typeof m}`},TypeError),He("ERR_OUT_OF_RANGE",function(b,m,g){let O=`The value of "${b}" is out of range.`,C=g;return Number.isInteger(g)&&Math.abs(g)>2**32?C=We(String(g)):typeof g=="bigint"&&(C=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(C=We(C)),C+="n"),O+=` It must be ${m}. Received ${C}`,O},RangeError);function We(b){let m="",g=b.length;const O=b[0]==="-"?1:0;for(;g>=O+4;g-=3)m=`_${b.slice(g-3,g)}${m}`;return`${b.slice(0,g)}${m}`}function tr(b,m,g){ze(m,"offset"),(b[m]===void 0||b[m+g]===void 0)&&rt(m,b.length-(g+1))}function St(b,m,g,O,C,j){if(b>g||b<m){const B=typeof m=="bigint"?"n":"";let ce;throw j>3?m===0||m===BigInt(0)?ce=`>= 0${B} and < 2${B} ** ${(j+1)*8}${B}`:ce=`>= -(2${B} ** ${(j+1)*8-1}${B}) and < 2 ** ${(j+1)*8-1}${B}`:ce=`>= ${m}${B} and <= ${g}${B}`,new xe.ERR_OUT_OF_RANGE("value",ce,b)}tr(O,C,j)}function ze(b,m){if(typeof b!="number")throw new xe.ERR_INVALID_ARG_TYPE(m,"number",b)}function rt(b,m,g){throw Math.floor(b)!==b?(ze(b,g),new xe.ERR_OUT_OF_RANGE(g||"offset","an integer",b)):m<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${m}`,b)}const ft=/[^+/0-9A-Za-z-_]/g;function dt(b){if(b=b.split("=")[0],b=b.trim().replace(ft,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function pt(b,m){m=m||1/0;let g;const O=b.length;let C=null;const j=[];for(let B=0;B<O;++B){if(g=b.charCodeAt(B),g>55295&&g<57344){if(!C){if(g>56319){(m-=3)>-1&&j.push(239,191,189);continue}else if(B+1===O){(m-=3)>-1&&j.push(239,191,189);continue}C=g;continue}if(g<56320){(m-=3)>-1&&j.push(239,191,189),C=g;continue}g=(C-55296<<10|g-56320)+65536}else C&&(m-=3)>-1&&j.push(239,191,189);if(C=null,g<128){if((m-=1)<0)break;j.push(g)}else if(g<2048){if((m-=2)<0)break;j.push(g>>6|192,g&63|128)}else if(g<65536){if((m-=3)<0)break;j.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((m-=4)<0)break;j.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return j}function Ge(b){const m=[];for(let g=0;g<b.length;++g)m.push(b.charCodeAt(g)&255);return m}function ht(b,m){let g,O,C;const j=[];for(let B=0;B<b.length&&!((m-=2)<0);++B)g=b.charCodeAt(B),O=g>>8,C=g%256,j.push(C),j.push(O);return j}function jt(b){return t.toByteArray(dt(b))}function mt(b,m,g,O){let C;for(C=0;C<O&&!(C+g>=m.length||C>=b.length);++C)m[C+g]=b[C];return C}function Ie(b,m){return b instanceof m||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===m.name}function gt(b){return b!==b}const Ft=function(){const b="0123456789abcdef",m=new Array(256);for(let g=0;g<16;++g){const O=g*16;for(let C=0;C<16;++C)m[O+C]=b[g]+b[C]}return m}();function Be(b){return typeof BigInt>"u"?Dt:b}function Dt(){throw new Error("BigInt not supported")}}(Ao)),Ao}(function(e,t){(function(r,n){e.exports=n($y(),Xy(),nv(),qu(),lv,Rv(),Nv())})(le,function(r,n,s,o,l,i,c){return function(){var u={809:function(p){p.exports=r},30:function(p){p.exports=n},36:function(p){p.exports=s},300:function(p){p.exports=o},408:function(p){p.exports=c},25:function(p){p.exports=l},130:function(p){p.exports=i}},a={};function d(p){var h=a[p];if(h!==void 0)return h.exports;var y=a[p]={exports:{}};return u[p](y,y.exports,d),y.exports}d.n=function(p){var h=p&&p.__esModule?function(){return p.default}:function(){return p};return d.d(h,{a:h}),h},d.d=function(p,h){for(var y in h)d.o(h,y)&&!d.o(p,y)&&Object.defineProperty(p,y,{enumerable:!0,get:h[y]})},d.o=function(p,h){return Object.prototype.hasOwnProperty.call(p,h)},d.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})};var f={};return function(){d.r(f),d.d(f,{assets:function(){return P},auth:function(){return Q},buildAnswer:function(){return fp},buildCarouselCard:function(){return lp},buildQuestion:function(){return np},carouselCards:function(){return Fa},contentInteraction:function(){return Be},decodeBase64:function(){return pp},default:function(){return hp},editorialPages:function(){return Kd},features:function(){return g},getEntries:function(){return p.getEntries},getEntry:function(){return p.getEntry},management:function(){return ir},payments:function(){return ei},people:function(){return Ut},peopleEngagement:function(){return Ma},qaQuestions:function(){return $a},reportError:function(){return h.reportError},search:function(){return Gd}});var p=d(809),h=d(30),y=d(36),_={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:S,LOCALHOST:v,STAGING:w,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:T,LOCAL:M}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:D,EMAIL_IDS:R}}=_;let W={emailIds:{}};var G=d(300),L=d.n(G);const $=async N=>{try{const{message:k,response:I,request:U}=N;let X=k;return I?X+=` - The request was made and the server responded with ${JSON.stringify({status:I.status,data:I.data})}`:U&&(X+=" - The request was made but no response was received"),console.warn(X),await(0,h.reportError)(new Error(X)),X}catch(k){return console.warn(`Cannot handle error: ${k.message}`),k.message}},{APIS:{ASSETS_API:{BASE_URL:H,ENDPOINTS:{USERS:K,CERTIFICATES:V}}}}=_;var P={certificates:{create:async(N,k)=>{let I=[];try{const{data:U}=await L().post(`${H}${K}/${N}${V}`,k);U&&(I=U)}catch(U){await $(U)}return I}}};const{APIS:{AUTH_API:{BASE_URL:q,ENDPOINTS:{USER_PASSWORD:Y,USERS:ie}}},USERS:{MYSELF:ee}}=_;var Q={userPassword:{update:async N=>{let k=null;try{k=await L().put(`${q}${ie}/${ee}${Y}`,N)}catch(I){k={message:(((I||{}).response||{}).data||{}).message},await $(I)}return k}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Z,ENDPOINTS:{ANSWERS:oe,QUESTIONS:Te,LIKES:ne}}}}=_,te=`${Z}${Te}`;var _e={create:async({questionSlug:N},k)=>{try{await L().post(`${te}/${encodeURIComponent(N)}${oe}`,k)}catch(I){const U=await $(I);throw new Error(U)}},remove:async({questionSlug:N,answerSlug:k})=>{try{await L().delete(`${te}/${encodeURIComponent(N)}${oe}/${encodeURIComponent(k)}`)}catch(I){const U=await $(I);throw new Error(U)}},update:async({questionSlug:N,answerSlug:k},I)=>{try{return await L().put(`${te}/${encodeURIComponent(N)}${oe}/${encodeURIComponent(k)}`,I)}catch(U){const X=await $(U);throw new Error(X)}},like:async({questionSlug:N,answerSlug:k},I)=>{try{return await L().post(`${te}/${encodeURIComponent(N)}${oe}/${encodeURIComponent(k)}${ne}`,I)}catch(U){const X=await $(U);throw new Error(X)}},unlike:async({questionSlug:N,answerSlug:k})=>{try{return await L().delete(`${te}/${encodeURIComponent(N)}${oe}/${encodeURIComponent(k)}${ne}`)}catch(I){const U=await $(I);throw new Error(U)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:xe,ENDPOINTS:{QUESTIONS:He}}}}=_,We=`${xe}${He}`;var tr={create:async N=>{try{return await L().post(We,N)}catch(k){const I=await $(k);throw new Error(I)}},remove:async({questionSlug:N})=>{try{await L().delete(`${We}/${encodeURIComponent(N)}`)}catch(k){const I=await $(k);throw new Error(I)}},update:async({questionSlug:N},k)=>{try{return await L().put(`${We}/${encodeURIComponent(N)}`,k)}catch(I){const U=await $(I);throw new Error(U)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:St,ENDPOINTS:{REPLIES:ze,ANSWERS:rt,QUESTIONS:ft,LIKES:dt}}}}=_,pt=`${St}${ft}`,Ge=({questionSlug:N,answerSlug:k,replySlug:I},U=!1)=>{let X=`${pt}/${encodeURIComponent(N)}${rt}/${encodeURIComponent(k)}${ze}`;return I&&(X=`${X}/${encodeURIComponent(I)}`,U&&(X=`${X}${dt}`)),X};var ht={create:async({questionSlug:N,answerSlug:k},I)=>{try{return await L().post(Ge({questionSlug:N,answerSlug:k}),I)}catch(U){const X=await $(U);throw new Error(X)}},update:async({questionSlug:N,answerSlug:k,replySlug:I},U)=>{try{return await L().put(Ge({questionSlug:N,answerSlug:k,replySlug:I}),U)}catch(X){const me=await $(X);throw new Error(me)}},remove:async({questionSlug:N,answerSlug:k,replySlug:I})=>{try{await L().delete(Ge({questionSlug:N,answerSlug:k,replySlug:I}))}catch(U){const X=await $(U);throw new Error(X)}},like:async({questionSlug:N,answerSlug:k,replySlug:I},U)=>{try{await L().post(Ge({questionSlug:N,answerSlug:k,replySlug:I},!0),U)}catch(X){const me=await $(X);throw new Error(me)}},unlike:async({questionSlug:N,answerSlug:k,replySlug:I})=>{try{await L().delete(Ge({questionSlug:N,answerSlug:k,replySlug:I},!0))}catch(U){const X=await $(U);throw new Error(X)}},getReplyUrl:Ge};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:jt,ENDPOINTS:{QUESTIONS:mt,ANSWERS:Ie,LIKES:gt}}}}=_,Ft=`${jt}${mt}`;var Be={answers:_e,questions:tr,replies:ht,likes:{create:async(N,k)=>{try{return await L().post(`${Ft}/${encodeURIComponent(N)}${Ie}/${encodeURIComponent(k)}${gt}`)}catch(I){const U=await $(I);throw new Error(U)}},remove:async(N,k)=>{try{return await L().delete(`${Ft}/${encodeURIComponent(N)}${Ie}/${encodeURIComponent(k)}${gt}`)}catch(I){const U=await $(I);throw new Error(U)}}}};const{APIS:{FEATURES_API:{BASE_URL:Dt,ENDPOINTS:{FLAGS:b}}}}=_,m=`${Dt}${b}`;var g={flags:{read:async N=>{let k=null;try{const{data:I}=await L().get(`${m}/${encodeURIComponent(N)}`);I!=null&&I.name&&(I!=null&&I.featureState)&&(k=I)}catch(I){await $(I)}return k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:O,ENDPOINTS:{ACCOUNTS:C}}}}=_;var j={create:async N=>{try{await L().post(`${O}${C}`,N)}catch(k){throw await $(k),k}},read:async N=>{let k=null;try{({data:k}=await L().get(`${O}${C}/${encodeURIComponent(N)}`))}catch(I){await $(I)}return k},update:async(N,k)=>{try{await L().put(`${O}${C}/${encodeURIComponent(N)}`,k)}catch(I){throw await $(I),I}}};const{APIS:{MANAGEMENT_API:{BASE_URL:B,ENDPOINTS:{BULK_ENROLMENTS:ce}}}}=_;var Ee={create:async N=>{try{await L().post(`${B}${ce}`,N)}catch(k){throw await $(k),k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:ye,ENDPOINTS:{EVENT_REGISTRATIONS:we}}}}=_;var he={create:async N=>{try{await L().post(`${ye}${we}`,N)}catch(k){const I=await $(k);throw new Error(I)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:rr,ENDPOINTS:{LOGINS:Jr,LOGIN_PASSWORDLESS:yt}}}}=_,nr=`${rr}${Jr}`;var ir={accounts:j,bulkEnrolments:Ee,eventRegistrations:he,passwordless:{update:async N=>{try{await L().put(`${nr}/${encodeURIComponent(N)}${yt}`)}catch(k){throw await $(k),k}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Kr,ENDPOINTS:{PRODUCTS:Zn}}}}=_,Xr=`${Kr}${Zn}`;var ei={products:{list:async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(Xr,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Zr,ENDPOINTS:{BULK_ENROLMENTS:en}}}}=_;var ti={list:async N=>{let k=[];try{const{data:I}=await L().get(`${Zr}${en}`,{params:N});I&&I.length&&(k=I)}catch(I){await $(I)}return k}},ri=d(25);const{OK:tn,MULTIPLE_CHOICES:ni,NOT_FOUND:ii,FORBIDDEN:oi}=ri.StatusCodes,rn=N=>N>=tn&&N<ni||N===oi||N===ii,{APIS:{PEOPLE_API:{BASE_URL_V2:x,ENDPOINTS:{USERS:z}}}}=_,J=async N=>{let k=null;try{const{data:I}=await L().get(`${x}${z}/${encodeURIComponent(N)}`,{validateStatus:rn});I&&I.id&&(k=I)}catch(I){await $(I)}return k},ae=async N=>{let k=[];try{if(N&&N.length<2)throw new Error("users list method requires at least two ids");const I=N.map(X=>`ids=${encodeURIComponent(X)}`).join("&"),U=await L().get(`${x}${z}?${I}`,{validateStatus:rn});U&&U.length&&(k=U)}catch(I){await $(I)}return k};var pe={read:J,update:async(N,k)=>{let I=!1;try{const{data:U}=await L().put(`${x}${z}/${encodeURIComponent(N)}`,k);I=!(!U||!U.id)}catch(U){await $(U)}return I},list:ae};const{APIS:{PEOPLE_API:{BASE_URL_V2:ge,ENDPOINTS:{USERS:fe,USER_LIKES:ue}}},USERS:{MYSELF:ke}}=_,Oe=`${ge}${fe}/${ke}${ue}`,Se=async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(Oe,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k};var Ue={list:Se},vt={authors:{readQuestionAuthors:async(N,k,I)=>{try{if(N.author=await J(N.authorId),N.answers&&N.answers.length&&!I.ignoreAnswersAuthors){N.answers.sort((X,me)=>new Date(me.updatedAt)-new Date(X.updatedAt)),N.totalAnswers=N.answers.length;let U=N.answers;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);U=N.answers.slice(X,X+I.limit)}for(let X of U){X.author=X.authorId&&await J(X.authorId)||{};const[me]=k?await Se({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!me}N.answers=U}else N.answers||(N.answers=[]);return N}catch(U){throw await $(U),new Error(`Cannot read authors for question: ${U.message}`)}},readAuthors:async(N=[])=>{let k=[];try{if(Array.isArray(N)===!1)throw new Error("authorIds is not an array!");if(N&&N.length===1){const I=await J(N[0]);I&&k.push(I)}else if(N&&N.length>1){const I=await ae(N);I&&I.length>0&&(k=I)}}catch(I){throw await $(I),new Error(`Cannot read authors: ${I.message}`)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL:nn,ENDPOINTS:{REGISTRATIONS:Ve}}}}=_;var sd={list:async N=>{let k=[];try{const{data:I}=await L().get(`${nn}${Ve}`,{params:N});I&&I.length&&(k=I)}catch(I){await $(I)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:cd,ENDPOINTS:{USERS:ud,USER_COURSES:ld}}},USERS:{MYSELF:fd}}=_,ai=`${cd}${ud}/${fd}${ld}`;var dd={create:async N=>{try{await L().post(ai,N)}catch(k){await $(k)}},list:async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(ai,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k},update:async(N,k)=>{try{await L().put(`${ai}/${N}`,k)}catch(I){await $(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:pd,ENDPOINTS:{USERS:hd,USER_EVENTS:md}}},USERS:{MYSELF:gd}}=_,yd=`${pd}${hd}/${gd}${md}`;var vd={list:async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(yd,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:_d,ENDPOINTS:{USERS:Ed,USER_LESSONS:wd}}},USERS:{MYSELF:bd}}=_,ka=`${_d}${Ed}/${bd}${wd}`;var Sd={create:async N=>{let k=null;try{k=await L().post(ka,N)}catch(I){await $(I)}return k},list:async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(ka,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Td,ENDPOINTS:{USERS:Od,USER_PRODUCTS:Ad}}},USERS:{MYSELF:xd}}=_,si=`${Td}${Od}/${xd}${Ad}`;var Rd={create:async N=>{let k=null;try{k=await L().post(si,N)}catch(I){await $(I)}return k},list:async N=>{let k=[],I=N?{params:N}:{params:{}};try{const{data:U}=await L().get(si,I);U&&U.length&&(k=U)}catch(U){await $(U)}return k},update:async(N,k)=>{try{await L().put(`${si}/${N}`,k)}catch(I){await $(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Cd,ENDPOINTS:{USERS:Pd,USER_RATINGS:Nd}}},USERS:{MYSELF:Id}}=_,La=`${Cd}${Pd}/${Id}${Nd}`;var Ut={bulkEnrolments:ti,handlers:vt,registrations:sd,users:pe,userCourses:dd,userEvents:vd,userLessons:Sd,userLikes:Ue,userProducts:Rd,userRatings:{create:async N=>{let k=null;try{const{data:I}=await L().post(La,N);I!=null&&I.id&&(k=I)}catch(I){await $(I)}return k},update:async(N,k)=>{try{await L().put(`${La}/${N}`,k)}catch(I){await $(I)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:kd,ENDPOINTS:{ENQUIRY_EMAILS:Ld}}}}=_;var Md={create:async N=>{let k=null;try{const{data:I}=await L().post(`${kd}${Ld}`,N);I&&(k=I)}catch(I){await $(I)}return k}},jd={forms:{sendEnquiryEmails:async N=>{let k=null;try{const{emailIds:I}=W;k=await Ma.emails.create({...I,...N})}catch(I){await $(I)}return k}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Fd,ENDPOINTS:{USERS:Dd,USER_PROPERTIES:Ud}}},USERS:{MYSELF:$d}}=_;var Ma={emails:Md,handlers:jd,userProperties:{update:async(N,k)=>{try{await L().put(`${Fd}${Dd}/${$d}${Ud}/${N}`,k)}catch(I){await $(I)}}}},Bd=d(130);const{APIS:{SEARCH_API:{BASE_URL:qd,ENDPOINTS:{SEARCH:Hd}}}}=_,Wd=`${qd}${Hd}`;var Gd={ask:async N=>{try{let k=null;const{data:I}=await L().get(Wd,{params:{question:N}});return I!=null&&I.answer&&(I!=null&&I.references)&&(I!=null&&I.version)&&(k=I),k}catch(k){const I=await $(k);throw new Error(I)}},stream:(N,k,I)=>{const U=(0,Bd.io)(void 0,{path:"/api/search-api/web-sockets"});function X(){U.emit("search",{question:N})}function me(Ae){I(Ae),be(),U.disconnect()}function be(){U.off("connect",X),U.off("update",k),U.off("result",me)}return U.on("connect",X),U.on("update",k),U.on("result",me),be}};const{CONTENTFUL:Vd}=_,{CARD_TYPES:ja}=Vd.CAROUSELS;var Fa={read:async(N,k)=>{try{if(!k||!k.sys||!k.sys.id)throw new Error("Invalid link to card");if(!N||!ja[N])throw new Error("Unsupported card content type");const{INCLUDE:I,SELECT:U}=ja[N];return await(0,p.getEntry)({content_type:N,"sys.id":k.sys.id,include:I,select:U},{assetDetails:!0})}catch(I){throw await $(I),new Error(`Cannot read carousel card: ${I.message}`)}}};const{CONTENTFUL:Qd}=_,{INCLUDE:zd,SELECT:Yd,TYPE:Jd}=Qd.EDITORIAL_PAGES;var Kd={read:async N=>{try{return await(0,p.getEntry)({content_type:Jd,"fields.slug":N,include:zd,select:Yd})}catch(k){throw await $(k),new Error(`Cannot read editorial page: ${k.message}`)}}};const{CONTENTFUL:Xd}=_,{TYPE:Da,ORDER:Zd,SELECT:Ua,SKIP:ep,LIMIT:tp,INCLUDE:rp}=Xd.QUESTIONS;var $a={read:async N=>{try{return await(0,p.getEntry)({content_type:Da,"fields.slug":N,include:2,select:Ua})}catch(k){throw await $(k),new Error(`Cannot read question: ${k.message}`)}},list:async(N={})=>{try{return await(0,p.getEntries)({content_type:Da,include:rp,limit:tp,order:Zd,select:Ua,skip:ep,...N})}catch(k){throw await $(k),new Error(`Cannot list questions: ${k.message}`)}}},np=async(N,k,I={ignoreAnswersAuthors:!1})=>{try{let U={};return U=await $a.read(N),U=await Ut.handlers.authors.readQuestionAuthors(U,k,I),U}catch(U){throw await $(U),new Error(`Cannot build question: ${U.message}`)}};const{ARTICLES:{TYPE:ip},COURSES:{TYPE:op},EVENTS:{TYPE:ap},LISTS:{TYPE:sp},QUESTIONS:{TYPE:cp},LEARNING_HUB:{TYPE:up}}=_.CONTENTFUL,or=N=>N&&N.url?(Object.assign(N,{aspect:"responsiveCard",query:"q=90&fit=fill"}),N):null,ci={[ip]:async N=>{const{authorIds:k,authorTag:I,image:U,publishedDate:X,readingTime:me,slug:be,title:Ae}=N,qe=await Ut.handlers.authors.readAuthors(k),Ye=qe&&qe.length?qe:I?[I]:null;return{banner:or(U),contributors:Ye,publishedDate:X,readingTime:me,slug:be,title:Ae}},[op]:async(N,k)=>{const{banner:I,freeCourse:U,partnershipDetails:X,slug:me,title:be,registered:Ae}=N,qe={banner:or(I),slug:me,title:be,pill:U?"free":"premium",registered:!!Ae};if(X){const{partners:Ye}=X;qe.partner=Ye&&Ye.length&&X.partners[0]}if(Ae===void 0&&k){const[Ye]=await Ut.userProducts.list({courseSlug:me,isEnrolled:!0,scope:"active"});qe.registered=!!Ye}return qe},[ap]:async(N,k)=>{const{bannerImage:I,defaultStartDate:U,isEventOngoing:X,slug:me,speakers:be,title:Ae,registered:qe}=N,Ye=new Date(U),mp=!!Ye&&Ye<new Date;if(be&&be.length)for(const on of be)on.image=(ui=on.image)&&ui.url?`${ui.url}?w=100&h=100&fit=thumb&f=center`:null;var ui;const Ba={banner:or(I),dateHasPassed:mp,title:Ae,slug:me,isOngoingEvent:X,contributors:be,startDate:Ye,registered:!!qe};if(qe===void 0&&k){const[on]=await Ut.userEvents.list({eventSlug:me});Ba.registered=!!on}return Ba},[sp]:async N=>{const{hero:k,slug:I,title:U}=N;return{banner:or(k),slug:I,title:U}},[cp]:async N=>{const{answers:k,authorId:I,createdAt:U,slug:X,title:me}=N;let be=null;if(I){const Ae=await Ut.users.read(I);Ae&&(be=Ae)}return{answers:k&&k.length?k.length:0,contributors:be?[be]:[],createdAt:U,slug:X,title:me}},[up]:N=>{const{bannerSection:k,customLabel:I,slug:U,title:X}=N;return{banner:or(k.image),slug:U,title:X,customLabel:I}},people:N=>{const{id:k,name:I,jobTitle:U,location:X,image:me}=N;return{profile:me,slug:k,title:I,text:U,secondaryText:X}}};var lp=async({contentType:N,...k}={},I)=>{try{if(!ci[N])throw new Error("Content type not supported");if(typeof ci[N]!="function")throw new Error("No builder function for content type");return N!=="people"&&k.sys&&k.sys.type&&k.sys.type==="Link"&&(k=await Fa.read(N,k)),{contentType:N,...await ci[N](k,I)}}catch(U){throw await $(U),new Error(`Cannot build carousel card: ${U.message}`)}},fp=async(N,k,I={})=>{try{if(!N.replies||N.replies.length===0)return N.replies=[],N;N.replies.sort((X,me)=>new Date(X.createdAt)-new Date(me.createdAt)),N.totalReplies=N.totalReplies||N.replies.length;let U=N.replies;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);U=N.replies.slice(X,X+I.limit)}for(const X of U){if(X.authorId===N.authorId){X.author=N.author,X.userLiked=!1;continue}X.author=X.authorId&&await J(X.authorId)||{};const[me]=k?await Se({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!me}return N.replies=U,N}catch(U){throw await $(U),new Error(`Cannot build replies for answer: ${U.message}`)}},dp=d(408);const pp=N=>N&&dp.Buffer.from(N,"base64").toString("ascii");function hp({contentContext:N=null,errorsContext:k=null,gtmContext:I=null,origin:U}){try{const X=(me=>{let be=null;me?be=me:typeof window<"u"&&(be=window.origin||window.location.origin),be||new Error("Cannot select environment: Website not defined");let Ae=null;const qe=be.match(w);return qe?Ae=qe[1].split(A)[0]:be===S?Ae=T:be.includes(v)&&(Ae=M),Ae||new Error(`Cannot select environment: No rule for website ${be}`),Ae})(U);return N&&(0,p.setContext)(Object.assign({},N,{environment:X})),k&&(0,h.setContext)(Object.assign({},k,{environment:X})),I&&((0,y.setContext)(Object.assign({},I,{environment:X})),(0,y.setupGTM)()),(({environment:me})=>{const be=(Ae=>{if(!Ae)throw new Error("Cannot map environment: Environment not defined");if(!D[Ae])throw new Error(`Cannot map environment: No mapping found for environment ${Ae}`);return D[Ae]})(me);W.emailIds=R[be]})(Object.assign({},{environment:X})),X}catch(X){console.warn(`Cannot load SDK: ${X.message}`)}}}(),f}()})})(ku);var Iv=ku.exports;const Ir={Off:"off",On:"on",Cookie:"cookie"},kv=e=>{const[t]=oa.useCookies(),[r,n]=F.useState(null),[s,o]=F.useState(!1),[l,i]=F.useState(Ir.Off);return F.useEffect(()=>{e&&Iv.features.flags.read(e).then(c=>{i(c.featureState),n(null)}).catch(c=>{i(Ir.Off),n(c)})},[e]),F.useEffect(()=>{switch(l){case Ir.Off:o(!1);break;case Ir.On:o(!0);break;case Ir.Cookie:o(!!t[`feature-${e}`]);break;default:o(!1)}},[l,t]),{isFeatureActive:s,error:r}};function Lv(e,t,r){var n=this,s=F.useRef(null),o=F.useRef(0),l=F.useRef(null),i=F.useRef([]),c=F.useRef(),u=F.useRef(),a=F.useRef(e),d=F.useRef(!0);F.useEffect(function(){a.current=e},[e]);var f=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,y="maxWait"in r,_=y?Math.max(+r.maxWait||0,t):null;F.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var S=F.useMemo(function(){var v=function(R){var W=i.current,G=c.current;return i.current=c.current=null,o.current=R,u.current=a.current.apply(G,W)},w=function(R,W){f&&cancelAnimationFrame(l.current),l.current=f?requestAnimationFrame(R):setTimeout(R,W)},A=function(R){if(!d.current)return!1;var W=R-s.current;return!s.current||W>=t||W<0||y&&R-o.current>=_},T=function(R){return l.current=null,h&&i.current?v(R):(i.current=c.current=null,u.current)},M=function R(){var W=Date.now();if(A(W))return T(W);if(d.current){var G=t-(W-s.current),L=y?Math.min(G,_-(W-o.current)):G;w(R,L)}},D=function(){var R=Date.now(),W=A(R);if(i.current=[].slice.call(arguments),c.current=n,s.current=R,W){if(!l.current&&d.current)return o.current=s.current,w(M,t),p?v(s.current):u.current;if(y)return w(M,t),v(s.current)}return l.current||w(M,t),u.current};return D.cancel=function(){l.current&&(f?cancelAnimationFrame(l.current):clearTimeout(l.current)),o.current=0,i.current=s.current=c.current=l.current=null},D.isPending=function(){return!!l.current},D.flush=function(){return l.current?T(Date.now()):u.current},D},[p,y,t,_,h,f]);return S}function Pf(e,t,r){var n=r===void 0?{}:r,s=n.leading,o=n.trailing;return Lv(e,t,{maxWait:t,leading:s===void 0||s,trailing:o===void 0||o})}let xo;const Vr=(e=!0,t=!1)=>{if(!e)return;const[r,n]=F.useState(0)||[!1,()=>{}];F.useEffect(()=>(o(),window.addEventListener("resize",l),()=>{clearTimeout(xo),l.flush(),window.removeEventListener("resize",l)}),[]);const s=()=>window.innerWidth,o=()=>{n(s())},l=Pf(()=>{s()!==r&&(t&&(clearTimeout(xo),document.body.classList.add("is-resizing"),xo=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},Nf=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:r=()=>{},scrollUp:n=()=>{}}})=>{if(!window)return;const[s,o]=F.useState({current:0,past:0})||[!1,()=>{}],[l,i]=F.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];F.useEffect(()=>(c(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const c=()=>{const a=window.scrollY,d=s.current,f=a-d,p=f>0?"down":"up";if(o({current:a,past:d}),p==="down"){a>=e+t.down&&!l.scrollDown&&(!l.scrollUp||f>t.up)&&(r(),i({scrollUp:!1,scrollDown:!0}));return}Math.abs(f)>=t.up&&!l.scrollUp&&(n(),i({scrollUp:!0,scrollDown:!1}))},u=Pf(()=>{c()},250);return s},Mv=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const r=F.useRef(!1);Lt(()=>{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)},jv=(e,t)=>{Array.isArray(t)||(t=[t]);const r=gp(e);return t.forEach(({type:n,value:s})=>{yp(r,n,s)}),r},If=e=>{const t=[];return e.forEach(r=>{const n=parseInt(r);isNaN(n)||t.push(n)}),t.sort((r,n)=>r-n)},kf=(e,t,r)=>{let n=r.mobile;for(const s in t){const o=parseInt(String(t[s]));if(e>=o)n=r[o];else if(e<o)break}return n},Fv=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Dv=e=>{let o;try{o=new Date().getTime()-new Date(e).getTime()}catch{return""}const l=o/36e5,i=Math.floor(o/864e5);if(i<1)return l<1?{path:"now"}:{path:"hours",number:Math.floor(l)};if(i<7)return{path:"days",number:i};const c=Math.floor(i/7);return c<=52?{path:"weeks",number:c}:{path:"years",number:Math.floor(i/365)}},Uv=e=>new Promise(t=>setTimeout(t,e)),ba={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}.
68
+ */var yu;function pv(){return yu||(yu=1,function(e){const t=fv(),n=dv(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const s=2147483647;e.kMaxLength=s,i.TYPED_ARRAY_SUPPORT=o(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const b=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(b,m),b.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function l(b){if(b>s)throw new RangeError('The value "'+b+'" is invalid for option "size"');const m=new Uint8Array(b);return Object.setPrototypeOf(m,i.prototype),m}function i(b,m,g){if(typeof b=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(b)}return u(b,m,g)}i.poolSize=8192;function u(b,m,g){if(typeof b=="string")return f(b,m);if(ArrayBuffer.isView(b))return h(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Me(b,ArrayBuffer)||b&&Me(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Me(b,SharedArrayBuffer)||b&&Me(b.buffer,SharedArrayBuffer)))return y(b,m,g);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=b.valueOf&&b.valueOf();if(T!=null&&T!==b)return i.from(T,m,g);const N=_(b);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return i.from(b[Symbol.toPrimitive]("string"),m,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}i.from=function(b,m,g){return u(b,m,g)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function c(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function a(b,m,g){return c(b),b<=0?l(b):m!==void 0?typeof g=="string"?l(b).fill(m,g):l(b).fill(m):l(b)}i.alloc=function(b,m,g){return a(b,m,g)};function d(b){return c(b),l(b<0?0:S(b)|0)}i.allocUnsafe=function(b){return d(b)},i.allocUnsafeSlow=function(b){return d(b)};function f(b,m){if((typeof m!="string"||m==="")&&(m="utf8"),!i.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const g=w(b,m)|0;let T=l(g);const N=T.write(b,m);return N!==g&&(T=T.slice(0,N)),T}function p(b){const m=b.length<0?0:S(b.length)|0,g=l(m);for(let T=0;T<m;T+=1)g[T]=b[T]&255;return g}function h(b){if(Me(b,Uint8Array)){const m=new Uint8Array(b);return y(m.buffer,m.byteOffset,m.byteLength)}return p(b)}function y(b,m,g){if(m<0||b.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<m+(g||0))throw new RangeError('"length" is outside of buffer bounds');let T;return m===void 0&&g===void 0?T=new Uint8Array(b):g===void 0?T=new Uint8Array(b,m):T=new Uint8Array(b,m,g),Object.setPrototypeOf(T,i.prototype),T}function _(b){if(i.isBuffer(b)){const m=S(b.length)|0,g=l(m);return g.length===0||b.copy(g,0,0,m),g}if(b.length!==void 0)return typeof b.length!="number"||_t(b.length)?l(0):p(b);if(b.type==="Buffer"&&Array.isArray(b.data))return p(b.data)}function S(b){if(b>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return b|0}function v(b){return+b!=b&&(b=0),i.alloc(+b)}i.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==i.prototype},i.compare=function(m,g){if(Me(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),Me(g,Uint8Array)&&(g=i.from(g,g.offset,g.byteLength)),!i.isBuffer(m)||!i.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===g)return 0;let T=m.length,N=g.length;for(let M=0,H=Math.min(T,N);M<H;++M)if(m[M]!==g[M]){T=m[M],N=g[M];break}return T<N?-1:N<T?1:0},i.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(m,g){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return i.alloc(0);let T;if(g===void 0)for(g=0,T=0;T<m.length;++T)g+=m[T].length;const N=i.allocUnsafe(g);let M=0;for(T=0;T<m.length;++T){let H=m[T];if(Me(H,Uint8Array))M+H.length>N.length?(i.isBuffer(H)||(H=i.from(H)),H.copy(N,M)):Uint8Array.prototype.set.call(N,H,M);else if(i.isBuffer(H))H.copy(N,M);else throw new TypeError('"list" argument must be an Array of Buffers');M+=H.length}return N};function w(b,m){if(i.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Me(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const g=b.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&g===0)return 0;let N=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return je(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Mt(b).length;default:if(N)return T?-1:je(b).length;m=(""+m).toLowerCase(),N=!0}}i.byteLength=w;function x(b,m,g){let T=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,m>>>=0,g<=m))return"";for(b||(b="utf8");;)switch(b){case"hex":return oe(this,m,g);case"utf8":case"utf-8":return K(this,m,g);case"ascii":return q(this,m,g);case"latin1":case"binary":return Y(this,m,g);case"base64":return $(this,m,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,m,g);default:if(T)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),T=!0}}i.prototype._isBuffer=!0;function O(b,m,g){const T=b[m];b[m]=b[g],b[g]=T}i.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<m;g+=2)O(this,g,g+1);return this},i.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<m;g+=4)O(this,g,g+3),O(this,g+1,g+2);return this},i.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<m;g+=8)O(this,g,g+7),O(this,g+1,g+6),O(this,g+2,g+5),O(this,g+3,g+4);return this},i.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?K(this,0,m):x.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(m){if(!i.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:i.compare(this,m)===0},i.prototype.inspect=function(){let m="";const g=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(m+=" ... "),"<Buffer "+m+">"},r&&(i.prototype[r]=i.prototype.inspect),i.prototype.compare=function(m,g,T,N,M){if(Me(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),!i.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(g===void 0&&(g=0),T===void 0&&(T=m?m.length:0),N===void 0&&(N=0),M===void 0&&(M=this.length),g<0||T>m.length||N<0||M>this.length)throw new RangeError("out of range index");if(N>=M&&g>=T)return 0;if(N>=M)return-1;if(g>=T)return 1;if(g>>>=0,T>>>=0,N>>>=0,M>>>=0,this===m)return 0;let H=M-N,le=T-g;const be=Math.min(H,le),_e=this.slice(N,M),Se=m.slice(g,T);for(let me=0;me<be;++me)if(_e[me]!==Se[me]){H=_e[me],le=Se[me];break}return H<le?-1:le<H?1:0};function F(b,m,g,T,N){if(b.length===0)return-1;if(typeof g=="string"?(T=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,_t(g)&&(g=N?0:b.length-1),g<0&&(g=b.length+g),g>=b.length){if(N)return-1;g=b.length-1}else if(g<0)if(N)g=0;else return-1;if(typeof m=="string"&&(m=i.from(m,T)),i.isBuffer(m))return m.length===0?-1:D(b,m,g,T,N);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(b,m,g):Uint8Array.prototype.lastIndexOf.call(b,m,g):D(b,[m],g,T,N);throw new TypeError("val must be string, number or Buffer")}function D(b,m,g,T,N){let M=1,H=b.length,le=m.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(b.length<2||m.length<2)return-1;M=2,H/=2,le/=2,g/=2}function be(Se,me){return M===1?Se[me]:Se.readUInt16BE(me*M)}let _e;if(N){let Se=-1;for(_e=g;_e<H;_e++)if(be(b,_e)===be(m,Se===-1?0:_e-Se)){if(Se===-1&&(Se=_e),_e-Se+1===le)return Se*M}else Se!==-1&&(_e-=_e-Se),Se=-1}else for(g+le>H&&(g=H-le),_e=g;_e>=0;_e--){let Se=!0;for(let me=0;me<le;me++)if(be(b,_e+me)!==be(m,me)){Se=!1;break}if(Se)return _e}return-1}i.prototype.includes=function(m,g,T){return this.indexOf(m,g,T)!==-1},i.prototype.indexOf=function(m,g,T){return F(this,m,g,T,!0)},i.prototype.lastIndexOf=function(m,g,T){return F(this,m,g,T,!1)};function R(b,m,g,T){g=Number(g)||0;const N=b.length-g;T?(T=Number(T),T>N&&(T=N)):T=N;const M=m.length;T>M/2&&(T=M/2);let H;for(H=0;H<T;++H){const le=parseInt(m.substr(H*2,2),16);if(_t(le))return H;b[g+H]=le}return H}function W(b,m,g,T){return vt(je(m,b.length-g),b,g,T)}function V(b,m,g,T){return vt(Xe(m),b,g,T)}function L(b,m,g,T){return vt(Mt(m),b,g,T)}function U(b,m,g,T){return vt(rt(m,b.length-g),b,g,T)}i.prototype.write=function(m,g,T,N){if(g===void 0)N="utf8",T=this.length,g=0;else if(T===void 0&&typeof g=="string")N=g,T=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(T)?(T=T>>>0,N===void 0&&(N="utf8")):(N=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const M=this.length-g;if((T===void 0||T>M)&&(T=M),m.length>0&&(T<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let H=!1;for(;;)switch(N){case"hex":return R(this,m,g,T);case"utf8":case"utf-8":return W(this,m,g,T);case"ascii":case"latin1":case"binary":return V(this,m,g,T);case"base64":return L(this,m,g,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,m,g,T);default:if(H)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),H=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(b,m,g){return m===0&&g===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(m,g))}function K(b,m,g){g=Math.min(b.length,g);const T=[];let N=m;for(;N<g;){const M=b[N];let H=null,le=M>239?4:M>223?3:M>191?2:1;if(N+le<=g){let be,_e,Se,me;switch(le){case 1:M<128&&(H=M);break;case 2:be=b[N+1],(be&192)===128&&(me=(M&31)<<6|be&63,me>127&&(H=me));break;case 3:be=b[N+1],_e=b[N+2],(be&192)===128&&(_e&192)===128&&(me=(M&15)<<12|(be&63)<<6|_e&63,me>2047&&(me<55296||me>57343)&&(H=me));break;case 4:be=b[N+1],_e=b[N+2],Se=b[N+3],(be&192)===128&&(_e&192)===128&&(Se&192)===128&&(me=(M&15)<<18|(be&63)<<12|(_e&63)<<6|Se&63,me>65535&&me<1114112&&(H=me))}}H===null?(H=65533,le=1):H>65535&&(H-=65536,T.push(H>>>10&1023|55296),H=56320|H&1023),T.push(H),N+=le}return C(T)}const Q=4096;function C(b){const m=b.length;if(m<=Q)return String.fromCharCode.apply(String,b);let g="",T=0;for(;T<m;)g+=String.fromCharCode.apply(String,b.slice(T,T+=Q));return g}function q(b,m,g){let T="";g=Math.min(b.length,g);for(let N=m;N<g;++N)T+=String.fromCharCode(b[N]&127);return T}function Y(b,m,g){let T="";g=Math.min(b.length,g);for(let N=m;N<g;++N)T+=String.fromCharCode(b[N]);return T}function oe(b,m,g){const T=b.length;(!m||m<0)&&(m=0),(!g||g<0||g>T)&&(g=T);let N="";for(let M=m;M<g;++M)N+=Dt[b[M]];return N}function ee(b,m,g){const T=b.slice(m,g);let N="";for(let M=0;M<T.length-1;M+=2)N+=String.fromCharCode(T[M]+T[M+1]*256);return N}i.prototype.slice=function(m,g){const T=this.length;m=~~m,g=g===void 0?T:~~g,m<0?(m+=T,m<0&&(m=0)):m>T&&(m=T),g<0?(g+=T,g<0&&(g=0)):g>T&&(g=T),g<m&&(g=m);const N=this.subarray(m,g);return Object.setPrototypeOf(N,i.prototype),N};function G(b,m,g){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+m>g)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m],M=1,H=0;for(;++H<g&&(M*=256);)N+=this[m+H]*M;return N},i.prototype.readUintBE=i.prototype.readUIntBE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m+--g],M=1;for(;g>0&&(M*=256);)N+=this[m+--g]*M;return N},i.prototype.readUint8=i.prototype.readUInt8=function(m,g){return m=m>>>0,g||G(m,1,this.length),this[m]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(m,g){return m=m>>>0,g||G(m,2,this.length),this[m]|this[m+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(m,g){return m=m>>>0,g||G(m,2,this.length),this[m]<<8|this[m+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(m,g){return m=m>>>0,g||G(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},i.prototype.readBigUInt64LE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,M=this[++m]+this[++m]*2**8+this[++m]*2**16+T*2**24;return BigInt(N)+(BigInt(M)<<BigInt(32))}),i.prototype.readBigUInt64BE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=g*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],M=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+T;return(BigInt(N)<<BigInt(32))+BigInt(M)}),i.prototype.readIntLE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m],M=1,H=0;for(;++H<g&&(M*=256);)N+=this[m+H]*M;return M*=128,N>=M&&(N-=Math.pow(2,8*g)),N},i.prototype.readIntBE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=g,M=1,H=this[m+--N];for(;N>0&&(M*=256);)H+=this[m+--N]*M;return M*=128,H>=M&&(H-=Math.pow(2,8*g)),H},i.prototype.readInt8=function(m,g){return m=m>>>0,g||G(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},i.prototype.readInt16LE=function(m,g){m=m>>>0,g||G(m,2,this.length);const T=this[m]|this[m+1]<<8;return T&32768?T|4294901760:T},i.prototype.readInt16BE=function(m,g){m=m>>>0,g||G(m,2,this.length);const T=this[m+1]|this[m]<<8;return T&32768?T|4294901760:T},i.prototype.readInt32LE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},i.prototype.readInt32BE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},i.prototype.readBigInt64LE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(T<<24);return(BigInt(N)<<BigInt(32))+BigInt(g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),i.prototype.readBigInt64BE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=(g<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(N)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+T)}),i.prototype.readFloatLE=function(m,g){return m=m>>>0,g||G(m,4,this.length),n.read(this,m,!0,23,4)},i.prototype.readFloatBE=function(m,g){return m=m>>>0,g||G(m,4,this.length),n.read(this,m,!1,23,4)},i.prototype.readDoubleLE=function(m,g){return m=m>>>0,g||G(m,8,this.length),n.read(this,m,!0,52,8)},i.prototype.readDoubleBE=function(m,g){return m=m>>>0,g||G(m,8,this.length),n.read(this,m,!1,52,8)};function Z(b,m,g,T,N,M){if(!i.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>N||m<M)throw new RangeError('"value" argument is out of bounds');if(g+T>b.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(m,g,T,N){if(m=+m,g=g>>>0,T=T>>>0,!N){const le=Math.pow(2,8*T)-1;Z(this,m,g,T,le,0)}let M=1,H=0;for(this[g]=m&255;++H<T&&(M*=256);)this[g+H]=m/M&255;return g+T},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(m,g,T,N){if(m=+m,g=g>>>0,T=T>>>0,!N){const le=Math.pow(2,8*T)-1;Z(this,m,g,T,le,0)}let M=T-1,H=1;for(this[g+M]=m&255;--M>=0&&(H*=256);)this[g+M]=m/H&255;return g+T},i.prototype.writeUint8=i.prototype.writeUInt8=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,1,255,0),this[g]=m&255,g+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,65535,0),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,65535,0),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,4294967295,0),this[g+3]=m>>>24,this[g+2]=m>>>16,this[g+1]=m>>>8,this[g]=m&255,g+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,4294967295,0),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4};function ae(b,m,g,T,N){tt(m,T,N,b,g,7);let M=Number(m&BigInt(4294967295));b[g++]=M,M=M>>8,b[g++]=M,M=M>>8,b[g++]=M,M=M>>8,b[g++]=M;let H=Number(m>>BigInt(32)&BigInt(4294967295));return b[g++]=H,H=H>>8,b[g++]=H,H=H>>8,b[g++]=H,H=H>>8,b[g++]=H,g}function Oe(b,m,g,T,N){tt(m,T,N,b,g,7);let M=Number(m&BigInt(4294967295));b[g+7]=M,M=M>>8,b[g+6]=M,M=M>>8,b[g+5]=M,M=M>>8,b[g+4]=M;let H=Number(m>>BigInt(32)&BigInt(4294967295));return b[g+3]=H,H=H>>8,b[g+2]=H,H=H>>8,b[g+1]=H,H=H>>8,b[g]=H,g+8}i.prototype.writeBigUInt64LE=Ke(function(m,g=0){return ae(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Ke(function(m,g=0){return Oe(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(m,g,T,N){if(m=+m,g=g>>>0,!N){const be=Math.pow(2,8*T-1);Z(this,m,g,T,be-1,-be)}let M=0,H=1,le=0;for(this[g]=m&255;++M<T&&(H*=256);)m<0&&le===0&&this[g+M-1]!==0&&(le=1),this[g+M]=(m/H>>0)-le&255;return g+T},i.prototype.writeIntBE=function(m,g,T,N){if(m=+m,g=g>>>0,!N){const be=Math.pow(2,8*T-1);Z(this,m,g,T,be-1,-be)}let M=T-1,H=1,le=0;for(this[g+M]=m&255;--M>=0&&(H*=256);)m<0&&le===0&&this[g+M+1]!==0&&(le=1),this[g+M]=(m/H>>0)-le&255;return g+T},i.prototype.writeInt8=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,1,127,-128),m<0&&(m=255+m+1),this[g]=m&255,g+1},i.prototype.writeInt16LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,32767,-32768),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeInt16BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,32767,-32768),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeInt32LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,2147483647,-2147483648),this[g]=m&255,this[g+1]=m>>>8,this[g+2]=m>>>16,this[g+3]=m>>>24,g+4},i.prototype.writeInt32BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4},i.prototype.writeBigInt64LE=Ke(function(m,g=0){return ae(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Ke(function(m,g=0){return Oe(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ie(b,m,g,T,N,M){if(g+T>b.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function re(b,m,g,T,N){return m=+m,g=g>>>0,N||ie(b,m,g,4),n.write(b,m,g,T,23,4),g+4}i.prototype.writeFloatLE=function(m,g,T){return re(this,m,g,!0,T)},i.prototype.writeFloatBE=function(m,g,T){return re(this,m,g,!1,T)};function te(b,m,g,T,N){return m=+m,g=g>>>0,N||ie(b,m,g,8),n.write(b,m,g,T,52,8),g+8}i.prototype.writeDoubleLE=function(m,g,T){return te(this,m,g,!0,T)},i.prototype.writeDoubleBE=function(m,g,T){return te(this,m,g,!1,T)},i.prototype.copy=function(m,g,T,N){if(!i.isBuffer(m))throw new TypeError("argument should be a Buffer");if(T||(T=0),!N&&N!==0&&(N=this.length),g>=m.length&&(g=m.length),g||(g=0),N>0&&N<T&&(N=T),N===T||m.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),m.length-g<N-T&&(N=m.length-g+T);const M=N-T;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,T,N):Uint8Array.prototype.set.call(m,this.subarray(T,N),g),M},i.prototype.fill=function(m,g,T,N){if(typeof m=="string"){if(typeof g=="string"?(N=g,g=0,T=this.length):typeof T=="string"&&(N=T,T=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!i.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(m.length===1){const H=m.charCodeAt(0);(N==="utf8"&&H<128||N==="latin1")&&(m=H)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(g<0||this.length<g||this.length<T)throw new RangeError("Out of range index");if(T<=g)return this;g=g>>>0,T=T===void 0?this.length:T>>>0,m||(m=0);let M;if(typeof m=="number")for(M=g;M<T;++M)this[M]=m;else{const H=i.isBuffer(m)?m:i.from(m,N),le=H.length;if(le===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(M=0;M<T-g;++M)this[M+g]=H[M%le]}return this};const we={};function Ne(b,m,g){we[b]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(b,m){return`The "${b}" argument must be of type number. Received type ${typeof m}`},TypeError),Ne("ERR_OUT_OF_RANGE",function(b,m,g){let T=`The value of "${b}" is out of range.`,N=g;return Number.isInteger(g)&&Math.abs(g)>2**32?N=$e(String(g)):typeof g=="bigint"&&(N=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(N=$e(N)),N+="n"),T+=` It must be ${m}. Received ${N}`,T},RangeError);function $e(b){let m="",g=b.length;const T=b[0]==="-"?1:0;for(;g>=T+4;g-=3)m=`_${b.slice(g-3,g)}${m}`;return`${b.slice(0,g)}${m}`}function Fe(b,m,g){Ge(m,"offset"),(b[m]===void 0||b[m+g]===void 0)&&qe(m,b.length-(g+1))}function tt(b,m,g,T,N,M){if(b>g||b<m){const H=typeof m=="bigint"?"n":"";let le;throw M>3?m===0||m===BigInt(0)?le=`>= 0${H} and < 2${H} ** ${(M+1)*8}${H}`:le=`>= -(2${H} ** ${(M+1)*8-1}${H}) and < 2 ** ${(M+1)*8-1}${H}`:le=`>= ${m}${H} and <= ${g}${H}`,new we.ERR_OUT_OF_RANGE("value",le,b)}Fe(T,N,M)}function Ge(b,m){if(typeof b!="number")throw new we.ERR_INVALID_ARG_TYPE(m,"number",b)}function qe(b,m,g){throw Math.floor(b)!==b?(Ge(b,g),new we.ERR_OUT_OF_RANGE(g||"offset","an integer",b)):m<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${m}`,b)}const Ve=/[^+/0-9A-Za-z-_]/g;function ve(b){if(b=b.split("=")[0],b=b.trim().replace(Ve,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function je(b,m){m=m||1/0;let g;const T=b.length;let N=null;const M=[];for(let H=0;H<T;++H){if(g=b.charCodeAt(H),g>55295&&g<57344){if(!N){if(g>56319){(m-=3)>-1&&M.push(239,191,189);continue}else if(H+1===T){(m-=3)>-1&&M.push(239,191,189);continue}N=g;continue}if(g<56320){(m-=3)>-1&&M.push(239,191,189),N=g;continue}g=(N-55296<<10|g-56320)+65536}else N&&(m-=3)>-1&&M.push(239,191,189);if(N=null,g<128){if((m-=1)<0)break;M.push(g)}else if(g<2048){if((m-=2)<0)break;M.push(g>>6|192,g&63|128)}else if(g<65536){if((m-=3)<0)break;M.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((m-=4)<0)break;M.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return M}function Xe(b){const m=[];for(let g=0;g<b.length;++g)m.push(b.charCodeAt(g)&255);return m}function rt(b,m){let g,T,N;const M=[];for(let H=0;H<b.length&&!((m-=2)<0);++H)g=b.charCodeAt(H),T=g>>8,N=g%256,M.push(N),M.push(T);return M}function Mt(b){return t.toByteArray(ve(b))}function vt(b,m,g,T){let N;for(N=0;N<T&&!(N+g>=m.length||N>=b.length);++N)m[N+g]=b[N];return N}function Me(b,m){return b instanceof m||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===m.name}function _t(b){return b!==b}const Dt=function(){const b="0123456789abcdef",m=new Array(256);for(let g=0;g<16;++g){const T=g*16;for(let N=0;N<16;++N)m[T+N]=b[g]+b[N]}return m}();function Ke(b){return typeof BigInt>"u"?Ut:b}function Ut(){throw new Error("BigInt not supported")}}(Ao)),Ao}(function(e,t){(function(n,r){e.exports=r(by(),Ly(),Uy(),Du(),Vy,lv(),pv())})(ce,function(n,r,s,o,l,i,u){return function(){var c={809:function(p){p.exports=n},30:function(p){p.exports=r},36:function(p){p.exports=s},300:function(p){p.exports=o},408:function(p){p.exports=u},25:function(p){p.exports=l},130:function(p){p.exports=i}},a={};function d(p){var h=a[p];if(h!==void 0)return h.exports;var y=a[p]={exports:{}};return c[p](y,y.exports,d),y.exports}d.n=function(p){var h=p&&p.__esModule?function(){return p.default}:function(){return p};return d.d(h,{a:h}),h},d.d=function(p,h){for(var y in h)d.o(h,y)&&!d.o(p,y)&&Object.defineProperty(p,y,{enumerable:!0,get:h[y]})},d.o=function(p,h){return Object.prototype.hasOwnProperty.call(p,h)},d.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})};var f={};return function(){d.r(f),d.d(f,{assets:function(){return C},auth:function(){return G},buildAnswer:function(){return ap},buildCarouselCard:function(){return op},buildQuestion:function(){return Xd},carouselCards:function(){return Ma},contentInteraction:function(){return Ke},decodeBase64:function(){return cp},default:function(){return up},editorialPages:function(){return Vd},features:function(){return g},getEntries:function(){return p.getEntries},getEntry:function(){return p.getEntry},management:function(){return ir},payments:function(){return ei},people:function(){return Bt},peopleEngagement:function(){return Fa},qaQuestions:function(){return Ba},reportError:function(){return h.reportError},search:function(){return Bd}});var p=d(809),h=d(30),y=d(36),_={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:S,LOCALHOST:v,STAGING:w,STAGING_SPLITTER:x},ENVIRONMENTS:{PRODUCTION:O,LOCAL:F}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:D,EMAIL_IDS:R}}=_;let W={emailIds:{}};var V=d(300),L=d.n(V);const U=async P=>{try{const{message:k,response:I,request:B}=P;let X=k;return I?X+=` - The request was made and the server responded with ${JSON.stringify({status:I.status,data:I.data})}`:B&&(X+=" - The request was made but no response was received"),console.warn(X),await(0,h.reportError)(new Error(X)),X}catch(k){return console.warn(`Cannot handle error: ${k.message}`),k.message}},{APIS:{ASSETS_API:{BASE_URL:$,ENDPOINTS:{USERS:K,CERTIFICATES:Q}}}}=_;var C={certificates:{create:async(P,k)=>{let I=[];try{const{data:B}=await L().post(`${$}${K}/${P}${Q}`,k);B&&(I=B)}catch(B){await U(B)}return I}}};const{APIS:{AUTH_API:{BASE_URL:q,ENDPOINTS:{USER_PASSWORD:Y,USERS:oe}}},USERS:{MYSELF:ee}}=_;var G={userPassword:{update:async P=>{let k=null;try{k=await L().put(`${q}${oe}/${ee}${Y}`,P)}catch(I){k={message:(((I||{}).response||{}).data||{}).message},await U(I)}return k}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Z,ENDPOINTS:{ANSWERS:ae,QUESTIONS:Oe,LIKES:ie}}}}=_,re=`${Z}${Oe}`;var te={create:async({questionSlug:P},k)=>{try{await L().post(`${re}/${encodeURIComponent(P)}${ae}`,k)}catch(I){const B=await U(I);throw new Error(B)}},remove:async({questionSlug:P,answerSlug:k})=>{try{await L().delete(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}`)}catch(I){const B=await U(I);throw new Error(B)}},update:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().put(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}`,I)}catch(B){const X=await U(B);throw new Error(X)}},like:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().post(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}${ie}`,I)}catch(B){const X=await U(B);throw new Error(X)}},unlike:async({questionSlug:P,answerSlug:k})=>{try{return await L().delete(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}${ie}`)}catch(I){const B=await U(I);throw new Error(B)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:we,ENDPOINTS:{QUESTIONS:Ne}}}}=_,$e=`${we}${Ne}`;var Fe={create:async P=>{try{return await L().post($e,P)}catch(k){const I=await U(k);throw new Error(I)}},remove:async({questionSlug:P})=>{try{await L().delete(`${$e}/${encodeURIComponent(P)}`)}catch(k){const I=await U(k);throw new Error(I)}},update:async({questionSlug:P},k)=>{try{return await L().put(`${$e}/${encodeURIComponent(P)}`,k)}catch(I){const B=await U(I);throw new Error(B)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:tt,ENDPOINTS:{REPLIES:Ge,ANSWERS:qe,QUESTIONS:Ve,LIKES:ve}}}}=_,je=`${tt}${Ve}`,Xe=({questionSlug:P,answerSlug:k,replySlug:I},B=!1)=>{let X=`${je}/${encodeURIComponent(P)}${qe}/${encodeURIComponent(k)}${Ge}`;return I&&(X=`${X}/${encodeURIComponent(I)}`,B&&(X=`${X}${ve}`)),X};var rt={create:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().post(Xe({questionSlug:P,answerSlug:k}),I)}catch(B){const X=await U(B);throw new Error(X)}},update:async({questionSlug:P,answerSlug:k,replySlug:I},B)=>{try{return await L().put(Xe({questionSlug:P,answerSlug:k,replySlug:I}),B)}catch(X){const ge=await U(X);throw new Error(ge)}},remove:async({questionSlug:P,answerSlug:k,replySlug:I})=>{try{await L().delete(Xe({questionSlug:P,answerSlug:k,replySlug:I}))}catch(B){const X=await U(B);throw new Error(X)}},like:async({questionSlug:P,answerSlug:k,replySlug:I},B)=>{try{await L().post(Xe({questionSlug:P,answerSlug:k,replySlug:I},!0),B)}catch(X){const ge=await U(X);throw new Error(ge)}},unlike:async({questionSlug:P,answerSlug:k,replySlug:I})=>{try{await L().delete(Xe({questionSlug:P,answerSlug:k,replySlug:I},!0))}catch(B){const X=await U(B);throw new Error(X)}},getReplyUrl:Xe};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Mt,ENDPOINTS:{QUESTIONS:vt,ANSWERS:Me,LIKES:_t}}}}=_,Dt=`${Mt}${vt}`;var Ke={answers:te,questions:Fe,replies:rt,likes:{create:async(P,k)=>{try{return await L().post(`${Dt}/${encodeURIComponent(P)}${Me}/${encodeURIComponent(k)}${_t}`)}catch(I){const B=await U(I);throw new Error(B)}},remove:async(P,k)=>{try{return await L().delete(`${Dt}/${encodeURIComponent(P)}${Me}/${encodeURIComponent(k)}${_t}`)}catch(I){const B=await U(I);throw new Error(B)}}}};const{APIS:{FEATURES_API:{BASE_URL:Ut,ENDPOINTS:{FLAGS:b}}}}=_,m=`${Ut}${b}`;var g={flags:{read:async P=>{let k=null;try{const{data:I}=await L().get(`${m}/${encodeURIComponent(P)}`);I!=null&&I.name&&(I!=null&&I.featureState)&&(k=I)}catch(I){await U(I)}return k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:T,ENDPOINTS:{ACCOUNTS:N}}}}=_;var M={create:async P=>{try{await L().post(`${T}${N}`,P)}catch(k){throw await U(k),k}},read:async P=>{let k=null;try{({data:k}=await L().get(`${T}${N}/${encodeURIComponent(P)}`))}catch(I){await U(I)}return k},update:async(P,k)=>{try{await L().put(`${T}${N}/${encodeURIComponent(P)}`,k)}catch(I){throw await U(I),I}}};const{APIS:{MANAGEMENT_API:{BASE_URL:H,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=_;var be={create:async P=>{try{await L().post(`${H}${le}`,P)}catch(k){throw await U(k),k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:_e,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=_;var me={create:async P=>{try{await L().post(`${_e}${Se}`,P)}catch(k){const I=await U(k);throw new Error(I)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:rr,ENDPOINTS:{LOGINS:Jr,LOGIN_PASSWORDLESS:Et}}}}=_,nr=`${rr}${Jr}`;var ir={accounts:M,bulkEnrolments:be,eventRegistrations:me,passwordless:{update:async P=>{try{await L().put(`${nr}/${encodeURIComponent(P)}${Et}`)}catch(k){throw await U(k),k}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Xr,ENDPOINTS:{PRODUCTS:Zn}}}}=_,Zr=`${Xr}${Zn}`;var ei={products:{list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(Zr,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:en,ENDPOINTS:{BULK_ENROLMENTS:tn}}}}=_;var ti={list:async P=>{let k=[];try{const{data:I}=await L().get(`${en}${tn}`,{params:P});I&&I.length&&(k=I)}catch(I){await U(I)}return k}},ri=d(25);const{OK:rn,MULTIPLE_CHOICES:ni,NOT_FOUND:ii,FORBIDDEN:oi}=ri.StatusCodes,nn=P=>P>=rn&&P<ni||P===oi||P===ii,{APIS:{PEOPLE_API:{BASE_URL_V2:A,ENDPOINTS:{USERS:z}}}}=_,J=async P=>{let k=null;try{const{data:I}=await L().get(`${A}${z}/${encodeURIComponent(P)}`,{validateStatus:nn});I&&I.id&&(k=I)}catch(I){await U(I)}return k},se=async P=>{let k=[];try{if(P&&P.length<2)throw new Error("users list method requires at least two ids");const I=P.map(X=>`ids=${encodeURIComponent(X)}`).join("&"),B=await L().get(`${A}${z}?${I}`,{validateStatus:nn});B&&B.length&&(k=B)}catch(I){await U(I)}return k};var he={read:J,update:async(P,k)=>{let I=!1;try{const{data:B}=await L().put(`${A}${z}/${encodeURIComponent(P)}`,k);I=!(!B||!B.id)}catch(B){await U(B)}return I},list:se};const{APIS:{PEOPLE_API:{BASE_URL_V2:ye,ENDPOINTS:{USERS:de,USER_LIKES:fe}}},USERS:{MYSELF:De}}=_,Re=`${ye}${de}/${De}${fe}`,Ae=async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(Re,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k};var ze={list:Ae},wt={authors:{readQuestionAuthors:async(P,k,I)=>{try{if(P.author=await J(P.authorId),P.answers&&P.answers.length&&!I.ignoreAnswersAuthors){P.answers.sort((X,ge)=>new Date(ge.updatedAt)-new Date(X.updatedAt)),P.totalAnswers=P.answers.length;let B=P.answers;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);B=P.answers.slice(X,X+I.limit)}for(let X of B){X.author=X.authorId&&await J(X.authorId)||{};const[ge]=k?await Ae({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!ge}P.answers=B}else P.answers||(P.answers=[]);return P}catch(B){throw await U(B),new Error(`Cannot read authors for question: ${B.message}`)}},readAuthors:async(P=[])=>{let k=[];try{if(Array.isArray(P)===!1)throw new Error("authorIds is not an array!");if(P&&P.length===1){const I=await J(P[0]);I&&k.push(I)}else if(P&&P.length>1){const I=await se(P);I&&I.length>0&&(k=I)}}catch(I){throw await U(I),new Error(`Cannot read authors: ${I.message}`)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL:on,ENDPOINTS:{REGISTRATIONS:Ze}}}}=_;var rd={list:async P=>{let k=[];try{const{data:I}=await L().get(`${on}${Ze}`,{params:P});I&&I.length&&(k=I)}catch(I){await U(I)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:nd,ENDPOINTS:{USERS:id,USER_COURSES:od}}},USERS:{MYSELF:ad}}=_,ai=`${nd}${id}/${ad}${od}`;var sd={create:async P=>{try{await L().post(ai,P)}catch(k){await U(k)}},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(ai,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k},update:async(P,k)=>{try{await L().put(`${ai}/${P}`,k)}catch(I){await U(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:cd,ENDPOINTS:{USERS:ud,USER_EVENTS:ld}}},USERS:{MYSELF:fd}}=_,dd=`${cd}${ud}/${fd}${ld}`;var pd={list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(dd,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:hd,ENDPOINTS:{USERS:md,USER_LESSONS:gd}}},USERS:{MYSELF:yd}}=_,ka=`${hd}${md}/${yd}${gd}`;var vd={create:async P=>{let k=null;try{k=await L().post(ka,P)}catch(I){await U(I)}return k},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(ka,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:_d,ENDPOINTS:{USERS:Ed,USER_PRODUCTS:wd}}},USERS:{MYSELF:bd}}=_,si=`${_d}${Ed}/${bd}${wd}`;var Sd={create:async P=>{let k=null;try{k=await L().post(si,P)}catch(I){await U(I)}return k},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(si,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k},update:async(P,k)=>{try{await L().put(`${si}/${P}`,k)}catch(I){await U(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Od,ENDPOINTS:{USERS:Td,USER_RATINGS:xd}}},USERS:{MYSELF:Ad}}=_,La=`${Od}${Td}/${Ad}${xd}`;var Bt={bulkEnrolments:ti,handlers:wt,registrations:rd,users:he,userCourses:sd,userEvents:pd,userLessons:vd,userLikes:ze,userProducts:Sd,userRatings:{create:async P=>{let k=null;try{const{data:I}=await L().post(La,P);I!=null&&I.id&&(k=I)}catch(I){await U(I)}return k},update:async(P,k)=>{try{await L().put(`${La}/${P}`,k)}catch(I){await U(I)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Rd,ENDPOINTS:{ENQUIRY_EMAILS:Cd}}}}=_;var Nd={create:async P=>{let k=null;try{const{data:I}=await L().post(`${Rd}${Cd}`,P);I&&(k=I)}catch(I){await U(I)}return k}},Pd={forms:{sendEnquiryEmails:async P=>{let k=null;try{const{emailIds:I}=W;k=await Fa.emails.create({...I,...P})}catch(I){await U(I)}return k}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Id,ENDPOINTS:{USERS:kd,USER_PROPERTIES:Ld}}},USERS:{MYSELF:Fd}}=_;var Fa={emails:Nd,handlers:Pd,userProperties:{update:async(P,k)=>{try{await L().put(`${Id}${kd}/${Fd}${Ld}/${P}`,k)}catch(I){await U(I)}}}},jd=d(130);const{APIS:{SEARCH_API:{BASE_URL:Md,ENDPOINTS:{SEARCH:Dd}}}}=_,Ud=`${Md}${Dd}`;var Bd={ask:async P=>{try{let k=null;const{data:I}=await L().get(Ud,{params:{question:P}});return I!=null&&I.answer&&(I!=null&&I.references)&&(I!=null&&I.version)&&(k=I),k}catch(k){const I=await U(k);throw new Error(I)}},stream:(P,k,I)=>{const B=(0,jd.io)(void 0,{path:"/api/search-api/web-sockets"});function X(){B.emit("search",{question:P})}function ge(Ce){I(Ce),Te(),B.disconnect()}function Te(){B.off("connect",X),B.off("update",k),B.off("result",ge)}return B.on("connect",X),B.on("update",k),B.on("result",ge),Te}};const{CONTENTFUL:$d}=_,{CARD_TYPES:ja}=$d.CAROUSELS;var Ma={read:async(P,k)=>{try{if(!k||!k.sys||!k.sys.id)throw new Error("Invalid link to card");if(!P||!ja[P])throw new Error("Unsupported card content type");const{INCLUDE:I,SELECT:B}=ja[P];return await(0,p.getEntry)({content_type:P,"sys.id":k.sys.id,include:I,select:B},{assetDetails:!0})}catch(I){throw await U(I),new Error(`Cannot read carousel card: ${I.message}`)}}};const{CONTENTFUL:qd}=_,{INCLUDE:Hd,SELECT:Wd,TYPE:Gd}=qd.EDITORIAL_PAGES;var Vd={read:async P=>{try{return await(0,p.getEntry)({content_type:Gd,"fields.slug":P,include:Hd,select:Wd})}catch(k){throw await U(k),new Error(`Cannot read editorial page: ${k.message}`)}}};const{CONTENTFUL:Qd}=_,{TYPE:Da,ORDER:zd,SELECT:Ua,SKIP:Yd,LIMIT:Kd,INCLUDE:Jd}=Qd.QUESTIONS;var Ba={read:async P=>{try{return await(0,p.getEntry)({content_type:Da,"fields.slug":P,include:2,select:Ua})}catch(k){throw await U(k),new Error(`Cannot read question: ${k.message}`)}},list:async(P={})=>{try{return await(0,p.getEntries)({content_type:Da,include:Jd,limit:Kd,order:zd,select:Ua,skip:Yd,...P})}catch(k){throw await U(k),new Error(`Cannot list questions: ${k.message}`)}}},Xd=async(P,k,I={ignoreAnswersAuthors:!1})=>{try{let B={};return B=await Ba.read(P),B=await Bt.handlers.authors.readQuestionAuthors(B,k,I),B}catch(B){throw await U(B),new Error(`Cannot build question: ${B.message}`)}};const{ARTICLES:{TYPE:Zd},COURSES:{TYPE:ep},EVENTS:{TYPE:tp},LISTS:{TYPE:rp},QUESTIONS:{TYPE:np},LEARNING_HUB:{TYPE:ip}}=_.CONTENTFUL,or=P=>P&&P.url?(Object.assign(P,{aspect:"responsiveCard",query:"q=90&fit=fill"}),P):null,ci={[Zd]:async P=>{const{authorIds:k,authorTag:I,image:B,publishedDate:X,readingTime:ge,slug:Te,title:Ce}=P,Je=await Bt.handlers.authors.readAuthors(k),nt=Je&&Je.length?Je:I?[I]:null;return{banner:or(B),contributors:nt,publishedDate:X,readingTime:ge,slug:Te,title:Ce}},[ep]:async(P,k)=>{const{banner:I,freeCourse:B,partnershipDetails:X,slug:ge,title:Te,registered:Ce}=P,Je={banner:or(I),slug:ge,title:Te,pill:B?"free":"premium",registered:!!Ce};if(X){const{partners:nt}=X;Je.partner=nt&&nt.length&&X.partners[0]}if(Ce===void 0&&k){const[nt]=await Bt.userProducts.list({courseSlug:ge,isEnrolled:!0,scope:"active"});Je.registered=!!nt}return Je},[tp]:async(P,k)=>{const{bannerImage:I,defaultStartDate:B,isEventOngoing:X,slug:ge,speakers:Te,title:Ce,registered:Je}=P,nt=new Date(B),lp=!!nt&&nt<new Date;if(Te&&Te.length)for(const an of Te)an.image=(ui=an.image)&&ui.url?`${ui.url}?w=100&h=100&fit=thumb&f=center`:null;var ui;const $a={banner:or(I),dateHasPassed:lp,title:Ce,slug:ge,isOngoingEvent:X,contributors:Te,startDate:nt,registered:!!Je};if(Je===void 0&&k){const[an]=await Bt.userEvents.list({eventSlug:ge});$a.registered=!!an}return $a},[rp]:async P=>{const{hero:k,slug:I,title:B}=P;return{banner:or(k),slug:I,title:B}},[np]:async P=>{const{answers:k,authorId:I,createdAt:B,slug:X,title:ge}=P;let Te=null;if(I){const Ce=await Bt.users.read(I);Ce&&(Te=Ce)}return{answers:k&&k.length?k.length:0,contributors:Te?[Te]:[],createdAt:B,slug:X,title:ge}},[ip]:P=>{const{bannerSection:k,customLabel:I,slug:B,title:X}=P;return{banner:or(k.image),slug:B,title:X,customLabel:I}},people:P=>{const{id:k,name:I,jobTitle:B,location:X,image:ge}=P;return{profile:ge,slug:k,title:I,text:B,secondaryText:X}}};var op=async({contentType:P,...k}={},I)=>{try{if(!ci[P])throw new Error("Content type not supported");if(typeof ci[P]!="function")throw new Error("No builder function for content type");return P!=="people"&&k.sys&&k.sys.type&&k.sys.type==="Link"&&(k=await Ma.read(P,k)),{contentType:P,...await ci[P](k,I)}}catch(B){throw await U(B),new Error(`Cannot build carousel card: ${B.message}`)}},ap=async(P,k,I={})=>{try{if(!P.replies||P.replies.length===0)return P.replies=[],P;P.replies.sort((X,ge)=>new Date(X.createdAt)-new Date(ge.createdAt)),P.totalReplies=P.totalReplies||P.replies.length;let B=P.replies;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);B=P.replies.slice(X,X+I.limit)}for(const X of B){if(X.authorId===P.authorId){X.author=P.author,X.userLiked=!1;continue}X.author=X.authorId&&await J(X.authorId)||{};const[ge]=k?await Ae({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!ge}return P.replies=B,P}catch(B){throw await U(B),new Error(`Cannot build replies for answer: ${B.message}`)}},sp=d(408);const cp=P=>P&&sp.Buffer.from(P,"base64").toString("ascii");function up({contentContext:P=null,errorsContext:k=null,gtmContext:I=null,origin:B}){try{const X=(ge=>{let Te=null;ge?Te=ge:typeof window<"u"&&(Te=window.origin||window.location.origin),Te||new Error("Cannot select environment: Website not defined");let Ce=null;const Je=Te.match(w);return Je?Ce=Je[1].split(x)[0]:Te===S?Ce=O:Te.includes(v)&&(Ce=F),Ce||new Error(`Cannot select environment: No rule for website ${Te}`),Ce})(B);return P&&(0,p.setContext)(Object.assign({},P,{environment:X})),k&&(0,h.setContext)(Object.assign({},k,{environment:X})),I&&((0,y.setContext)(Object.assign({},I,{environment:X})),(0,y.setupGTM)()),(({environment:ge})=>{const Te=(Ce=>{if(!Ce)throw new Error("Cannot map environment: Environment not defined");if(!D[Ce])throw new Error(`Cannot map environment: No mapping found for environment ${Ce}`);return D[Ce]})(ge);W.emailIds=R[Te]})(Object.assign({},{environment:X})),X}catch(X){console.warn(`Cannot load SDK: ${X.message}`)}}}(),f}()})})(Cu);var hv=Cu.exports;const Ir={Off:"off",On:"on",Cookie:"cookie"},mv=e=>{const[t]=ia.useCookies(),[n,r]=j.useState(null),[s,o]=j.useState(!1),[l,i]=j.useState(Ir.Off);return j.useEffect(()=>{e&&hv.features.flags.read(e).then(u=>{i(u.featureState),r(null)}).catch(u=>{i(Ir.Off),r(u)})},[e]),j.useEffect(()=>{switch(l){case Ir.Off:o(!1);break;case Ir.On:o(!0);break;case Ir.Cookie:o(!!t[`feature-${e}`]);break;default:o(!1)}},[l,t]),{isFeatureActive:s,error:n}};function gv(e,t,n){var r=this,s=j.useRef(null),o=j.useRef(0),l=j.useRef(null),i=j.useRef([]),u=j.useRef(),c=j.useRef(),a=j.useRef(e),d=j.useRef(!0);j.useEffect(function(){a.current=e},[e]);var f=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,h=!("trailing"in n)||!!n.trailing,y="maxWait"in n,_=y?Math.max(+n.maxWait||0,t):null;j.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var S=j.useMemo(function(){var v=function(R){var W=i.current,V=u.current;return i.current=u.current=null,o.current=R,c.current=a.current.apply(V,W)},w=function(R,W){f&&cancelAnimationFrame(l.current),l.current=f?requestAnimationFrame(R):setTimeout(R,W)},x=function(R){if(!d.current)return!1;var W=R-s.current;return!s.current||W>=t||W<0||y&&R-o.current>=_},O=function(R){return l.current=null,h&&i.current?v(R):(i.current=u.current=null,c.current)},F=function R(){var W=Date.now();if(x(W))return O(W);if(d.current){var V=t-(W-s.current),L=y?Math.min(V,_-(W-o.current)):V;w(R,L)}},D=function(){var R=Date.now(),W=x(R);if(i.current=[].slice.call(arguments),u.current=r,s.current=R,W){if(!l.current&&d.current)return o.current=s.current,w(F,t),p?v(s.current):c.current;if(y)return w(F,t),v(s.current)}return l.current||w(F,t),c.current};return D.cancel=function(){l.current&&(f?cancelAnimationFrame(l.current):clearTimeout(l.current)),o.current=0,i.current=s.current=u.current=l.current=null},D.isPending=function(){return!!l.current},D.flush=function(){return l.current?O(Date.now()):c.current},D},[p,y,t,_,h,f]);return S}function Sf(e,t,n){var r=n===void 0?{}:n,s=r.leading,o=r.trailing;return gv(e,t,{maxWait:t,leading:s===void 0||s,trailing:o===void 0||o})}let Ro;const Vr=(e=!0,t=!1)=>{if(!e)return;const[n,r]=j.useState(0)||[!1,()=>{}];j.useEffect(()=>(o(),window.addEventListener("resize",l),()=>{clearTimeout(Ro),l.flush(),window.removeEventListener("resize",l)}),[]);const s=()=>window.innerWidth,o=()=>{r(s())},l=Sf(()=>{s()!==n&&(t&&(clearTimeout(Ro),document.body.classList.add("is-resizing"),Ro=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return n},Of=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[s,o]=j.useState({current:0,past:0})||[!1,()=>{}],[l,i]=j.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];j.useEffect(()=>(u(),window.addEventListener("scroll",c),()=>{c.flush(),window.removeEventListener("scroll",c)}),[]);const u=()=>{const a=window.scrollY,d=s.current,f=a-d,p=f>0?"down":"up";if(o({current:a,past:d}),p==="down"){a>=e+t.down&&!l.scrollDown&&(!l.scrollUp||f>t.up)&&(n(),i({scrollUp:!1,scrollDown:!0}));return}Math.abs(f)>=t.up&&!l.scrollUp&&(r(),i({scrollUp:!0,scrollDown:!1}))},c=Sf(()=>{u()},250);return s},yv=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=j.useRef(!1);jt(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},vv=(e,t)=>{Array.isArray(t)||(t=[t]);const n=fp(e);return t.forEach(({type:r,value:s})=>{dp(n,r,s)}),n},Tf=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},xf=(e,t,n)=>{let r=n.mobile;for(const s in t){const o=parseInt(String(t[s]));if(e>=o)r=n[o];else if(e<o)break}return r},_v=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Ev=e=>{let o;try{o=new Date().getTime()-new Date(e).getTime()}catch{return""}const l=o/36e5,i=Math.floor(o/864e5);if(i<1)return l<1?{path:"now"}:{path:"hours",number:Math.floor(l)};if(i<7)return{path:"days",number:i};const u=Math.floor(i/7);return u<=52?{path:"weeks",number:u}:{path:"years",number:Math.floor(i/365)}},wv=e=>new Promise(t=>setTimeout(t,e)),wa={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}.
69
69
 
70
70
  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.
71
71
 
72
- 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..."},$v={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>"},Bv={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>"},qv={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>"},Hv=Object.freeze(Object.defineProperty({__proto__:null,en:ba,es:$v,fr:Bv,pt:qv},Symbol.toStringTag,{value:"Module"})),Ke=(e,t,r,n,s={})=>{let o="";return`${t}_${r}`in ba?o=e({id:`${t}_${r}`},s):o=e({id:t},{[n]:r,...s}),o},Wv=(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 s=r.length-1;s>=0;s--){const o=Math.pow(10,(s+1)*3);if(o<=e){e=Math.round(e*t/o)/t,e===1e3&&s<r.length-1&&(e=1,s++),n=`${e}${r[s]}`;break}}return n},Lf=(e,t)=>F.Children.map(e,r=>F.cloneElement(r,{...t})),Gv=e=>e.replace(/\s+/g,"").length>0,Re=({variant:e="primary",size:t="medium",styling:r={muted:!1,fullWidth:!1},icon:n=!1,href:s=!1,element:o="button",onClick:l=!1,className:i="",disabled:c=!1,screenreaderText:u=!1,children:a=!1,...d})=>{const p=Vr(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const _=Object.assign({},t),S=If(Object.keys(_));t=kf(p,S,_)}const h=[];typeof t=="string"&&h.push(t),n&&(h.push("icon"),typeof n=="object"?(h.push(n.icon),n.position?h.push(n.position):h.push("left"),n.hover&&h.push(`hover_${n.hover}`),n.animate&&(h.push("animate"),typeof n.animate=="string"&&h.push(n.animate))):(h.push(n),!n.includes("right")&&!n.includes("left")&&h.push("left"))),r.muted&&h.push("muted"),r.fullWidth&&h.push("full-width");const y={...d,className:re(e,i,h,{"no-text":!a,disabled:c,button:s}),onClick:_=>{(!s||s[0]==="#")&&l&&(_.preventDefault(),_.stopPropagation()),l&&l(_)},disabled:typeof c=="object"&&"isClickable"in c?!c.isClickable:c};return s&&(o="a",y.href=s),F.createElement(o,y,a||(u?E.jsx(Le,{showOnFocus:!1,children:u}):null))},Qr=({buttons:e,className:t="",...r})=>{const n=e.length>1?"ul":"p",s=e.map((o,l)=>n==="p"?E.jsx(Re,{...o},l):E.jsx("li",{children:E.jsx(Re,{...o})},l));return F.createElement(n,{className:re("button-wrapper",t),...r,children:s})};const $n=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return E.jsx("hr",{className:re({"has-max-width":e}),style:t})},zr=({href:e,children:t,fallbackElement:r,className:n="",onClick:s,gtmContext:o,gtmType:l,...i})=>{if(e){const c={...i};return s&&(c.onClick=s),o&&(c["data-gtm-event-context"]=o),l&&(c["data-gtm-event-type"]=l),E.jsx("a",{href:e,className:re("gtm-trackable",n),...c,children:t})}return r?F.createElement(r,{children:t,className:n,...i}):t},Su={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},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"}},Vv=({aspect:e,range:t,sizes:r})=>{const{range:n,sizes:s}=e?Su[e]:Su.fallback;return{range:t&&t.length>0?t:n,sizes:r||s}},Qv=({format:e,height:t,query:r,width:n})=>{let s=`w=${n}&h=${t}`;return s=e?`${s}&fm=${e}`:s,s=r?`${s}&${r}`:s,s},Ro=({format:e,range:t,url:r,query:n})=>t.map(({height:s,width:o})=>`${r}?${Qv({format:e,height:s,query:n,width:o})} ${o}w`).join(", ");const Mf=({image:e,className:t,testId:r})=>{const{description:n,height:s,type:o,query:l,url:i,width:c,loading:u,decoding:a,fetchPriority:d}=e,{range:f,sizes:p}=Vv(e),h=Ro({format:"avif",query:l,range:f,url:i}),y=Ro({format:"webp",query:l,range:f,url:i}),_=Ro({format:"",query:l,range:f,url:i});return E.jsxs("picture",{className:t,children:[o!=="image/gif"&&E.jsx("source",{type:"image/avif",srcSet:h,sizes:p,"data-testid":"source"}),E.jsx("source",{type:"image/webp",srcSet:y,sizes:p,"data-testid":"source"}),E.jsx("img",{srcSet:_,sizes:p,src:i,alt:n,loading:u||"lazy",decoding:a||"async",fetchpriority:d||"auto",width:c,height:s,"data-testid":r||"image"})]})};let kr=!1;const jf=({isOpen:e=!1,isLoading:t=!1,children:r})=>{const n=se.useIntl(),s=F.useRef(null),[o,l]=F.useState("hidden");F.useEffect(()=>{const c=s.current;if(c)return c.addEventListener("transitionend",i),()=>{c.removeEventListener("transitionend",i)}},[]);const i=({propertyName:c})=>{c==="opacity"&&(kr!==!1&&clearTimeout(kr),l(u=>u==="opening"?"open":u==="closing"?"closed":u==="closed"?"hidden":u))};return Lt(()=>{kr!==!1&&clearTimeout(kr);let c="open";e?l("opening"):(l("closing"),c="hidden"),kr=setTimeout(()=>{l(c)},300)},[e]),E.jsx("aside",{ref:s,className:re("tooltip text-medium",o,{loading:t}),hidden:o==="hidden",children:t?E.jsx("p",{children:n.formatMessage({id:"tooltip_loading"})}):typeof r=="string"?E.jsx("p",{children:r}):r})};const Sa=({children:e,className:t="",...r})=>E.jsx("section",{className:re("full-width-section",t),...r,children:e});const zv=({text:e,buttons:t,className:r=""})=>{const n=[];return t.forEach(s=>{n.push({href:s.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":s.eventContext||"Download",target:"_blank",children:s.text})}),E.jsx(Sa,{className:re("download-section",r),children:E.jsxs(E.Fragment,{children:[F.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),E.jsx(Qr,{buttons:n})]})})};const Yv=({title:e=!1,logos:t=[],className:r=""})=>{const n=t.length;if(n===0)return null;const s={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return E.jsxs("div",{className:re("logos",r),children:[e&&F.createElement(s.element,{className:"title"},s.text),E.jsx("ul",{className:re({"two-col":n===2||n===4,"three-col":n===5||n<=10&&n%3===0}),children:t.map(({logo:o,nameOfBusiness:l,link:i=!1,description:c=!1},u)=>{if(!o||!o.url)return null;const a=E.jsx("img",{src:o.url,width:o.width||"auto",height:o.height||"auto",alt:l});return E.jsxs("li",{children:[E.jsx("p",{className:"img-wrapper",children:i?E.jsx("a",{href:i,target:"_blank",rel:"nofollow noreferrer noopener",children:a}):a}),c&&E.jsx("small",{children:c})]},window.btoa(`${o.url}_${u}`))})})]})};const Jv=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Kv=({content:e,image:t,variant:r="default",spacing:n="normal",cta:s,children:o})=>{const l=["eyebrow","title","text"],i={eyebrow:"small",title:"h1",text:"p"},c={};return l.forEach(u=>{if(!e[u]){c[u]=!1;return}if(typeof e[u]=="object"){c[u]=e[u];const{text:a,element:d}=e[u];if(d&&Jv.includes(d.toLowerCase()))return;c[u]={text:a,element:i[u]};return}c[u]={text:e[u],element:i[u]}}),s&&s.link&&s.link[0]==="#"&&(s.props||(s.props={}),s.props.onClick=u=>{u.preventDefault(),u.stopPropagation();const a=document.getElementById(s.link.substring(1));a&&a.scrollIntoView({behavior:"smooth"})}),E.jsx(Sa,{className:re("banner-section",r,n,{"has-image":t,"has-extra-spacing":n==="normal"&&c.eyebrow&&c.title}),children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"content-wrapper",children:[l.map(u=>{if(c[u]&&typeof c[u]=="object"){const{text:a,element:d=""}=c[u];return F.createElement(d.toLowerCase(),{key:u,className:u},a)}return null}),o,s&&s.text&&s.link&&E.jsx(Re,{variant:t||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:s.link,...s.props,children:s.text})]}),t&&E.jsx(Mf,{image:{...t,aspect:"banner"}})]})})},Xv=F.memo(Kv);const Zv=({variant:e="primary",button:t=null,title:r,text:n,gtmContext:s})=>!r&&!n?null:E.jsxs("aside",{className:re("marketing-block",e),children:[r&&E.jsx("p",{className:"title",children:r}),n&&E.jsx("p",{children:n}),t&&E.jsx(Re,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Bn="https://storage.googleapis.com/apolitical-assets/",Gt={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},e_="200,000+";const Ta=({label:e=!1,className:t="",children:r})=>{const n=se.useIntl();return E.jsxs("details",{className:re("collapsible-section",t),children:[E.jsx("summary",{children:e||n.formatMessage({id:"collapsibleSection_summary"})}),E.jsx("div",{className:"content",children:r})]})};const ut=({variant:e="primary",className:t="",children:r,...n})=>E.jsx("div",{className:re("highlighted-text-box",e,t),...n,children:r});const Yr=({variant:e="empty",text:t=!1,button:r=!1,className:n=""})=>{let s=r&&!!Object.keys(r).length;const o=typeof r=="object"&&"breakpoints"in r,l=Vr(o);if(o&&typeof r=="object"&&typeof l=="number"){const d=Object.assign({},r.breakpoints),f=If(Object.keys(d));s=kf(l,f,d)}const{breakpoints:i,text:c="",component:u,...a}=r;return E.jsx(ut,{variant:"subtle",className:re("empty-state-box",e,n),children:E.jsxs(E.Fragment,{children:[t&&E.jsx(Gn,{options:{forceBlock:!0},children:t}),s&&typeof r=="object"&&(u||E.jsx(Re,{...a,variant:r.variant?r.variant:"secondary",children:c}))]})})};const ra=({children:e,...t})=>E.jsx("p",{...t,children:e}),Ff={q:ra,blockquote:ra};for(let e=1;e<=6;e++)Ff[`h${e}`]={component:ra,props:{className:"title"}};const Df=({type:e="default",className:t="",heading:r=!1,children:n})=>E.jsxs("div",{className:re("helper-text-box text-small",e,t),children:[r&&E.jsx("p",{className:"title",children:r}),typeof n=="string"?E.jsx(Gn,{options:{wrapper:F.Fragment,forceBlock:!0,overrides:Ff},children:n}):E.jsx("p",{children:n})]});const t_=({className:e="",show:t=!1,hide:r=!1,text:n,children:s})=>{const o=se.useIntl(),l=F.useRef(null),[i,c]=F.useState(""),[u,a]=F.useState("closed");F.useEffect(()=>{const p=l.current;if(p)return p.addEventListener("transitionend",d),()=>{p.removeEventListener("transitionend",d)}},[]),F.useEffect(()=>{if(!n||typeof n!="string")return;const p=n.split(`
73
- `);c(p.length<3?`${n.substring(0,400)}...`:p.slice(0,3).join(`
74
- `))},[n]),F.useEffect(()=>{u==="ready-to-close"&&a("closing")},[u]);const d=({propertyName:p})=>{p==="max-height"&&a(h=>h==="opening"?"open":h==="closing"?"closed":h)};if(!n)return null;const f=["opening","open"].includes(u);return E.jsxs(ut,{variant:"subtle",className:re("hide-show-text-box",e),children:[E.jsxs("div",{ref:l,className:re("content",u),children:[E.jsx(Gn,{options:{forceBlock:!0},children:u==="closed"?i:n}),u!=="closed"&&s]}),E.jsx("p",{className:"cta",children:E.jsx(Re,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:re({"rotate-180":f}),onClick:()=>{a(f?"ready-to-close":"opening")},children:f?r||o.formatMessage({id:"hideShowTextBox_hide"}):t||o.formatMessage({id:"hideShowTextBox_show"})})})]})},r_=()=>F.Fragment,n_=({children:e})=>E.jsx(ut,{variant:"secondary",children:e}),i_=["span","strong","h1","h2","h3","h4","h5","h6","p"],o_=({children:e})=>{const t=se.useIntl();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const o of F.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number"))if(F.isValidElement(o)&&o.type==="summary"){if(o.props&&o.props.children){for(const l of F.Children.toArray(o.props.children))if(!(!l||typeof l=="string"||typeof l=="number")&&F.isValidElement(l)){const i=l.type;if(i_.includes(i)){for(r=l.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(o);const s=r?r.toString():"";return E.jsx(Ta,{label:s,className:["Sources","Resources"].includes(s)?"discrete-links":"",children:n.map(o=>o)})},a_=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return E.jsx(ut,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return E.jsx(ut,{variant:"primary",children:e});case"pink-textbox":return E.jsx(ut,{variant:"tertiary",children:e});default:return E.jsx("div",{...t,children:e})}return E.jsx("div",{...t,children:e})},s_=e=>{const t=se.useIntl(),r=Date.now().toString();let n="default";const s=e.src;return s.includes("youtube")||s.includes("vimeo")?n="video":s.includes("riddle")||s.includes("sli.do")?n="poll":s.includes("padlet")&&(n="padlet"),E.jsxs(E.Fragment,{children:[E.jsx(Le,{children:E.jsx("a",{href:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),E.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),E.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},Tu=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},c_=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,s=!1;for(const o of F.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&F.isValidElement(o)){const l=o.type;if(["button","center","span","strong"].includes(l)&&o.props&&o.props.children&&o.props.children[0])for((l==="button"||Tu(o.props.children[0])==="button")&&(s=!0),n=o.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!F.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&Tu(n)==="button"&&(s=!0);else break}return s?(r={...r,className:"button primary medium"},E.jsx("p",{className:"center",children:E.jsx(Re,{variant:"primary",size:"medium",...r,children:n})})):E.jsx("a",{...r,children:n})},Uf=({children:e})=>E.jsx("span",{children:e});const na=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:F.Fragment,forceBlock:!0,overrides:{a:c_,CollapsibleSection:Ta,TextBox:ut,CaseStudy:n_,style:r_,details:o_,div:a_,iframe:s_}};return E.jsx("div",{className:re("markdown-text",e),children:E.jsx(Gn,{options:{...n,...t},children:r})})};const $f=({size:e="medium",variant:t="default",className:r="",children:n})=>E.jsx("span",{className:re("pill",e,t,r),children:n});const qn=({element:e="p",children:t=null,className:r="",...n})=>F.createElement(e,{...n,className:re("status-banner text-small",r),"aria-live":"assertive"},t);const u_=({progress:e=0,text:t=!1,className:r=""})=>{const n=se.useIntl(),s=e>75?100:e>50?75:e>25?50:e>5?25:0,o={"--progress":`${e}%`};return E.jsx("span",{className:re(`progress-bar section-${s}`,r),style:o,children:E.jsx(Le,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},Bf=F.memo(u_);const Co="loadingBlock_",l_=({progress:e=0,steps:t=!1,className:r=""})=>{const n=se.useIntl();t||(t={0:{text:n.formatMessage({id:`${Co}loading`})},75:{text:n.formatMessage({id:`${Co}almostDone`})},100:{text:n.formatMessage({id:`${Co}complete`})}});let s=null;const o=Object.keys(t);for(let i=0;i<o.length&&!(e<parseInt(o[i]));i++)s=o[i];const l=s&&t[s].icon?{"--icon":`url(${Bn}icons/${t[s].icon}.svg)`}:{};return E.jsxs(ut,{className:re("loading-block",r,{"has-icon":s&&t[s].icon}),variant:"subtle",style:l,children:[s&&E.jsx("span",{className:"step",children:t[s].text}),E.jsx(Bf,{progress:e})]})},f_=F.memo(l_);const Ze=({element:e="div",className:t="",...r})=>E.jsx(sa,{element:e,className:re("loading-placeholder",t),...r});const ia={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"]},qf=(e,t)=>e in ia?E.jsx("div",{className:e,children:ia[e].map((r,n)=>qf(r,n))},t):E.jsx(Ze,{className:e},t),Hf=({layout:e="overview-page"})=>E.jsx("div",{className:re("loading-state",e),children:ia[e].map((t,r)=>qf(t,r))}),Wf=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):""},An=["#5AB6A3","#A2D7AF","#806056","#3962B3"],d_=e=>{const t=Math.ceil(26/An.length),r=Wf(e).toLowerCase();if(r==="")return An[0];const n=r.charCodeAt(0)-96;for(let s=0;s<An.length;s++)if(n<=t*(s+1))return An[s]};const Ou=256,Jn=({className:e="",src:t="",name:r,alt:n,width:s=Ou,height:o=Ou,...l})=>{const[i,c]=F.useState(!1),u=F.useRef(null);F.useEffect(()=>{const d=u.current;if(!d)return;const f=d.getContext("2d");if(!f)return;const p=s,h=o;typeof window<"u"&&window.devicePixelRatio&&(d.width=p*window.devicePixelRatio,d.height=h*window.devicePixelRatio,f.scale(window.devicePixelRatio,window.devicePixelRatio)),f.fillStyle=d_(r),f.fillRect(0,0,p,h),f.font=`${p/3}px Arial`,f.textAlign="center",f.fillStyle="white",f.fillText(Wf(r),p/2,h/1.6)},[r]);let a=!1;return t&&t!==""&&!i&&(t.includes("http")||t.includes("//"))&&(a=!0),E.jsx("figure",{className:re("profile-picture",e,{error:i}),...l,children:a?E.jsx("img",{src:t,alt:n||r,onError:()=>{c(!0)},width:s,height:o}):E.jsx("canvas",{ref:u})})},Oa=e=>e==="apolitical"?{image:`${Bn}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Bn}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},p_=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const s=e!=="",o=t!=="",l=r!=="";if(!s&&!o&&!l)return"";const i=`${e}${s&&o?` — ${t}`:t}`;let c=`${i}${(s||o)&&l?`, ${r}`:r}`;return c.length>n&&(c=i),c.length>n&&(c=aa(c,n)),c};const Kn=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:s="member-click",className:o=""})=>{const l=se.useIntl(),i=Oa(t);i.name||(i.name=l.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:c,url:u,image:a}=i,d=p_(i),f=r&&r.createdAt?Dv(r.createdAt):!1,p=r&&r.createdAt?Fv(r.createdAt):"";return F.createElement(e,{className:re("member text-medium",o),children:E.jsxs(zr,{href:u,gtmType:s,gtmContext:n,onClick:h=>{h==null||h.stopPropagation()},children:[E.jsx(Jn,{name:c,src:a}),E.jsxs("p",{className:"details",children:[E.jsx("strong",{children:c}),r&&E.jsxs("span",{className:"additional-content",children:[r.createdAt&&f&&E.jsx("span",{className:"date",title:p,"aria-label":p,children:l.formatMessage({id:`dates_${f.path}`},{number:f.number})}),r.didEdit&&E.jsx("em",{children:l.formatMessage({id:"discussion_edited"})})]}),d&&E.jsx("small",{children:d})]})]})})};const Au={small:24,medium:48},Gf=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:s,showGap:o,showPlaceholders:l}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:i=2,className:c=""})=>{const u=se.useIntl();return!r||r.length===0?null:F.createElement(e,{className:re("contributors",c,s,{"has-gap":o}),children:E.jsxs(E.Fragment,{children:[E.jsx("ul",{children:r.map((a,d)=>{let f,p="";if(d<i){const{name:h="",image:y=""}=Oa(a);if(l)return E.jsx(Ze,{element:"li",className:"contributor"},d);f=E.jsx(Jn,{name:h,src:y,width:Au[s||"medium"],height:Au[s||"medium"]})}else if(d===i){const h=(t||r.length)-i;f=E.jsxs("small",{className:re({"large-number":h>99}),children:["+",Wv(h,0)]}),p="number-left"}return f?E.jsx("li",{className:re("contributor",p),children:f},d):null})}),n&&E.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?u.formatMessage({id:`member_${r[0]}`}):aa(r[0].name||"",20):null})]})})},Vf=({showDevTools:e=!0,children:t})=>{const r=new Ne.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return E.jsxs(Ne.QueryClientProvider,{client:r,children:[t,e&&E.jsx(vp.ReactQueryDevtools,{initialIsOpen:!1})]})},Qf=({children:e,locale:t,messages:r})=>{const n=t||"en",s={...Hv[n],...r||{}};return E.jsx(se.IntlProvider,{locale:n,messages:s,children:e})},lt=F.createContext(null),zf=({children:e,user:t})=>E.jsx(lt.Provider,{value:t,children:e}),h_=({bootstrap:e,children:t,intl:r})=>{const[n,s]=F.useState({isLoading:!0});return F.useEffect(()=>{e().then(o=>s({...o,isLoading:!1})).catch(()=>s({isLoading:!1}))},[]),E.jsx(Qf,{locale:r==null?void 0:r.locale,messages:r==null?void 0:r.messages,children:E.jsx(zf,{user:n,children:E.jsx(Vf,{children:t})})})};const Po="joinCommunityButton",Aa=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const s=se.useIntl(),o=F.useContext(lt),l=o&&typeof o.id=="string",[i,c]=F.useState(e),[u,a]=F.useState(e?"joined":"notJoined");F.useEffect(()=>{u==="joining"?a("joined"):u==="leaving"&&a("notJoined")},[i]);const d={},f={};return i&&u!=="leaving"&&(d["data-hover-text"]=s.formatMessage({id:`${Po}_leave`}),d["aria-label"]=s.formatMessage({id:`${Po}_member_aria`}),f["aria-hidden"]="true"),E.jsx(Re,{variant:i?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:i&&u!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async p=>{l&&(p.currentTarget.blur(),i?(a("leaving"),typeof n=="function"&&await n()):(a("joining"),typeof r=="function"&&await r()),c(!i))},className:re("join-community-button",u,{active:u==="joining"}),disabled:!l,...d,children:E.jsx("span",{className:"text",...f,children:s.formatMessage({id:`${Po}${["joining","leaving"].includes(u)?`_${u}`:i?"_member":t?"_short":""}`})})})};const No="communityDetails_",m_=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:s="",...o})=>{const l=se.useIntl(),i=r||(n==null?void 0:n.length)||0;return E.jsxs("div",{className:re("community-details",s),children:[E.jsx($n,{}),E.jsxs("div",{className:"member-details",children:[E.jsxs("div",{className:"top",children:[E.jsxs("h3",{children:[l.formatMessage({id:`${No}members`}),E.jsx("span",{className:"count",children:i})]}),E.jsx("p",{className:"text-small",children:E.jsx("a",{href:`/communities/${t}/members`,children:l.formatMessage({id:`${No}viewAll`})})})]}),E.jsx(Gf,{contributors:{total:r,data:n!=null&&n.length?n:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:i===0},cutoff:5})]}),E.jsx(Aa,{isMember:e,...o}),e&&E.jsx(Re,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:l.formatMessage({id:`${No}invite`})})]})};const g_=({breadcrumbs:e,cutoff:t=20,className:r=""})=>{const n=se.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Le,{element:"p",children:n.formatMessage({id:"breadcrumbs_label"})}),E.jsx("ul",{className:re("breadcrumbs text-small",r),children:e.map(({text:s,href:o,current:l=!1},i)=>E.jsxs("li",{children:[l&&E.jsx(Le,{element:"span",children:n.formatMessage({id:"breadcrumbs_currentPage"})}),E.jsx(zr,{href:l?void 0:o,children:aa(s,t)})]},`${window.btoa(s)}_${i}`))})]})};const y_=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:s=""})=>{const o=se.useIntl(),l=t?[{id:"all",text:typeof t!="boolean"&&t.text||o.formatMessage({id:"filters_all"})},...e]:e,[i,c]=F.useState(t?["all"]:[]),u=(a,d)=>{let f=[];i.includes(a)?f=i.filter(p=>p!==a):a==="all"?f=["all"]:r?f=[...i.filter(p=>p!=="all"),a]:f=[a],c(p=>(n&&typeof n=="function"&&n({current:f,previous:p}),f)),d&&typeof d=="function"&&d()};return E.jsx("ul",{className:re("filters",s),children:l.map(({id:a,text:d,disabled:f=!1,callback:p=()=>{}})=>{let h={};return f&&(h={disabled:!0,"aria-label":o.formatMessage({id:"filters_disabled"},{name:d})}),E.jsx("li",{children:E.jsx("button",{className:re(a,{selected:i.includes(a)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),u(a,p)},...h,children:d})},a)})})},v_=(e,t)=>{const r=String(e);if(!t||!t.length)return`/${r}`;let n="";return t.forEach(({url:s,position:o})=>{o==="before-lang"?n+=`/${s}`:(n.includes(`/${r}/`)||(n+=`/${r}`),n+=`/${s}`)}),n.includes(`/${r}/`)||(n+=`/${r}`),n};const Io={en:"English",es:"Español",fr:"Français",pt:"Português"},xn="languageSwitcher_",__=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:r=!1,translations:n,onChange:s=()=>{},urlParts:o,variant:l="default",label:i,className:c=""})=>{const u=se.useIntl(),[a,d]=F.useState(e);if(F.useEffect(()=>{e!==a&&d(e)},[e]),!n||!Object.values(n).some(y=>y&&y.post_name))return null;const p=Object.keys(n),h=a!==e;return E.jsxs("div",{className:re("language-switcher text-small",l,c),children:[E.jsxs("nav",{children:[l!=="short"&&E.jsx("p",{children:i||u.formatMessage({id:`${xn}label`})}),E.jsx("ul",{children:p.map(y=>{if(!Io[y])return null;let _={className:y};return a===y?_["aria-label"]=u.formatMessage({id:`${xn}selected`},{language:Io[y]}):_={..._,href:v_(y,o),onClick:S=>{S.preventDefault(),S.stopPropagation(),d(y),s(y)}},E.jsx("li",{children:E.jsx(zr,{..._,fallbackElement:"span",children:Io[y]})},y)})}),l!=="short"&&!h&&E.jsx("p",{children:u.formatMessage({id:`${xn}translation_${t?"original":r?"human":"machine"}`})})]}),l!=="short"&&!h&&!t&&!r&&E.jsx("small",{children:u.formatMessage({id:`${xn}disclaimer`},{email:Gt.support,link:y=>{const _=`mailto:${y}`;return E.jsx("a",{href:_,children:y})}})})]})};const ko=se.createIntl({locale:"en",messages:ba}),Yf=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:s=!1,messages:o={button:ko.formatMessage({id:"loadMore_button"}),endOfFeed:ko.formatMessage({id:"loadMore_endOfFeed"}),error:ko.formatMessage({id:"loadMore_error"})},className:l="",gtmContext:i="LoadMore"})=>{const[c,u]=F.useState(!1),[a,d]=F.useState(!1);if(t<=0||t<r*e)return null;const f=async p=>{try{await n(p)}catch(h){h instanceof Error&&h.message&&h.message.includes("Cannot read items")?d(!0):u(!0)}};return E.jsxs("footer",{className:re("load-more",l),children:[c&&E.jsx("p",{className:"error",children:o.error}),a?E.jsx("p",{children:o.endOfFeed}):E.jsx(Re,{variant:"secondary",icon:s,onClick:f,"data-gtm-event-context":i,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:o.button})]})};let Rn=!1;const Jf=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const s=se.useIntl(),o=F.useRef(null),[l,i]=F.useState(!1),c=u=>{o.current&&u.target instanceof HTMLElement&&!o.current.contains(u.target)&&i(!1)};return F.useEffect(()=>(document.addEventListener("click",c,!0),()=>{document.removeEventListener("click",c,!0)})),F.createElement(e,{ref:o,className:re("more-menu text-medium",n),children:E.jsxs(E.Fragment,{children:[E.jsx(Re,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>i(!l),"aria-haspopup":"true","aria-expanded":l,"aria-controls":t,screenreaderText:s.formatMessage({id:"moreMenu"})}),E.jsx("ul",{id:t,hidden:!l,children:r.map(({href:u,onClick:a,text:d,icon:f,...p},h)=>{const y={...p,onClick:_=>{i(!1),typeof a=="function"&&a(_)},onFocus:()=>{Rn&&(clearTimeout(Rn),Rn=!1)},onBlur:()=>{Rn=setTimeout(()=>{i(!1)},100)}};return u&&(y.href=u),E.jsx("li",{children:E.jsx(Re,{variant:"tertiary",size:"medium",icon:f?{icon:f,position:"left"}:!1,...y,children:d})},`${window.btoa(d)}_${h}`)})})]})})};const xa=({variant:e="default",version:t="default",className:r="",...n})=>E.jsx("p",{className:"logo-wrapper",children:E.jsx("a",{href:"/home/",className:re("logo",e,t,r),...n,children:E.jsx(Le,{children:E.jsx(se.FormattedMessage,{id:"apolitical"})})})});const E_={"2-1":901},w_=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const s=Vr(!0);let o=n;return F.Children.count(n)===1&&(o=F.Children.toArray(n)[0],o.props&&(o=o.props.children)),E.jsx("section",{className:re("columns",`layout-${e}`,r),children:F.Children.map(o,(l,i)=>t!==!1&&i===t&&s&&s<E_[e]?null:l)})};const Lo="cookieBanner_",Mo=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],jo=new Date(Date.now()+12*30*24*60*60*1e3),Kf=()=>{const e=se.useIntl(),[t,r,n]=oa.useCookies(Mo),[s,o]=F.useState(!t["apol-cookie-banner"]),l=()=>{Mo.forEach(a=>{r(a,!0,{path:"/",expires:jo,domain:a==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),o(!1),window.location.reload()},i=()=>{r("apol-cookie-banner",!0,{path:"/",expires:jo}),Mo.forEach(a=>{if(a==="apol-cookie-banner"){r(a,!0,{path:"/",expires:jo});return}n(a)}),o(!1)};if(!s)return null;const c=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:i,gtmType:"reject-all"},{id:"accept",onClick:l,gtmType:"accepted-all"}],u=[];return c.forEach(a=>{u.push({variant:a.href?"tertiary":"primary",href:a.href,onClick:a.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${a.gtmType}-click`,children:e.formatMessage({id:`${Lo}buttons_${a.id}`})})}),E.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[E.jsx("h6",{children:e.formatMessage({id:`${Lo}title`})}),E.jsx("p",{children:e.formatMessage({id:`${Lo}text`})}),E.jsx(Qr,{buttons:u})]})},ct={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:Gt["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Gt["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:Gt.support,gtmType:"concierge-email-click"},business:{email:Gt.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 Vt="footer_",Hn="SiteFooter",xu=({group:e})=>{const t=ct[e].order||[];let r=!1;return"text"in ct[e]&&(r=ct[e].text),E.jsxs(F.Fragment,{children:[E.jsx("p",{className:"pre-title",children:E.jsx(se.FormattedMessage,{id:`${Vt}${e}`})}),Array.isArray(t)&&t.length>0&&E.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:s,gtmType:o}=ct[e][n],l={};return["legal"].includes(e)&&(l.target="_blank",l.rel="noopener"),E.jsx("li",{children:E.jsx("a",{href:s,className:"gtm-trackable","data-gtm-event-context":Hn,"data-gtm-event-type":o,...l,children:E.jsx(se.FormattedMessage,{id:`${Vt}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&E.jsx("dl",{className:"text-medium",children:r.order.map(n=>E.jsxs(F.Fragment,{children:[E.jsx("dt",{children:E.jsx(se.FormattedMessage,{id:`${Vt}${e}_${n}`})}),E.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&E.jsx("address",{children:E.jsx(se.FormattedMessage,{id:`${Vt}${e}_${n}_address`,values:{br:E.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&E.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":Hn,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},Ra=()=>E.jsx("div",{id:"footer",children:E.jsxs("div",{className:"wrapper",children:[E.jsx(sa,{element:"hr"}),E.jsx(xa,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Hn,"data-gtm-event-type":"logo-homepage-link"}),E.jsx("footer",{children:["platform","community","company","contact"].map(e=>E.jsxs("div",{className:"group",children:[E.jsx(xu,{group:e}),Object.keys(ct[e]).includes("child")&&E.jsx(xu,{group:ct[e].child})]},e))}),E.jsx("hr",{}),E.jsxs("div",{className:"sub-footer",children:[E.jsx("ul",{children:Array.isArray(ct.social.order)&&ct.social.order.map(e=>{const t=ct.social[e];return E.jsx("li",{className:e,children:E.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Hn,"data-gtm-event-type":"social-click",children:E.jsx("span",{className:"hidden",children:E.jsx(se.FormattedMessage,{id:`${Vt}social_${e}`})})})},e)})}),E.jsx("small",{children:E.jsx(se.FormattedMessage,{id:`${Vt}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Cn="emailHelperTextBox_",b_=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const s=se.useIntl(),[o,l]=F.useState({path:`${Cn}default`,type:"default",link:{},mail:{},error:""}),[i,c]=F.useState(!1),u=F.useCallback(p=>{p.preventDefault(),p.stopPropagation();const h=y=>{l({path:`${Cn}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>u(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:y})};if(typeof n!="function"){h(s.formatMessage({id:`${Cn}error_noFunction`}));return}c(!0),n(t).then(()=>{localStorage.setItem("email",t),window.location.href=r||"/signup/verify-email"}).catch(y=>{h(y.message)}).finally(()=>{c(!1)})},[t,r,n]);F.useEffect(()=>{let p=Cn,h="default",y={},_={};switch(e){case"gov":p+="autoApproved",h="success";break;case"nonGov":p+="unrecognisedEmail",h="error",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",h="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",h="error",y={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":p+="emailAlreadyExists",h="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}l({...o,path:p,type:h,link:y,mail:_})},[e]);const a={};return["link","mail"].forEach(p=>{a[p]=Object.keys(o[p]).length?h=>E.jsx("a",{...o[p],children:h}):h=>h}),E.jsx(Df,{type:o.type,heading:i?!1:s.formatMessage({id:`${o.path}_title`}),children:i?E.jsxs(E.Fragment,{children:[E.jsx(Ze,{element:"span"}),E.jsx(Ze,{element:"span"})]}):s.formatMessage({id:`${o.path}_text`},{...a,strong:p=>E.jsx("strong",{children:p}),em:p=>E.jsx("em",{children:p}),br:E.jsxs(E.Fragment,{children:[E.jsx("br",{}),E.jsx("br",{})]}),error:o.error})})};const Pn="passwordRules_",Xf="isMoreThanEightCharacters",Zf="includesNumberAndSymbol",ed="includesLowerAndUppercase",S_={[Xf]:"8Characters",[Zf]:"numberSymbol",[ed]:"lowercaseUppercase"},T_=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=se.useIntl();return E.jsxs("aside",{className:re("password-rules",t),children:[E.jsx("small",{children:r.formatMessage({id:`${Pn}intro`})}),E.jsx("ul",{children:[Xf,Zf,ed].map(n=>E.jsxs("li",{className:re({matches:e[n]}),children:[E.jsxs(Le,{children:[r.formatMessage({id:`${Pn}rule_label`})," "]}),E.jsx("span",{children:r.formatMessage({id:`${Pn}rule_${S_[n]}`})}),!e[n]&&E.jsxs(Le,{element:"strong",children:[" "," ",r.formatMessage({id:`${Pn}notMet`})]})]},`rule-${n}`))})]})},O_=F.memo(T_);const A_=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:s=()=>{}},className:o="",hasLoaded:l=!1})=>{const i=se.useIntl(),[c,u]=F.useState({setUp:!1,id:null,rating:null,disabled:!0}),a=async()=>{try{const S=await r();u(v=>({...v,setUp:!0,id:S&&S.id,disabled:!1}))}catch(S){u(v=>({...v,setUp:!0,disabled:!0})),s(S)}};if(F.useEffect(()=>{l&&!c.setUp&&a()},[l]),!l)return E.jsx(Ze,{className:"rating-placeholder"});const{id:d,rating:f,disabled:p}=c,h="ratings_",y={text:i.formatMessage({id:`${h}text`}),low:i.formatMessage({id:`${h}low`}),high:i.formatMessage({id:`${h}high`}),success:i.formatMessage({id:`${h}success`}),...e},_=async S=>{if(!(!d||p))try{u(v=>({...v,rating:S,disabled:!0})),await n({id:d,value:S})}catch(v){u(w=>({...w,rating:null})),s(v)}finally{u(v=>({...v,disabled:!1}))}};return E.jsxs("div",{className:re("rating",o),children:[E.jsx("span",{className:"label",children:y[f?"success":"text"]}),E.jsx("ol",{children:Array.from(new Array(t).keys()).map(S=>{const v=S+1;return E.jsx("li",{className:re({selected:f&&v<=f}),children:E.jsx(Re,{variant:"tertiary",size:"small",icon:{icon:`star${!f||v>f?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${i.formatMessage({id:`${h}stars`},{number:v,total:t})}${v===1||v===t?` - ${y[v===1?"low":"high"]}`:""}`,onClick:w=>{w.preventDefault(),w.stopPropagation(),_(v)},disabled:p})},`rating-${v}`)})})]})};const td=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:s="search-bar",gtmEvent:o="form-submission"})=>{const{searchIsOpen:l=!0,isDesktopVersion:i=!1}=r||{},c=se.useIntl(),u=F.useRef(null);Lt(()=>{!r||i||!l||u.current&&u.current.focus()},[l]);const a=d=>{d.preventDefault(),d.stopPropagation(),!(!u.current||!u.current.value||u.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(u.current.value)}`)};return E.jsx("form",{onSubmit:a,className:re("search-form gtm-trackable",t),"data-gtm-event-context":s,"data-gtm-event-type":o,children:E.jsx("fieldset",{id:`${e}-form`,hidden:r?!l:!1,role:"search",children:E.jsxs("p",{children:[E.jsx(Le,{element:"label",htmlFor:e,children:c.formatMessage({id:"search_label"})}),E.jsx("input",{ref:u,type:"search",id:e,name:e,defaultValue:n,placeholder:c.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&a(d)}}),E.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),u.current&&u.current.value&&(u.current.value="")},children:E.jsx(Le,{children:c.formatMessage({id:"search_clear"})})}),E.jsx("button",{className:"search",onClick:a,children:E.jsx(Le,{children:c.formatMessage({id:"search_cta"})})})]})})})},ve={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=o=>{const l=`logged${e?"In":"Out"}`;return t>=r[o][l]};let s={};return["navigation","search"].forEach(o=>{s[o]=n(o)}),s},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(s=>s===!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 s=Date.now();if(!t&&ve.handlerCalled[e]&&s-ve.handlerCalled[e]<500)return;ve.handlerCalled[e]=s;let o=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(l=>{l===e||r[l]===!1||o.push({type:`menus.${l}`,value:!1})}),n(o)},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 s=Pu(e[n],t);if(!(typeof s>"u")&&(!r||s[t]&&s[t].includes(r)||s.value&&s.value.includes(r)||s.toString().includes(r)))return e[n]}return e[0].children?ve.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:s})=>{if(!t.current||!t.current.children)return;const o=r?"desktop":"default";if(n[e][o]){n[e][o].focus();return}let l,i;switch(e){case"navigation":if(r){const c=ve.findFirstChild(t.current.children,"attributes.aria-controls","navigation");l=ve.findFirstChild(c.children,"href")}else l=ve.findFirstChild(t.current.children,"href");l||(l=t.current);break;case"account":if(i=ve.findFirstChild(t.current.children,"className","account"),!i||!i.children)return;l=ve.findFirstChild(i.children,"href");break;default:return}l&&(s([{type:`focusElements.${e}.${o}`,value:l}]),l.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(ve.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(ve.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(ve.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{ve.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},$r={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"}}}},Wn=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:s=()=>{},doTrack:o=null})=>{const l=se.useIntl(),i=Pu($r,e);if(!i||i.onlyShow&&(i.onlyShow==="logged-in"&&!t||i.onlyShow==="logged-out"&&t))return null;const c="doTrack"in i,u=o===null?c?i.doTrack:!0:o,a=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;i.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let f=!1;if(i.href){let v=i.gtmType||`${e}-click`;if(v.includes(".")){const w=v.split("."),A=w[w.length-2];v=`${A==="topics"?`${A}-`:""}${w[w.length-1]}`}f={href:i.href,role:"menuitem"},u&&(f={...f,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),a&&(f={...f,variant:"secondary",size:{mobile:"small",881:"large"},...i.props||{}})}const p=i.order&&i.order[0]&&i[i.order[0]],h=p&&i[i.order[0]].order,y=f&&window.location.pathname===i.href;let _={},S={};if(p){const v=i.menuId||e,w={onClick:A=>ve.events.onClick(A,{id:v,callback:s,isOpen:n[v]}),onFocus:()=>ve.events.onFocus({id:v}),onBlur:()=>ve.events.onBlur({id:v,callback:s}),onMouseLeave:()=>ve.events.onBlur({id:v,callback:s}),onMouseEnter:()=>ve.events.onMouseEnter({id:v,callback:s})};r&&(h&&(_={...w,onKeyPress:A=>{A.key==="Enter"&&ve.events.onClick(A,{id:v,callback:s,isOpen:n[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[v],"aria-controls":v}),S={hidden:v in n?!n[v]:!0}),h||(S={...S,...w})}return E.jsxs("li",{className:re({[i.className]:i.className,"has-submenu":p,parent:h,active:y}),role:"none",..._,children:[f?F.createElement(a?Re:"a",f,l.formatMessage({id:d})):l.formatMessage({id:d}),i.order&&E.jsx("ul",{...S,children:i.order.map(v=>{if(!i[v])return null;const w={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:s,doTrack:c?u:null};return i[v].order?E.jsxs("li",{className:re({[i[v].className]:i[v].className}),children:[l.formatMessage({id:`${d}_${v}`}),E.jsx("ul",{children:i[v].order.map(A=>E.jsx(Wn,{id:`${e}.${v}.${A}`,...w},A))})]},v):E.jsx(Wn,{id:`${e}.${v}`,...w},v)})})]},e)};const x_={height:67,height_desktop:83},Ca=()=>{const e=se.useIntl(),t=F.useContext(lt),r=Vr(!0,!0),n=t&&typeof t.id=="string",s=F.useMemo(()=>ve.getIsDesktopVersion(n,r),[n,r]),[o,l]=F.useReducer(jv,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:i,menus:c,focusElements:u}=o;Nf({scrollPosition:x_[`height${s.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!s&&c.navigation||ve.shouldChangeHeaderIsVisible(!0,c,l)},scrollDown:()=>{!s&&c.navigation||ve.shouldChangeHeaderIsVisible(!1,c,l)}}});const a=(f,p)=>{ve.handleMenus({id:f,value:p,menus:c,dispatch:l})},d=F.useRef(null);return Lt(()=>{c.navigation&&ve.autoFocus({menu:"navigation",navigationRef:d,isDesktopVersion:s.navigation,focusElements:u,dispatch:l})},[c.navigation]),Lt(()=>{c.account&&ve.autoFocus({menu:"account",navigationRef:d,isDesktopVersion:s.navigation,focusElements:u,dispatch:l})},[c.account]),t&&t.isLoading?null:E.jsxs(E.Fragment,{children:[E.jsxs("nav",{id:"header",className:re({"logged-in":n,"logged-out":!n,visible:i}),children:[E.jsx(Le,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),E.jsx(xa,{}),!s.navigation&&E.jsx("button",{className:"menu-button gtm-trackable",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("navigation",!c.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":c.navigation,"aria-controls":"navigation",children:E.jsx(Le,{children:e.formatMessage({id:`header_menu_${c.navigation?"hide":"show"}`})})}),E.jsx("ul",{ref:d,id:"navigation",hidden:s.navigation||c.account?!1:!c.navigation,role:"menu","data-showing":!s.navigation&&c.account?"account":"default",children:$r.order.map(f=>E.jsx(Wn,{id:f,isLoggedIn:n,isDesktopVersion:s.navigation,menus:{navigation:c.navigation,account:c.account},callback:a},f))}),!s.search&&E.jsx("button",{className:"search toggle-search-button",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("search",!c.search)},"aria-haspopup":"true","aria-expanded":c.search,"aria-controls":"search-form",children:E.jsx(Le,{children:e.formatMessage({id:`header_search_${c.search?"hide":"show"}`})})}),E.jsx(td,{id:"global-search",handleToggle:{searchIsOpen:c.search,isDesktopVersion:s.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?E.jsxs("button",{className:"account-button",onClick:f=>ve.events.onClick(f,{id:"account",callback:a,isOpen:c.account}),onMouseEnter:()=>ve.events.onMouseEnter({id:"account",callback:a}),onMouseLeave:()=>ve.events.onBlur({id:"account",callback:a}),"aria-haspopup":"true","aria-expanded":c.account,"aria-controls":"navigation",children:[E.jsx(Le,{children:e.formatMessage({id:`header_account_${c.account?"hide":"show"}`})}),E.jsx(Jn,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):E.jsx("ul",{className:"sign-in-buttons",children:$r.buttons.order.map(f=>E.jsx(Wn,{id:`buttons.${f}`},f))})]}),E.jsx("hr",{id:"content-of-page"}),E.jsx("div",{className:re("overlay",{open:c.navigation||c.account||!s.search&&c.search})})]})};const R_=()=>{const e=se.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Ca,{}),E.jsx("div",{className:"content",children:E.jsx(Yr,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),E.jsx(Ra,{})]})},C_=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:s="",locale:o="en"})=>{const l=Iu();F.useEffect(()=>{window.scrollTo(0,0)},[l]);const i=Lf(e,{locale:o});return E.jsx(_p.ErrorBoundary,{onError:t,fallback:E.jsx(R_,{}),children:E.jsx(F.Suspense,{fallback:E.jsx(Hf,{layout:"overview-page"}),children:E.jsx("div",{id:"wrapper",className:re(s,{[n]:n!=="default"}),children:E.jsxs(oa.CookiesProvider,{children:[E.jsx(Ca,{}),E.jsx("div",{className:"content",children:i}),r&&E.jsx(Ra,{}),E.jsx(Kf,{})]})})})})},Ru={default:"tags_",headerTopics:"header_topics_topics_"},Fo={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"},P_={getTagDetails:e=>{if(e.includes("topic_")){if(e=Fo.topic[e.replace("topic_","")],e){const t=$r.topics.topics[e].href;return t?{id:e,href:t,text:`${Ru.headerTopics}${e}`}:null}return null}return Fo[e]?(e=Fo[e],{id:e,text:`${Ru.default}${e}`}):null}};const N_=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:s="",gtmType:o="tag-click",gtmContext:l="tags"})=>{const i=se.useIntl();if(!e||e.length<1)return null;const c=[];return e.forEach(u=>{if(!u)return;const a=P_.getTagDetails(u);a&&c.push(a)}),c.length<1?null:E.jsx("ul",{className:re("tags text-small",t,s,{"one-line":r}),children:c.map(u=>{const a=i.formatMessage({id:u.text});return E.jsx("li",{children:u.href&&n?E.jsx("a",{href:u.href,className:"gtm-trackable","data-gtm-event-type":o,"data-gtm-event-context":l,children:a}):a},u.id)})})};const I_=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:s="member-click",className:o=""})=>{const l=se.useIntl();return t.length===0?null:(e||(e=t.length),E.jsxs("div",{className:re("members-list",o),children:[E.jsxs("h1",{children:[l.formatMessage({id:"membersList"}),E.jsx("span",{className:"count",children:e})]}),E.jsx("ul",{children:t.map((i,c)=>E.jsxs("li",{children:[E.jsx(Kn,{member:i,gtmContext:n,gtmType:s}),i.isAdmin&&E.jsx($f,{children:l.formatMessage({id:"membersList_admin"})})]},c))}),r&&E.jsx(Yf,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))};let Nn=null;const $e="discussion_form_",Pa=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:r={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:n,maxLength:s=5e4,minRows:o=4,forceShow:l={cancel:!1,error:!1},functions:i={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:c="DiscussionForm"})=>{var W,G;const u=se.useIntl(),a=F.useContext(lt),[d,f]=F.useState(r.isEditing&&r.isEditing.text||""),[p,h]=F.useState(l.error||!1),[y,_]=F.useState(!1),S=F.useRef(null);if(n||(n=S),r.isLoading)return E.jsx(Ze,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const v=L=>{const $=L.target.value;f($);let H;!a||!a.id?H=Ke(u.formatMessage,`${$e}error_loggedOut`,e.type,"action"):t?$.length>=s&&(H=`${$e}error_tooLong`):H=Ke(u.formatMessage,`${$e}error_noPermission`,e.type,"action"),H?h(H):p&&h(!1)};let w=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const L=e.type==="response"?((W=e.slugs)==null?void 0:W.question)||"":((G=e.slugs)==null?void 0:G.answer)||"";L&&(w=`${w}-${L.slice(-15)}`)}const A=async L=>{var H;if(L.preventDefault(),L.stopPropagation(),!a||!a.id||!t||M)return;Nn&&clearTimeout(Nn),_("submitting");const $=window.location.pathname;try{let K;switch(e.type){case"post":K=await i.create({content:d});break;case"question":K=await i.create({title:d,authorId:a&&a.id,...(H=i.props)==null?void 0:H.create});break;case"response":K=await i.create({question:e.slugs.question},{body:d,authorId:a&&a.id,contentPath:$});break;case"reply":K=await i.create({question:e.slugs.question,answer:e.slugs.answer},{body:d,authorId:a&&a.id,contentPath:$});break;default:break}await Uv(1e3),i.callback&&await i.callback(K),Nn=setTimeout(()=>{f(""),_("submitted"),T()},500)}catch(K){const V=K;let P=`${$e}error`;V.message.includes("entry already exists")&&(P=Ke(u.formatMessage,`${$e}error_alreadyExists`,e.type,"action")),V.message.includes("429")?P=Ke(u.formatMessage,`${$e}error_tooMany`,e.type,"action"):V.message.includes("400")&&(P=`${$e}error`),h(P),T()}},T=()=>{Nn=setTimeout(()=>{h(!1),_(!1)},5e3)},M=!d||!Gv(d),D=y==="submitting",R=[];return(r.isEditing&&!D||l.cancel)&&R.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:i.handleCancel,className:"gtm-trackable","data-gtm-event-context":c,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!l.cancel&&(!a||!a.id||!d),children:u.formatMessage({id:`${$e}cancel`})}),R.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:L=>{if(r.isEditing){_("submitting"),i.handleSaveEdit&&i.handleSaveEdit(S.current&&"value"in S.current?S.current.value:"");return}A(L)},className:"gtm-trackable","data-gtm-event-context":c,"data-gtm-event-type":`${r.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!a||!a.id||!t||M||D||r.isEditing&&d===r.isEditing.text,children:u.formatMessage({id:`${$e}${D?r.isEditing?"saving":"posting":r.isEditing?"save":"post"}`})}),E.jsxs("form",{id:w,className:re("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)&&E.jsx("h2",{children:Ke(u.formatMessage,`${$e}title`,e.type,"action")}),E.jsx(Kn,{member:a||"community",gtmContext:c,gtmType:"profile-click"}),E.jsx(Le,{element:"label",showOnFocus:!1,htmlFor:`${w}-input`,children:Ke(u.formatMessage,`${$e}label`,e.type,"action")}),E.jsx(Ep,{ref:n,id:`${w}-input`,name:e.type,placeholder:Ke(u.formatMessage,`${$e}placeholder`,e.type,"action"),onChange:v,value:d,maxLength:s,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:o,autoFocus:!!r.isEditing}),E.jsx("small",{children:Ke(u.formatMessage,`${$e}explainer`,e.type,"action",{a:L=>E.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":c,"data-gtm-event-type":"community-guidelines-link",children:L})})}),E.jsx(Qr,{buttons:R}),y==="submitted"&&E.jsx(qn,{className:"success","data-testid":"success",children:Ke(u.formatMessage,`${$e}success`,e.type,"action")}),p&&E.jsx(qn,{id:"error-message",className:"error","data-testid":"error",children:l.error?l.error:typeof p=="string"?p.includes(" ")?p:u.formatMessage({id:p},{action:u.formatMessage({id:`discussion_action_${e.type}`}),maxLength:s}):p})]})},Na=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:r,required:n,join:s,leave:o,notMemberStateText:l}})=>n&&!r?E.jsx(Yr,{text:l,button:{component:E.jsx(Aa,{functions:{join:s,leave:o}})}}):E.jsx(Pa,{content:{type:e,slugs:{}},functions:{create:t}}),k_={showThread:!1,showForm:!1},Ia=F.createContext(k_),L_=({children:e})=>{const[t,r]=F.useState({showThread:!1,showForm:!1});return E.jsx(Ia.Provider,{value:{...t,updateConversation:r},children:e})},M_=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),j_=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Dr=!1;const Do=()=>{Dr!==!1&&(clearTimeout(Dr),Dr=!1)},Uo=10,rd=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:s=!1,content:o={type:"reply",slugs:{}},canLike:l=!0,functions:{createLike:i=()=>{},deleteLike:c=()=>{}}={}})=>{const u=se.useIntl();F.useEffect(()=>{p(s)},[s]);const[a,d]=F.useState(t),[f,p]=F.useState(s),[h,y]=F.useState(!1),[_,S]=F.useState(!1),v=F.useMemo(()=>j_(r,Uo),[r]),w=T=>{if(T.preventDefault(),T.stopPropagation(),S(!1),Dr)return Do(),!1;if(Do(),h||!l)return!1;Dr=setTimeout(A,350)},A=async()=>{if(Do(),h||!l)return!1;let T=f?a-1:a+1;T<0&&(T=0),y(!0),d(T),p(!f);try{if(o&&o.slugs){const M=M_(o.slugs);f?await c(M):await i(M,{contentPath:window.location.pathname})}}catch{d(t),p(s)}finally{y(!1)}};return F.createElement(e,{className:re("likes-wrapper text-medium action-button",{"show-spinner":h,"is-liked":f,disabled:!l}),onClick:w,onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},children:E.jsxs(E.Fragment,{children:[E.jsx(Re,{variant:"tertiary",size:"medium",icon:{icon:f?"heart":"heart_empty",animate:"bounce"},className:re({"do-animation":f&&!s}),screenreaderText:l?u.formatMessage({id:`discussion_likes_${f?"unlike":"like"}`},{action:u.formatMessage({id:`discussion_action_${o.type}`})}):!1,onClick:w,disabled:!l,"aria-hidden":!l,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),E.jsx("span",{className:re("number-of-likes",{"no-likes":a===0}),"data-testid":"number-of-likes",children:u.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:a})}),r&&E.jsx(jf,{isOpen:_,isLoading:r.length===0,children:r.length&&E.jsxs("ul",{children:[v.map(T=>typeof T=="string"||!T.name?null:E.jsx("li",{children:E.jsx(zr,{href:T.id?`/profiles/${T.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:T.name})},T.id||window.btoa(T.name))),r.length>Uo&&E.jsx("li",{children:u.formatMessage({id:"discussion_likes_more"},{number:r.length-Uo})})]})})]})})};const nd=({element:e="section",children:t,className:r,...n})=>F.createElement(e,{className:re("modal",r),children:typeof t=="string"?E.jsx("p",{children:t}):t,...n});const id=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:s=()=>{}}={},forceShow:{error:o=!1}={},title:l,children:i,buttons:c,className:u="",gtmContext:a="Modal"})=>{const d=se.useIntl(),[f,p]=F.useState(t),h=_=>{p(_),_?(n(),document.body.classList.add("has-overlay")):(s(),document.body.classList.remove("has-overlay"))};F.useEffect(()=>{h(t)},[t]);const y=r?{"--max-width":`${r/16}rem`}:{};return E.jsx("div",{className:re("overlay",{open:f}),children:E.jsx(nd,{id:e,className:re("overlay-modal",u,{"has-max-width":r}),hidden:!f,style:y,children:t&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"top",children:[E.jsx("h2",{children:l}),E.jsx(Re,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>h(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":a,screenreaderText:d.formatMessage({id:"overlay_button"})})]}),E.jsx($n,{}),i,c&&E.jsxs("div",{className:"bottom",children:[E.jsx($n,{}),E.jsx(Qr,{buttons:c})]}),o&&E.jsx(qn,{className:"error",children:o})]})})})},od=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Cu=e=>{const t={};return Object.keys(e).forEach(r=>r.includes("Id")?t[r]=e[r]:t[`${r}Slug`]=e[r]),t};const at="discussion_",Xn=({element:e="div",content:t,userHasPermissions:r=!0,isLoading:n=!1,originalAuthorId:s,functions:{content:{createContent:o,deleteContent:l,updateContent:i}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:c,deleteLike:u}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:a}={openComments:()=>{}}},links:d={},className:f,gtmContext:p="DiscussionAnswer",children:h})=>{const y=se.useIntl(),_=F.useContext(lt),S=F.useContext(Ia),[v,w]=F.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[A,T]=F.useState(!1),[M,D]=F.useState("");if(F.useEffect(()=>{w({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),n||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return E.jsx(Ze,{className:"discussion-card discussion-post"});const{author:R,canLike:W,createdAt:G,id:L,likes:$=0,userLiked:H,comments:K=0}=t,V=_&&_.id&&typeof R!="string"&&R.id&&R.id===_.id||!1,P=typeof W=="boolean"?W:r?!V:!1,q=async Q=>{Q||(Q=""),D("");try{if(!wp(Q,v.body)){const Z=t.type==="question"?{title:Q}:{body:Q};await i(Cu(t.slugs),Z)}w({body:Q,isEditing:!1,didEdit:!0})}catch{D(`${at}form_error`)}},Y=()=>{S&&S.updateConversation&&S.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const Z=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,oe=document.getElementById(Z),Te=document.getElementById(`${Z}-input`);Te&&Te.focus(),oe&&oe.scrollIntoView({behavior:"smooth"})},0)},ie=()=>{try{l(Cu(t.slugs))}catch{D("delete-error")}},ee=[{text:y.formatMessage({id:`${at}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(y.formatMessage({id:`${at}report_subject`}))}&body=${encodeURI(y.formatMessage({id:`${at}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&&V&&ee.push({text:y.formatMessage({id:`${at}moreMenu_edit`}),onClick:()=>w({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`edit-${t.type}-click`},{text:y.formatMessage({id:`${at}moreMenu_delete`}),onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),T(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`delete-${t.type}-click`,...od(`delete-${t.slug}-modal`,A)}),F.createElement(e,{className:re("discussion-post",f),"data-testid":`discussion-${t.type}-thread`,children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{id:L||t.slug,className:re("discussion-card",t.type,{editing:v.isEditing,"has-link":d.post&&!v.isEditing}),onClick:Q=>{!d.post||v.isEditing||(Q.preventDefault(),Q.stopPropagation(),window.location.href=d.post)},children:[!v.isEditing&&E.jsx(Kn,{member:R,additionalContent:{createdAt:G,didEdit:v.didEdit},className:typeof R!="string"&&R.id===s?"highlighted":"",gtmContext:p,gtmType:"profile-click"}),v.isEditing?E.jsx(Pa,{content:{type:t.type,slugs:t.slugs},userHasPermissions:r,meta:{isLoading:n,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:M!==""&&M!=="delete-error"?y.formatMessage({id:M},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:q,handleCancel:()=>{D(""),w({...v,isEditing:!1})}},gtmContext:`${p}Form`}):d.post?E.jsx("a",{href:d.post,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":"title-click",children:E.jsx(na,{options:{overrides:{a:Uf}},children:v.body})}):E.jsx(na,{options:{wrapper:t.type==="question"?"h1":F.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&E.jsxs("ul",{className:re("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[E.jsx(rd,{element:"li",likes:$,isShort:!1,userLiked:H,content:{type:t.type,slugs:t.slugs},canLike:P,functions:{createLike:c,deleteLike:u}}),(["question","post"].includes(t.type)||d.comments||typeof a=="function")&&E.jsxs("li",{className:"action-button",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),d.comments&&(window.location.href=d.comments),typeof a=="function"&&a()},children:[E.jsx(Re,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:d.comments?d.comments:!1,onClick:d.comments||typeof a!="function"?!1:a,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:y.formatMessage({id:`${at}comments_screenReader`},{count:K})}),E.jsx("span",{children:y.formatMessage({id:`${at}comments`},{count:K})})]}),(t.type==="answer"||t.type==="reply")&&E.jsx("li",{children:E.jsx(Re,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:Y,children:y.formatMessage({id:`${at}reply`})})}),E.jsx(Jf,{element:"li",id:`more-${t.slug}`,options:ee})]})]}),h,E.jsx(id,{id:`delete-${t.slug}-modal`,isOpen:A,functions:{onOpen:()=>{},onClose:()=>T(!1)},forceShow:{error:M==="delete-error"?y.formatMessage({id:"discussion_delete_error"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:y.formatMessage({id:"discussion_delete_title"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>T(!1),children:y.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ie,children:y.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:E.jsx(se.FormattedMessage,{id:"discussion_delete_text",values:{p:Q=>E.jsx("p",{children:Q}),action:y.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const $o="discussion_responses_",F_=({type:e="answer",responses:t=0})=>{const r=se.useIntl();return E.jsxs("div",{className:"responses-heading",children:[E.jsx("h3",{children:r.formatMessage({id:`${$o}title`},{action:r.formatMessage({id:`${$o}${e}`}),count:t})}),t===0&&E.jsx("p",{children:Ke(r.formatMessage,`${$o}empty`,e,e)})]})};const D_=({isOpen:e=!1,count:t=0,children:r})=>{const n=se.useIntl(),s=F.useRef(null),[o,l]=F.useState(e),[i,c]=F.useState("closed");F.useEffect(()=>{const f=s.current;if(f)return f.addEventListener("transitionend",u),()=>{f.removeEventListener("transitionend",u)}},[]),Lt(()=>{i==="closed"&&!o||c(["opening","open"].includes(i)?"ready-to-close":"opening")},[o]),F.useEffect(()=>{i==="ready-to-close"&&c("closing")},[i]);const u=({propertyName:f})=>{f==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)},a=["opening","open"].includes(i),d=Lf(r,{element:"li"});return E.jsxs("div",{className:"thread-wrapper",children:[E.jsx(Re,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${a?"left":"right"}`},onClick:()=>{l(!o)},children:n.formatMessage({id:`discussion_thread_${a?"hide":"show"}`},{count:t})}),E.jsx("ul",{ref:s,className:re("thread",i),hidden:!o,children:d})]})},U_=({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}),$_=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({content:i})=>{if(!r)return;const c=U_({user:r,content:i,verb:"post"});await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return e.setQueryData(t,a=>[...a,c]),{previousActivities:u}},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),B_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t),u=c==null?void 0:c.map(a=>((a==null?void 0:a.id)===(l==null?void 0:l.activityId)&&(a.content=i),a));return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(l,i,c)=>{e.setQueryData(t,c.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),q_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:i})=>{await e.cancelQueries({queryKey:t});const c=e.getQueryData(t),u=c==null?void 0:c.map(a=>{var d;return(a==null?void 0:a.id)===i&&((d=a.reaction_counts)!=null&&d.like?a.reaction_counts.like+=1:a.reaction_counts.like=1),a});return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivities)},onSuccess:i=>{const c=e.getQueryData(t),u=c==null?void 0:c.map(a=>((a==null?void 0:a.id)===(i==null?void 0:i.activity_id)&&(a.latest_reactions.like?a.latest_reactions.like.push(i):a.latest_reactions.like=[i]),a));return e.setQueryData(t,()=>u&&[...u]),{previousActivities:c}},onSettled:(i,c,u)=>{e.invalidateQueries({queryKey:[...t,u.activityId]})}}),H_=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:c})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),a=u==null?void 0:u.map(d=>{var f;return(d==null?void 0:d.id)===c&&(f=d.reaction_counts)!=null&&f.like&&(d.reaction_counts.like-=1),d});return e.setQueryData(t,()=>a&&[...a]),{previousActivities:a}},onError:(c,u,a)=>{e.setQueryData(t,a.previousActivities)},onSuccess:(c,{activityId:u})=>{const a=e.getQueryData(t),d=a==null?void 0:a.map(f=>{var p,h,y,_;if(f.id===u){const S=(y=(h=(p=f.latest_reactions)==null?void 0:p.like)==null?void 0:h.find(v=>v.user_id===(r==null?void 0:r.id)))==null?void 0:y.id;return f.latest_reactions.like=(_=f.latest_reactions.like)==null?void 0:_.filter(v=>v.id!==S),f}else return f});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:a}},onSettled:(c,u,a)=>{e.invalidateQueries({queryKey:[...t,a.activityId]})}}),W_=({basePath:e,parentId:t,isMember:r,functions:{list:n,create:s,edit:o,like:l,unlike:i,join:c,leave:u}})=>{const a=se.useIntl(),d=Ne.useQueryClient(),f=F.useContext(lt),{data:p,error:h,isLoading:y,isFetching:_}=Ne.useQuery({queryKey:[e,t],queryFn:n}),S=$_({queryClient:d,queryKey:[e,t],user:f,mutationFn:s}),{mutate:v}=Ne.useMutation(S),w=B_({queryClient:d,queryKey:[e,t],mutationFn:async L=>await o(L)}),{mutate:A}=Ne.useMutation(w),T=q_({queryClient:d,queryKey:[e,t],mutationFn:l}),{mutate:M}=Ne.useMutation(T),D=H_({queryClient:d,queryKey:[e,t],user:f,mutationFn:async({activityId:L})=>{var K,V,P;const $=p&&(p==null?void 0:p.find(q=>q.id===L)),H=(P=(V=(K=$==null?void 0:$.latest_reactions)==null?void 0:K.like)==null?void 0:V.find(q=>q.user_id===(f==null?void 0:f.id)))==null?void 0:P.id;await i({reactionId:H||"",activityId:L})}}),{mutate:R}=Ne.useMutation(D),W=F.useCallback(({activityId:L})=>M({activityId:L}),[M]),G=F.useCallback(({activityId:L})=>R({activityId:L}),[R]);return h?E.jsx(Yr,{variant:"error",text:h.message}):y?E.jsx(Ze,{style:{height:"400px"}}):E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:r,required:!0,join:c,leave:u,notMemberStateText:a.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(p)&&(p==null?void 0:p.map(L=>{var $,H,K,V,P,q,Y,ie,ee,Q,Z;return E.jsx(Xn,{content:{type:"post",body:L==null?void 0:L.content,createdAt:(L==null?void 0:L.time)||"",slugs:{parentId:t,activityId:L==null?void 0:L.id},slug:L==null?void 0:L.id,author:{id:($=L==null?void 0:L.actor)==null?void 0:$.id,name:(K=(H=L==null?void 0:L.actor)==null?void 0:H.data)==null?void 0:K.name,organization:(P=(V=L==null?void 0:L.actor)==null?void 0:V.data)==null?void 0:P.organization,jobTitle:(Y=(q=L==null?void 0:L.actor)==null?void 0:q.data)==null?void 0:Y.jobTitle,image:{thumbnail:((ee=(ie=L==null?void 0:L.actor)==null?void 0:ie.data)==null?void 0:ee.thumbnail)||void 0}},userLiked:((Q=L==null?void 0:L.own_reactions)==null?void 0:Q.like)&&((Z=L==null?void 0:L.own_reactions)==null?void 0:Z.like.length)>0,likes:(L==null?void 0:L.reaction_counts.like)||0,comments:(L==null?void 0:L.reaction_counts.reply)||0},links:{post:`${e}/${t}/${L==null?void 0:L.id}`,comments:`${e}/${t}/${L==null?void 0:L.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(oe,Te)=>A({activityInfo:oe,content:Te})},likes:{createLike:()=>{W({activityId:L==null?void 0:L.id})},deleteLike:()=>{G({activityId:L==null?void 0:L.id})}},comments:{openComments:()=>null}}},L==null?void 0:L.id)}))]})},G_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:i=>{var u;const c=e.getQueryData(t);if(c)return(u=c==null?void 0:c.latest_reactions)!=null&&u.reply?(c.latest_reactions.reply.unshift(i),c&&(c.reaction_counts={reply:c.latest_reactions.reply.length})):(c.latest_reactions={reply:[i]},c.reaction_counts={reply:1}),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),V_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({replyInfo:o,content:{body:l}})=>{var u,a,d;if(l.length===0)return;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);if(!i||!((u=i==null?void 0:i.latest_reactions)!=null&&u.reply))return;const c=(d=(a=i==null?void 0:i.latest_reactions)==null?void 0:a.reply)==null?void 0:d.map(f=>(f.id===o.replySlug&&(f.data.content=l),f));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:c}})),{previousActivity:i}},onError:(o,l,i)=>{e.setQueryData(t,i.previousActivity)}}),Q_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:l})=>{var u,a;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),c=(a=(u=i==null?void 0:i.latest_reactions)==null?void 0:u.reply)==null?void 0:a.map(d=>{var f;return d.id===l&&((f=d.children_counts)!=null&&f.like?d.children_counts.like+=1:d.children_counts={like:1}),d});return e.setQueryData(t,()=>({...i,latest_reactions:{reply:c}})),{previousActivity:i}},onError:(l,i,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:l=>{var u;const i=e.getQueryData(t),c=(u=i==null?void 0:i.latest_reactions.reply)==null?void 0:u.map(a=>(a.id===l.id&&(a.latest_children.like?a.latest_children.like.push(l):a.latest_children.like=[l]),a));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:c}})),{previousActivity:i}}}),z_=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:i})=>{var a;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);if(!c)return;const u=(a=c.latest_reactions.reply)==null?void 0:a.map(d=>(d.id===i&&d.children_counts.like&&(d.children_counts.like-=1),d));return e.setQueryData(t,()=>({...c,latest_reactions:{reply:u}})),{previousActivity:c}},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:(i,{replyId:c})=>{var d;const u=e.getQueryData(t);if(!u)return;const a=(d=u.latest_reactions.reply)==null?void 0:d.map(f=>{var p;return f.id===c?(p=f.latest_children.reply)==null?void 0:p.filter(y=>y.user_id!==(r==null?void 0:r.id)):f});return e.setQueryData(t,()=>({...u,latest_reactions:{reply:a}})),{previousActivity:u}}}),ad=({basePath:e,parentId:t,activityId:r,repliesList:n,isMember:s,functions:{createReply:o,editReply:l,like:i,unlike:c,join:u,leave:a}})=>{const d=se.useIntl(),f=Ne.useQueryClient(),p=F.useContext(lt),h=G_({queryClient:f,queryKey:[e,t,r],mutationFn:o}),{mutate:y}=Ne.useMutation(h),_=V_({queryClient:f,queryKey:[e,t,r],mutationFn:async R=>l(R)}),{mutate:S}=Ne.useMutation(_),v=Q_({queryClient:f,queryKey:[e,t,r],mutationFn:i}),{mutate:w}=Ne.useMutation(v),A=z_({queryClient:f,queryKey:[e,t,r],user:p,mutationFn:c}),{mutate:T}=Ne.useMutation(A),M=F.useCallback(({replyId:R})=>w({replyId:R}),[w]),D=F.useCallback(({replyId:R})=>T({replyId:R}),[T]);return E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:y,membershipRequiredToPost:{isMember:s,required:!0,join:u,leave:a,notMemberStateText:d.formatMessage({id:"community_joinToPost"})}}),(n==null?void 0:n.length)===0||(n==null?void 0:n.map(R=>{var G,L,$,H,K,V,P,q,Y,ie,ee,Q,Z,oe,Te,ne;const W=((G=R==null?void 0:R.latest_children)==null?void 0:G.like)&&((L=R==null?void 0:R.latest_children)==null?void 0:L.like.filter(te=>te.user_id===(p==null?void 0:p.id)));return E.jsx(Xn,{content:{type:"post",body:typeof R.data.content=="string"?($=R==null?void 0:R.data)==null?void 0:$.content:((K=(H=R==null?void 0:R.data)==null?void 0:H.content)==null?void 0:K.text)||"",createdAt:R==null?void 0:R.created_at,slugs:{question:`${e}/${t}/${r}`,parentId:t,reply:R==null?void 0:R.id},slug:`${e}/${t}/${r}#${R==null?void 0:R.id}`,author:{id:(V=R==null?void 0:R.user)==null?void 0:V.id,name:(q=(P=R==null?void 0:R.user)==null?void 0:P.data)==null?void 0:q.name,organization:(ie=(Y=R==null?void 0:R.user)==null?void 0:Y.data)==null?void 0:ie.organization,jobTitle:(Q=(ee=R==null?void 0:R.user)==null?void 0:ee.data)==null?void 0:Q.jobTitle,image:{thumbnail:((oe=(Z=R==null?void 0:R.user)==null?void 0:Z.data)==null?void 0:oe.thumbnail)||void 0}},userLiked:!!(W!=null&&W.length),likes:((Te=R==null?void 0:R.children_counts)==null?void 0:Te.like)||0,comments:((ne=R==null?void 0:R.children_counts)==null?void 0:ne.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(te,_e)=>S({replyInfo:te,content:_e})},likes:{createLike:()=>M({replyId:R==null?void 0:R.id}),deleteLike:()=>D({replyId:R==null?void 0:R.id})},comments:{openComments:()=>{}}}},R==null?void 0:R.id)}))]})},Y_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return c&&c.id===(l==null?void 0:l.activityId)&&(c.content=i),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onError:(l,i,c)=>{e.setQueryData(t,c.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),J_=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async()=>{var c;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);return(c=i==null?void 0:i.reaction_counts)!=null&&c.like?i.reaction_counts.like+=1:i&&(i.reaction_counts={like:1}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:i=>{const c=e.getQueryData(t);return c!=null&&c.latest_reactions.like?c.latest_reactions.like.push(i):c&&(c.latest_reactions={like:[i]}),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),K_=({queryClient:e,queryKey:t,user:r,activity:n,mutationFn:s})=>({mutationFn:s,onMutate:async()=>{var a;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return(a=u==null?void 0:u.reaction_counts)!=null&&a.like&&u.reaction_counts.like>0&&(u.reaction_counts.like-=1),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(u,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:()=>{var d,f,p;if(!n)return;const u=(p=(f=(d=n.latest_reactions)==null?void 0:d.like)==null?void 0:f.find(h=>h.user_id===(r==null?void 0:r.id)))==null?void 0:p.id,a=e.getQueryData(t);if(a!=null&&a.latest_reactions.like)return a.latest_reactions.like=a.latest_reactions.like.filter(h=>h.id!==u),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),X_=({basePath:e,parentId:t,activityId:r,isMember:n,functions:{get:s,editActivity:o,likeActivity:l,unlikeActivity:i,createReply:c,editReply:u,likeReply:a,unlikeReply:d,join:f,leave:p}})=>{var $,H,K,V,P,q,Y,ie,ee,Q;const h=F.useContext(lt),y=Ne.useQueryClient(),{data:_,error:S,isLoading:v,isFetching:w}=Ne.useQuery({queryKey:[e,t,r],queryFn:s}),A=Y_({queryClient:y,queryKey:[e,t,r],mutationFn:async Z=>await o(Z)}),{mutate:T}=Ne.useMutation(A),M=J_({queryClient:y,queryKey:[e,t,r],mutationFn:l}),{mutate:D}=Ne.useMutation(M),R=K_({queryClient:y,queryKey:[e,t,r],user:h,mutationFn:async()=>{var oe,Te,ne;const Z=(ne=(Te=(oe=_==null?void 0:_.latest_reactions)==null?void 0:oe.like)==null?void 0:Te.find(te=>te.user_id===(h==null?void 0:h.id)))==null?void 0:ne.id;await i({activityId:r,reactionId:Z})},activity:_}),{mutate:W}=Ne.useMutation(R),G=F.useCallback(({activityId:Z})=>D({activityId:Z}),[D]),L=F.useCallback(async({activityId:Z})=>W({activityId:Z}),[W]);return S?E.jsx(Yr,{variant:"error",text:S.message}):v||w?E.jsx(Ze,{style:{height:"400px"}}):E.jsx(Xn,{content:{type:"post",body:_==null?void 0:_.content,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${r}`,parentId:t,activityId:_==null?void 0:_.id},slug:r,author:{id:($=_==null?void 0:_.actor)==null?void 0:$.id,name:(H=_==null?void 0:_.actor)==null?void 0:H.data.name,organization:(K=_==null?void 0:_.actor)==null?void 0:K.data.organization,jobTitle:(V=_==null?void 0:_.actor)==null?void 0:V.data.jobTitle,image:{thumbnail:((P=_==null?void 0:_.actor)==null?void 0:P.data.thumbnail)||void 0}},userLiked:((q=_==null?void 0:_.own_reactions)==null?void 0:q.like)&&((Y=_==null?void 0:_.own_reactions)==null?void 0:Y.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(ie=_==null?void 0:_.actor)==null?void 0:ie.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(Z,oe)=>T({activityInfo:Z,content:oe})},likes:{createLike:()=>G({activityId:r}),deleteLike:()=>L({activityId:r})},comments:{openComments:()=>{}}},children:E.jsxs(E.Fragment,{children:[E.jsxs("h3",{children:["Comments (",((ee=_==null?void 0:_.reaction_counts)==null?void 0:ee.reply)||0,")"]}),E.jsx(ad,{basePath:e,parentId:t,activityId:r,repliesList:(Q=_==null?void 0:_.latest_reactions)==null?void 0:Q.reply,isMember:n,functions:{createReply:c,like:a,unlike:d,editReply:u,join:f,leave:p}})]})},r)},Z_=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:s}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:s}});exports.ASSETS_BUCKET=Bn;exports.ActivitiesFeed=W_;exports.ActivitySection=X_;exports.AddPost=Na;exports.BannerSection=Xv;exports.Breadcrumbs=g_;exports.Button=Re;exports.ButtonWrapper=Qr;exports.CacheProvider=Vf;exports.CollapsibleSection=Ta;exports.Columns=w_;exports.CommunityDetails=m_;exports.Contributors=Gf;exports.ConversationContext=Ia;exports.CookieBanner=Kf;exports.DiscussionConversation=L_;exports.DiscussionForm=Pa;exports.DiscussionLikes=rd;exports.DiscussionPost=Xn;exports.DiscussionThread=D_;exports.Divider=$n;exports.DownloadSection=zv;exports.EMAILS=Gt;exports.EmailHelperTextBox=b_;exports.EmptyStateBox=Yr;exports.Filters=y_;exports.Footer=Ra;exports.FullWidthSection=Sa;exports.GlobalProviders=h_;exports.Header=Ca;exports.HelperTextBox=Df;exports.HiddenFromScreenReaders=sa;exports.HideShowTextBox=t_;exports.HighlightedTextBox=ut;exports.IntlProvider=Qf;exports.JoinButton=Aa;exports.LanguageSwitcher=__;exports.Link=zr;exports.LoadMore=Yf;exports.LoadingBlock=f_;exports.LoadingPlaceholder=Ze;exports.LoadingState=Hf;exports.Logo=xa;exports.LogoSection=Yv;exports.MarkdownText=na;exports.MarketingBox=Zv;exports.Member=Kn;exports.MembersList=I_;exports.Modal=nd;exports.MoreMenu=Jf;exports.NUMBER_OF_USERS=e_;exports.Overlay=id;exports.PageLayout=C_;exports.PasswordRules=O_;exports.Pill=$f;exports.ProfilePicture=Jn;exports.ProgressBar=Bf;exports.Rating=A_;exports.RepliesFeed=ad;exports.ResponsesHeading=F_;exports.ResponsiveImage=Mf;exports.SearchForm=td;exports.Span=Uf;exports.StatusBanner=qn;exports.Tags=N_;exports.Tooltip=jf;exports.UserContext=lt;exports.UserProvider=zf;exports.VisuallyHidden=Le;exports.addAriaProps=od;exports.getMember=Oa;exports.headerData=$r;exports.mapGetStreamData=Z_;exports.useCurrentPath=Iu;exports.useEffectAfterMount=Lt;exports.useFeatureFlag=kv;exports.useScreenWidth=Vr;exports.useScrollListener=Nf;exports.useScrollToHash=Mv;
72
+ Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",inviteModal_title:"You’re registered",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",progressBar:"{number}% loaded",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},bv={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>"},Sv={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>"},Ov={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>"},Tv=Object.freeze(Object.defineProperty({__proto__:null,en:wa,es:bv,fr:Sv,pt:Ov},Symbol.toStringTag,{value:"Module"})),ot=(e,t,n,r,s={})=>{let o="";return`${t}_${n}`in wa?o=e({id:`${t}_${n}`},s):o=e({id:t},{[r]:n,...s}),o},xv=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let s=n.length-1;s>=0;s--){const o=Math.pow(10,(s+1)*3);if(o<=e){e=Math.round(e*t/o)/t,e===1e3&&s<n.length-1&&(e=1,s++),r=`${e}${n[s]}`;break}}return r},Af=(e,t)=>j.Children.map(e,n=>j.cloneElement(n,{...t})),Av=e=>e.replace(/\s+/g,"").length>0,xe=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:s=!1,element:o="button",onClick:l=!1,className:i="",disabled:u=!1,screenreaderText:c=!1,children:a=!1,...d})=>{const p=Vr(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const _=Object.assign({},t),S=Tf(Object.keys(_));t=xf(p,S,_)}const h=[];typeof t=="string"&&h.push(t),r&&(h.push("icon"),typeof r=="object"?(h.push(r.icon),r.position?h.push(r.position):h.push("left"),r.hover&&h.push(`hover_${r.hover}`),r.animate&&(h.push("animate"),typeof r.animate=="string"&&h.push(r.animate))):(h.push(r),!r.includes("right")&&!r.includes("left")&&h.push("left"))),n.muted&&h.push("muted"),n.fullWidth&&h.push("full-width");const y={...d,className:ne(e,i,h,{"no-text":!a,disabled:u,button:s}),onClick:_=>{(!s||s[0]==="#")&&l&&(_.preventDefault(),_.stopPropagation()),l&&l(_)},disabled:typeof u=="object"&&"isClickable"in u?!u.isClickable:u};return s&&(o="a",y.href=s),j.createElement(o,y,a||(c?E.jsx(Ue,{showOnFocus:!1,children:c}):null))},Qr=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",s=e.map((o,l)=>r==="p"?E.jsx(xe,{...o},l):E.jsx("li",{children:E.jsx(xe,{...o})},l));return j.createElement(r,{className:ne("button-wrapper",t),...n,children:s})};const Jt=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return E.jsx("hr",{className:ne({"has-max-width":e}),style:t})},zr=({href:e,children:t,fallbackElement:n,className:r="",onClick:s,gtmContext:o,gtmType:l,...i})=>{if(e){const u={...i};return s&&(u.onClick=s),o&&(u["data-gtm-event-context"]=o),l&&(u["data-gtm-event-type"]=l),E.jsx("a",{href:e,className:ne("gtm-trackable",r),...u,children:t})}return n?j.createElement(n,{children:t,className:r,...i}):t},vu={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"}},Rv=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:s}=e?vu[e]:vu.fallback;return{range:t&&t.length>0?t:r,sizes:n||s}},Cv=({format:e,height:t,query:n,width:r})=>{let s=`w=${r}&h=${t}`;return s=e?`${s}&fm=${e}`:s,s=n?`${s}&${n}`:s,s},Co=({format:e,range:t,url:n,query:r})=>t.map(({height:s,width:o})=>`${n}?${Cv({format:e,height:s,query:r,width:o})} ${o}w`).join(", ");const Rf=({image:e,className:t,testId:n})=>{const{description:r,height:s,type:o,query:l,url:i,width:u,loading:c,decoding:a,fetchPriority:d}=e,{range:f,sizes:p}=Rv(e),h=Co({format:"avif",query:l,range:f,url:i}),y=Co({format:"webp",query:l,range:f,url:i}),_=Co({format:"",query:l,range:f,url:i});return E.jsxs("picture",{className:t,children:[o!=="image/gif"&&E.jsx("source",{type:"image/avif",srcSet:h,sizes:p,"data-testid":"source"}),E.jsx("source",{type:"image/webp",srcSet:y,sizes:p,"data-testid":"source"}),E.jsx("img",{srcSet:_,sizes:p,src:i,alt:r,loading:c||"lazy",decoding:a||"async",fetchpriority:d||"auto",width:u,height:s,"data-testid":n||"image"})]})};let kr=!1;const Cf=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=ue.useIntl(),s=j.useRef(null),[o,l]=j.useState("hidden");j.useEffect(()=>{const u=s.current;if(u)return u.addEventListener("transitionend",i),()=>{u.removeEventListener("transitionend",i)}},[]);const i=({propertyName:u})=>{u==="opacity"&&(kr!==!1&&clearTimeout(kr),l(c=>c==="opening"?"open":c==="closing"?"closed":c==="closed"?"hidden":c))};return jt(()=>{kr!==!1&&clearTimeout(kr);let u="open";e?l("opening"):(l("closing"),u="hidden"),kr=setTimeout(()=>{l(u)},300)},[e]),E.jsx("aside",{ref:s,className:ne("tooltip text-medium",o,{loading:t}),hidden:o==="hidden",children:t?E.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?E.jsx("p",{children:n}):n})};const ba=({children:e,className:t="",...n})=>E.jsx("section",{className:ne("full-width-section",t),...n,children:e});const Nv=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(s=>{r.push({href:s.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":s.eventContext||"Download",target:"_blank",children:s.text})}),E.jsx(ba,{className:ne("download-section",n),children:E.jsxs(E.Fragment,{children:[j.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),E.jsx(Qr,{buttons:r})]})})};const Pv=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const s={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return E.jsxs("div",{className:ne("logos",n),children:[e&&j.createElement(s.element,{className:"title"},s.text),E.jsx("ul",{className:ne({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:o,nameOfBusiness:l,link:i=!1,description:u=!1},c)=>{if(!o||!o.url)return null;const a=E.jsx("img",{src:o.url,width:o.width||"auto",height:o.height||"auto",alt:l});return E.jsxs("li",{children:[E.jsx("p",{className:"img-wrapper",children:i?E.jsx("a",{href:i,target:"_blank",rel:"nofollow noreferrer noopener",children:a}):a}),u&&E.jsx("small",{children:u})]},window.btoa(`${o.url}_${c}`))})})]})};const Iv=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],kv=({content:e,image:t,variant:n="default",spacing:r="normal",cta:s,children:o})=>{const l=["eyebrow","title","text"],i={eyebrow:"small",title:"h1",text:"p"},u={};return l.forEach(c=>{if(!e[c]){u[c]=!1;return}if(typeof e[c]=="object"){u[c]=e[c];const{text:a,element:d}=e[c];if(d&&Iv.includes(d.toLowerCase()))return;u[c]={text:a,element:i[c]};return}u[c]={text:e[c],element:i[c]}}),s&&s.link&&s.link[0]==="#"&&(s.props||(s.props={}),s.props.onClick=c=>{c.preventDefault(),c.stopPropagation();const a=document.getElementById(s.link.substring(1));a&&a.scrollIntoView({behavior:"smooth"})}),E.jsx(ba,{className:ne("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&u.eyebrow&&u.title}),children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"content-wrapper",children:[l.map(c=>{if(u[c]&&typeof u[c]=="object"){const{text:a,element:d=""}=u[c];return j.createElement(d.toLowerCase(),{key:c,className:c},a)}return null}),o,s&&s.text&&s.link&&E.jsx(xe,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:s.link,...s.props,children:s.text})]}),t&&E.jsx(Rf,{image:{...t,aspect:"banner"}})]})})},Lv=j.memo(kv);const Fv=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:s})=>!n&&!r?null:E.jsxs("aside",{className:ne("marketing-block",e),children:[n&&E.jsx("p",{className:"title",children:n}),r&&E.jsx("p",{children:r}),t&&E.jsx(xe,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Bn="https://storage.googleapis.com/apolitical-assets/",Gt={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},jv="200,000+";const Sa=({label:e=!1,className:t="",children:n})=>{const r=ue.useIntl();return E.jsxs("details",{className:ne("collapsible-section",t),children:[E.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),E.jsx("div",{className:"content",children:n})]})};const gt=({variant:e="primary",className:t="",children:n,...r})=>E.jsx("div",{className:ne("highlighted-text-box",e,t),...r,children:n});const Yr=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let s=n&&!!Object.keys(n).length;const o=typeof n=="object"&&"breakpoints"in n,l=Vr(o);if(o&&typeof n=="object"&&typeof l=="number"){const d=Object.assign({},n.breakpoints),f=Tf(Object.keys(d));s=xf(l,f,d)}const{breakpoints:i,text:u="",component:c,...a}=n;return E.jsx(gt,{variant:"subtle",className:ne("empty-state-box",e,r),children:E.jsxs(E.Fragment,{children:[t&&E.jsx(Wn,{options:{forceBlock:!0},children:t}),s&&typeof n=="object"&&(c||E.jsx(xe,{...a,variant:n.variant?n.variant:"secondary",children:u}))]})})};const ta=({children:e,...t})=>E.jsx("p",{...t,children:e}),Nf={q:ta,blockquote:ta};for(let e=1;e<=6;e++)Nf[`h${e}`]={component:ta,props:{className:"title"}};const Pf=({type:e="default",className:t="",heading:n=!1,children:r})=>E.jsxs("div",{className:ne("helper-text-box text-small",e,t),children:[n&&E.jsx("p",{className:"title",children:n}),typeof r=="string"?E.jsx(Wn,{options:{wrapper:j.Fragment,forceBlock:!0,overrides:Nf},children:r}):E.jsx("p",{children:r})]});const Mv=({className:e="",show:t=!1,hide:n=!1,text:r,children:s})=>{const o=ue.useIntl(),l=j.useRef(null),[i,u]=j.useState(""),[c,a]=j.useState("closed");j.useEffect(()=>{const p=l.current;if(p)return p.addEventListener("transitionend",d),()=>{p.removeEventListener("transitionend",d)}},[]),j.useEffect(()=>{if(!r||typeof r!="string")return;const p=r.split(`
73
+ `);u(p.length<3?`${r.substring(0,400)}...`:p.slice(0,3).join(`
74
+ `))},[r]),j.useEffect(()=>{c==="ready-to-close"&&a("closing")},[c]);const d=({propertyName:p})=>{p==="max-height"&&a(h=>h==="opening"?"open":h==="closing"?"closed":h)};if(!r)return null;const f=["opening","open"].includes(c);return E.jsxs(gt,{variant:"subtle",className:ne("hide-show-text-box",e),children:[E.jsxs("div",{ref:l,className:ne("content",c),children:[E.jsx(Wn,{options:{forceBlock:!0},children:c==="closed"?i:r}),c!=="closed"&&s]}),E.jsx("p",{className:"cta",children:E.jsx(xe,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ne({"rotate-180":f}),onClick:()=>{a(f?"ready-to-close":"opening")},children:f?n||o.formatMessage({id:"hideShowTextBox_hide"}):t||o.formatMessage({id:"hideShowTextBox_show"})})})]})},Dv=()=>j.Fragment,Uv=({children:e})=>E.jsx(gt,{variant:"secondary",children:e}),Bv=["span","strong","h1","h2","h3","h4","h5","h6","p"],$v=({children:e})=>{const t=ue.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const o of j.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number"))if(j.isValidElement(o)&&o.type==="summary"){if(o.props&&o.props.children){for(const l of j.Children.toArray(o.props.children))if(!(!l||typeof l=="string"||typeof l=="number")&&j.isValidElement(l)){const i=l.type;if(Bv.includes(i)){for(n=l.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(o);const s=n?n.toString():"";return E.jsx(Sa,{label:s,className:["Sources","Resources"].includes(s)?"discrete-links":"",children:r.map(o=>o)})},qv=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return E.jsx(gt,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return E.jsx(gt,{variant:"primary",children:e});case"pink-textbox":return E.jsx(gt,{variant:"tertiary",children:e});default:return E.jsx("div",{...t,children:e})}return E.jsx("div",{...t,children:e})},Hv=e=>{const t=ue.useIntl(),n=Date.now().toString();let r="default";const s=e.src;return s.includes("youtube")||s.includes("vimeo")?r="video":s.includes("riddle")||s.includes("sli.do")?r="poll":s.includes("padlet")&&(r="padlet"),E.jsxs(E.Fragment,{children:[E.jsx(Ue,{children:E.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),E.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),E.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},_u=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Wv=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,s=!1;for(const o of j.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&j.isValidElement(o)){const l=o.type;if(["button","center","span","strong"].includes(l)&&o.props&&o.props.children&&o.props.children[0])for((l==="button"||_u(o.props.children[0])==="button")&&(s=!0),r=o.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!j.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&_u(r)==="button"&&(s=!0);else break}return s?(n={...n,className:"button primary medium"},E.jsx("p",{className:"center",children:E.jsx(xe,{variant:"primary",size:"medium",...n,children:r})})):E.jsx("a",{...n,children:r})},If=({children:e})=>E.jsx("span",{children:e});const ra=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:j.Fragment,forceBlock:!0,overrides:{a:Wv,CollapsibleSection:Sa,TextBox:gt,CaseStudy:Uv,style:Dv,details:$v,div:qv,iframe:Hv}};return E.jsx("div",{className:ne("markdown-text",e),children:E.jsx(Wn,{options:{...r,...t},children:n})})};const kf=({size:e="medium",variant:t="default",className:n="",children:r})=>E.jsx("span",{className:ne("pill",e,t,n),children:r});const $n=({element:e="p",children:t=null,className:n="",...r})=>j.createElement(e,{...r,className:ne("status-banner text-small",n),"aria-live":"assertive"},t);const Gv=({progress:e=0,text:t=!1,className:n=""})=>{const r=ue.useIntl(),s=e>75?100:e>50?75:e>25?50:e>5?25:0,o={"--progress":`${e}%`};return E.jsx("span",{className:ne(`progress-bar section-${s}`,n),style:o,children:E.jsx(Ue,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Lf=j.memo(Gv);const No="loadingBlock_",Vv=({progress:e=0,steps:t=!1,className:n=""})=>{const r=ue.useIntl();t||(t={0:{text:r.formatMessage({id:`${No}loading`})},75:{text:r.formatMessage({id:`${No}almostDone`})},100:{text:r.formatMessage({id:`${No}complete`})}});let s=null;const o=Object.keys(t);for(let i=0;i<o.length&&!(e<parseInt(o[i]));i++)s=o[i];const l=s&&t[s].icon?{"--icon":`url(${Bn}icons/${t[s].icon}.svg)`}:{};return E.jsxs(gt,{className:ne("loading-block",n,{"has-icon":s&&t[s].icon}),variant:"subtle",style:l,children:[s&&E.jsx("span",{className:"step",children:t[s].text}),E.jsx(Lf,{progress:e})]})},Qv=j.memo(Vv);const st=({element:e="div",className:t="",...n})=>E.jsx(aa,{element:e,className:ne("loading-placeholder",t),...n});const na={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"]},Ff=(e,t)=>e in na?E.jsx("div",{className:e,children:na[e].map((n,r)=>Ff(n,r))},t):E.jsx(st,{className:e},t),jf=({layout:e="overview-page"})=>E.jsx("div",{className:ne("loading-state",e),children:na[e].map((t,n)=>Ff(t,n))}),Mf=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):""},An=["#5AB6A3","#A2D7AF","#806056","#3962B3"],zv=e=>{const t=Math.ceil(26/An.length),n=Mf(e).toLowerCase();if(n==="")return An[0];const r=n.charCodeAt(0)-96;for(let s=0;s<An.length;s++)if(r<=t*(s+1))return An[s]};const Eu=256,Yn=({className:e="",src:t="",name:n,alt:r,width:s=Eu,height:o=Eu,...l})=>{const[i,u]=j.useState(!1),c=j.useRef(null);j.useEffect(()=>{const d=c.current;if(!d)return;const f=d.getContext("2d");if(!f)return;const p=s,h=o;typeof window<"u"&&window.devicePixelRatio&&(d.width=p*window.devicePixelRatio,d.height=h*window.devicePixelRatio,f.scale(window.devicePixelRatio,window.devicePixelRatio)),f.fillStyle=zv(n),f.fillRect(0,0,p,h),f.font=`${p/3}px Arial`,f.textAlign="center",f.fillStyle="white",f.fillText(Mf(n),p/2,h/1.6)},[n]);let a=!1;return t&&t!==""&&!i&&(t.includes("http")||t.includes("//"))&&(a=!0),E.jsx("figure",{className:ne("profile-picture",e,{error:i}),...l,children:a?E.jsx("img",{src:t,alt:r||n,onError:()=>{u(!0)},width:s,height:o}):E.jsx("canvas",{ref:c})})},Oa=e=>e==="apolitical"?{image:`${Bn}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Bn}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},Yv=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const s=e!=="",o=t!=="",l=n!=="";if(!s&&!o&&!l)return"";const i=`${e}${s&&o?` — ${t}`:t}`;let u=`${i}${(s||o)&&l?`, ${n}`:n}`;return u.length>r&&(u=i),u.length>r&&(u=oa(u,r)),u};const Kn=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:s="member-click",className:o=""})=>{const l=ue.useIntl(),i=Oa(t);i.name||(i.name=l.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:u,url:c,image:a}=i,d=Yv(i),f=n&&n.createdAt?Ev(n.createdAt):!1,p=n&&n.createdAt?_v(n.createdAt):"";return j.createElement(e,{className:ne("member text-medium",o),children:E.jsxs(zr,{href:c,gtmType:s,gtmContext:r,onClick:h=>{h==null||h.stopPropagation()},children:[E.jsx(Yn,{name:u,src:a}),E.jsxs("p",{className:"details",children:[E.jsx("strong",{children:u}),n&&E.jsxs("span",{className:"additional-content",children:[n.createdAt&&f&&E.jsx("span",{className:"date",title:p,"aria-label":p,children:l.formatMessage({id:`dates_${f.path}`},{number:f.number})}),n.didEdit&&E.jsx("em",{children:l.formatMessage({id:"discussion_edited"})})]}),d&&E.jsx("small",{children:d})]})]})})};const wu={small:24,medium:48},Df=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:s,showGap:o,showPlaceholders:l}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:i=2,className:u=""})=>{const c=ue.useIntl();return!n||n.length===0?null:j.createElement(e,{className:ne("contributors",u,s,{"has-gap":o}),children:E.jsxs(E.Fragment,{children:[E.jsx("ul",{children:n.map((a,d)=>{let f,p="";if(d<i){const{name:h="",image:y=""}=Oa(a);if(l)return E.jsx(st,{element:"li",className:"contributor"},d);f=E.jsx(Yn,{name:h,src:y,width:wu[s||"medium"],height:wu[s||"medium"]})}else if(d===i){const h=(t||n.length)-i;f=E.jsxs("small",{className:ne({"large-number":h>99}),children:["+",xv(h,0)]}),p="number-left"}return f?E.jsx("li",{className:ne("contributor",p),children:f},d):null})}),r&&E.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?c.formatMessage({id:`member_${n[0]}`}):oa(n[0].name||"",20):null})]})})},Uf=({showDevTools:e=!0,children:t})=>{const n=new Le.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return E.jsxs(Le.QueryClientProvider,{client:n,children:[t,e&&E.jsx(pp.ReactQueryDevtools,{initialIsOpen:!1})]})},Bf=({children:e,locale:t,messages:n})=>{const r=t||"en",s={...Tv[r],...n||{}};return E.jsx(ue.IntlProvider,{locale:r,messages:s,children:e})},yt=j.createContext(null),$f=({children:e,user:t})=>E.jsx(yt.Provider,{value:t,children:e}),Kv=({bootstrap:e,children:t,intl:n})=>{const[r,s]=j.useState({isLoading:!0});return j.useEffect(()=>{e().then(o=>s({...o,isLoading:!1})).catch(()=>s({isLoading:!1}))},[]),E.jsx(Bf,{locale:n==null?void 0:n.locale,messages:n==null?void 0:n.messages,children:E.jsx($f,{user:r,children:E.jsx(Uf,{children:t})})})};const Po="joinCommunityButton",Ta=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const s=ue.useIntl(),o=j.useContext(yt),l=o&&typeof o.id=="string",[i,u]=j.useState(e),[c,a]=j.useState(e?"joined":"notJoined");j.useEffect(()=>{c==="joining"?a("joined"):c==="leaving"&&a("notJoined")},[i]);const d={},f={};return i&&c!=="leaving"&&(d["data-hover-text"]=s.formatMessage({id:`${Po}_leave`}),d["aria-label"]=s.formatMessage({id:`${Po}_member_aria`}),f["aria-hidden"]="true"),E.jsx(xe,{variant:i?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:i&&c!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async p=>{l&&(p.currentTarget.blur(),i?(a("leaving"),typeof r=="function"&&await r()):(a("joining"),typeof n=="function"&&await n()),u(!i))},className:ne("join-community-button",c,{active:c==="joining"}),disabled:!l,...d,children:E.jsx("span",{className:"text",...f,children:s.formatMessage({id:`${Po}${["joining","leaving"].includes(c)?`_${c}`:i?"_member":t?"_short":""}`})})})};const Io="communityDetails_",Jv=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:s="",...o})=>{const l=ue.useIntl(),i=n||(r==null?void 0:r.length)||0;return E.jsxs("div",{className:ne("community-details",s),children:[E.jsx(Jt,{}),E.jsxs("div",{className:"member-details",children:[E.jsxs("div",{className:"top",children:[E.jsxs("h3",{children:[l.formatMessage({id:`${Io}members`}),E.jsx("span",{className:"count",children:i})]}),E.jsx("p",{className:"text-small",children:E.jsx("a",{href:`/communities/${t}/members`,children:l.formatMessage({id:`${Io}viewAll`})})})]}),E.jsx(Df,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:i===0},cutoff:5})]}),E.jsx(Ta,{isMember:e,...o}),e&&E.jsx(xe,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:l.formatMessage({id:`${Io}invite`})})]})};const Xv=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=ue.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Ue,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),E.jsx("ul",{className:ne("breadcrumbs text-small",n),children:e.map(({text:s,href:o,current:l=!1},i)=>E.jsxs("li",{children:[l&&E.jsx(Ue,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),E.jsx(zr,{href:l?void 0:o,children:oa(s,t)})]},`${window.btoa(s)}_${i}`))})]})};const Zv=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:s=""})=>{const o=ue.useIntl(),l=t?[{id:"all",text:typeof t!="boolean"&&t.text||o.formatMessage({id:"filters_all"})},...e]:e,[i,u]=j.useState(t?["all"]:[]),c=(a,d)=>{let f=[];i.includes(a)?f=i.filter(p=>p!==a):a==="all"?f=["all"]:n?f=[...i.filter(p=>p!=="all"),a]:f=[a],u(p=>(r&&typeof r=="function"&&r({current:f,previous:p}),f)),d&&typeof d=="function"&&d()};return E.jsx("ul",{className:ne("filters",s),children:l.map(({id:a,text:d,disabled:f=!1,callback:p=()=>{}})=>{let h={};return f&&(h={disabled:!0,"aria-label":o.formatMessage({id:"filters_disabled"},{name:d})}),E.jsx("li",{children:E.jsx("button",{className:ne(a,{selected:i.includes(a)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),c(a,p)},...h,children:d})},a)})})},e_=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:s,position:o})=>{o==="before-lang"?r+=`/${s}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${s}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const ko={en:"English",es:"Español",fr:"Français",pt:"Português"},Rn="languageSwitcher_",t_=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:s=()=>{},urlParts:o,variant:l="default",label:i,className:u=""})=>{const c=ue.useIntl(),[a,d]=j.useState(e);if(j.useEffect(()=>{e!==a&&d(e)},[e]),!r||!Object.values(r).some(y=>y&&y.post_name))return null;const p=Object.keys(r),h=a!==e;return E.jsxs("div",{className:ne("language-switcher text-small",l,u),children:[E.jsxs("nav",{children:[l!=="short"&&E.jsx("p",{children:i||c.formatMessage({id:`${Rn}label`})}),E.jsx("ul",{children:p.map(y=>{if(!ko[y])return null;let _={className:y};return a===y?_["aria-label"]=c.formatMessage({id:`${Rn}selected`},{language:ko[y]}):_={..._,href:e_(y,o),onClick:S=>{S.preventDefault(),S.stopPropagation(),d(y),s(y)}},E.jsx("li",{children:E.jsx(zr,{..._,fallbackElement:"span",children:ko[y]})},y)})}),l!=="short"&&!h&&E.jsx("p",{children:c.formatMessage({id:`${Rn}translation_${t?"original":n?"human":"machine"}`})})]}),l!=="short"&&!h&&!t&&!n&&E.jsx("small",{children:c.formatMessage({id:`${Rn}disclaimer`},{email:Gt.support,link:y=>{const _=`mailto:${y}`;return E.jsx("a",{href:_,children:y})}})})]})};const Lo=ue.createIntl({locale:"en",messages:wa}),qf=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:s=!1,messages:o={button:Lo.formatMessage({id:"loadMore_button"}),endOfFeed:Lo.formatMessage({id:"loadMore_endOfFeed"}),error:Lo.formatMessage({id:"loadMore_error"})},className:l="",gtmContext:i="LoadMore"})=>{const[u,c]=j.useState(!1),[a,d]=j.useState(!1);if(t<=0||t<n*e)return null;const f=async p=>{try{await r(p)}catch(h){h instanceof Error&&h.message&&h.message.includes("Cannot read items")?d(!0):c(!0)}};return E.jsxs("footer",{className:ne("load-more",l),children:[u&&E.jsx("p",{className:"error",children:o.error}),a?E.jsx("p",{children:o.endOfFeed}):E.jsx(xe,{variant:"secondary",icon:s,onClick:f,"data-gtm-event-context":i,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:o.button})]})};let Cn=!1;const Hf=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const s=ue.useIntl(),o=j.useRef(null),[l,i]=j.useState(!1),u=c=>{o.current&&c.target instanceof HTMLElement&&!o.current.contains(c.target)&&i(!1)};return j.useEffect(()=>(document.addEventListener("click",u,!0),()=>{document.removeEventListener("click",u,!0)})),j.createElement(e,{ref:o,className:ne("more-menu text-medium",r),children:E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>i(!l),"aria-haspopup":"true","aria-expanded":l,"aria-controls":t,screenreaderText:s.formatMessage({id:"moreMenu"})}),E.jsx("ul",{id:t,hidden:!l,children:n.map(({href:c,onClick:a,text:d,icon:f,...p},h)=>{const y={...p,onClick:_=>{i(!1),typeof a=="function"&&a(_)},onFocus:()=>{Cn&&(clearTimeout(Cn),Cn=!1)},onBlur:()=>{Cn=setTimeout(()=>{i(!1)},100)}};return c&&(y.href=c),E.jsx("li",{children:E.jsx(xe,{variant:"tertiary",size:"medium",icon:f?{icon:f,position:"left"}:!1,...y,children:d})},`${window.btoa(d)}_${h}`)})})]})})};const xa=({variant:e="default",version:t="default",className:n="",...r})=>E.jsx("p",{className:"logo-wrapper",children:E.jsx("a",{href:"/home/",className:ne("logo",e,t,n),...r,children:E.jsx(Ue,{children:E.jsx(ue.FormattedMessage,{id:"apolitical"})})})});const r_={"2-1":901},n_=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const s=Vr(!0);let o=r;return j.Children.count(r)===1&&(o=j.Children.toArray(r)[0],o.props&&(o=o.props.children)),E.jsx("section",{className:ne("columns",`layout-${e}`,n),children:j.Children.map(o,(l,i)=>t!==!1&&i===t&&s&&s<r_[e]?null:l)})};const Fo="cookieBanner_",jo=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Mo=new Date(Date.now()+12*30*24*60*60*1e3),Wf=()=>{const e=ue.useIntl(),[t,n,r]=ia.useCookies(jo),[s,o]=j.useState(!t["apol-cookie-banner"]),l=()=>{jo.forEach(a=>{n(a,!0,{path:"/",expires:Mo,domain:a==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),o(!1),window.location.reload()},i=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Mo}),jo.forEach(a=>{if(a==="apol-cookie-banner"){n(a,!0,{path:"/",expires:Mo});return}r(a)}),o(!1)};if(!s)return null;const u=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:i,gtmType:"reject-all"},{id:"accept",onClick:l,gtmType:"accepted-all"}],c=[];return u.forEach(a=>{c.push({variant:a.href?"tertiary":"primary",href:a.href,onClick:a.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${a.gtmType}-click`,children:e.formatMessage({id:`${Fo}buttons_${a.id}`})})}),E.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[E.jsx("h6",{children:e.formatMessage({id:`${Fo}title`})}),E.jsx("p",{children:e.formatMessage({id:`${Fo}text`})}),E.jsx(Qr,{buttons:c})]})},mt={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:Gt["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Gt["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:Gt.support,gtmType:"concierge-email-click"},business:{email:Gt.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 Vt="footer_",qn="SiteFooter",bu=({group:e})=>{const t=mt[e].order||[];let n=!1;return"text"in mt[e]&&(n=mt[e].text),E.jsxs(j.Fragment,{children:[E.jsx("p",{className:"pre-title",children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}`})}),Array.isArray(t)&&t.length>0&&E.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:s,gtmType:o}=mt[e][r],l={};return["legal"].includes(e)&&(l.target="_blank",l.rel="noopener"),E.jsx("li",{children:E.jsx("a",{href:s,className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":o,...l,children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&E.jsx("dl",{className:"text-medium",children:n.order.map(r=>E.jsxs(j.Fragment,{children:[E.jsx("dt",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}`})}),E.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&E.jsx("address",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}_address`,values:{br:E.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&E.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Aa=()=>E.jsx("div",{id:"footer",children:E.jsxs("div",{className:"wrapper",children:[E.jsx(aa,{element:"hr"}),E.jsx(xa,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":"logo-homepage-link"}),E.jsx("footer",{children:["platform","community","company","contact"].map(e=>E.jsxs("div",{className:"group",children:[E.jsx(bu,{group:e}),Object.keys(mt[e]).includes("child")&&E.jsx(bu,{group:mt[e].child})]},e))}),E.jsx("hr",{}),E.jsxs("div",{className:"sub-footer",children:[E.jsx("ul",{children:Array.isArray(mt.social.order)&&mt.social.order.map(e=>{const t=mt.social[e];return E.jsx("li",{className:e,children:E.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":"social-click",children:E.jsx("span",{className:"hidden",children:E.jsx(ue.FormattedMessage,{id:`${Vt}social_${e}`})})})},e)})}),E.jsx("small",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Nn="emailHelperTextBox_",i_=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const s=ue.useIntl(),[o,l]=j.useState({path:`${Nn}default`,type:"default",link:{},mail:{},error:""}),[i,u]=j.useState(!1),c=j.useCallback(p=>{p.preventDefault(),p.stopPropagation();const h=y=>{l({path:`${Nn}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>c(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:y})};if(typeof r!="function"){h(s.formatMessage({id:`${Nn}error_noFunction`}));return}u(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(y=>{h(y.message)}).finally(()=>{u(!1)})},[t,n,r]);j.useEffect(()=>{let p=Nn,h="default",y={},_={};switch(e){case"gov":p+="autoApproved",h="success";break;case"nonGov":p+="unrecognisedEmail",h="error",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",h="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",h="error",y={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:S=>c(S),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",h="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}l({...o,path:p,type:h,link:y,mail:_})},[e]);const a={};return["link","mail"].forEach(p=>{a[p]=Object.keys(o[p]).length?h=>E.jsx("a",{...o[p],children:h}):h=>h}),E.jsx(Pf,{type:o.type,heading:i?!1:s.formatMessage({id:`${o.path}_title`}),children:i?E.jsxs(E.Fragment,{children:[E.jsx(st,{element:"span"}),E.jsx(st,{element:"span"})]}):s.formatMessage({id:`${o.path}_text`},{...a,strong:p=>E.jsx("strong",{children:p}),em:p=>E.jsx("em",{children:p}),br:E.jsxs(E.Fragment,{children:[E.jsx("br",{}),E.jsx("br",{})]}),error:o.error})})};const Pn="passwordRules_",Gf="isMoreThanEightCharacters",Vf="includesNumberAndSymbol",Qf="includesLowerAndUppercase",o_={[Gf]:"8Characters",[Vf]:"numberSymbol",[Qf]:"lowercaseUppercase"},a_=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=ue.useIntl();return E.jsxs("aside",{className:ne("password-rules",t),children:[E.jsx("small",{children:n.formatMessage({id:`${Pn}intro`})}),E.jsx("ul",{children:[Gf,Vf,Qf].map(r=>E.jsxs("li",{className:ne({matches:e[r]}),children:[E.jsxs(Ue,{children:[n.formatMessage({id:`${Pn}rule_label`})," "]}),E.jsx("span",{children:n.formatMessage({id:`${Pn}rule_${o_[r]}`})}),!e[r]&&E.jsxs(Ue,{element:"strong",children:[" "," ",n.formatMessage({id:`${Pn}notMet`})]})]},`rule-${r}`))})]})},s_=j.memo(a_);const c_=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:s=()=>{}},className:o="",hasLoaded:l=!1})=>{const i=ue.useIntl(),[u,c]=j.useState({setUp:!1,id:null,rating:null,disabled:!0}),a=async()=>{try{const S=await n();c(v=>({...v,setUp:!0,id:S&&S.id,disabled:!1}))}catch(S){c(v=>({...v,setUp:!0,disabled:!0})),s(S)}};if(j.useEffect(()=>{l&&!u.setUp&&a()},[l]),!l)return E.jsx(st,{className:"rating-placeholder"});const{id:d,rating:f,disabled:p}=u,h="ratings_",y={text:i.formatMessage({id:`${h}text`}),low:i.formatMessage({id:`${h}low`}),high:i.formatMessage({id:`${h}high`}),success:i.formatMessage({id:`${h}success`}),...e},_=async S=>{if(!(!d||p))try{c(v=>({...v,rating:S,disabled:!0})),await r({id:d,value:S})}catch(v){c(w=>({...w,rating:null})),s(v)}finally{c(v=>({...v,disabled:!1}))}};return E.jsxs("div",{className:ne("rating",o),children:[E.jsx("span",{className:"label",children:y[f?"success":"text"]}),E.jsx("ol",{children:Array.from(new Array(t).keys()).map(S=>{const v=S+1;return E.jsx("li",{className:ne({selected:f&&v<=f}),children:E.jsx(xe,{variant:"tertiary",size:"small",icon:{icon:`star${!f||v>f?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${i.formatMessage({id:`${h}stars`},{number:v,total:t})}${v===1||v===t?` - ${y[v===1?"low":"high"]}`:""}`,onClick:w=>{w.preventDefault(),w.stopPropagation(),_(v)},disabled:p})},`rating-${v}`)})})]})};const zf=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:s="search-bar",gtmEvent:o="form-submission"})=>{const{searchIsOpen:l=!0,isDesktopVersion:i=!1}=n||{},u=ue.useIntl(),c=j.useRef(null);jt(()=>{!n||i||!l||c.current&&c.current.focus()},[l]);const a=d=>{d.preventDefault(),d.stopPropagation(),!(!c.current||!c.current.value||c.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(c.current.value)}`)};return E.jsx("form",{onSubmit:a,className:ne("search-form gtm-trackable",t),"data-gtm-event-context":s,"data-gtm-event-type":o,children:E.jsx("fieldset",{id:`${e}-form`,hidden:n?!l:!1,role:"search",children:E.jsxs("p",{children:[E.jsx(Ue,{element:"label",htmlFor:e,children:u.formatMessage({id:"search_label"})}),E.jsx("input",{ref:c,type:"search",id:e,name:e,defaultValue:r,placeholder:u.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&a(d)}}),E.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current&&c.current.value&&(c.current.value="")},children:E.jsx(Ue,{children:u.formatMessage({id:"search_clear"})})}),E.jsx("button",{className:"search",onClick:a,children:E.jsx(Ue,{children:u.formatMessage({id:"search_cta"})})})]})})})};var Yf={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.isEmail=void 0;const u_={requireTld:!0,allowUnderscores:!1,allowTrailingDot:!1},l_={allowDisplayName:!1,requireDisplayName:!1,allowUtf8LocalPart:!0,requireTld:!0},f_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,d_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p_=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,m_=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;function Su(e,t){let n=0,r;const s=encodeURI(e).split(/%..|./).length-1;return t&&(n=Number(t.min)||0,r=Number(t.max)),s>=n&&(typeof r>"u"||s<=r)}function g_(e,t){t=Object.assign(Object.assign({},u_),t),t.allowTrailingDot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1));const n=e.split(".");if(t.requireTld){const r=""+n.pop();if(!n.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(r)||/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(r))return!1}for(let r,s=0;s<n.length;s++)if(r=n[s],t.allowUnderscores&&(r=r.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(r)||/[\uff01-\uff5e]/.test(r)||r[0]==="-"||r[r.length-1]==="-")return!1;return!0}function y_(e,t){if(t=Object.assign(Object.assign({},l_),t),t.requireDisplayName||t.allowDisplayName){const u=e.match(f_);if(u)e=u[1];else if(t.requireDisplayName)return!1}const n=e.split("@"),r=""+n.pop(),s=r.toLowerCase();let o=n.join("@");if((s==="gmail.com"||s==="googlemail.com")&&(o=o.replace(/\./g,"").toLowerCase()),!Su(o,{max:64})||!Su(r,{max:254})||!g_(r,{requireTld:t.requireTld}))return!1;if(o[0]==='"')return o=o.slice(1,o.length-1),t.allowUtf8LocalPart?m_.test(o):p_.test(o);const l=t.allowUtf8LocalPart?h_:d_,i=o.split(".");for(let u=0;u<i.length;u++)if(!l.test(i[u]))return!1;return!0}Kr.isEmail=y_;var Jn={},v_=ce&&ce.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),__=ce&&ce.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E_=ce&&ce.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&v_(t,e,n);return __(t,e),t},Lr=ce&&ce.__awaiter||function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function i(a){try{c(r.next(a))}catch(d){l(d)}}function u(a){try{c(r.throw(a))}catch(d){l(d)}}function c(a){a.done?o(a.value):s(a.value).then(i,u)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReactMultiEmail=void 0;const Pe=E_(j),Kf=Kr,w_=e=>typeof e>"u"?[]:e.filter(n=>(0,Kf.isEmail)(n));function b_(e){const{id:t,style:n,className:r="",noClass:s,placeholder:o,autoFocus:l,allowDisplayName:i=!1,stripDisplayName:u=!1,allowDuplicate:c=!1,delimiter:a=`[${i?"":" "},;]`,initialInputValue:d="",inputClassName:f,autoComplete:p,getLabel:h,enable:y,onDisabled:_,validateEmail:S,onChange:v,onChangeInput:w,onFocus:x,onBlur:O,onKeyDown:F,onKeyUp:D,spinner:R,disableOnBlurValidation:W=!1}=e,V=Pe.useRef(null),[L,U]=Pe.useState(!1),[$,K]=Pe.useState([]),[Q,C]=Pe.useState(d),[q,Y]=Pe.useState(!1),oe=Pe.useCallback((te,we)=>Lr(this,void 0,void 0,function*(){var Ne;const $e=[];let Fe="";const tt=new RegExp(a,"g"),Ge=S||Kf.isEmail,qe=Ve=>{if(!c){for(let ve=0,je=$.length;ve<je;ve++)if($[ve]===Ve)return!1}return $e.push(Ve),!0};if(te!=="")if(tt.test(te)){const ve=[...new Set(te.split(tt).filter(je=>je))];do{const je=Ge(""+ve[0].trim());if(typeof je=="boolean")if(je)qe(""+ve.shift());else if(i)if(Ge(""+ve[0].trim(),{allowDisplayName:i})){const rt=u?(Ne=ve.shift())===null||Ne===void 0?void 0:Ne.split("<")[1].split(">")[0]:ve.shift();qe(""+rt)}else ve.length===1?Fe=""+ve.shift():ve.shift();else Fe=""+ve.shift();else Y(!0),(yield S==null?void 0:S(te))===!0?(qe(""+ve.shift()),Y(!1)):ve.length===1?Fe=""+ve.shift():ve.shift()}while(ve.length)}else{if(y&&!y({emailCnt:$.length})){_==null||_();return}if(we){const Ve=Ge(te);if(typeof Ve=="boolean")if(Ve)qe(te);else if(i)if(Ge(te,{allowDisplayName:i})){const je=u?te.split("<")[1].split(">")[0]:te;qe(je)}else Fe=te;else Fe=te;else Y(!0),(yield S==null?void 0:S(te))===!0?(qe(te),Y(!1)):Fe=te}else Fe=te}K([...$,...$e]),C(Fe),$e.length&&(v==null||v([...$,...$e])),Fe!==Fe&&(w==null||w(Fe))}),[i,c,a,$,y,v,w,_,u,S]),ee=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){yield oe(te),w==null||w(te)}),[oe,w]),G=Pe.useCallback((te,we)=>{if(we)return;const Ne=[...$.slice(0,te),...$.slice(te+1)];K(Ne),v==null||v(Ne)},[$,v]),Z=Pe.useCallback(te=>{switch(F==null||F(te),te.key){case"Enter":te.preventDefault();break;case"Backspace":te.currentTarget.value||G($.length-1,!1);break}},[$.length,F,G]),ae=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){switch(D==null||D(te),te.key){case"Enter":yield oe(te.currentTarget.value,!0);break}}),[oe,D]),Oe=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){return yield ee(te.currentTarget.value)}),[ee]),ie=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){U(!1),W||(yield oe(te.currentTarget.value,!0)),O==null||O()}),[W,oe,O]),re=Pe.useCallback(()=>{U(!0),x==null||x()},[x]);return Pe.useEffect(()=>{K(w_(e.emails))},[e.emails]),Pe.createElement("div",{className:`${r} ${s?"":"react-multi-email"} ${L?"focused":""} ${Q===""&&$.length===0?"empty":""}`,style:n,onClick:()=>{var te;return(te=V.current)===null||te===void 0?void 0:te.focus()}},q&&(R==null?void 0:R()),o?Pe.createElement("span",{"data-placeholder":!0},o):null,Pe.createElement("div",{className:"data-labels",style:{opacity:q?.45:1,display:"contents",flexWrap:"inherit"}},$.map((te,we)=>h(te,we,G))),Pe.createElement("input",{id:t,style:{opacity:q?.45:1},ref:V,type:"text",value:Q,onFocus:re,onBlur:ie,onChange:Oe,onKeyDown:Z,onKeyUp:ae,autoFocus:l,className:f,autoComplete:p}))}Jn.ReactMultiEmail=b_;(function(e){var t=ce&&ce.__createBinding||(Object.create?function(r,s,o,l){l===void 0&&(l=o);var i=Object.getOwnPropertyDescriptor(s,o);(!i||("get"in i?!s.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,l,i)}:function(r,s,o,l){l===void 0&&(l=o),r[l]=s[o]}),n=ce&&ce.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kr,e),n(Jn,e)})(Yf);const Jf=({title:e,label:t,ctaMessage:n,titleColor:r,labelColor:s,backgroundColor:o,onClose:l,reportError:i,sendInvites:u,initialFormStatus:c="NOT_SUBMITTED"})=>{const[a,d]=j.useState([]),[f,p]=j.useState(!0),[h,y]=j.useState(c),{formatMessage:_}=ue.useIntl(),S=async x=>{x.preventDefault();try{await u(a),d([]),y("SUCCESS")}catch(O){y("ERROR"),i(O)}},v=x=>{x.preventDefault(),y("NOT_SUBMITTED"),p(!0),d([])},w=x=>{x.preventDefault(),l(),y("CLOSED")};return h==="CLOSED"?null:h==="ERROR"||h==="SUCCESS"?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"content centred",children:h==="SUCCESS"?E.jsx("h2",{className:"success-title",children:_({id:"inviteForm_success"})}):E.jsxs("h2",{className:"error-title",children:[" ",_({id:"inviteForm_error"})]})}),E.jsx(Jt,{}),E.jsx("div",{className:"footer",children:h==="SUCCESS"?E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"secondary",onClick:v,children:_({id:"inviteForm_ctaSendMoreInvites"})}),E.jsx(xe,{onClick:w,children:_({id:"inviteForm_ctaDone"})})]}):E.jsx(xe,{onClick:v,children:_({id:"inviteForm_ctaTryAgain"})})})]}):E.jsxs("form",{style:{backgroundColor:o},onSubmit:S,className:ne("invite-form gtm-trackable"),children:[E.jsxs("fieldset",{className:"content",children:[E.jsx("h2",{className:"title",style:{color:r},children:e}),E.jsx("label",{htmlFor:"email-input",className:"label",style:{color:s},children:t}),E.jsx(Yf.ReactMultiEmail,{id:"email-input",inputClassName:"email-input input",placeholder:_({id:"inviteForm_email_placeholder"}),emails:a,onChange:x=>{d(x),p(!x.length)},autoFocus:!1,getLabel:(x,O,F)=>E.jsxs("div",{className:"email text-medium",children:[E.jsx("div",{"data-tag-item":!0,children:x}),E.jsx(xe,{variant:"tertiary",size:"small",icon:{icon:"close"},onClick:()=>{F(O),p(!a.length)},className:"remove-email-button",screenreaderText:_({id:"overlay_close"})})]},O)})]}),E.jsx(Jt,{}),E.jsx("fieldset",{className:"footer",children:E.jsx(xe,{className:"sendEmailsButton",disabled:f,children:n})})]})},Ee={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=o=>{const l=`logged${e?"In":"Out"}`;return t>=n[o][l]};let s={};return["navigation","search"].forEach(o=>{s[o]=r(o)}),s},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(s=>s===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const s=Date.now();if(!t&&Ee.handlerCalled[e]&&s-Ee.handlerCalled[e]<500)return;Ee.handlerCalled[e]=s;let o=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(l=>{l===e||n[l]===!1||o.push({type:`menus.${l}`,value:!1})}),r(o)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const s=xu(e[r],t);if(!(typeof s>"u")&&(!n||s[t]&&s[t].includes(n)||s.value&&s.value.includes(n)||s.toString().includes(n)))return e[r]}return e[0].children?Ee.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:s})=>{if(!t.current||!t.current.children)return;const o=n?"desktop":"default";if(r[e][o]){r[e][o].focus();return}let l,i;switch(e){case"navigation":if(n){const u=Ee.findFirstChild(t.current.children,"attributes.aria-controls","navigation");l=Ee.findFirstChild(u.children,"href")}else l=Ee.findFirstChild(t.current.children,"href");l||(l=t.current);break;case"account":if(i=Ee.findFirstChild(t.current.children,"className","account"),!i||!i.children)return;l=Ee.findFirstChild(i.children,"href");break;default:return}l&&(s([{type:`focusElements.${e}.${o}`,value:l}]),l.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Ee.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Ee.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Ee.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Ee.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Br={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"}}}},Hn=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:s=()=>{},doTrack:o=null})=>{const l=ue.useIntl(),i=xu(Br,e);if(!i||i.onlyShow&&(i.onlyShow==="logged-in"&&!t||i.onlyShow==="logged-out"&&t))return null;const u="doTrack"in i,c=o===null?u?i.doTrack:!0:o,a=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;i.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let f=!1;if(i.href){let v=i.gtmType||`${e}-click`;if(v.includes(".")){const w=v.split("."),x=w[w.length-2];v=`${x==="topics"?`${x}-`:""}${w[w.length-1]}`}f={href:i.href,role:"menuitem"},c&&(f={...f,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),a&&(f={...f,variant:"secondary",size:{mobile:"small",881:"large"},...i.props||{}})}const p=i.order&&i.order[0]&&i[i.order[0]],h=p&&i[i.order[0]].order,y=f&&window.location.pathname===i.href;let _={},S={};if(p){const v=i.menuId||e,w={onClick:x=>Ee.events.onClick(x,{id:v,callback:s,isOpen:r[v]}),onFocus:()=>Ee.events.onFocus({id:v}),onBlur:()=>Ee.events.onBlur({id:v,callback:s}),onMouseLeave:()=>Ee.events.onBlur({id:v,callback:s}),onMouseEnter:()=>Ee.events.onMouseEnter({id:v,callback:s})};n&&(h&&(_={...w,onKeyPress:x=>{x.key==="Enter"&&Ee.events.onClick(x,{id:v,callback:s,isOpen:r[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[v],"aria-controls":v}),S={hidden:v in r?!r[v]:!0}),h||(S={...S,...w})}return E.jsxs("li",{className:ne({[i.className]:i.className,"has-submenu":p,parent:h,active:y}),role:"none",..._,children:[f?j.createElement(a?xe:"a",f,l.formatMessage({id:d})):l.formatMessage({id:d}),i.order&&E.jsx("ul",{...S,children:i.order.map(v=>{if(!i[v])return null;const w={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:s,doTrack:u?c:null};return i[v].order?E.jsxs("li",{className:ne({[i[v].className]:i[v].className}),children:[l.formatMessage({id:`${d}_${v}`}),E.jsx("ul",{children:i[v].order.map(x=>E.jsx(Hn,{id:`${e}.${v}.${x}`,...w},x))})]},v):E.jsx(Hn,{id:`${e}.${v}`,...w},v)})})]},e)};const S_={height:67,height_desktop:83},Ra=()=>{const e=ue.useIntl(),t=j.useContext(yt),n=Vr(!0,!0),r=t&&typeof t.id=="string",s=j.useMemo(()=>Ee.getIsDesktopVersion(r,n),[r,n]),[o,l]=j.useReducer(vv,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:i,menus:u,focusElements:c}=o;Of({scrollPosition:S_[`height${s.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!s&&u.navigation||Ee.shouldChangeHeaderIsVisible(!0,u,l)},scrollDown:()=>{!s&&u.navigation||Ee.shouldChangeHeaderIsVisible(!1,u,l)}}});const a=(f,p)=>{Ee.handleMenus({id:f,value:p,menus:u,dispatch:l})},d=j.useRef(null);return jt(()=>{u.navigation&&Ee.autoFocus({menu:"navigation",navigationRef:d,isDesktopVersion:s.navigation,focusElements:c,dispatch:l})},[u.navigation]),jt(()=>{u.account&&Ee.autoFocus({menu:"account",navigationRef:d,isDesktopVersion:s.navigation,focusElements:c,dispatch:l})},[u.account]),t&&t.isLoading?null:E.jsxs(E.Fragment,{children:[E.jsxs("nav",{id:"header",className:ne({"logged-in":r,"logged-out":!r,visible:i}),children:[E.jsx(Ue,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),E.jsx(xa,{}),!s.navigation&&E.jsx("button",{className:"menu-button gtm-trackable",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("navigation",!u.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":u.navigation,"aria-controls":"navigation",children:E.jsx(Ue,{children:e.formatMessage({id:`header_menu_${u.navigation?"hide":"show"}`})})}),E.jsx("ul",{ref:d,id:"navigation",hidden:s.navigation||u.account?!1:!u.navigation,role:"menu","data-showing":!s.navigation&&u.account?"account":"default",children:Br.order.map(f=>E.jsx(Hn,{id:f,isLoggedIn:r,isDesktopVersion:s.navigation,menus:{navigation:u.navigation,account:u.account},callback:a},f))}),!s.search&&E.jsx("button",{className:"search toggle-search-button",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("search",!u.search)},"aria-haspopup":"true","aria-expanded":u.search,"aria-controls":"search-form",children:E.jsx(Ue,{children:e.formatMessage({id:`header_search_${u.search?"hide":"show"}`})})}),E.jsx(zf,{id:"global-search",handleToggle:{searchIsOpen:u.search,isDesktopVersion:s.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?E.jsxs("button",{className:"account-button",onClick:f=>Ee.events.onClick(f,{id:"account",callback:a,isOpen:u.account}),onMouseEnter:()=>Ee.events.onMouseEnter({id:"account",callback:a}),onMouseLeave:()=>Ee.events.onBlur({id:"account",callback:a}),"aria-haspopup":"true","aria-expanded":u.account,"aria-controls":"navigation",children:[E.jsx(Ue,{children:e.formatMessage({id:`header_account_${u.account?"hide":"show"}`})}),E.jsx(Yn,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):E.jsx("ul",{className:"sign-in-buttons",children:Br.buttons.order.map(f=>E.jsx(Hn,{id:`buttons.${f}`},f))})]}),E.jsx("hr",{id:"content-of-page"}),E.jsx("div",{className:ne("overlay",{open:u.navigation||u.account||!s.search&&u.search})})]})};const O_=()=>{const e=ue.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Ra,{}),E.jsx("div",{className:"content",children:E.jsx(Yr,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),E.jsx(Aa,{})]})},T_=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:s="",locale:o="en"})=>{const l=Ru();j.useEffect(()=>{window.scrollTo(0,0)},[l]);const i=Af(e,{locale:o});return E.jsx(hp.ErrorBoundary,{onError:t,fallback:E.jsx(O_,{}),children:E.jsx(j.Suspense,{fallback:E.jsx(jf,{layout:"overview-page"}),children:E.jsx("div",{id:"wrapper",className:ne(s,{[r]:r!=="default"}),children:E.jsxs(ia.CookiesProvider,{children:[E.jsx(Ra,{}),E.jsx("div",{className:"content",children:i}),n&&E.jsx(Aa,{}),E.jsx(Wf,{})]})})})})},Ou={default:"tags_",headerTopics:"header_topics_topics_"},Do={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"},x_={getTagDetails:e=>{if(e.includes("topic_")){if(e=Do.topic[e.replace("topic_","")],e){const t=Br.topics.topics[e].href;return t?{id:e,href:t,text:`${Ou.headerTopics}${e}`}:null}return null}return Do[e]?(e=Do[e],{id:e,text:`${Ou.default}${e}`}):null}};const A_=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:s="",gtmType:o="tag-click",gtmContext:l="tags"})=>{const i=ue.useIntl();if(!e||e.length<1)return null;const u=[];return e.forEach(c=>{if(!c)return;const a=x_.getTagDetails(c);a&&u.push(a)}),u.length<1?null:E.jsx("ul",{className:ne("tags text-small",t,s,{"one-line":n}),children:u.map(c=>{const a=i.formatMessage({id:c.text});return E.jsx("li",{children:c.href&&r?E.jsx("a",{href:c.href,className:"gtm-trackable","data-gtm-event-type":o,"data-gtm-event-context":l,children:a}):a},c.id)})})};const R_=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:s="member-click",className:o=""})=>{const l=ue.useIntl();return t.length===0?null:(e||(e=t.length),E.jsxs("div",{className:ne("members-list",o),children:[E.jsxs("h1",{children:[l.formatMessage({id:"membersList"}),E.jsx("span",{className:"count",children:e})]}),E.jsx("ul",{children:t.map((i,u)=>E.jsxs("li",{children:[E.jsx(Kn,{member:i,gtmContext:r,gtmType:s}),i.isAdmin&&E.jsx(kf,{children:l.formatMessage({id:"membersList_admin"})})]},u))}),n&&E.jsx(qf,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};let In=null;const Ye="discussion_form_",Ca=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:s=5e4,minRows:o=4,forceShow:l={cancel:!1,error:!1},functions:i={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:u="DiscussionForm"})=>{var W,V;const c=ue.useIntl(),a=j.useContext(yt),[d,f]=j.useState(n.isEditing&&n.isEditing.text||""),[p,h]=j.useState(l.error||!1),[y,_]=j.useState(!1),S=j.useRef(null);if(r||(r=S),n.isLoading)return E.jsx(st,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const v=L=>{const U=L.target.value;f(U);let $;!a||!a.id?$=ot(c.formatMessage,`${Ye}error_loggedOut`,e.type,"action"):t?U.length>=s&&($=`${Ye}error_tooLong`):$=ot(c.formatMessage,`${Ye}error_noPermission`,e.type,"action"),$?h($):p&&h(!1)};let w=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const L=e.type==="response"?((W=e.slugs)==null?void 0:W.question)||"":((V=e.slugs)==null?void 0:V.answer)||"";L&&(w=`${w}-${L.slice(-15)}`)}const x=async L=>{var $;if(L.preventDefault(),L.stopPropagation(),!a||!a.id||!t||F)return;In&&clearTimeout(In),_("submitting");const U=window.location.pathname;try{let K;switch(e.type){case"post":K=await i.create({content:d});break;case"question":K=await i.create({title:d,authorId:a&&a.id,...($=i.props)==null?void 0:$.create});break;case"response":K=await i.create({question:e.slugs.question},{body:d,authorId:a&&a.id,contentPath:U});break;case"reply":K=await i.create({question:e.slugs.question,answer:e.slugs.answer},{body:d,authorId:a&&a.id,contentPath:U});break;default:break}await wv(1e3),i.callback&&await i.callback(K),In=setTimeout(()=>{f(""),_("submitted"),O()},500)}catch(K){const Q=K;let C=`${Ye}error`;Q.message.includes("entry already exists")&&(C=ot(c.formatMessage,`${Ye}error_alreadyExists`,e.type,"action")),Q.message.includes("429")?C=ot(c.formatMessage,`${Ye}error_tooMany`,e.type,"action"):Q.message.includes("400")&&(C=`${Ye}error`),h(C),O()}},O=()=>{In=setTimeout(()=>{h(!1),_(!1)},5e3)},F=!d||!Av(d),D=y==="submitting",R=[];return(n.isEditing&&!D||l.cancel)&&R.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:i.handleCancel,className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!l.cancel&&(!a||!a.id||!d),children:c.formatMessage({id:`${Ye}cancel`})}),R.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:L=>{if(n.isEditing){_("submitting"),i.handleSaveEdit&&i.handleSaveEdit(S.current&&"value"in S.current?S.current.value:"");return}x(L)},className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!a||!a.id||!t||F||D||n.isEditing&&d===n.isEditing.text,children:c.formatMessage({id:`${Ye}${D?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),E.jsxs("form",{id:w,className:ne("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&E.jsx("h2",{children:ot(c.formatMessage,`${Ye}title`,e.type,"action")}),E.jsx(Kn,{member:a||"community",gtmContext:u,gtmType:"profile-click"}),E.jsx(Ue,{element:"label",showOnFocus:!1,htmlFor:`${w}-input`,children:ot(c.formatMessage,`${Ye}label`,e.type,"action")}),E.jsx(mp,{ref:r,id:`${w}-input`,name:e.type,placeholder:ot(c.formatMessage,`${Ye}placeholder`,e.type,"action"),onChange:v,value:d,maxLength:s,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:o,autoFocus:!!n.isEditing}),E.jsx("small",{children:ot(c.formatMessage,`${Ye}explainer`,e.type,"action",{a:L=>E.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":"community-guidelines-link",rel:"noreferrer",children:L})})}),E.jsx(Qr,{buttons:R}),y==="submitted"&&E.jsx($n,{className:"success","data-testid":"success",children:ot(c.formatMessage,`${Ye}success`,e.type,"action")}),p&&E.jsx($n,{id:"error-message",className:"error","data-testid":"error",children:l.error?l.error:typeof p=="string"?p.includes(" ")?p:c.formatMessage({id:p},{action:c.formatMessage({id:`discussion_action_${e.type}`}),maxLength:s}):p})]})},Na=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:s,leave:o,notMemberStateText:l}})=>r&&!n?E.jsx(Yr,{text:l,button:{component:E.jsx(Ta,{functions:{join:s,leave:o}})}}):E.jsx(Ca,{content:{type:e,slugs:{}},functions:{create:t}}),C_={showThread:!1,showForm:!1},Pa=j.createContext(C_),N_=({children:e})=>{const[t,n]=j.useState({showThread:!1,showForm:!1});return E.jsx(Pa.Provider,{value:{...t,updateConversation:n},children:e})},P_=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),I_=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Dr=!1;const Uo=()=>{Dr!==!1&&(clearTimeout(Dr),Dr=!1)},Bo=10,Xf=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:s=!1,content:o={type:"reply",slugs:{}},canLike:l=!0,functions:{createLike:i=()=>{},deleteLike:u=()=>{}}={}})=>{const c=ue.useIntl();j.useEffect(()=>{p(s)},[s]);const[a,d]=j.useState(t),[f,p]=j.useState(s),[h,y]=j.useState(!1),[_,S]=j.useState(!1),v=j.useMemo(()=>I_(n,Bo),[n]),w=O=>{if(O.preventDefault(),O.stopPropagation(),S(!1),Dr)return Uo(),!1;if(Uo(),h||!l)return!1;Dr=setTimeout(x,350)},x=async()=>{if(Uo(),h||!l)return!1;let O=f?a-1:a+1;O<0&&(O=0),y(!0),d(O),p(!f);try{if(o&&o.slugs){const F=P_(o.slugs);f?await u(F):await i(F,{contentPath:window.location.pathname})}}catch{d(t),p(s)}finally{y(!1)}};return j.createElement(e,{className:ne("likes-wrapper text-medium action-button",{"show-spinner":h,"is-liked":f,disabled:!l}),onClick:w,onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},children:E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:f?"heart":"heart_empty",animate:"bounce"},className:ne({"do-animation":f&&!s}),screenreaderText:l?c.formatMessage({id:`discussion_likes_${f?"unlike":"like"}`},{action:c.formatMessage({id:`discussion_action_${o.type}`})}):!1,onClick:w,disabled:!l,"aria-hidden":!l,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),E.jsx("span",{className:ne("number-of-likes",{"no-likes":a===0}),"data-testid":"number-of-likes",children:c.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:a})}),n&&E.jsx(Cf,{isOpen:_,isLoading:n.length===0,children:n.length&&E.jsxs("ul",{children:[v.map(O=>typeof O=="string"||!O.name?null:E.jsx("li",{children:E.jsx(zr,{href:O.id?`/profiles/${O.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:O.name})},O.id||window.btoa(O.name))),n.length>Bo&&E.jsx("li",{children:c.formatMessage({id:"discussion_likes_more"},{number:n.length-Bo})})]})})]})})};const Zf=({element:e="section",children:t,className:n,...r})=>j.createElement(e,{className:ne("modal",n),children:typeof t=="string"?E.jsx("p",{children:t}):t,...r});const Ia=({id:e="content-overlay",isOpen:t=!1,showDivider:n=!0,maxWidth:r,functions:{onOpen:s=()=>{},onClose:o=()=>{}}={},forceShow:{error:l=!1}={},title:i,children:u,buttons:c,className:a="",gtmContext:d="Modal"})=>{const f=ue.useIntl(),[p,h]=j.useState(t),y=S=>{h(S),S?(s(),document.body.classList.add("has-overlay")):(o(),document.body.classList.remove("has-overlay"))};j.useEffect(()=>{y(t)},[t]);const _=r?{"--max-width":`${r/16}rem`}:{};return E.jsx("div",{className:ne("overlay",{open:p}),children:E.jsx(Zf,{id:e,className:ne("overlay-modal",a,{"has-max-width":r}),hidden:!p,style:_,children:t&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"top",children:[i&&E.jsx("h2",{className:"modal-title",children:i}),E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>y(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":d,screenreaderText:f.formatMessage({id:"overlay_close"})})]}),n&&E.jsx(Jt,{}),u,c&&E.jsxs("div",{className:"bottom",children:[E.jsx(Jt,{}),E.jsx(Qr,{buttons:c})]}),l&&E.jsx($n,{className:"error",children:l})]})})})},ed=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const k_=({className:e,showModal:t=!0,title:n,formTitle:r="Know someone who might like to join this workshop?",formLabel:s="Send an invitation to your colleagues below",ctaMessage:o="Send invites",showIcon:l,onClose:i,reportError:u=()=>{},sendInvites:c})=>E.jsx(Ia,{title:n,isOpen:t,showDivider:!1,showIcon:l,className:ne("invite-modal",e,{success:!!n}),children:E.jsx(Jf,{title:r,label:s,ctaMessage:o,onClose:i,sendInvites:c,reportError:u})}),Tu=e=>{const t={};return Object.keys(e).forEach(n=>n.includes("Id")?t[n]=e[n]:t[`${n}Slug`]=e[n]),t};const pt="discussion_",Xn=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:s,functions:{content:{createContent:o,deleteContent:l,updateContent:i}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:u,deleteLike:c}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:a}={openComments:()=>{}}},links:d={},className:f,gtmContext:p="DiscussionAnswer",children:h})=>{const y=ue.useIntl(),_=j.useContext(yt),S=j.useContext(Pa),[v,w]=j.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[x,O]=j.useState(!1),[F,D]=j.useState("");if(j.useEffect(()=>{w({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return E.jsx(st,{className:"discussion-card discussion-post"});const{author:R,canLike:W,createdAt:V,id:L,likes:U=0,userLiked:$,comments:K=0}=t,Q=_&&_.id&&typeof R!="string"&&R.id&&R.id===_.id||!1,C=typeof W=="boolean"?W:n?!Q:!1,q=async G=>{G||(G=""),D("");try{if(!gp(G,v.body)){const Z=t.type==="question"?{title:G}:{body:G};await i(Tu(t.slugs),Z)}w({body:G,isEditing:!1,didEdit:!0})}catch{D(`${pt}form_error`)}},Y=()=>{S&&S.updateConversation&&S.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const Z=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,ae=document.getElementById(Z),Oe=document.getElementById(`${Z}-input`);Oe&&Oe.focus(),ae&&ae.scrollIntoView({behavior:"smooth"})},0)},oe=()=>{try{l(Tu(t.slugs))}catch{D("delete-error")}},ee=[{text:y.formatMessage({id:`${pt}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(y.formatMessage({id:`${pt}report_subject`}))}&body=${encodeURI(y.formatMessage({id:`${pt}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&Q&&ee.push({text:y.formatMessage({id:`${pt}moreMenu_edit`}),onClick:()=>w({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`edit-${t.type}-click`},{text:y.formatMessage({id:`${pt}moreMenu_delete`}),onClick:G=>{G.preventDefault(),G.stopPropagation(),O(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`delete-${t.type}-click`,...ed(`delete-${t.slug}-modal`,x)}),j.createElement(e,{className:ne("discussion-post",f),"data-testid":`discussion-${t.type}-thread`,children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{id:L||t.slug,className:ne("discussion-card",t.type,{editing:v.isEditing,"has-link":d.post&&!v.isEditing}),onClick:G=>{!d.post||v.isEditing||(G.preventDefault(),G.stopPropagation(),window.location.href=d.post)},children:[!v.isEditing&&E.jsx(Kn,{member:R,additionalContent:{createdAt:V,didEdit:v.didEdit},className:typeof R!="string"&&R.id===s?"highlighted":"",gtmContext:p,gtmType:"profile-click"}),v.isEditing?E.jsx(Ca,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:F!==""&&F!=="delete-error"?y.formatMessage({id:F},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:q,handleCancel:()=>{D(""),w({...v,isEditing:!1})}},gtmContext:`${p}Form`}):d.post?E.jsx("a",{href:d.post,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":"title-click",children:E.jsx(ra,{options:{overrides:{a:If}},children:v.body})}):E.jsx(ra,{options:{wrapper:t.type==="question"?"h1":j.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&E.jsxs("ul",{className:ne("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[E.jsx(Xf,{element:"li",likes:U,isShort:!1,userLiked:$,content:{type:t.type,slugs:t.slugs},canLike:C,functions:{createLike:u,deleteLike:c}}),(["question","post"].includes(t.type)||d.comments||typeof a=="function")&&E.jsxs("li",{className:"action-button",onClick:G=>{G.preventDefault(),G.stopPropagation(),d.comments&&(window.location.href=d.comments),typeof a=="function"&&a()},children:[E.jsx(xe,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:d.comments?d.comments:!1,onClick:d.comments||typeof a!="function"?!1:a,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:y.formatMessage({id:`${pt}comments_screenReader`},{count:K})}),E.jsx("span",{children:y.formatMessage({id:`${pt}comments`},{count:K})})]}),(t.type==="answer"||t.type==="reply")&&E.jsx("li",{children:E.jsx(xe,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:Y,children:y.formatMessage({id:`${pt}reply`})})}),E.jsx(Hf,{element:"li",id:`more-${t.slug}`,options:ee})]})]}),h,E.jsx(Ia,{id:`delete-${t.slug}-modal`,isOpen:x,functions:{onOpen:()=>{},onClose:()=>O(!1)},forceShow:{error:F==="delete-error"?y.formatMessage({id:"discussion_delete_error"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:y.formatMessage({id:"discussion_delete_title"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>O(!1),children:y.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:oe,children:y.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:E.jsx(ue.FormattedMessage,{id:"discussion_delete_text",values:{p:G=>E.jsx("p",{children:G}),action:y.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const $o="discussion_responses_",L_=({type:e="answer",responses:t=0})=>{const n=ue.useIntl();return E.jsxs("div",{className:"responses-heading",children:[E.jsx("h3",{children:n.formatMessage({id:`${$o}title`},{action:n.formatMessage({id:`${$o}${e}`}),count:t})}),t===0&&E.jsx("p",{children:ot(n.formatMessage,`${$o}empty`,e,e)})]})};const F_=({isOpen:e=!1,count:t=0,children:n})=>{const r=ue.useIntl(),s=j.useRef(null),[o,l]=j.useState(e),[i,u]=j.useState("closed");j.useEffect(()=>{const f=s.current;if(f)return f.addEventListener("transitionend",c),()=>{f.removeEventListener("transitionend",c)}},[]),jt(()=>{i==="closed"&&!o||u(["opening","open"].includes(i)?"ready-to-close":"opening")},[o]),j.useEffect(()=>{i==="ready-to-close"&&u("closing")},[i]);const c=({propertyName:f})=>{f==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)},a=["opening","open"].includes(i),d=Af(n,{element:"li"});return E.jsxs("div",{className:"thread-wrapper",children:[E.jsx(xe,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${a?"left":"right"}`},onClick:()=>{l(!o)},children:r.formatMessage({id:`discussion_thread_${a?"hide":"show"}`},{count:t})}),E.jsx("ul",{ref:s,className:ne("thread",i),hidden:!o,children:d})]})},j_=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),M_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:i})=>{if(!n)return;const u=j_({user:n,content:i,verb:"post"});await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return e.setQueryData(t,a=>[...a,u]),{previousActivities:c}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),D_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>((a==null?void 0:a.id)===(l==null?void 0:l.activityId)&&(a.content=i),a));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),U_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:i})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>{var d;return(a==null?void 0:a.id)===i&&((d=a.reaction_counts)!=null&&d.like?a.reaction_counts.like+=1:a.reaction_counts.like=1),a});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:i=>{const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>((a==null?void 0:a.id)===(i==null?void 0:i.activity_id)&&(a.latest_reactions.like?a.latest_reactions.like.push(i):a.latest_reactions.like=[i]),a));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:u}},onSettled:(i,u,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),B_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:u})=>{await e.cancelQueries({queryKey:t});const c=e.getQueryData(t),a=c==null?void 0:c.map(d=>{var f;return(d==null?void 0:d.id)===u&&(f=d.reaction_counts)!=null&&f.like&&(d.reaction_counts.like-=1),d});return e.setQueryData(t,()=>a&&[...a]),{previousActivities:a}},onError:(u,c,a)=>{e.setQueryData(t,a.previousActivities)},onSuccess:(u,{activityId:c})=>{const a=e.getQueryData(t),d=a==null?void 0:a.map(f=>{var p,h,y,_;if(f.id===c){const S=(y=(h=(p=f.latest_reactions)==null?void 0:p.like)==null?void 0:h.find(v=>v.user_id===(n==null?void 0:n.id)))==null?void 0:y.id;return f.latest_reactions.like=(_=f.latest_reactions.like)==null?void 0:_.filter(v=>v.id!==S),f}else return f});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:a}},onSettled:(u,c,a)=>{e.invalidateQueries({queryKey:[...t,a.activityId]})}}),$_=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:s,edit:o,like:l,unlike:i,join:u,leave:c}})=>{const a=ue.useIntl(),d=Le.useQueryClient(),f=j.useContext(yt),{data:p,error:h,isLoading:y,isFetching:_}=Le.useQuery({queryKey:[e,t],queryFn:r}),S=M_({queryClient:d,queryKey:[e,t],user:f,mutationFn:s}),{mutate:v}=Le.useMutation(S),w=D_({queryClient:d,queryKey:[e,t],mutationFn:async L=>await o(L)}),{mutate:x}=Le.useMutation(w),O=U_({queryClient:d,queryKey:[e,t],mutationFn:l}),{mutate:F}=Le.useMutation(O),D=B_({queryClient:d,queryKey:[e,t],user:f,mutationFn:async({activityId:L})=>{var K,Q,C;const U=p&&(p==null?void 0:p.find(q=>q.id===L)),$=(C=(Q=(K=U==null?void 0:U.latest_reactions)==null?void 0:K.like)==null?void 0:Q.find(q=>q.user_id===(f==null?void 0:f.id)))==null?void 0:C.id;await i({reactionId:$||"",activityId:L})}}),{mutate:R}=Le.useMutation(D),W=j.useCallback(({activityId:L})=>F({activityId:L}),[F]),V=j.useCallback(({activityId:L})=>R({activityId:L}),[R]);return h?E.jsx(Yr,{variant:"error",text:h.message}):y?E.jsx(st,{style:{height:"400px"}}):E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:n,required:!0,join:u,leave:c,notMemberStateText:a.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(p)&&(p==null?void 0:p.map(L=>{var U,$,K,Q,C,q,Y,oe,ee,G,Z;return E.jsx(Xn,{content:{type:"post",body:L==null?void 0:L.content,createdAt:(L==null?void 0:L.time)||"",slugs:{parentId:t,activityId:L==null?void 0:L.id},slug:L==null?void 0:L.id,author:{id:(U=L==null?void 0:L.actor)==null?void 0:U.id,name:(K=($=L==null?void 0:L.actor)==null?void 0:$.data)==null?void 0:K.name,organization:(C=(Q=L==null?void 0:L.actor)==null?void 0:Q.data)==null?void 0:C.organization,jobTitle:(Y=(q=L==null?void 0:L.actor)==null?void 0:q.data)==null?void 0:Y.jobTitle,image:{thumbnail:((ee=(oe=L==null?void 0:L.actor)==null?void 0:oe.data)==null?void 0:ee.thumbnail)||void 0}},userLiked:((G=L==null?void 0:L.own_reactions)==null?void 0:G.like)&&((Z=L==null?void 0:L.own_reactions)==null?void 0:Z.like.length)>0,likes:(L==null?void 0:L.reaction_counts.like)||0,comments:(L==null?void 0:L.reaction_counts.reply)||0},links:{post:`${e}/${t}/${L==null?void 0:L.id}`,comments:`${e}/${t}/${L==null?void 0:L.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(ae,Oe)=>x({activityInfo:ae,content:Oe})},likes:{createLike:()=>{W({activityId:L==null?void 0:L.id})},deleteLike:()=>{V({activityId:L==null?void 0:L.id})}},comments:{openComments:()=>null}}},L==null?void 0:L.id)}))]})},q_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:i=>{var c;const u=e.getQueryData(t);if(u)return(c=u==null?void 0:u.latest_reactions)!=null&&c.reply?(u.latest_reactions.reply.unshift(i),u&&(u.reaction_counts={reply:u.latest_reactions.reply.length})):(u.latest_reactions={reply:[i]},u.reaction_counts={reply:1}),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),H_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyInfo:o,content:{body:l}})=>{var c,a,d;if(l.length===0)return;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);if(!i||!((c=i==null?void 0:i.latest_reactions)!=null&&c.reply))return;const u=(d=(a=i==null?void 0:i.latest_reactions)==null?void 0:a.reply)==null?void 0:d.map(f=>(f.id===o.replySlug&&(f.data.content=l),f));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}},onError:(o,l,i)=>{e.setQueryData(t,i.previousActivity)}}),W_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:l})=>{var c,a;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),u=(a=(c=i==null?void 0:i.latest_reactions)==null?void 0:c.reply)==null?void 0:a.map(d=>{var f;return d.id===l&&((f=d.children_counts)!=null&&f.like?d.children_counts.like+=1:d.children_counts={like:1}),d});return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:l=>{var c;const i=e.getQueryData(t),u=(c=i==null?void 0:i.latest_reactions.reply)==null?void 0:c.map(a=>(a.id===l.id&&(a.latest_children.like?a.latest_children.like.push(l):a.latest_children.like=[l]),a));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}}}),G_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:i})=>{var a;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);if(!u)return;const c=(a=u.latest_reactions.reply)==null?void 0:a.map(d=>(d.id===i&&d.children_counts.like&&(d.children_counts.like-=1),d));return e.setQueryData(t,()=>({...u,latest_reactions:{reply:c}})),{previousActivity:u}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:(i,{replyId:u})=>{var d;const c=e.getQueryData(t);if(!c)return;const a=(d=c.latest_reactions.reply)==null?void 0:d.map(f=>{var p;return f.id===u?(p=f.latest_children.reply)==null?void 0:p.filter(y=>y.user_id!==(n==null?void 0:n.id)):f});return e.setQueryData(t,()=>({...c,latest_reactions:{reply:a}})),{previousActivity:c}}}),td=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:s,functions:{createReply:o,editReply:l,like:i,unlike:u,join:c,leave:a}})=>{const d=ue.useIntl(),f=Le.useQueryClient(),p=j.useContext(yt),h=q_({queryClient:f,queryKey:[e,t,n],mutationFn:o}),{mutate:y}=Le.useMutation(h),_=H_({queryClient:f,queryKey:[e,t,n],mutationFn:async R=>l(R)}),{mutate:S}=Le.useMutation(_),v=W_({queryClient:f,queryKey:[e,t,n],mutationFn:i}),{mutate:w}=Le.useMutation(v),x=G_({queryClient:f,queryKey:[e,t,n],user:p,mutationFn:u}),{mutate:O}=Le.useMutation(x),F=j.useCallback(({replyId:R})=>w({replyId:R}),[w]),D=j.useCallback(({replyId:R})=>O({replyId:R}),[O]);return E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:y,membershipRequiredToPost:{isMember:s,required:!0,join:c,leave:a,notMemberStateText:d.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(R=>{var V,L,U,$,K,Q,C,q,Y,oe,ee,G,Z,ae,Oe,ie;const W=((V=R==null?void 0:R.latest_children)==null?void 0:V.like)&&((L=R==null?void 0:R.latest_children)==null?void 0:L.like.filter(re=>re.user_id===(p==null?void 0:p.id)));return E.jsx(Xn,{content:{type:"post",body:typeof R.data.content=="string"?(U=R==null?void 0:R.data)==null?void 0:U.content:((K=($=R==null?void 0:R.data)==null?void 0:$.content)==null?void 0:K.text)||"",createdAt:R==null?void 0:R.created_at,slugs:{question:`${e}/${t}/${n}`,parentId:t,reply:R==null?void 0:R.id},slug:`${e}/${t}/${n}#${R==null?void 0:R.id}`,author:{id:(Q=R==null?void 0:R.user)==null?void 0:Q.id,name:(q=(C=R==null?void 0:R.user)==null?void 0:C.data)==null?void 0:q.name,organization:(oe=(Y=R==null?void 0:R.user)==null?void 0:Y.data)==null?void 0:oe.organization,jobTitle:(G=(ee=R==null?void 0:R.user)==null?void 0:ee.data)==null?void 0:G.jobTitle,image:{thumbnail:((ae=(Z=R==null?void 0:R.user)==null?void 0:Z.data)==null?void 0:ae.thumbnail)||void 0}},userLiked:!!(W!=null&&W.length),likes:((Oe=R==null?void 0:R.children_counts)==null?void 0:Oe.like)||0,comments:((ie=R==null?void 0:R.children_counts)==null?void 0:ie.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(re,te)=>S({replyInfo:re,content:te})},likes:{createLike:()=>F({replyId:R==null?void 0:R.id}),deleteLike:()=>D({replyId:R==null?void 0:R.id})},comments:{openComments:()=>{}}}},R==null?void 0:R.id)}))]})},V_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return u&&u.id===(l==null?void 0:l.activityId)&&(u.content=i),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Q_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var u;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);return(u=i==null?void 0:i.reaction_counts)!=null&&u.like?i.reaction_counts.like+=1:i&&(i.reaction_counts={like:1}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:i=>{const u=e.getQueryData(t);return u!=null&&u.latest_reactions.like?u.latest_reactions.like.push(i):u&&(u.latest_reactions={like:[i]}),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),z_=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:s})=>({mutationFn:s,onMutate:async()=>{var a;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return(a=c==null?void 0:c.reaction_counts)!=null&&a.like&&c.reaction_counts.like>0&&(c.reaction_counts.like-=1),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onError:(c,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:()=>{var d,f,p;if(!r)return;const c=(p=(f=(d=r.latest_reactions)==null?void 0:d.like)==null?void 0:f.find(h=>h.user_id===(n==null?void 0:n.id)))==null?void 0:p.id,a=e.getQueryData(t);if(a!=null&&a.latest_reactions.like)return a.latest_reactions.like=a.latest_reactions.like.filter(h=>h.id!==c),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Y_=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:s,editActivity:o,likeActivity:l,unlikeActivity:i,createReply:u,editReply:c,likeReply:a,unlikeReply:d,join:f,leave:p}})=>{var U,$,K,Q,C,q,Y,oe,ee,G;const h=j.useContext(yt),y=Le.useQueryClient(),{data:_,error:S,isLoading:v,isFetching:w}=Le.useQuery({queryKey:[e,t,n],queryFn:s}),x=V_({queryClient:y,queryKey:[e,t,n],mutationFn:async Z=>await o(Z)}),{mutate:O}=Le.useMutation(x),F=Q_({queryClient:y,queryKey:[e,t,n],mutationFn:l}),{mutate:D}=Le.useMutation(F),R=z_({queryClient:y,queryKey:[e,t,n],user:h,mutationFn:async()=>{var ae,Oe,ie;const Z=(ie=(Oe=(ae=_==null?void 0:_.latest_reactions)==null?void 0:ae.like)==null?void 0:Oe.find(re=>re.user_id===(h==null?void 0:h.id)))==null?void 0:ie.id;await i({activityId:n,reactionId:Z})},activity:_}),{mutate:W}=Le.useMutation(R),V=j.useCallback(({activityId:Z})=>D({activityId:Z}),[D]),L=j.useCallback(async({activityId:Z})=>W({activityId:Z}),[W]);return S?E.jsx(Yr,{variant:"error",text:S.message}):v||w?E.jsx(st,{style:{height:"400px"}}):E.jsx(Xn,{content:{type:"post",body:_==null?void 0:_.content,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${n}`,parentId:t,activityId:_==null?void 0:_.id},slug:n,author:{id:(U=_==null?void 0:_.actor)==null?void 0:U.id,name:($=_==null?void 0:_.actor)==null?void 0:$.data.name,organization:(K=_==null?void 0:_.actor)==null?void 0:K.data.organization,jobTitle:(Q=_==null?void 0:_.actor)==null?void 0:Q.data.jobTitle,image:{thumbnail:((C=_==null?void 0:_.actor)==null?void 0:C.data.thumbnail)||void 0}},userLiked:((q=_==null?void 0:_.own_reactions)==null?void 0:q.like)&&((Y=_==null?void 0:_.own_reactions)==null?void 0:Y.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(oe=_==null?void 0:_.actor)==null?void 0:oe.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(Z,ae)=>O({activityInfo:Z,content:ae})},likes:{createLike:()=>V({activityId:n}),deleteLike:()=>L({activityId:n})},comments:{openComments:()=>{}}},children:E.jsxs(E.Fragment,{children:[E.jsxs("h3",{children:["Comments (",((ee=_==null?void 0:_.reaction_counts)==null?void 0:ee.reply)||0,")"]}),E.jsx(td,{basePath:e,parentId:t,activityId:n,repliesList:(G=_==null?void 0:_.latest_reactions)==null?void 0:G.reply,isMember:r,functions:{createReply:u,like:a,unlike:d,editReply:c,join:f,leave:p}})]})},n)},K_=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:s}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:s}});exports.ASSETS_BUCKET=Bn;exports.ActivitiesFeed=$_;exports.ActivitySection=Y_;exports.AddPost=Na;exports.BannerSection=Lv;exports.Breadcrumbs=Xv;exports.Button=xe;exports.ButtonWrapper=Qr;exports.CacheProvider=Uf;exports.CollapsibleSection=Sa;exports.Columns=n_;exports.CommunityDetails=Jv;exports.Contributors=Df;exports.ConversationContext=Pa;exports.CookieBanner=Wf;exports.DiscussionConversation=N_;exports.DiscussionForm=Ca;exports.DiscussionLikes=Xf;exports.DiscussionPost=Xn;exports.DiscussionThread=F_;exports.Divider=Jt;exports.DownloadSection=Nv;exports.EMAILS=Gt;exports.EmailHelperTextBox=i_;exports.EmptyStateBox=Yr;exports.Filters=Zv;exports.Footer=Aa;exports.FullWidthSection=ba;exports.GlobalProviders=Kv;exports.Header=Ra;exports.HelperTextBox=Pf;exports.HiddenFromScreenReaders=aa;exports.HideShowTextBox=Mv;exports.HighlightedTextBox=gt;exports.IntlProvider=Bf;exports.InviteForm=Jf;exports.InviteModal=k_;exports.JoinButton=Ta;exports.LanguageSwitcher=t_;exports.Link=zr;exports.LoadMore=qf;exports.LoadingBlock=Qv;exports.LoadingPlaceholder=st;exports.LoadingState=jf;exports.Logo=xa;exports.LogoSection=Pv;exports.MarkdownText=ra;exports.MarketingBox=Fv;exports.Member=Kn;exports.MembersList=R_;exports.Modal=Zf;exports.MoreMenu=Hf;exports.NUMBER_OF_USERS=jv;exports.Overlay=Ia;exports.PageLayout=T_;exports.PasswordRules=s_;exports.Pill=kf;exports.ProfilePicture=Yn;exports.ProgressBar=Lf;exports.Rating=c_;exports.RepliesFeed=td;exports.ResponsesHeading=L_;exports.ResponsiveImage=Rf;exports.SearchForm=zf;exports.Span=If;exports.StatusBanner=$n;exports.Tags=A_;exports.Tooltip=Cf;exports.UserContext=yt;exports.UserProvider=$f;exports.VisuallyHidden=Ue;exports.addAriaProps=ed;exports.getMember=Oa;exports.headerData=Br;exports.mapGetStreamData=K_;exports.useCurrentPath=Ru;exports.useEffectAfterMount=jt;exports.useFeatureFlag=mv;exports.useScreenWidth=Vr;exports.useScrollListener=Of;exports.useScrollToHash=yv;