@botpress/webchat 3.0.0 → 3.1.0

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.
@@ -1,4 +1,4 @@
1
- (function(ye,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(ye=typeof globalThis<"u"?globalThis:ye||self,A(ye.Webchat={},ye.React,ye.ReactDOM))})(this,function(ye,A,er){"use strict";var HY=Object.defineProperty;var VY=(ye,A,er)=>A in ye?HY(ye,A,{enumerable:!0,configurable:!0,writable:!0,value:er}):ye[A]=er;var fp=(ye,A,er)=>VY(ye,typeof A!="symbol"?A+"":A,er);function dp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=dp(A),pp=dp(er);var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nl={exports:{}},gi={};/**
1
+ (function(pe,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(pe=typeof globalThis<"u"?globalThis:pe||self,A(pe.Webchat={},pe.React,pe.ReactDOM))})(this,function(pe,A,er){"use strict";var fX=Object.defineProperty;var dX=(pe,A,er)=>A in pe?fX(pe,A,{enumerable:!0,configurable:!0,writable:!0,value:er}):pe[A]=er;var fE=(pe,A,er)=>dX(pe,typeof A!="symbol"?A+"":A,er);function pp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=pp(A),hp=pp(er);var Xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var il={exports:{}},yi={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var hp;function J0(){if(hp)return gi;hp=1;var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var c,f={},p=null,d=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return gi.Fragment=n,gi.jsx=a,gi.jsxs=a,gi}var yi={};/**
9
+ */var vp;function dE(){if(vp)return yi;vp=1;var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var c,f={},p=null,d=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return yi.Fragment=n,yi.jsx=a,yi.jsxs=a,yi}var bi={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,197 +14,212 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var vp;function Z0(){return vp||(vp=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function g(P){if(P===null||typeof P!="object")return null;var te=v&&P[v]||P[h];return typeof te=="function"?te:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(P){{for(var te=arguments.length,ue=new Array(te>1?te-1:0),he=1;he<te;he++)ue[he-1]=arguments[he];x("error",P,ue)}}function x(P,te,ue){{var he=m.ReactDebugCurrentFrame,Me=he.getStackAddendum();Me!==""&&(te+="%s",ue=ue.concat([Me]));var Be=ue.map(function(Te){return String(Te)});Be.unshift("Warning: "+te),Function.prototype.apply.call(console[P],console,Be)}}var k=!1,S=!1,E=!1,T=!1,L=!1,N;N=Symbol.for("react.module.reference");function O(P){return!!(typeof P=="string"||typeof P=="function"||P===r||P===o||L||P===i||P===u||P===c||T||P===d||k||S||E||typeof P=="object"&&P!==null&&(P.$$typeof===p||P.$$typeof===f||P.$$typeof===a||P.$$typeof===s||P.$$typeof===l||P.$$typeof===N||P.getModuleId!==void 0))}function M(P,te,ue){var he=P.displayName;if(he)return he;var Me=te.displayName||te.name||"";return Me!==""?ue+"("+Me+")":ue}function K(P){return P.displayName||"Context"}function F(P){if(P==null)return null;if(typeof P.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case s:var te=P;return K(te)+".Consumer";case a:var ue=P;return K(ue._context)+".Provider";case l:return M(P,P.render,"ForwardRef");case f:var he=P.displayName||null;return he!==null?he:F(P.type)||"Memo";case p:{var Me=P,Be=Me._payload,Te=Me._init;try{return F(Te(Be))}catch{return null}}}return null}var I=Object.assign,D=0,j,G,U,R,y,_,z;function w(){}w.__reactDisabledLog=!0;function H(){{if(D===0){j=console.log,G=console.info,U=console.warn,R=console.error,y=console.group,_=console.groupCollapsed,z=console.groupEnd;var P={configurable:!0,enumerable:!0,value:w,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}D++}}function X(){{if(D--,D===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},P,{value:j}),info:I({},P,{value:G}),warn:I({},P,{value:U}),error:I({},P,{value:R}),group:I({},P,{value:y}),groupCollapsed:I({},P,{value:_}),groupEnd:I({},P,{value:z})})}D<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=m.ReactCurrentDispatcher,Y;function Q(P,te,ue){{if(Y===void 0)try{throw Error()}catch(Me){var he=Me.stack.trim().match(/\n( *(at )?)/);Y=he&&he[1]||""}return`
18
- `+Y+P}}var ee=!1,J;{var Z=typeof WeakMap=="function"?WeakMap:Map;J=new Z}function V(P,te){if(!P||ee)return"";{var ue=J.get(P);if(ue!==void 0)return ue}var he;ee=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Be;Be=q.current,q.current=null,H();try{if(te){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(Mt){he=Mt}Reflect.construct(P,[],Te)}else{try{Te.call()}catch(Mt){he=Mt}P.call(Te.prototype)}}else{try{throw Error()}catch(Mt){he=Mt}P()}}catch(Mt){if(Mt&&he&&typeof Mt.stack=="string"){for(var we=Mt.stack.split(`
19
- `),Ot=he.stack.split(`
20
- `),Qe=we.length-1,at=Ot.length-1;Qe>=1&&at>=0&&we[Qe]!==Ot[at];)at--;for(;Qe>=1&&at>=0;Qe--,at--)if(we[Qe]!==Ot[at]){if(Qe!==1||at!==1)do if(Qe--,at--,at<0||we[Qe]!==Ot[at]){var Yt=`
21
- `+we[Qe].replace(" at new "," at ");return P.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",P.displayName)),typeof P=="function"&&J.set(P,Yt),Yt}while(Qe>=1&&at>=0);break}}}finally{ee=!1,q.current=Be,X(),Error.prepareStackTrace=Me}var mi=P?P.displayName||P.name:"",wr=mi?Q(mi):"";return typeof P=="function"&&J.set(P,wr),wr}function ie(P,te,ue){return V(P,!1)}function le(P){var te=P.prototype;return!!(te&&te.isReactComponent)}function de(P,te,ue){if(P==null)return"";if(typeof P=="function")return V(P,le(P));if(typeof P=="string")return Q(P);switch(P){case u:return Q("Suspense");case c:return Q("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case l:return ie(P.render);case f:return de(P.type,te,ue);case p:{var he=P,Me=he._payload,Be=he._init;try{return de(Be(Me),te,ue)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,ge={},$e=m.ReactDebugCurrentFrame;function Ae(P){if(P){var te=P._owner,ue=de(P.type,P._source,te?te.type:null);$e.setExtraStackFrame(ue)}else $e.setExtraStackFrame(null)}function rt(P,te,ue,he,Me){{var Be=Function.call.bind(ae);for(var Te in P)if(Be(P,Te)){var we=void 0;try{if(typeof P[Te]!="function"){var Ot=Error((he||"React class")+": "+ue+" type `"+Te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[Te]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ot.name="Invariant Violation",Ot}we=P[Te](te,Te,he,ue,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Qe){we=Qe}we&&!(we instanceof Error)&&(Ae(Me),b("%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).",he||"React class",ue,Te,typeof we),Ae(null)),we instanceof Error&&!(we.message in ge)&&(ge[we.message]=!0,Ae(Me),b("Failed %s type: %s",ue,we.message),Ae(null))}}}var Et=Array.isArray;function Ct(P){return Et(P)}function kt(P){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ue=te&&P[Symbol.toStringTag]||P.constructor.name||"Object";return ue}}function oe(P){try{return ce(P),!1}catch{return!0}}function ce(P){return""+P}function W(P){if(oe(P))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",kt(P)),ce(P)}var B=m.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},se,fe,ve;ve={};function Ye(P){if(ae.call(P,"ref")){var te=Object.getOwnPropertyDescriptor(P,"ref").get;if(te&&te.isReactWarning)return!1}return P.ref!==void 0}function Xe(P){if(ae.call(P,"key")){var te=Object.getOwnPropertyDescriptor(P,"key").get;if(te&&te.isReactWarning)return!1}return P.key!==void 0}function gt(P,te){if(typeof P.ref=="string"&&B.current&&te&&B.current.stateNode!==te){var ue=F(B.current.type);ve[ue]||(b('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',F(B.current.type),P.ref),ve[ue]=!0)}}function it(P,te){{var ue=function(){se||(se=!0,b("%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)",te))};ue.isReactWarning=!0,Object.defineProperty(P,"key",{get:ue,configurable:!0})}}function Re(P,te){{var ue=function(){fe||(fe=!0,b("%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)",te))};ue.isReactWarning=!0,Object.defineProperty(P,"ref",{get:ue,configurable:!0})}}var ot=function(P,te,ue,he,Me,Be,Te){var we={$$typeof:t,type:P,key:te,ref:ue,props:Te,_owner:Be};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function Ze(P,te,ue,he,Me){{var Be,Te={},we=null,Ot=null;ue!==void 0&&(W(ue),we=""+ue),Xe(te)&&(W(te.key),we=""+te.key),Ye(te)&&(Ot=te.ref,gt(te,Me));for(Be in te)ae.call(te,Be)&&!ne.hasOwnProperty(Be)&&(Te[Be]=te[Be]);if(P&&P.defaultProps){var Qe=P.defaultProps;for(Be in Qe)Te[Be]===void 0&&(Te[Be]=Qe[Be])}if(we||Ot){var at=typeof P=="function"?P.displayName||P.name||"Unknown":P;we&&it(Te,at),Ot&&Re(Te,at)}return ot(P,we,Ot,Me,he,B.current,Te)}}var Gt=m.ReactCurrentOwner,Po=m.ReactDebugCurrentFrame;function Mn(P){if(P){var te=P._owner,ue=de(P.type,P._source,te?te.type:null);Po.setExtraStackFrame(ue)}else Po.setExtraStackFrame(null)}var yr;yr=!1;function br(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function xr(){{if(Gt.current){var P=F(Gt.current.type);if(P)return`
17
+ */var mp;function pE(){return mp||(mp=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function g(P){if(P===null||typeof P!="object")return null;var te=v&&P[v]||P[h];return typeof te=="function"?te:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(P){{for(var te=arguments.length,ue=new Array(te>1?te-1:0),me=1;me<te;me++)ue[me-1]=arguments[me];w("error",P,ue)}}function w(P,te,ue){{var me=m.ReactDebugCurrentFrame,Me=me.getStackAddendum();Me!==""&&(te+="%s",ue=ue.concat([Me]));var We=ue.map(function($e){return String($e)});We.unshift("Warning: "+te),Function.prototype.apply.call(console[P],console,We)}}var C=!1,S=!1,E=!1,I=!1,L=!1,_;_=Symbol.for("react.module.reference");function O(P){return!!(typeof P=="string"||typeof P=="function"||P===r||P===o||L||P===i||P===u||P===c||I||P===d||C||S||E||typeof P=="object"&&P!==null&&(P.$$typeof===p||P.$$typeof===f||P.$$typeof===a||P.$$typeof===s||P.$$typeof===l||P.$$typeof===_||P.getModuleId!==void 0))}function D(P,te,ue){var me=P.displayName;if(me)return me;var Me=te.displayName||te.name||"";return Me!==""?ue+"("+Me+")":ue}function H(P){return P.displayName||"Context"}function F(P){if(P==null)return null;if(typeof P.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case s:var te=P;return H(te)+".Consumer";case a:var ue=P;return H(ue._context)+".Provider";case l:return D(P,P.render,"ForwardRef");case f:var me=P.displayName||null;return me!==null?me:F(P.type)||"Memo";case p:{var Me=P,We=Me._payload,$e=Me._init;try{return F($e(We))}catch{return null}}}return null}var j=Object.assign,M=0,W,G,V,R,y,$,N;function x(){}x.__reactDisabledLog=!0;function B(){{if(M===0){W=console.log,G=console.info,V=console.warn,R=console.error,y=console.group,$=console.groupCollapsed,N=console.groupEnd;var P={configurable:!0,enumerable:!0,value:x,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}M++}}function Y(){{if(M--,M===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},P,{value:W}),info:j({},P,{value:G}),warn:j({},P,{value:V}),error:j({},P,{value:R}),group:j({},P,{value:y}),groupCollapsed:j({},P,{value:$}),groupEnd:j({},P,{value:N})})}M<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=m.ReactCurrentDispatcher,X;function Z(P,te,ue){{if(X===void 0)try{throw Error()}catch(Me){var me=Me.stack.trim().match(/\n( *(at )?)/);X=me&&me[1]||""}return`
18
+ `+X+P}}var ee=!1,J;{var Q=typeof WeakMap=="function"?WeakMap:Map;J=new Q}function q(P,te){if(!P||ee)return"";{var ue=J.get(P);if(ue!==void 0)return ue}var me;ee=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var We;We=K.current,K.current=null,B();try{if(te){var $e=function(){throw Error()};if(Object.defineProperty($e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($e,[])}catch(Mt){me=Mt}Reflect.construct(P,[],$e)}else{try{$e.call()}catch(Mt){me=Mt}P.call($e.prototype)}}else{try{throw Error()}catch(Mt){me=Mt}P()}}catch(Mt){if(Mt&&me&&typeof Mt.stack=="string"){for(var Se=Mt.stack.split(`
19
+ `),Ot=me.stack.split(`
20
+ `),Ze=Se.length-1,at=Ot.length-1;Ze>=1&&at>=0&&Se[Ze]!==Ot[at];)at--;for(;Ze>=1&&at>=0;Ze--,at--)if(Se[Ze]!==Ot[at]){if(Ze!==1||at!==1)do if(Ze--,at--,at<0||Se[Ze]!==Ot[at]){var Yt=`
21
+ `+Se[Ze].replace(" at new "," at ");return P.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",P.displayName)),typeof P=="function"&&J.set(P,Yt),Yt}while(Ze>=1&&at>=0);break}}}finally{ee=!1,K.current=We,Y(),Error.prepareStackTrace=Me}var gi=P?P.displayName||P.name:"",Er=gi?Z(gi):"";return typeof P=="function"&&J.set(P,Er),Er}function ie(P,te,ue){return q(P,!1)}function le(P){var te=P.prototype;return!!(te&&te.isReactComponent)}function de(P,te,ue){if(P==null)return"";if(typeof P=="function")return q(P,le(P));if(typeof P=="string")return Z(P);switch(P){case u:return Z("Suspense");case c:return Z("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case l:return ie(P.render);case f:return de(P.type,te,ue);case p:{var me=P,Me=me._payload,We=me._init;try{return de(We(Me),te,ue)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,ve={},Te=m.ReactDebugCurrentFrame;function Ae(P){if(P){var te=P._owner,ue=de(P.type,P._source,te?te.type:null);Te.setExtraStackFrame(ue)}else Te.setExtraStackFrame(null)}function rt(P,te,ue,me,Me){{var We=Function.call.bind(ae);for(var $e in P)if(We(P,$e)){var Se=void 0;try{if(typeof P[$e]!="function"){var Ot=Error((me||"React class")+": "+ue+" type `"+$e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[$e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ot.name="Invariant Violation",Ot}Se=P[$e](te,$e,me,ue,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){Se=Ze}Se&&!(Se instanceof Error)&&(Ae(Me),b("%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).",me||"React class",ue,$e,typeof Se),Ae(null)),Se instanceof Error&&!(Se.message in ve)&&(ve[Se.message]=!0,Ae(Me),b("Failed %s type: %s",ue,Se.message),Ae(null))}}}var Et=Array.isArray;function kt(P){return Et(P)}function Ct(P){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ue=te&&P[Symbol.toStringTag]||P.constructor.name||"Object";return ue}}function oe(P){try{return ce(P),!1}catch{return!0}}function ce(P){return""+P}function U(P){if(oe(P))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(P)),ce(P)}var z=m.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},se,fe,ge;ge={};function Ye(P){if(ae.call(P,"ref")){var te=Object.getOwnPropertyDescriptor(P,"ref").get;if(te&&te.isReactWarning)return!1}return P.ref!==void 0}function Xe(P){if(ae.call(P,"key")){var te=Object.getOwnPropertyDescriptor(P,"key").get;if(te&&te.isReactWarning)return!1}return P.key!==void 0}function gt(P,te){if(typeof P.ref=="string"&&z.current&&te&&z.current.stateNode!==te){var ue=F(z.current.type);ge[ue]||(b('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',F(z.current.type),P.ref),ge[ue]=!0)}}function it(P,te){{var ue=function(){se||(se=!0,b("%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)",te))};ue.isReactWarning=!0,Object.defineProperty(P,"key",{get:ue,configurable:!0})}}function Re(P,te){{var ue=function(){fe||(fe=!0,b("%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)",te))};ue.isReactWarning=!0,Object.defineProperty(P,"ref",{get:ue,configurable:!0})}}var ot=function(P,te,ue,me,Me,We,$e){var Se={$$typeof:t,type:P,key:te,ref:ue,props:$e,_owner:We};return Se._store={},Object.defineProperty(Se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(Se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(Se.props),Object.freeze(Se)),Se};function Qe(P,te,ue,me,Me){{var We,$e={},Se=null,Ot=null;ue!==void 0&&(U(ue),Se=""+ue),Xe(te)&&(U(te.key),Se=""+te.key),Ye(te)&&(Ot=te.ref,gt(te,Me));for(We in te)ae.call(te,We)&&!ne.hasOwnProperty(We)&&($e[We]=te[We]);if(P&&P.defaultProps){var Ze=P.defaultProps;for(We in Ze)$e[We]===void 0&&($e[We]=Ze[We])}if(Se||Ot){var at=typeof P=="function"?P.displayName||P.name||"Unknown":P;Se&&it($e,at),Ot&&Re($e,at)}return ot(P,Se,Ot,Me,me,z.current,$e)}}var Gt=m.ReactCurrentOwner,Po=m.ReactDebugCurrentFrame;function Mn(P){if(P){var te=P._owner,ue=de(P.type,P._source,te?te.type:null);Po.setExtraStackFrame(ue)}else Po.setExtraStackFrame(null)}var xr;xr=!1;function wr(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Sr(){{if(Gt.current){var P=F(Gt.current.type);if(P)return`
22
22
 
23
- Check the render method of \``+P+"`."}return""}}function up(P){return""}var kn={};function tl(P){{var te=xr();if(!te){var ue=typeof P=="string"?P:P.displayName||P.name;ue&&(te=`
23
+ Check the render method of \``+P+"`."}return""}}function fp(P){return""}var Cn={};function rl(P){{var te=Sr();if(!te){var ue=typeof P=="string"?P:P.displayName||P.name;ue&&(te=`
24
24
 
25
- Check the top-level render call using <`+ue+">.")}return te}}function Ao(P,te){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var ue=tl(te);if(kn[ue])return;kn[ue]=!0;var he="";P&&P._owner&&P._owner!==Gt.current&&(he=" It was passed a child from "+F(P._owner.type)+"."),Mn(P),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ue,he),Mn(null)}}function Ro(P,te){{if(typeof P!="object")return;if(Ct(P))for(var ue=0;ue<P.length;ue++){var he=P[ue];br(he)&&Ao(he,te)}else if(br(P))P._store&&(P._store.validated=!0);else if(P){var Me=g(P);if(typeof Me=="function"&&Me!==P.entries)for(var Be=Me.call(P),Te;!(Te=Be.next()).done;)br(Te.value)&&Ao(Te.value,te)}}}function jY(P){{var te=P.type;if(te==null||typeof te=="string")return;var ue;if(typeof te=="function")ue=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===l||te.$$typeof===f))ue=te.propTypes;else return;if(ue){var he=F(te);rt(ue,P.props,"prop",he,P)}else if(te.PropTypes!==void 0&&!yr){yr=!0;var Me=F(te);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function NY(P){{for(var te=Object.keys(P.props),ue=0;ue<te.length;ue++){var he=te[ue];if(he!=="children"&&he!=="key"){Mn(P),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",he),Mn(null);break}}P.ref!==null&&(Mn(P),b("Invalid attribute `ref` supplied to `React.Fragment`."),Mn(null))}}var Y0={};function X0(P,te,ue,he,Me,Be){{var Te=O(P);if(!Te){var we="";(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(we+=" 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 Ot=up();Ot?we+=Ot:we+=xr();var Qe;P===null?Qe="null":Ct(P)?Qe="array":P!==void 0&&P.$$typeof===t?(Qe="<"+(F(P.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Qe=typeof P,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Qe,we)}var at=Ze(P,te,ue,Me,Be);if(at==null)return at;if(Te){var Yt=te.children;if(Yt!==void 0)if(he)if(Ct(Yt)){for(var mi=0;mi<Yt.length;mi++)Ro(Yt[mi],P);Object.freeze&&Object.freeze(Yt)}else b("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 Ro(Yt,P)}if(ae.call(te,"key")){var wr=F(P),Mt=Object.keys(te).filter(function(UY){return UY!=="key"}),cp=Mt.length>0?"{key: someKey, "+Mt.join(": ..., ")+": ...}":"{key: someKey}";if(!Y0[wr+cp]){var WY=Mt.length>0?"{"+Mt.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ue+">.")}return te}}function Ao(P,te){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var ue=rl(te);if(Cn[ue])return;Cn[ue]=!0;var me="";P&&P._owner&&P._owner!==Gt.current&&(me=" It was passed a child from "+F(P._owner.type)+"."),Mn(P),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ue,me),Mn(null)}}function Ro(P,te){{if(typeof P!="object")return;if(kt(P))for(var ue=0;ue<P.length;ue++){var me=P[ue];wr(me)&&Ao(me,te)}else if(wr(P))P._store&&(P._store.validated=!0);else if(P){var Me=g(P);if(typeof Me=="function"&&Me!==P.entries)for(var We=Me.call(P),$e;!($e=We.next()).done;)wr($e.value)&&Ao($e.value,te)}}}function rX(P){{var te=P.type;if(te==null||typeof te=="string")return;var ue;if(typeof te=="function")ue=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===l||te.$$typeof===f))ue=te.propTypes;else return;if(ue){var me=F(te);rt(ue,P.props,"prop",me,P)}else if(te.PropTypes!==void 0&&!xr){xr=!0;var Me=F(te);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function iX(P){{for(var te=Object.keys(P.props),ue=0;ue<te.length;ue++){var me=te[ue];if(me!=="children"&&me!=="key"){Mn(P),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),Mn(null);break}}P.ref!==null&&(Mn(P),b("Invalid attribute `ref` supplied to `React.Fragment`."),Mn(null))}}var uE={};function cE(P,te,ue,me,Me,We){{var $e=O(P);if(!$e){var Se="";(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(Se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ot=fp();Ot?Se+=Ot:Se+=Sr();var Ze;P===null?Ze="null":kt(P)?Ze="array":P!==void 0&&P.$$typeof===t?(Ze="<"+(F(P.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):Ze=typeof P,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ze,Se)}var at=Qe(P,te,ue,Me,We);if(at==null)return at;if($e){var Yt=te.children;if(Yt!==void 0)if(me)if(kt(Yt)){for(var gi=0;gi<Yt.length;gi++)Ro(Yt[gi],P);Object.freeze&&Object.freeze(Yt)}else b("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 Ro(Yt,P)}if(ae.call(te,"key")){var Er=F(P),Mt=Object.keys(te).filter(function(cX){return cX!=="key"}),dp=Mt.length>0?"{key: someKey, "+Mt.join(": ..., ")+": ...}":"{key: someKey}";if(!uE[Er+dp]){var uX=Mt.length>0?"{"+Mt.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,cp,wr,WY,wr),Y0[wr+cp]=!0}}return P===r?NY(at):jY(at),at}}function LY(P,te,ue){return X0(P,te,ue,!0)}function FY(P,te,ue){return X0(P,te,ue,!1)}var BY=FY,zY=LY;yi.Fragment=r,yi.jsx=BY,yi.jsxs=zY}()),yi}process.env.NODE_ENV==="production"?nl.exports=J0():nl.exports=Z0();var $=nl.exports;function Q0(e,t=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];function u(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=C.useMemo(()=>v,Object.values(v));return $.jsx(h.Provider,{value:g,children:d})}function c(f,p){const d=(p==null?void 0:p[e][l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,eE(i,...t)]}function eE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Sr=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function tE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function nE(...e){return t=>e.forEach(n=>tE(n,t))}var mp=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(iE);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return $.jsx(rl,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return $.jsx(rl,{...r,ref:t,children:n})});mp.displayName="Slot";var rl=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const i=aE(n);return C.cloneElement(n,{...oE(r,n.props),ref:t?nE(t,i):i})}return C.Children.count(n)>1?C.Children.only(null):null});rl.displayName="SlotClone";var rE=({children:e})=>$.jsx($.Fragment,{children:e});function iE(e){return C.isValidElement(e)&&e.type===rE}function oE(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function aE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],il=sE.reduce((e,t)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?mp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ol="Avatar",[lE,KY]=Q0(ol),[uE,gp]=lE(ol),al=C.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=C.useState("idle");return $.jsx(uE,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:$.jsx(il.span,{...r,ref:t})})});al.displayName=ol;var yp="AvatarImage",sl=C.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=gp(yp,n),s=cE(r),l=jn(u=>{i(u),a.onImageLoadingStatusChange(u)});return Sr(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?$.jsx(il.img,{...o,ref:t,src:r}):null});sl.displayName=yp;var bp="AvatarFallback",ll=C.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=gp(bp,n),[a,s]=C.useState(r===void 0);return C.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?$.jsx(il.span,{...i,ref:t}):null});ll.displayName=bp;function cE(e){const[t,n]=C.useState("idle");return Sr(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}function ul(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function fE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const dE=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function xp(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const pE=2.4,hE=.2126729,vE=.7151522,mE=.072175,gE=.56,yE=.57,bE=.62,xE=.65,Do=.022,wp=1.414,wE=1.14,SE=1.14,EE=.035991,CE=.035991,kE=27.7847239587675,$E=27.7847239587675,Sp=.027,Ep=.027,Cp=.001,TE=5e-4;function kp(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**pE;return hE*i(t)+vE*i(n)+mE*i(r)}function $p(e,t){if(!e||!t)return 0;let n=kp(ul(e)),r=kp(ul(t)),i=0,o=0;return n=n>Do?n:n+(Do-n)**wp,r=r>Do?r:r+(Do-r)**wp,Math.abs(r-n)<TE?0:(r>n?(i=(r**gE-n**yE)*wE,o=i<Cp?0:i<EE?i-i*kE*Sp:i-Sp):(i=(r**xE-n**bE)*SE,o=i>-Cp?0:i>-CE?i-i*$E*Ep:i+Ep),Math.abs(o*100))}class Tp{constructor(){fp(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(o=>{o(n)}),(i=this.eventMap["*"])==null||i.forEach(o=>{o({type:t,payload:n})})}}const OE=new Tp;function Op(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Ip(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Pp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",f="month",p="quarter",d="year",v="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var D=["th","st","nd","rd"],j=I%100;return"["+I+(D[(j-20)%10]||D[j]||D[0])+"]"}},x=function(I,D,j){var G=String(I);return!G||G.length>=D?I:""+Array(D+1-G.length).join(j)+I},k={s:x,z:function(I){var D=-I.utcOffset(),j=Math.abs(D),G=Math.floor(j/60),U=j%60;return(D<=0?"+":"-")+x(G,2,"0")+":"+x(U,2,"0")},m:function I(D,j){if(D.date()<j.date())return-I(j,D);var G=12*(j.year()-D.year())+(j.month()-D.month()),U=D.clone().add(G,f),R=j-U<0,y=D.clone().add(G+(R?-1:1),f);return+(-(G+(j-U)/(R?U-y:y-U))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:d,w:c,d:u,D:v,h:l,m:s,s:a,ms:o,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},S="en",E={};E[S]=b;var T="$isDayjsObject",L=function(I){return I instanceof K||!(!I||!I[T])},N=function I(D,j,G){var U;if(!D)return S;if(typeof D=="string"){var R=D.toLowerCase();E[R]&&(U=R),j&&(E[R]=j,U=R);var y=D.split("-");if(!U&&y.length>1)return I(y[0])}else{var _=D.name;E[_]=D,U=_}return!G&&U&&(S=U),U||!G&&S},O=function(I,D){if(L(I))return I.clone();var j=typeof D=="object"?D:{};return j.date=I,j.args=arguments,new K(j)},M=k;M.l=N,M.i=L,M.w=function(I,D){return O(I,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var K=function(){function I(j){this.$L=N(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[T]=!0}var D=I.prototype;return D.parse=function(j){this.$d=function(G){var U=G.date,R=G.utc;if(U===null)return new Date(NaN);if(M.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var y=U.match(g);if(y){var _=y[2]-1||0,z=(y[7]||"0").substring(0,3);return R?new Date(Date.UTC(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,z)):new Date(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,z)}}return new Date(U)}(j),this.init()},D.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},D.$utils=function(){return M},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(j,G){var U=O(j);return this.startOf(G)<=U&&U<=this.endOf(G)},D.isAfter=function(j,G){return O(j)<this.startOf(G)},D.isBefore=function(j,G){return this.endOf(G)<O(j)},D.$g=function(j,G,U){return M.u(j)?this[G]:this.set(U,j)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(j,G){var U=this,R=!!M.u(G)||G,y=M.p(j),_=function(ee,J){var Z=M.w(U.$u?Date.UTC(U.$y,J,ee):new Date(U.$y,J,ee),U);return R?Z:Z.endOf(u)},z=function(ee,J){return M.w(U.toDate()[ee].apply(U.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},w=this.$W,H=this.$M,X=this.$D,q="set"+(this.$u?"UTC":"");switch(y){case d:return R?_(1,0):_(31,11);case f:return R?_(1,H):_(0,H+1);case c:var Y=this.$locale().weekStart||0,Q=(w<Y?w+7:w)-Y;return _(R?X-Q:X+(6-Q),H);case u:case v:return z(q+"Hours",0);case l:return z(q+"Minutes",1);case s:return z(q+"Seconds",2);case a:return z(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(j){return this.startOf(j,!1)},D.$set=function(j,G){var U,R=M.p(j),y="set"+(this.$u?"UTC":""),_=(U={},U[u]=y+"Date",U[v]=y+"Date",U[f]=y+"Month",U[d]=y+"FullYear",U[l]=y+"Hours",U[s]=y+"Minutes",U[a]=y+"Seconds",U[o]=y+"Milliseconds",U)[R],z=R===u?this.$D+(G-this.$W):G;if(R===f||R===d){var w=this.clone().set(v,1);w.$d[_](z),w.init(),this.$d=w.set(v,Math.min(this.$D,w.daysInMonth())).$d}else _&&this.$d[_](z);return this.init(),this},D.set=function(j,G){return this.clone().$set(j,G)},D.get=function(j){return this[M.p(j)]()},D.add=function(j,G){var U,R=this;j=Number(j);var y=M.p(G),_=function(H){var X=O(R);return M.w(X.date(X.date()+Math.round(H*j)),R)};if(y===f)return this.set(f,this.$M+j);if(y===d)return this.set(d,this.$y+j);if(y===u)return _(1);if(y===c)return _(7);var z=(U={},U[s]=r,U[l]=i,U[a]=n,U)[y]||1,w=this.$d.getTime()+j*z;return M.w(w,this)},D.subtract=function(j,G){return this.add(-1*j,G)},D.format=function(j){var G=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var R=j||"YYYY-MM-DDTHH:mm:ssZ",y=M.z(this),_=this.$H,z=this.$m,w=this.$M,H=U.weekdays,X=U.months,q=U.meridiem,Y=function(J,Z,V,ie){return J&&(J[Z]||J(G,R))||V[Z].slice(0,ie)},Q=function(J){return M.s(_%12||12,J,"0")},ee=q||function(J,Z,V){var ie=J<12?"AM":"PM";return V?ie.toLowerCase():ie};return R.replace(m,function(J,Z){return Z||function(V){switch(V){case"YY":return String(G.$y).slice(-2);case"YYYY":return M.s(G.$y,4,"0");case"M":return w+1;case"MM":return M.s(w+1,2,"0");case"MMM":return Y(U.monthsShort,w,X,3);case"MMMM":return Y(X,w);case"D":return G.$D;case"DD":return M.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Y(U.weekdaysMin,G.$W,H,2);case"ddd":return Y(U.weekdaysShort,G.$W,H,3);case"dddd":return H[G.$W];case"H":return String(_);case"HH":return M.s(_,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ee(_,z,!0);case"A":return ee(_,z,!1);case"m":return String(z);case"mm":return M.s(z,2,"0");case"s":return String(G.$s);case"ss":return M.s(G.$s,2,"0");case"SSS":return M.s(G.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(j,G,U){var R,y=this,_=M.p(G),z=O(j),w=(z.utcOffset()-this.utcOffset())*r,H=this-z,X=function(){return M.m(y,z)};switch(_){case d:R=X()/12;break;case f:R=X();break;case p:R=X()/3;break;case c:R=(H-w)/6048e5;break;case u:R=(H-w)/864e5;break;case l:R=H/i;break;case s:R=H/r;break;case a:R=H/n;break;default:R=H}return U?R:M.a(R)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return E[this.$L]},D.locale=function(j,G){if(!j)return this.$L;var U=this.clone(),R=N(j,G,!0);return R&&(U.$L=R),U},D.clone=function(){return M.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},I}(),F=K.prototype;return O.prototype=F,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",v]].forEach(function(I){F[I[1]]=function(D){return this.$g(D,I[0],I[1])}}),O.extend=function(I,D){return I.$i||(I(D,K,O),I.$i=!0),O},O.locale=N,O.isDayjs=L,O.unix=function(I){return O(1e3*I)},O.en=E[S],O.Ls=E,O.p={},O})})(Pp);var IE=Pp.exports;const _o=Se(IE);var Ap={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(Ap);var PE=Ap.exports;const AE=Se(PE);var Rp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Rp);var RE=Rp.exports;const DE=Se(RE);let Mo;const _E=new Uint8Array(16);function ME(){if(!Mo&&(Mo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mo(_E)}const pt=[];for(let e=0;e<256;++e)pt.push((e+256).toString(16).slice(1));function jE(e,t=0){return pt[e[t+0]]+pt[e[t+1]]+pt[e[t+2]]+pt[e[t+3]]+"-"+pt[e[t+4]]+pt[e[t+5]]+"-"+pt[e[t+6]]+pt[e[t+7]]+"-"+pt[e[t+8]]+pt[e[t+9]]+"-"+pt[e[t+10]]+pt[e[t+11]]+pt[e[t+12]]+pt[e[t+13]]+pt[e[t+14]]+pt[e[t+15]]}const Dp={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _p(e,t,n){if(Dp.randomUUID&&!t&&!e)return Dp.randomUUID();e=e||{};const r=e.random||(e.rng||ME)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,jE(r)}_o.extend(AE),_o.extend(DE);function NE(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Mp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!_o(s).isSame(l,t)&&l&&n.push(Mp(l))}return n}function Mp(e){return{id:_p(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:LE(e)}}}function LE(e,t=!1){const n=_o(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function FE(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function BE(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function zE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function WE(e,t){return e.map(n=>Math.round(n*t))}const bi=e=>t=>zE(t,e),xi=e=>t=>WE(t,e),UE={50:bi(.95),100:bi(.9),200:bi(.75),300:bi(.6),400:bi(.3),500:e=>e,600:xi(.9),700:xi(.6),800:xi(.45),900:xi(.3),950:xi(.2)};function jp(e,t=UE){const n={},r=FE(e);for(const[i,o]of Object.entries(t))n[i]=BE(o(r));return n}function Np(e){const{fontFamily:t,radius:n,themeMode:r,color:i,variant:o,headerVariant:a}=e;let s={},l={};if(i){const d=jp(i),v=r==="dark"?xp(d):d,h=jp(fE(dE(ul(i)))),g=r==="dark"?xp(h):h,m=r==="dark"?"#101010":"#fdfdfd";l=Object.entries({...v,1:m}).reduce((x,[k,S])=>({...x,[`--bpPrimary-${k}`]:S}),{});const b=Object.entries({...g,1:m}).reduce((x,[k,S])=>({...x,[`--bpGray-${k}`]:S}),{});s={...l,...b}}n&&(s={...s,"--bpRadius-scale":n.toString()});const u=r==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=l?$p(l["--bpPrimary-600"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=o==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-100)","--button-bg-hover":"var(--bpPrimary-200)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":l?$p(l["--bpPrimary-500"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},p=a==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)"}:{"--header-bg":u.bg,"--header-bg-hover":u.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return s={...s,...f,...p},Op(":root",s)+(t?Op(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const HE=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),jo=A.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Ip(e??"",15);return $.jsxs(al,{ref:a,"data-color":s,...n,...o,children:[$.jsx(sl,{src:t,...r}),$.jsx(ll,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});jo.displayName="Avatar";function GY(){}function YY(){}function VE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const KE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GE={};function Lp(e,t){return(GE.jsx?qE:KE).test(e)}const YE=/[ \t\n\f\r]/g;function XE(e){return typeof e=="object"?e.type==="text"?Fp(e.value):!1:Fp(e)}function Fp(e){return e.replace(YE,"")===""}class wi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}wi.prototype.property={},wi.prototype.normal={},wi.prototype.space=null;function Bp(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new wi(n,r,t)}function cl(e){return e.toLowerCase()}class Wt{constructor(t,n){this.property=t,this.attribute=n}}Wt.prototype.space=null,Wt.prototype.boolean=!1,Wt.prototype.booleanish=!1,Wt.prototype.overloadedBoolean=!1,Wt.prototype.number=!1,Wt.prototype.commaSeparated=!1,Wt.prototype.spaceSeparated=!1,Wt.prototype.commaOrSpaceSeparated=!1,Wt.prototype.mustUseProperty=!1,Wt.prototype.defined=!1;let JE=0;const me=tr(),et=tr(),zp=tr(),re=tr(),ze=tr(),Er=tr(),jt=tr();function tr(){return 2**++JE}const fl=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:et,commaOrSpaceSeparated:jt,commaSeparated:Er,number:re,overloadedBoolean:zp,spaceSeparated:ze},Symbol.toStringTag,{value:"Module"})),dl=Object.keys(fl);class pl extends Wt{constructor(t,n,r,i){let o=-1;if(super(t,n),Wp(this,"space",i),typeof r=="number")for(;++o<dl.length;){const a=dl[o];Wp(this,dl[o],(r&fl[a])===fl[a])}}}pl.prototype.defined=!0;function Wp(e,t,n){n&&(e[t]=n)}const ZE={}.hasOwnProperty;function Cr(e){const t={},n={};let r;for(r in e.properties)if(ZE.call(e.properties,r)){const i=e.properties[r],o=new pl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[cl(r)]=r,n[cl(o.attribute)]=r}return new wi(t,n,e.space)}const Up=Cr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Hp=Cr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Vp(e,t){return t in e?e[t]:t}function Kp(e,t){return Vp(e,t.toLowerCase())}const qp=Cr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Kp,properties:{xmlns:null,xmlnsXLink:null}}),Gp=Cr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:et,ariaAutoComplete:null,ariaBusy:et,ariaChecked:et,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:et,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:et,ariaFlowTo:ze,ariaGrabbed:et,ariaHasPopup:null,ariaHidden:et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:re,ariaLive:null,ariaModal:et,ariaMultiLine:et,ariaMultiSelectable:et,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:et,ariaReadOnly:et,ariaRelevant:null,ariaRequired:et,ariaRoleDescription:ze,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:et,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),QE=Cr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Kp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Er,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:ze,autoFocus:me,autoPlay:me,blocking:ze,capture:null,charSet:null,checked:me,cite:null,className:ze,cols:re,colSpan:null,content:null,contentEditable:et,controls:me,controlsList:ze,coords:re|Er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:zp,draggable:et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:ze,height:re,hidden:me,high:re,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:ze,itemRef:ze,itemScope:me,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:re,pattern:null,ping:ze,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:ze,required:me,reversed:me,rows:re,rowSpan:re,sandbox:ze,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:et,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:et,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:re,security:null,unselectable:null}}),eC=Cr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Vp,properties:{about:jt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:ze,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Er,g2:Er,glyphName:Er,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jt,rev:jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jt,requiredFeatures:jt,requiredFonts:jt,requiredFormats:jt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),tC=/^data[-\w.:]+$/i,Yp=/-[a-z]/g,nC=/[A-Z]/g;function rC(e,t){const n=cl(t);let r=t,i=Wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&tC.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Yp,oC);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Yp.test(o)){let a=o.replace(nC,iC);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=pl}return new i(r,t)}function iC(e){return"-"+e.toLowerCase()}function oC(e){return e.charAt(1).toUpperCase()}const aC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},sC=Bp([Hp,Up,qp,Gp,QE],"html"),hl=Bp([Hp,Up,qp,Gp,eC],"svg");function lC(e){return e.join(" ").trim()}var Xp={},Jp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,uC=/\n/g,cC=/^\s*/,fC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,dC=/^:\s*/,pC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hC=/^[;\s]*/,vC=/^\s+|\s+$/g,mC=`
31
- `,Zp="/",Qp="*",nr="",gC="comment",yC="declaration",bC=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(v){var h=v.match(uC);h&&(n+=h.length);var g=v.lastIndexOf(mC);r=~g?v.length-g:r+v.length}function o(){var v={line:n,column:r};return function(h){return h.position=new a(v),u(),h}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(v){var h=new Error(t.source+":"+n+":"+r+": "+v);if(h.reason=v,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(v){var h=v.exec(e);if(h){var g=h[0];return i(g),e=e.slice(g.length),h}}function u(){l(cC)}function c(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=o();if(!(Zp!=e.charAt(0)||Qp!=e.charAt(1))){for(var h=2;nr!=e.charAt(h)&&(Qp!=e.charAt(h)||Zp!=e.charAt(h+1));)++h;if(h+=2,nr===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,i(g),e=e.slice(h),r+=2,v({type:gC,comment:g})}}function p(){var v=o(),h=l(fC);if(h){if(f(),!l(dC))return s("property missing ':'");var g=l(pC),m=v({type:yC,property:eh(h[0].replace(Jp,nr)),value:g?eh(g[0].replace(Jp,nr)):nr});return l(hC),m}}function d(){var v=[];c(v);for(var h;h=p();)h!==!1&&(v.push(h),c(v));return v}return u(),d()};function eh(e){return e?e.replace(vC,nr):nr}var xC=Xt&&Xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xp,"__esModule",{value:!0});var th=Xp.default=SC,wC=xC(bC);function SC(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,wC.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const EC=th.default||th,nh=rh("end"),vl=rh("start");function rh(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function CC(e){const t=vl(e),n=nh(e);if(t&&n)return{start:t,end:n}}function Si(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ih(e.position):"start"in e||"end"in e?ih(e):"line"in e||"column"in e?ml(e):""}function ml(e){return oh(e&&e.line)+":"+oh(e&&e.column)}function ih(e){return ml(e&&e.start)+"-"+ml(e&&e.end)}function oh(e){return e&&typeof e=="number"?e:1}class yt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Si(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}yt.prototype.file="",yt.prototype.name="",yt.prototype.reason="",yt.prototype.message="",yt.prototype.stack="",yt.prototype.column=void 0,yt.prototype.line=void 0,yt.prototype.ancestors=void 0,yt.prototype.cause=void 0,yt.prototype.fatal=void 0,yt.prototype.place=void 0,yt.prototype.ruleId=void 0,yt.prototype.source=void 0;const gl={}.hasOwnProperty,kC=new Map,$C=/[A-Z]/g,TC=/-([a-z])/g,OC=new Set(["table","tbody","thead","tfoot","tr"]),IC=new Set(["td","th"]),ah="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=LC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=NC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hl:sC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=sh(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function sh(e,t,n){if(t.type==="element")return AC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return RC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _C(e,t,n);if(t.type==="mdxjsEsm")return DC(e,t);if(t.type==="root")return MC(e,t,n);if(t.type==="text")return jC(e,t)}function AC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=hl,e.schema=i),e.ancestors.push(t);const o=uh(e,t.tagName,!1),a=FC(e,t);let s=bl(e,t);return OC.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!XE(l):!0})),lh(e,a,o,t),yl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function RC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ei(e,t.position)}function DC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ei(e,t.position)}function _C(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=hl,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:uh(e,t.name,!0),a=BC(e,t),s=bl(e,t);return lh(e,a,o,t),yl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function MC(e,t,n){const r={};return yl(r,bl(e,t)),e.create(t,e.Fragment,r,n)}function jC(e,t){return t.value}function lh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function NC(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function LC(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=vl(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function FC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&gl.call(t.properties,i)){const o=zC(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&IC.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function BC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ei(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Ei(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function bl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kC;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=sh(e,o,a);s!==void 0&&n.push(s)}return n}function zC(e,t,n){const r=rC(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?VE(n):lC(n)),r.property==="style"){let i=typeof n=="object"?n:WC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=UC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?aC[r.property]||r.property:r.attribute,n]}}function WC(e,t){const n={};try{EC(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=ah+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(TC,VC)),n[a]=o}}function uh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=Lp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Lp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return gl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ei(e)}function Ei(e,t){const n=new yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ah+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UC(e){const t={};let n;for(n in e)gl.call(e,n)&&(t[HC(n)]=e[n]);return t}function HC(e){let t=e.replace($C,KC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function VC(e,t){return t.toUpperCase()}function KC(e){return"-"+e.toLowerCase()}const xl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},qC={};function wl(e,t){const n=qC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ch(e,r,i)}function ch(e,t,n){if(GC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fh(e.children,t,n)}return Array.isArray(e)?fh(e,t,n):""}function fh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ch(e[i],t,n);return r.join("")}function GC(e){return!!(e&&typeof e=="object")}const dh=document.createElement("i");function Sl(e){const t="&"+e+";";dh.innerHTML=t;const n=dh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ut(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ht(e,t){return e.length>0?(Ut(e,e.length,0,t),e):t}const ph={}.hasOwnProperty;function hh(e){const t={};let n=-1;for(;++n<e.length;)YC(t,e[n]);return t}function YC(e,t){let n;for(n in t){const i=(ph.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){ph.call(i,a)||(i[a]=[]);const s=o[a];XC(i[a],Array.isArray(s)?s:s?[s]:[])}}}function XC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ut(e,0,0,r)}function vh(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const $t=Nn(/[A-Za-z]/),bt=Nn(/[\dA-Za-z]/),JC=Nn(/[#-'*+\--9=?A-Z^-~]/);function No(e){return e!==null&&(e<32||e===127)}const El=Nn(/\d/),ZC=Nn(/[\dA-Fa-f]/),QC=Nn(/[!-/:-@[-`{-~]/);function pe(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Lo=Nn(new RegExp("\\p{P}|\\p{S}","u")),rr=Nn(/\s/);function Nn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function kr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&bt(e.charCodeAt(n+1))&&bt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return be(l)?(e.enter(n),s(l)):t(l)}function s(l){return be(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const ek={tokenize:tk};function tk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ee(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return pe(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const nk={tokenize:rk},mh={tokenize:ik};function rk(e){const t=this,n=[];let r=0,i,o,a;return s;function s(x){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(x)}return u(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const k=t.events.length;let S=k,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}m(r);let T=k;for(;T<t.events.length;)t.events[T][1].end=Object.assign({},E),T++;return Ut(t.events,S+1,0,t.events.slice(k)),t.events.length=T,u(x)}return s(x)}function u(x){if(r===n.length){if(!i)return p(x);if(i.currentConstruct&&i.currentConstruct.concrete)return v(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mh,c,f)(x)}function c(x){return i&&b(),m(r),p(x)}function f(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(x)}function p(x){return t.containerState={},e.attempt(mh,d,v)(x)}function d(x){return r++,n.push([t.currentConstruct,t.containerState]),p(x)}function v(x){if(x===null){i&&b(),m(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(x)}function h(x){if(x===null){g(e.exit("chunkFlow"),!0),m(0),e.consume(x);return}return pe(x)?(e.consume(x),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),h)}function g(x,k){const S=t.sliceStream(x);if(k&&S.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(S),t.parser.lazy[x.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;const T=t.events.length;let L=T,N,O;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(N){O=t.events[L][1].end;break}N=!0}for(m(r),E=T;E<t.events.length;)t.events[E][1].end=Object.assign({},O),E++;Ut(t.events,L+1,0,t.events.slice(T)),t.events.length=E}}function m(x){let k=n.length;for(;k-- >x;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=x}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ik(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fo(e){if(e===null||Le(e)||rr(e))return 1;if(Lo(e))return 2}function Bo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Cl={name:"attention",tokenize:ak,resolveAll:ok};function ok(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);gh(f,-l),gh(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ht(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ht(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=Ht(u,Bo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ht(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Ht(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ut(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ak(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fo(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),c=Fo(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!p)),u._close=!!(o===42?p:p&&(c||!f)),t(l)}}function gh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const sk={name:"autolink",tokenize:lk};function lk(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return $t(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||bt(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||bt(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||No(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),c):JC(d)?(e.consume(d),u):n(d)}function c(d){return bt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||bt(d))&&r++<63){const v=d===45?p:f;return e.consume(d),v}return n(d)}}const Ci={tokenize:uk,partial:!0};function uk(e,t,n){return r;function r(o){return be(o)?Ee(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||pe(o)?t(o):n(o)}}const yh={name:"blockQuote",tokenize:ck,continuation:{tokenize:fk},exit:dk};function ck(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return be(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function fk(e,t,n){const r=this;return i;function i(a){return be(a)?Ee(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(yh,t,n)(a)}}function dk(e){e.exit("blockQuote")}const bh={name:"characterEscape",tokenize:pk};function pk(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return QC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const xh={name:"characterReference",tokenize:hk};function hk(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=bt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ZC,c):(e.enter("characterReferenceValue"),o=7,a=El,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return a===bt&&!Sl(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):n(f)}}const wh={tokenize:mk,partial:!0},Sh={name:"codeFenced",tokenize:vk,concrete:!0};function vk(e,t,n){const r=this,i={tokenize:S,partial:!0};let o=0,a=0,s;return l;function l(E){return u(E)}function u(E){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(a++,e.consume(E),c):a<3?n(E):(e.exit("codeFencedFenceSequence"),be(E)?Ee(e,f,"whitespace")(E):f(E))}function f(E){return E===null||pe(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(wh,h,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||pe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):be(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ee(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||pe(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===null||pe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),v)}function h(E){return e.attempt(i,k,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return o>0&&be(E)?Ee(e,b,"linePrefix",o+1)(E):b(E)}function b(E){return E===null||pe(E)?e.check(wh,h,k)(E):(e.enter("codeFlowValue"),x(E))}function x(E){return E===null||pe(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),x)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,T,L){let N=0;return O;function O(D){return E.enter("lineEnding"),E.consume(D),E.exit("lineEnding"),M}function M(D){return E.enter("codeFencedFence"),be(D)?Ee(E,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):K(D)}function K(D){return D===s?(E.enter("codeFencedFenceSequence"),F(D)):L(D)}function F(D){return D===s?(N++,E.consume(D),F):N>=a?(E.exit("codeFencedFenceSequence"),be(D)?Ee(E,I,"whitespace")(D):I(D)):L(D)}function I(D){return D===null||pe(D)?(E.exit("codeFencedFence"),T(D)):L(D)}}}function mk(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const kl={name:"codeIndented",tokenize:yk},gk={tokenize:bk,partial:!0};function yk(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ee(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):pe(u)?e.attempt(gk,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||pe(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function bk(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):pe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ee(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):pe(a)?i(a):n(a)}}const xk={name:"codeText",tokenize:Ek,resolve:wk,previous:Sk};function wk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Sk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ek(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):pe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||pe(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class Ck{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ki(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ki(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ki(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ki(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ki(this.left,n.reverse())}}}function ki(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Eh(e){const t={};let n=-1,r,i,o,a,s,l,u;const c=new Ck(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kk(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Ut(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function kk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={};let c,f,p=-1,d=n,v=0,h=0;const g=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const m=s.slice(g[p],g[p+1]),b=o.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),p=-1;++p<l.length;)u[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return u}const $k={tokenize:Ik,resolve:Ok},Tk={tokenize:Pk,partial:!0};function Ok(e){return Eh(e),e}function Ik(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):pe(s)?e.check(Tk,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pk(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ee(e,o,"linePrefix")}function o(a){if(a===null||pe(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ch(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(m){return m===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(m),e.exit(o),p):m===null||m===32||m===41||No(m)?n(m):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function p(m){return m===62?(e.enter(o),e.consume(m),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||pe(m)?n(m):(e.consume(m),m===92?v:d)}function v(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function h(m){return!c&&(m===null||m===41||Le(m))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(m)):c<u&&m===40?(e.consume(m),c++,h):m===41?(e.consume(m),c--,h):m===null||m===32||m===40||No(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===40||m===41||m===92?(e.consume(m),h):h(m)}}function kh(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):pe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||pe(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!be(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function $h(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):pe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ee(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||pe(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function $i(e,t){let n;return r;function r(i){return pe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ak={name:"definition",tokenize:Dk},Rk={tokenize:_k,partial:!0};function Dk(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return kh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Le(d)?$i(e,u)(d):u(d)}function u(d){return Ch(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(Rk,f,f)(d)}function f(d){return be(d)?Ee(e,p,"whitespace")(d):p(d)}function p(d){return d===null||pe(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function _k(e,t,n){return r;function r(s){return Le(s)?$i(e,i)(s):n(s)}function i(s){return $h(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return be(s)?Ee(e,a,"whitespace")(s):a(s)}function a(s){return s===null||pe(s)?t(s):n(s)}}const Mk={name:"hardBreakEscape",tokenize:jk};function jk(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return pe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Nk={name:"headingAtx",tokenize:Fk,resolve:Lk};function Lk(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ut(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Fk(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Le(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||pe(c)?(e.exit("atxHeading"),t(c)):be(c)?Ee(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Le(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const Bk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Th=["pre","script","style","textarea"],zk={name:"htmlFlow",tokenize:Vk,resolveTo:Hk,concrete:!0},Wk={tokenize:qk,partial:!0},Uk={tokenize:Kk,partial:!0};function Hk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vk(e,t,n){const r=this;let i,o,a,s,l;return u;function u(w){return c(w)}function c(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),o=!0,h):w===63?(e.consume(w),i=3,r.interrupt?t:y):$t(w)?(e.consume(w),a=String.fromCharCode(w),g):n(w)}function p(w){return w===45?(e.consume(w),i=2,d):w===91?(e.consume(w),i=5,s=0,v):$t(w)?(e.consume(w),i=4,r.interrupt?t:y):n(w)}function d(w){return w===45?(e.consume(w),r.interrupt?t:y):n(w)}function v(w){const H="CDATA[";return w===H.charCodeAt(s++)?(e.consume(w),s===H.length?r.interrupt?t:K:v):n(w)}function h(w){return $t(w)?(e.consume(w),a=String.fromCharCode(w),g):n(w)}function g(w){if(w===null||w===47||w===62||Le(w)){const H=w===47,X=a.toLowerCase();return!H&&!o&&Th.includes(X)?(i=1,r.interrupt?t(w):K(w)):Bk.includes(a.toLowerCase())?(i=6,H?(e.consume(w),m):r.interrupt?t(w):K(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?b(w):x(w))}return w===45||bt(w)?(e.consume(w),a+=String.fromCharCode(w),g):n(w)}function m(w){return w===62?(e.consume(w),r.interrupt?t:K):n(w)}function b(w){return be(w)?(e.consume(w),b):O(w)}function x(w){return w===47?(e.consume(w),O):w===58||w===95||$t(w)?(e.consume(w),k):be(w)?(e.consume(w),x):O(w)}function k(w){return w===45||w===46||w===58||w===95||bt(w)?(e.consume(w),k):S(w)}function S(w){return w===61?(e.consume(w),E):be(w)?(e.consume(w),S):x(w)}function E(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,T):be(w)?(e.consume(w),E):L(w)}function T(w){return w===l?(e.consume(w),l=null,N):w===null||pe(w)?n(w):(e.consume(w),T)}function L(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Le(w)?S(w):(e.consume(w),L)}function N(w){return w===47||w===62||be(w)?x(w):n(w)}function O(w){return w===62?(e.consume(w),M):n(w)}function M(w){return w===null||pe(w)?K(w):be(w)?(e.consume(w),M):n(w)}function K(w){return w===45&&i===2?(e.consume(w),j):w===60&&i===1?(e.consume(w),G):w===62&&i===4?(e.consume(w),_):w===63&&i===3?(e.consume(w),y):w===93&&i===5?(e.consume(w),R):pe(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wk,z,F)(w)):w===null||pe(w)?(e.exit("htmlFlowData"),F(w)):(e.consume(w),K)}function F(w){return e.check(Uk,I,z)(w)}function I(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),D}function D(w){return w===null||pe(w)?F(w):(e.enter("htmlFlowData"),K(w))}function j(w){return w===45?(e.consume(w),y):K(w)}function G(w){return w===47?(e.consume(w),a="",U):K(w)}function U(w){if(w===62){const H=a.toLowerCase();return Th.includes(H)?(e.consume(w),_):K(w)}return $t(w)&&a.length<8?(e.consume(w),a+=String.fromCharCode(w),U):K(w)}function R(w){return w===93?(e.consume(w),y):K(w)}function y(w){return w===62?(e.consume(w),_):w===45&&i===2?(e.consume(w),y):K(w)}function _(w){return w===null||pe(w)?(e.exit("htmlFlowData"),z(w)):(e.consume(w),_)}function z(w){return e.exit("htmlFlow"),t(w)}}function Kk(e,t,n){const r=this;return i;function i(a){return pe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function qk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ci,t,n)}}const Gk={name:"htmlText",tokenize:Yk};function Yk(e,t,n){const r=this;let i,o,a;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),S):y===63?(e.consume(y),x):$t(y)?(e.consume(y),L):n(y)}function u(y){return y===45?(e.consume(y),c):y===91?(e.consume(y),o=0,v):$t(y)?(e.consume(y),b):n(y)}function c(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):pe(y)?(a=f,G(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?j(y):y===45?p(y):f(y)}function v(y){const _="CDATA[";return y===_.charCodeAt(o++)?(e.consume(y),o===_.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):pe(y)?(a=h,G(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?j(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?j(y):pe(y)?(a=b,G(y)):(e.consume(y),b)}function x(y){return y===null?n(y):y===63?(e.consume(y),k):pe(y)?(a=x,G(y)):(e.consume(y),x)}function k(y){return y===62?j(y):x(y)}function S(y){return $t(y)?(e.consume(y),E):n(y)}function E(y){return y===45||bt(y)?(e.consume(y),E):T(y)}function T(y){return pe(y)?(a=T,G(y)):be(y)?(e.consume(y),T):j(y)}function L(y){return y===45||bt(y)?(e.consume(y),L):y===47||y===62||Le(y)?N(y):n(y)}function N(y){return y===47?(e.consume(y),j):y===58||y===95||$t(y)?(e.consume(y),O):pe(y)?(a=N,G(y)):be(y)?(e.consume(y),N):j(y)}function O(y){return y===45||y===46||y===58||y===95||bt(y)?(e.consume(y),O):M(y)}function M(y){return y===61?(e.consume(y),K):pe(y)?(a=M,G(y)):be(y)?(e.consume(y),M):N(y)}function K(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,F):pe(y)?(a=K,G(y)):be(y)?(e.consume(y),K):(e.consume(y),I)}function F(y){return y===i?(e.consume(y),i=void 0,D):y===null?n(y):pe(y)?(a=F,G(y)):(e.consume(y),F)}function I(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Le(y)?N(y):(e.consume(y),I)}function D(y){return y===47||y===62||Le(y)?N(y):n(y)}function j(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),U}function U(y){return be(y)?Ee(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):R(y)}function R(y){return e.enter("htmlTextData"),a(y)}}const $l={name:"labelEnd",tokenize:t$,resolveTo:e$,resolveAll:Qk},Xk={tokenize:n$},Jk={tokenize:r$},Zk={tokenize:i$};function Qk(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function e$(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=Ht(s,e.slice(o+1,o+r+3)),s=Ht(s,[["enter",c,t]]),s=Ht(s,Bo(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Ht(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Ht(s,e.slice(a+1)),s=Ht(s,[["exit",l,t]]),Ut(e,o,e.length,s),e}function t$(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?f(p):(a=r.parser.defined.includes(Jt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(Xk,c,a?c:f)(p):p===91?e.attempt(Jk,c,a?u:f)(p):a?c(p):f(p)}function u(p){return e.attempt(Zk,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function n$(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Le(f)?$i(e,o)(f):o(f)}function o(f){return f===41?c(f):Ch(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Le(f)?$i(e,l)(f):c(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?$h(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Le(f)?$i(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function r$(e,t,n){const r=this;return i;function i(s){return kh.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function i$(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const o$={name:"labelStartImage",tokenize:a$,resolveAll:$l.resolveAll};function a$(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const s$={name:"labelStartLink",tokenize:l$,resolveAll:$l.resolveAll};function l$(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Tl={name:"lineEnding",tokenize:u$};function u$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}const zo={name:"thematicBreak",tokenize:c$};function c$(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||pe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),be(u)?Ee(e,s,"whitespace")(u):s(u))}}const It={name:"list",tokenize:p$,continuation:{tokenize:h$},exit:m$},f$={tokenize:g$,partial:!0},d$={tokenize:v$,partial:!0};function p$(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const v=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:El(d)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(zo,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return El(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Ci,r.interrupt?n:c,e.attempt(f$,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return be(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function h$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ci,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!be(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(d$,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(It,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function v$(e,t,n){const r=this;return Ee(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function m$(e){e.exit(this.containerState.type)}function g$(e,t,n){const r=this;return Ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!be(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Oh={name:"setextUnderline",tokenize:b$,resolveTo:y$};function y$(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function b$(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),be(u)?Ee(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||pe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const x$={tokenize:w$};function w$(e){const t=this,n=e.attempt(Ci,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt($k,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const S$={resolveAll:Ph()},E$=Ih("string"),C$=Ih("text");function Ih(e){return{tokenize:t,resolveAll:Ph(e==="text"?k$:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Ph(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function k$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function $$(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:x,exit:k,attempt:T(S),check:T(E),interrupt:T(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:v,defineSkip:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(M){return a=Ht(a,M),g(),a[a.length-1]!==null?[]:(L(t,0),u.events=Bo(o,u.events,u),u.events)}function p(M,K){return O$(d(M),K)}function d(M){return T$(a,M)}function v(){const{line:M,column:K,offset:F,_index:I,_bufferIndex:D}=r;return{line:M,column:K,offset:F,_index:I,_bufferIndex:D}}function h(M){i[M.line]=M.column,O()}function g(){let M;for(;r._index<a.length;){const K=a[r._index];if(typeof K=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<K.length;)m(K.charCodeAt(r._bufferIndex));else m(K)}}function m(M){c=c(M)}function b(M){pe(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,O()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function x(M,K){const F=K||{};return F.type=M,F.start=v(),u.events.push(["enter",F,u]),s.push(F),F}function k(M){const K=s.pop();return K.end=v(),u.events.push(["exit",K,u]),K}function S(M,K){L(M,K.from)}function E(M,K){K.restore()}function T(M,K){return F;function F(I,D,j){let G,U,R,y;return Array.isArray(I)?z(I):"tokenize"in I?z([I]):_(I);function _(q){return Y;function Y(Q){const ee=Q!==null&&q[Q],J=Q!==null&&q.null,Z=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(J)?J:J?[J]:[]];return z(Z)(Q)}}function z(q){return G=q,U=0,q.length===0?j:w(q[U])}function w(q){return Y;function Y(Q){return y=N(),R=q,q.partial||(u.currentConstruct=q),q.name&&u.parser.constructs.disable.null.includes(q.name)?X():q.tokenize.call(K?Object.assign(Object.create(u),K):u,l,H,X)(Q)}}function H(q){return M(R,y),D}function X(q){return y.restore(),++U<G.length?w(G[U]):j}}}function L(M,K){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&Ut(u.events,K,u.events.length-K,M.resolve(u.events.slice(K),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function N(){const M=v(),K=u.previous,F=u.currentConstruct,I=u.events.length,D=Array.from(s);return{restore:j,from:I};function j(){r=M,u.previous=K,u.currentConstruct=F,u.events.length=I,s=D,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function T$(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function O$(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
30
+ <%s key={someKey} {...props} />`,dp,Er,uX,Er),uE[Er+dp]=!0}}return P===r?iX(at):rX(at),at}}function oX(P,te,ue){return cE(P,te,ue,!0)}function aX(P,te,ue){return cE(P,te,ue,!1)}var sX=aX,lX=oX;bi.Fragment=r,bi.jsx=sX,bi.jsxs=lX}()),bi}process.env.NODE_ENV==="production"?il.exports=dE():il.exports=pE();var T=il.exports;function hE(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];function u(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=k.useMemo(()=>v,Object.values(v));return T.jsx(h.Provider,{value:g,children:d})}function c(f,p){const d=(p==null?void 0:p[e][l])||s,v=k.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,vE(i,...t)]}function vE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var kr=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function mE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gE(...e){return t=>e.forEach(n=>mE(n,t))}var gp=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(bE);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return T.jsx(ol,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return T.jsx(ol,{...r,ref:t,children:n})});gp.displayName="Slot";var ol=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=wE(n);return k.cloneElement(n,{...xE(r,n.props),ref:t?gE(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});ol.displayName="SlotClone";var yE=({children:e})=>T.jsx(T.Fragment,{children:e});function bE(e){return k.isValidElement(e)&&e.type===yE}function xE(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function wE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],al=SE.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?gp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),sl="Avatar",[EE,pX]=hE(sl),[kE,yp]=EE(sl),ll=k.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=k.useState("idle");return T.jsx(kE,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:T.jsx(al.span,{...r,ref:t})})});ll.displayName=sl;var bp="AvatarImage",ul=k.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=yp(bp,n),s=CE(r),l=jn(u=>{i(u),a.onImageLoadingStatusChange(u)});return kr(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?T.jsx(al.img,{...o,ref:t,src:r}):null});ul.displayName=bp;var xp="AvatarFallback",cl=k.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=yp(xp,n),[a,s]=k.useState(r===void 0);return k.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?T.jsx(al.span,{...i,ref:t}):null});cl.displayName=xp;function CE(e){const[t,n]=k.useState("idle");return kr(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}function fl(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function TE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const $E=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function wp(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const OE=2.4,IE=.2126729,PE=.7151522,AE=.072175,RE=.56,_E=.57,DE=.62,ME=.65,_o=.022,Sp=1.414,jE=1.14,NE=1.14,LE=.035991,FE=.035991,BE=27.7847239587675,zE=27.7847239587675,Ep=.027,kp=.027,Cp=.001,WE=5e-4;function Tp(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**OE;return IE*i(t)+PE*i(n)+AE*i(r)}function $p(e,t){if(!e||!t)return 0;let n=Tp(fl(e)),r=Tp(fl(t)),i=0,o=0;return n=n>_o?n:n+(_o-n)**Sp,r=r>_o?r:r+(_o-r)**Sp,Math.abs(r-n)<WE?0:(r>n?(i=(r**RE-n**_E)*jE,o=i<Cp?0:i<LE?i-i*BE*Ep:i-Ep):(i=(r**ME-n**DE)*NE,o=i>-Cp?0:i>-FE?i-i*zE*kp:i+kp),Math.abs(o*100))}function Op(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Ip(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Pp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",f="month",p="quarter",d="year",v="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var M=["th","st","nd","rd"],W=j%100;return"["+j+(M[(W-20)%10]||M[W]||M[0])+"]"}},w=function(j,M,W){var G=String(j);return!G||G.length>=M?j:""+Array(M+1-G.length).join(W)+j},C={s:w,z:function(j){var M=-j.utcOffset(),W=Math.abs(M),G=Math.floor(W/60),V=W%60;return(M<=0?"+":"-")+w(G,2,"0")+":"+w(V,2,"0")},m:function j(M,W){if(M.date()<W.date())return-j(W,M);var G=12*(W.year()-M.year())+(W.month()-M.month()),V=M.clone().add(G,f),R=W-V<0,y=M.clone().add(G+(R?-1:1),f);return+(-(G+(W-V)/(R?V-y:y-V))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:f,y:d,w:c,d:u,D:v,h:l,m:s,s:a,ms:o,Q:p}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},S="en",E={};E[S]=b;var I="$isDayjsObject",L=function(j){return j instanceof H||!(!j||!j[I])},_=function j(M,W,G){var V;if(!M)return S;if(typeof M=="string"){var R=M.toLowerCase();E[R]&&(V=R),W&&(E[R]=W,V=R);var y=M.split("-");if(!V&&y.length>1)return j(y[0])}else{var $=M.name;E[$]=M,V=$}return!G&&V&&(S=V),V||!G&&S},O=function(j,M){if(L(j))return j.clone();var W=typeof M=="object"?M:{};return W.date=j,W.args=arguments,new H(W)},D=C;D.l=_,D.i=L,D.w=function(j,M){return O(j,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var H=function(){function j(W){this.$L=_(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[I]=!0}var M=j.prototype;return M.parse=function(W){this.$d=function(G){var V=G.date,R=G.utc;if(V===null)return new Date(NaN);if(D.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var y=V.match(g);if(y){var $=y[2]-1||0,N=(y[7]||"0").substring(0,3);return R?new Date(Date.UTC(y[1],$,y[3]||1,y[4]||0,y[5]||0,y[6]||0,N)):new Date(y[1],$,y[3]||1,y[4]||0,y[5]||0,y[6]||0,N)}}return new Date(V)}(W),this.init()},M.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(W,G){var V=O(W);return this.startOf(G)<=V&&V<=this.endOf(G)},M.isAfter=function(W,G){return O(W)<this.startOf(G)},M.isBefore=function(W,G){return this.endOf(G)<O(W)},M.$g=function(W,G,V){return D.u(W)?this[G]:this.set(V,W)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(W,G){var V=this,R=!!D.u(G)||G,y=D.p(W),$=function(ee,J){var Q=D.w(V.$u?Date.UTC(V.$y,J,ee):new Date(V.$y,J,ee),V);return R?Q:Q.endOf(u)},N=function(ee,J){return D.w(V.toDate()[ee].apply(V.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(J)),V)},x=this.$W,B=this.$M,Y=this.$D,K="set"+(this.$u?"UTC":"");switch(y){case d:return R?$(1,0):$(31,11);case f:return R?$(1,B):$(0,B+1);case c:var X=this.$locale().weekStart||0,Z=(x<X?x+7:x)-X;return $(R?Y-Z:Y+(6-Z),B);case u:case v:return N(K+"Hours",0);case l:return N(K+"Minutes",1);case s:return N(K+"Seconds",2);case a:return N(K+"Milliseconds",3);default:return this.clone()}},M.endOf=function(W){return this.startOf(W,!1)},M.$set=function(W,G){var V,R=D.p(W),y="set"+(this.$u?"UTC":""),$=(V={},V[u]=y+"Date",V[v]=y+"Date",V[f]=y+"Month",V[d]=y+"FullYear",V[l]=y+"Hours",V[s]=y+"Minutes",V[a]=y+"Seconds",V[o]=y+"Milliseconds",V)[R],N=R===u?this.$D+(G-this.$W):G;if(R===f||R===d){var x=this.clone().set(v,1);x.$d[$](N),x.init(),this.$d=x.set(v,Math.min(this.$D,x.daysInMonth())).$d}else $&&this.$d[$](N);return this.init(),this},M.set=function(W,G){return this.clone().$set(W,G)},M.get=function(W){return this[D.p(W)]()},M.add=function(W,G){var V,R=this;W=Number(W);var y=D.p(G),$=function(B){var Y=O(R);return D.w(Y.date(Y.date()+Math.round(B*W)),R)};if(y===f)return this.set(f,this.$M+W);if(y===d)return this.set(d,this.$y+W);if(y===u)return $(1);if(y===c)return $(7);var N=(V={},V[s]=r,V[l]=i,V[a]=n,V)[y]||1,x=this.$d.getTime()+W*N;return D.w(x,this)},M.subtract=function(W,G){return this.add(-1*W,G)},M.format=function(W){var G=this,V=this.$locale();if(!this.isValid())return V.invalidDate||h;var R=W||"YYYY-MM-DDTHH:mm:ssZ",y=D.z(this),$=this.$H,N=this.$m,x=this.$M,B=V.weekdays,Y=V.months,K=V.meridiem,X=function(J,Q,q,ie){return J&&(J[Q]||J(G,R))||q[Q].slice(0,ie)},Z=function(J){return D.s($%12||12,J,"0")},ee=K||function(J,Q,q){var ie=J<12?"AM":"PM";return q?ie.toLowerCase():ie};return R.replace(m,function(J,Q){return Q||function(q){switch(q){case"YY":return String(G.$y).slice(-2);case"YYYY":return D.s(G.$y,4,"0");case"M":return x+1;case"MM":return D.s(x+1,2,"0");case"MMM":return X(V.monthsShort,x,Y,3);case"MMMM":return X(Y,x);case"D":return G.$D;case"DD":return D.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return X(V.weekdaysMin,G.$W,B,2);case"ddd":return X(V.weekdaysShort,G.$W,B,3);case"dddd":return B[G.$W];case"H":return String($);case"HH":return D.s($,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return ee($,N,!0);case"A":return ee($,N,!1);case"m":return String(N);case"mm":return D.s(N,2,"0");case"s":return String(G.$s);case"ss":return D.s(G.$s,2,"0");case"SSS":return D.s(G.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(W,G,V){var R,y=this,$=D.p(G),N=O(W),x=(N.utcOffset()-this.utcOffset())*r,B=this-N,Y=function(){return D.m(y,N)};switch($){case d:R=Y()/12;break;case f:R=Y();break;case p:R=Y()/3;break;case c:R=(B-x)/6048e5;break;case u:R=(B-x)/864e5;break;case l:R=B/i;break;case s:R=B/r;break;case a:R=B/n;break;default:R=B}return V?R:D.a(R)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return E[this.$L]},M.locale=function(W,G){if(!W)return this.$L;var V=this.clone(),R=_(W,G,!0);return R&&(V.$L=R),V},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},j}(),F=H.prototype;return O.prototype=F,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",v]].forEach(function(j){F[j[1]]=function(M){return this.$g(M,j[0],j[1])}}),O.extend=function(j,M){return j.$i||(j(M,H,O),j.$i=!0),O},O.locale=_,O.isDayjs=L,O.unix=function(j){return O(1e3*j)},O.en=E[S],O.Ls=E,O.p={},O})})(Pp);var UE=Pp.exports;const Do=Ee(UE);var Ap={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(Ap);var HE=Ap.exports;const VE=Ee(HE);var Rp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Rp);var qE=Rp.exports;const KE=Ee(qE);let Mo;const GE=new Uint8Array(16);function YE(){if(!Mo&&(Mo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mo(GE)}const pt=[];for(let e=0;e<256;++e)pt.push((e+256).toString(16).slice(1));function XE(e,t=0){return pt[e[t+0]]+pt[e[t+1]]+pt[e[t+2]]+pt[e[t+3]]+"-"+pt[e[t+4]]+pt[e[t+5]]+"-"+pt[e[t+6]]+pt[e[t+7]]+"-"+pt[e[t+8]]+pt[e[t+9]]+"-"+pt[e[t+10]]+pt[e[t+11]]+pt[e[t+12]]+pt[e[t+13]]+pt[e[t+14]]+pt[e[t+15]]}const _p={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Dp(e,t,n){if(_p.randomUUID&&!t&&!e)return _p.randomUUID();e=e||{};const r=e.random||(e.rng||YE)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,XE(r)}Do.extend(VE),Do.extend(KE);function Mp(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(c=>c.id===a);let u;return l&&l.id===n?u={name:l.name||"You",avatar:l.pictureUrl}:l?u={name:l.name||"Agent",avatar:l.pictureUrl}:u={name:r||"Bot",avatar:i},{...o,direction:s,sender:u}})}function JE(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(jp(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!Do(s).isSame(l,t)&&l&&n.push(jp(l))}return n}function jp(e){return{id:Dp(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:QE(e)}}}function QE(e,t=!1){const n=Do(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function ZE(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function ek(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function tk(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function nk(e,t){return e.map(n=>Math.round(n*t))}const xi=e=>t=>tk(t,e),wi=e=>t=>nk(t,e),rk={50:xi(.95),100:xi(.9),200:xi(.75),300:xi(.6),400:xi(.3),500:e=>e,600:wi(.9),700:wi(.6),800:wi(.45),900:wi(.3),950:wi(.2)};function Np(e,t=rk){const n={},r=ZE(e);for(const[i,o]of Object.entries(t))n[i]=ek(o(r));return n}function Lp(e){const{fontFamily:t,radius:n,themeMode:r,color:i,variant:o,headerVariant:a}=e;let s={},l={};if(i){const d=Np(i),v=r==="dark"?wp(d):d,h=Np(TE($E(fl(i)))),g=r==="dark"?wp(h):h,m=r==="dark"?"#101010":"#fdfdfd";l=Object.entries({...v,1:m}).reduce((w,[C,S])=>({...w,[`--bpPrimary-${C}`]:S}),{});const b=Object.entries({...g,1:m}).reduce((w,[C,S])=>({...w,[`--bpGray-${C}`]:S}),{});s={...l,...b}}n&&(s={...s,"--bpRadius-scale":n.toString()});const u=r==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=l?$p(l["--bpPrimary-600"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=o==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":l?$p(l["--bpPrimary-500"],l["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},p=a==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)"}:{"--header-bg":u.bg,"--header-bg-hover":u.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return s={...s,...f,...p},Op(":root",s)+(t?Op(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const ik=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Fp=["audio","file","image","video"],Bp=e=>Fp.includes(e),zp="The Client ID is required to initialize the webchat.",ok="The API url is required to initialize the webchat.",ak="The Bot ID is required to initialize the webchat.",sk="No config URL provided.",Wp="Invalid API URL. Please use a valid API URL.",Up="Invalid Client ID. Please use a valid Botpress Client ID.",Hp="Invalid URL. Please make sure your client ID and API URL are valid",lk="Invalid config URL. Please make sure your config URL is valid",uk="Invalid webchat configuration, please make sure your config file is valid",ck="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",Vp="This bot is currently blocked or disabled.",qp="This bot has temporarily paused. Please check back later.",Kp="You are not a participant of this conversation, please clear your local storage.",Gp="Please check your internet connection and refresh the page.",jo=e=>{var n,r;console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};if(e instanceof Error&&"id"in e&&"code"in e&&"type"in e){const i=e;i.code===404&&((n=i.message)!=null&&n.includes("[Webhook Handler]"))&&i.type==="ResourceNotFound"?t={type:"configuration",message:Up}:i.code===403&&((r=i.message)!=null&&r.includes("[Webhook Handler]"))&&i.type==="Forbidden"?t={type:"bot",message:Vp}:i.code===405&&i.type==="MethodNotFound"?t={type:"configuration",message:Hp}:i.code===403&&i.type==="QuotaExceeded"?t={type:"bot",message:qp}:i.code===403&&i.type==="Forbidden"?t={type:"bot",message:Kp}:t={type:i.type,message:i.message}}else e instanceof Error&&(e.message.replaceAll(" ","").toLowerCase().includes("networkerror")||e.message.replaceAll(" ","").toLowerCase().includes("failedtofetch"))&&(t={type:"network",message:Gp});return t},No=A.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Ip(e??"",15);return T.jsxs(ll,{ref:a,"data-color":s,...n,...o,children:[T.jsx(ul,{src:t,...r}),T.jsx(cl,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});No.displayName="Avatar";function vX(){}function mX(){}function fk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hk={};function Yp(e,t){return(hk.jsx?pk:dk).test(e)}const vk=/[ \t\n\f\r]/g;function mk(e){return typeof e=="object"?e.type==="text"?Xp(e.value):!1:Xp(e)}function Xp(e){return e.replace(vk,"")===""}class Si{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Si.prototype.property={},Si.prototype.normal={},Si.prototype.space=null;function Jp(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Si(n,r,t)}function dl(e){return e.toLowerCase()}class Wt{constructor(t,n){this.property=t,this.attribute=n}}Wt.prototype.space=null,Wt.prototype.boolean=!1,Wt.prototype.booleanish=!1,Wt.prototype.overloadedBoolean=!1,Wt.prototype.number=!1,Wt.prototype.commaSeparated=!1,Wt.prototype.spaceSeparated=!1,Wt.prototype.commaOrSpaceSeparated=!1,Wt.prototype.mustUseProperty=!1,Wt.prototype.defined=!1;let gk=0;const ye=tr(),et=tr(),Qp=tr(),re=tr(),Ue=tr(),Cr=tr(),jt=tr();function tr(){return 2**++gk}const pl=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:et,commaOrSpaceSeparated:jt,commaSeparated:Cr,number:re,overloadedBoolean:Qp,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),hl=Object.keys(pl);class vl extends Wt{constructor(t,n,r,i){let o=-1;if(super(t,n),Zp(this,"space",i),typeof r=="number")for(;++o<hl.length;){const a=hl[o];Zp(this,hl[o],(r&pl[a])===pl[a])}}}vl.prototype.defined=!0;function Zp(e,t,n){n&&(e[t]=n)}const yk={}.hasOwnProperty;function Tr(e){const t={},n={};let r;for(r in e.properties)if(yk.call(e.properties,r)){const i=e.properties[r],o=new vl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[dl(r)]=r,n[dl(o.attribute)]=r}return new Si(t,n,e.space)}const eh=Tr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),th=Tr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function nh(e,t){return t in e?e[t]:t}function rh(e,t){return nh(e,t.toLowerCase())}const ih=Tr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:rh,properties:{xmlns:null,xmlnsXLink:null}}),oh=Tr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:et,ariaAutoComplete:null,ariaBusy:et,ariaChecked:et,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:et,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:et,ariaFlowTo:Ue,ariaGrabbed:et,ariaHasPopup:null,ariaHidden:et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:re,ariaLive:null,ariaModal:et,ariaMultiLine:et,ariaMultiSelectable:et,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:et,ariaReadOnly:et,ariaRelevant:null,ariaRequired:et,ariaRoleDescription:Ue,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:et,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),bk=Tr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:rh,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cr,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Ue,autoFocus:ye,autoPlay:ye,blocking:Ue,capture:null,charSet:null,checked:ye,cite:null,className:Ue,cols:re,colSpan:null,content:null,contentEditable:et,controls:ye,controlsList:Ue,coords:re|Cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:Qp,draggable:et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Ue,height:re,hidden:ye,high:re,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:ye,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:re,pattern:null,ping:Ue,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Ue,required:ye,reversed:ye,rows:re,rowSpan:re,sandbox:Ue,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:et,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:et,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:re,security:null,unselectable:null}}),xk=Tr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:nh,properties:{about:jt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Ue,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cr,g2:Cr,glyphName:Cr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jt,rev:jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jt,requiredFeatures:jt,requiredFonts:jt,requiredFormats:jt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),wk=/^data[-\w.:]+$/i,ah=/-[a-z]/g,Sk=/[A-Z]/g;function Ek(e,t){const n=dl(t);let r=t,i=Wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wk.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ah,Ck);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ah.test(o)){let a=o.replace(Sk,kk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=vl}return new i(r,t)}function kk(e){return"-"+e.toLowerCase()}function Ck(e){return e.charAt(1).toUpperCase()}const Tk={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$k=Jp([th,eh,ih,oh,bk],"html"),ml=Jp([th,eh,ih,oh,xk],"svg");function Ok(e){return e.join(" ").trim()}var sh={},lh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ik=/\n/g,Pk=/^\s*/,Ak=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Rk=/^:\s*/,_k=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Dk=/^[;\s]*/,Mk=/^\s+|\s+$/g,jk=`
31
+ `,uh="/",ch="*",nr="",Nk="comment",Lk="declaration",Fk=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(v){var h=v.match(Ik);h&&(n+=h.length);var g=v.lastIndexOf(jk);r=~g?v.length-g:r+v.length}function o(){var v={line:n,column:r};return function(h){return h.position=new a(v),u(),h}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(v){var h=new Error(t.source+":"+n+":"+r+": "+v);if(h.reason=v,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(v){var h=v.exec(e);if(h){var g=h[0];return i(g),e=e.slice(g.length),h}}function u(){l(Pk)}function c(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=o();if(!(uh!=e.charAt(0)||ch!=e.charAt(1))){for(var h=2;nr!=e.charAt(h)&&(ch!=e.charAt(h)||uh!=e.charAt(h+1));)++h;if(h+=2,nr===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,i(g),e=e.slice(h),r+=2,v({type:Nk,comment:g})}}function p(){var v=o(),h=l(Ak);if(h){if(f(),!l(Rk))return s("property missing ':'");var g=l(_k),m=v({type:Lk,property:fh(h[0].replace(lh,nr)),value:g?fh(g[0].replace(lh,nr)):nr});return l(Dk),m}}function d(){var v=[];c(v);for(var h;h=p();)h!==!1&&(v.push(h),c(v));return v}return u(),d()};function fh(e){return e?e.replace(Mk,nr):nr}var Bk=Xt&&Xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sh,"__esModule",{value:!0});var dh=sh.default=Wk,zk=Bk(Fk);function Wk(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,zk.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const Uk=dh.default||dh,ph=hh("end"),gl=hh("start");function hh(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Hk(e){const t=gl(e),n=ph(e);if(t&&n)return{start:t,end:n}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vh(e.position):"start"in e||"end"in e?vh(e):"line"in e||"column"in e?yl(e):""}function yl(e){return mh(e&&e.line)+":"+mh(e&&e.column)}function vh(e){return yl(e&&e.start)+"-"+yl(e&&e.end)}function mh(e){return e&&typeof e=="number"?e:1}class yt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ei(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}yt.prototype.file="",yt.prototype.name="",yt.prototype.reason="",yt.prototype.message="",yt.prototype.stack="",yt.prototype.column=void 0,yt.prototype.line=void 0,yt.prototype.ancestors=void 0,yt.prototype.cause=void 0,yt.prototype.fatal=void 0,yt.prototype.place=void 0,yt.prototype.ruleId=void 0,yt.prototype.source=void 0;const bl={}.hasOwnProperty,Vk=new Map,qk=/[A-Z]/g,Kk=/-([a-z])/g,Gk=new Set(["table","tbody","thead","tfoot","tr"]),Yk=new Set(["td","th"]),gh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=iC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=rC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ml:$k,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yh(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function yh(e,t,n){if(t.type==="element")return Jk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return eC(e,t,n);if(t.type==="mdxjsEsm")return Zk(e,t);if(t.type==="root")return tC(e,t,n);if(t.type==="text")return nC(e,t)}function Jk(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ml,e.schema=i),e.ancestors.push(t);const o=xh(e,t.tagName,!1),a=oC(e,t);let s=wl(e,t);return Gk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!mk(l):!0})),bh(e,a,o,t),xl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Qk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ki(e,t.position)}function Zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ki(e,t.position)}function eC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ml,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:xh(e,t.name,!0),a=aC(e,t),s=wl(e,t);return bh(e,a,o,t),xl(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function tC(e,t,n){const r={};return xl(r,wl(e,t)),e.create(t,e.Fragment,r,n)}function nC(e,t){return t.value}function bh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rC(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function iC(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=gl(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&bl.call(t.properties,i)){const o=sC(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Yk.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ki(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else ki(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function wl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Vk;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=yh(e,o,a);s!==void 0&&n.push(s)}return n}function sC(e,t,n){const r=Ek(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fk(n):Ok(n)),r.property==="style"){let i=typeof n=="object"?n:lC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=uC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Tk[r.property]||r.property:r.attribute,n]}}function lC(e,t){const n={};try{Uk(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=gh+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(Kk,fC)),n[a]=o}}function xh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=Yp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Yp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return bl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ki(e)}function ki(e,t){const n=new yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=gh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function uC(e){const t={};let n;for(n in e)bl.call(e,n)&&(t[cC(n)]=e[n]);return t}function cC(e){let t=e.replace(qk,dC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function fC(e,t){return t.toUpperCase()}function dC(e){return"-"+e.toLowerCase()}const Sl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pC={};function El(e,t){const n=pC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wh(e,r,i)}function wh(e,t,n){if(hC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sh(e.children,t,n)}return Array.isArray(e)?Sh(e,t,n):""}function Sh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=wh(e[i],t,n);return r.join("")}function hC(e){return!!(e&&typeof e=="object")}const Eh=document.createElement("i");function kl(e){const t="&"+e+";";Eh.innerHTML=t;const n=Eh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ut(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Ht(e,t){return e.length>0?(Ut(e,e.length,0,t),e):t}const kh={}.hasOwnProperty;function Ch(e){const t={};let n=-1;for(;++n<e.length;)vC(t,e[n]);return t}function vC(e,t){let n;for(n in t){const i=(kh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){kh.call(i,a)||(i[a]=[]);const s=o[a];mC(i[a],Array.isArray(s)?s:s?[s]:[])}}}function mC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ut(e,0,0,r)}function Th(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tt=Nn(/[A-Za-z]/),bt=Nn(/[\dA-Za-z]/),gC=Nn(/[#-'*+\--9=?A-Z^-~]/);function Lo(e){return e!==null&&(e<32||e===127)}const Cl=Nn(/\d/),yC=Nn(/[\dA-Fa-f]/),bC=Nn(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Fo=Nn(new RegExp("\\p{P}|\\p{S}","u")),rr=Nn(/\s/);function Nn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&bt(e.charCodeAt(n+1))&&bt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return be(l)?(e.enter(n),s(l)):t(l)}function s(l){return be(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const xC={tokenize:wC};function wC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ke(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return he(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const SC={tokenize:EC},$h={tokenize:kC};function EC(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const C=t.events.length;let S=C,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){E=t.events[S][1].end;break}m(r);let I=C;for(;I<t.events.length;)t.events[I][1].end=Object.assign({},E),I++;return Ut(t.events,S+1,0,t.events.slice(C)),t.events.length=I,u(w)}return s(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return v(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($h,c,f)(w)}function c(w){return i&&b(),m(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(w)}function p(w){return t.containerState={},e.attempt($h,d,v)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function v(w){if(w===null){i&&b(),m(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return he(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,C){const S=t.sliceStream(w);if(C&&S.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(S),t.parser.lazy[w.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;const I=t.events.length;let L=I,_,O;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(_){O=t.events[L][1].end;break}_=!0}for(m(r),E=I;E<t.events.length;)t.events[E][1].end=Object.assign({},O),E++;Ut(t.events,L+1,0,t.events.slice(I)),t.events.length=E}}function m(w){let C=n.length;for(;C-- >w;){const S=n[C];t.containerState=S[1],S[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function kC(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bo(e){if(e===null||Be(e)||rr(e))return 1;if(Fo(e))return 2}function zo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Tl={name:"attention",tokenize:TC,resolveAll:CC};function CC(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Oh(f,-l),Oh(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ht(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ht(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=Ht(u,zo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ht(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Ht(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ut(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function TC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bo(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),c=Bo(l),f=!c||c===2&&i||n.includes(l),p=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!p)),u._close=!!(o===42?p:p&&(c||!f)),t(l)}}function Oh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $C={name:"autolink",tokenize:OC};function OC(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return Tt(d)?(e.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||bt(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||bt(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Lo(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),c):gC(d)?(e.consume(d),u):n(d)}function c(d){return bt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||bt(d))&&r++<63){const v=d===45?p:f;return e.consume(d),v}return n(d)}}const Ci={tokenize:IC,partial:!0};function IC(e,t,n){return r;function r(o){return be(o)?ke(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||he(o)?t(o):n(o)}}const Ih={name:"blockQuote",tokenize:PC,continuation:{tokenize:AC},exit:RC};function PC(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return be(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function AC(e,t,n){const r=this;return i;function i(a){return be(a)?ke(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(Ih,t,n)(a)}}function RC(e){e.exit("blockQuote")}const Ph={name:"characterEscape",tokenize:_C};function _C(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return bC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ah={name:"characterReference",tokenize:DC};function DC(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=bt,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=yC,c):(e.enter("characterReferenceValue"),o=7,a=Cl,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return a===bt&&!kl(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),c):n(f)}}const Rh={tokenize:jC,partial:!0},_h={name:"codeFenced",tokenize:MC,concrete:!0};function MC(e,t,n){const r=this,i={tokenize:S,partial:!0};let o=0,a=0,s;return l;function l(E){return u(E)}function u(E){const I=r.events[r.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(a++,e.consume(E),c):a<3?n(E):(e.exit("codeFencedFenceSequence"),be(E)?ke(e,f,"whitespace")(E):f(E))}function f(E){return E===null||he(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Rh,h,C)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||he(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):be(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||he(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===null||he(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),v)}function h(E){return e.attempt(i,C,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return o>0&&be(E)?ke(e,b,"linePrefix",o+1)(E):b(E)}function b(E){return E===null||he(E)?e.check(Rh,h,C)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||he(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),w)}function C(E){return e.exit("codeFenced"),t(E)}function S(E,I,L){let _=0;return O;function O(M){return E.enter("lineEnding"),E.consume(M),E.exit("lineEnding"),D}function D(M){return E.enter("codeFencedFence"),be(M)?ke(E,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):H(M)}function H(M){return M===s?(E.enter("codeFencedFenceSequence"),F(M)):L(M)}function F(M){return M===s?(_++,E.consume(M),F):_>=a?(E.exit("codeFencedFenceSequence"),be(M)?ke(E,j,"whitespace")(M):j(M)):L(M)}function j(M){return M===null||he(M)?(E.exit("codeFencedFence"),I(M)):L(M)}}}function jC(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $l={name:"codeIndented",tokenize:LC},NC={tokenize:FC,partial:!0};function LC(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ke(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):he(u)?e.attempt(NC,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||he(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function FC(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ke(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):he(a)?i(a):n(a)}}const BC={name:"codeText",tokenize:UC,resolve:zC,previous:WC};function zC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function WC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UC(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,c(f)):he(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||he(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class HC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ti(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ti(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ti(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ti(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ti(this.left,n.reverse())}}}function Ti(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Dh(e){const t={};let n=-1,r,i,o,a,s,l,u;const c=new HC(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,VC(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Ut(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function VC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={};let c,f,p=-1,d=n,v=0,h=0;const g=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const m=s.slice(g[p],g[p+1]),b=o.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),p=-1;++p<l.length;)u[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return u}const qC={tokenize:YC,resolve:GC},KC={tokenize:XC,partial:!0};function GC(e){return Dh(e),e}function YC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):he(s)?e.check(KC,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function XC(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ke(e,o,"linePrefix")}function o(a){if(a===null||he(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Mh(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(m){return m===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(m),e.exit(o),p):m===null||m===32||m===41||Lo(m)?n(m):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function p(m){return m===62?(e.enter(o),e.consume(m),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||he(m)?n(m):(e.consume(m),m===92?v:d)}function v(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function h(m){return!c&&(m===null||m===41||Be(m))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(m)):c<u&&m===40?(e.consume(m),c++,h):m===41?(e.consume(m),c--,h):m===null||m===32||m===40||Lo(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===40||m===41||m===92?(e.consume(m),h):h(m)}}function jh(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):he(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||he(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!be(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Nh(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===a?(e.exit(o),l(a)):p===null?n(p):he(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ke(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||he(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(e.consume(p),c):c(p)}}function $i(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const JC={name:"definition",tokenize:ZC},QC={tokenize:eT,partial:!0};function ZC(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return jh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Be(d)?$i(e,u)(d):u(d)}function u(d){return Mh(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(QC,f,f)(d)}function f(d){return be(d)?ke(e,p,"whitespace")(d):p(d)}function p(d){return d===null||he(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function eT(e,t,n){return r;function r(s){return Be(s)?$i(e,i)(s):n(s)}function i(s){return Nh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return be(s)?ke(e,a,"whitespace")(s):a(s)}function a(s){return s===null||he(s)?t(s):n(s)}}const tT={name:"hardBreakEscape",tokenize:nT};function nT(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return he(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const rT={name:"headingAtx",tokenize:oT,resolve:iT};function iT(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ut(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function oT(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Be(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||he(c)?(e.exit("atxHeading"),t(c)):be(c)?ke(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Be(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const aT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Lh=["pre","script","style","textarea"],sT={name:"htmlFlow",tokenize:fT,resolveTo:cT,concrete:!0},lT={tokenize:pT,partial:!0},uT={tokenize:dT,partial:!0};function cT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fT(e,t,n){const r=this;let i,o,a,s,l;return u;function u(x){return c(x)}function c(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),f}function f(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),o=!0,h):x===63?(e.consume(x),i=3,r.interrupt?t:y):Tt(x)?(e.consume(x),a=String.fromCharCode(x),g):n(x)}function p(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,s=0,v):Tt(x)?(e.consume(x),i=4,r.interrupt?t:y):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:y):n(x)}function v(x){const B="CDATA[";return x===B.charCodeAt(s++)?(e.consume(x),s===B.length?r.interrupt?t:H:v):n(x)}function h(x){return Tt(x)?(e.consume(x),a=String.fromCharCode(x),g):n(x)}function g(x){if(x===null||x===47||x===62||Be(x)){const B=x===47,Y=a.toLowerCase();return!B&&!o&&Lh.includes(Y)?(i=1,r.interrupt?t(x):H(x)):aT.includes(a.toLowerCase())?(i=6,B?(e.consume(x),m):r.interrupt?t(x):H(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?b(x):w(x))}return x===45||bt(x)?(e.consume(x),a+=String.fromCharCode(x),g):n(x)}function m(x){return x===62?(e.consume(x),r.interrupt?t:H):n(x)}function b(x){return be(x)?(e.consume(x),b):O(x)}function w(x){return x===47?(e.consume(x),O):x===58||x===95||Tt(x)?(e.consume(x),C):be(x)?(e.consume(x),w):O(x)}function C(x){return x===45||x===46||x===58||x===95||bt(x)?(e.consume(x),C):S(x)}function S(x){return x===61?(e.consume(x),E):be(x)?(e.consume(x),S):w(x)}function E(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,I):be(x)?(e.consume(x),E):L(x)}function I(x){return x===l?(e.consume(x),l=null,_):x===null||he(x)?n(x):(e.consume(x),I)}function L(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Be(x)?S(x):(e.consume(x),L)}function _(x){return x===47||x===62||be(x)?w(x):n(x)}function O(x){return x===62?(e.consume(x),D):n(x)}function D(x){return x===null||he(x)?H(x):be(x)?(e.consume(x),D):n(x)}function H(x){return x===45&&i===2?(e.consume(x),W):x===60&&i===1?(e.consume(x),G):x===62&&i===4?(e.consume(x),$):x===63&&i===3?(e.consume(x),y):x===93&&i===5?(e.consume(x),R):he(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(lT,N,F)(x)):x===null||he(x)?(e.exit("htmlFlowData"),F(x)):(e.consume(x),H)}function F(x){return e.check(uT,j,N)(x)}function j(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),M}function M(x){return x===null||he(x)?F(x):(e.enter("htmlFlowData"),H(x))}function W(x){return x===45?(e.consume(x),y):H(x)}function G(x){return x===47?(e.consume(x),a="",V):H(x)}function V(x){if(x===62){const B=a.toLowerCase();return Lh.includes(B)?(e.consume(x),$):H(x)}return Tt(x)&&a.length<8?(e.consume(x),a+=String.fromCharCode(x),V):H(x)}function R(x){return x===93?(e.consume(x),y):H(x)}function y(x){return x===62?(e.consume(x),$):x===45&&i===2?(e.consume(x),y):H(x)}function $(x){return x===null||he(x)?(e.exit("htmlFlowData"),N(x)):(e.consume(x),$)}function N(x){return e.exit("htmlFlow"),t(x)}}function dT(e,t,n){const r=this;return i;function i(a){return he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function pT(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ci,t,n)}}const hT={name:"htmlText",tokenize:vT};function vT(e,t,n){const r=this;let i,o,a;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),S):y===63?(e.consume(y),w):Tt(y)?(e.consume(y),L):n(y)}function u(y){return y===45?(e.consume(y),c):y===91?(e.consume(y),o=0,v):Tt(y)?(e.consume(y),b):n(y)}function c(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):he(y)?(a=f,G(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?W(y):y===45?p(y):f(y)}function v(y){const $="CDATA[";return y===$.charCodeAt(o++)?(e.consume(y),o===$.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):he(y)?(a=h,G(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?W(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?W(y):he(y)?(a=b,G(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),C):he(y)?(a=w,G(y)):(e.consume(y),w)}function C(y){return y===62?W(y):w(y)}function S(y){return Tt(y)?(e.consume(y),E):n(y)}function E(y){return y===45||bt(y)?(e.consume(y),E):I(y)}function I(y){return he(y)?(a=I,G(y)):be(y)?(e.consume(y),I):W(y)}function L(y){return y===45||bt(y)?(e.consume(y),L):y===47||y===62||Be(y)?_(y):n(y)}function _(y){return y===47?(e.consume(y),W):y===58||y===95||Tt(y)?(e.consume(y),O):he(y)?(a=_,G(y)):be(y)?(e.consume(y),_):W(y)}function O(y){return y===45||y===46||y===58||y===95||bt(y)?(e.consume(y),O):D(y)}function D(y){return y===61?(e.consume(y),H):he(y)?(a=D,G(y)):be(y)?(e.consume(y),D):_(y)}function H(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,F):he(y)?(a=H,G(y)):be(y)?(e.consume(y),H):(e.consume(y),j)}function F(y){return y===i?(e.consume(y),i=void 0,M):y===null?n(y):he(y)?(a=F,G(y)):(e.consume(y),F)}function j(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Be(y)?_(y):(e.consume(y),j)}function M(y){return y===47||y===62||Be(y)?_(y):n(y)}function W(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),V}function V(y){return be(y)?ke(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):R(y)}function R(y){return e.enter("htmlTextData"),a(y)}}const Ol={name:"labelEnd",tokenize:wT,resolveTo:xT,resolveAll:bT},mT={tokenize:ST},gT={tokenize:ET},yT={tokenize:kT};function bT(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function xT(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=Ht(s,e.slice(o+1,o+r+3)),s=Ht(s,[["enter",c,t]]),s=Ht(s,zo(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Ht(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Ht(s,e.slice(a+1)),s=Ht(s,[["exit",l,t]]),Ut(e,o,e.length,s),e}function wT(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?f(p):(a=r.parser.defined.includes(Jt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(mT,c,a?c:f)(p):p===91?e.attempt(gT,c,a?u:f)(p):a?c(p):f(p)}function u(p){return e.attempt(yT,c,f)(p)}function c(p){return t(p)}function f(p){return o._balanced=!0,n(p)}}function ST(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Be(f)?$i(e,o)(f):o(f)}function o(f){return f===41?c(f):Mh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Be(f)?$i(e,l)(f):c(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Nh(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Be(f)?$i(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function ET(e,t,n){const r=this;return i;function i(s){return jh.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function kT(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const CT={name:"labelStartImage",tokenize:TT,resolveAll:Ol.resolveAll};function TT(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const $T={name:"labelStartLink",tokenize:OT,resolveAll:Ol.resolveAll};function OT(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Il={name:"lineEnding",tokenize:IT};function IT(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ke(e,t,"linePrefix")}}const Wo={name:"thematicBreak",tokenize:PT};function PT(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||he(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),be(u)?ke(e,s,"whitespace")(u):s(u))}}const It={name:"list",tokenize:_T,continuation:{tokenize:DT},exit:jT},AT={tokenize:NT,partial:!0},RT={tokenize:MT,partial:!0};function _T(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const v=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Cl(d)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Wo,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Cl(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Ci,r.interrupt?n:c,e.attempt(AT,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return be(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function DT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ci,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!be(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(RT,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(It,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function MT(e,t,n){const r=this;return ke(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function jT(e){e.exit(this.containerState.type)}function NT(e,t,n){const r=this;return ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!be(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Fh={name:"setextUnderline",tokenize:FT,resolveTo:LT};function LT(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function FT(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),be(u)?ke(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||he(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const BT={tokenize:zT};function zT(e){const t=this,n=e.attempt(Ci,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qC,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WT={resolveAll:zh()},UT=Bh("string"),HT=Bh("text");function Bh(e){return{tokenize:t,resolveAll:zh(e==="text"?VT:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function zh(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function VT(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function qT(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:w,exit:C,attempt:I(S),check:I(E),interrupt:I(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:v,defineSkip:h,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(D){return a=Ht(a,D),g(),a[a.length-1]!==null?[]:(L(t,0),u.events=zo(o,u.events,u),u.events)}function p(D,H){return GT(d(D),H)}function d(D){return KT(a,D)}function v(){const{line:D,column:H,offset:F,_index:j,_bufferIndex:M}=r;return{line:D,column:H,offset:F,_index:j,_bufferIndex:M}}function h(D){i[D.line]=D.column,O()}function g(){let D;for(;r._index<a.length;){const H=a[r._index];if(typeof H=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<H.length;)m(H.charCodeAt(r._bufferIndex));else m(H)}}function m(D){c=c(D)}function b(D){he(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,O()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function w(D,H){const F=H||{};return F.type=D,F.start=v(),u.events.push(["enter",F,u]),s.push(F),F}function C(D){const H=s.pop();return H.end=v(),u.events.push(["exit",H,u]),H}function S(D,H){L(D,H.from)}function E(D,H){H.restore()}function I(D,H){return F;function F(j,M,W){let G,V,R,y;return Array.isArray(j)?N(j):"tokenize"in j?N([j]):$(j);function $(K){return X;function X(Z){const ee=Z!==null&&K[Z],J=Z!==null&&K.null,Q=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(J)?J:J?[J]:[]];return N(Q)(Z)}}function N(K){return G=K,V=0,K.length===0?W:x(K[V])}function x(K){return X;function X(Z){return y=_(),R=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Y():K.tokenize.call(H?Object.assign(Object.create(u),H):u,l,B,Y)(Z)}}function B(K){return D(R,y),M}function Y(K){return y.restore(),++V<G.length?x(G[V]):W}}}function L(D,H){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&Ut(u.events,H,u.events.length-H,D.resolve(u.events.slice(H),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function _(){const D=v(),H=u.previous,F=u.currentConstruct,j=u.events.length,M=Array.from(s);return{restore:W,from:j};function W(){r=D,u.previous=H,u.currentConstruct=F,u.events.length=j,s=M,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function KT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function GT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
32
32
  `;break}case-3:{a=`\r
33
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const I$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Ak},disable:{null:[]},document:{42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:yh},flow:{35:Nk,42:zo,45:[Oh,zo],60:zk,61:Oh,95:zo,96:Sh,126:Sh},flowInitial:{[-2]:kl,[-1]:kl,32:kl},insideSpan:{null:[Cl,S$]},string:{38:xh,92:bh},text:{[-5]:Tl,[-4]:Tl,[-3]:Tl,33:o$,38:xh,42:Cl,60:[sk,Gk],91:s$,92:[Mk,bh],93:$l,95:Cl,96:xk}},Symbol.toStringTag,{value:"Module"}));function P$(e){const n=hh([I$,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(ek),document:i(nk),flow:i(x$),string:i(E$),text:i(C$)};return r;function i(o){return a;function a(s){return $$(r,o,s)}}}function A$(e){for(;!Eh(e););return e}const Ah=/[\0\t\n\r]/g;function R$(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,c,f,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Ah.lastIndex=f,u=Ah.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(o.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const D$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _$(e){return e.replace(D$,M$)}function M$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return vh(n.slice(o?2:1),o?16:10)}return Sl(n)||e}const Rh={}.hasOwnProperty;function j$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),N$(n)(A$(P$(n).document().write(R$()(e,t,!0))))}function N$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ae),autolinkProtocol:N,autolinkEmail:N,atxHeading:o(de),blockQuote:o(J),characterEscape:N,characterReference:N,codeFenced:o(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Z,a),codeText:o(V,a),codeTextData:N,data:N,codeFlowValue:N,definition:o(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(le),hardBreakEscape:o(ae),hardBreakTrailing:o(ae),htmlFlow:o(ge,a),htmlFlowData:N,htmlText:o(ge,a),htmlTextData:N,image:o($e),label:a,link:o(Ae),listItem:o(Et),listItemValue:p,listOrdered:o(rt,f),listUnordered:o(rt),paragraph:o(Ct),reference:w,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(de),strong:o(kt),thematicBreak:o(ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ee,autolinkProtocol:Q,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:q,characterReference:Y,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:l(m),codeText:l(D),codeTextData:O,data:O,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(K),hardBreakTrailing:l(K),htmlFlow:l(F),htmlFlowData:O,htmlText:l(I),htmlTextData:O,image:l(G),label:R,labelText:U,lineEnding:M,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:H,resourceDestinationString:y,resourceTitleString:_,resource:z,setextHeading:l(L),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};Dh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let B={type:"root",children:[]};const ne={stack:[B],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},se=[];let fe=-1;for(;++fe<W.length;)if(W[fe][1].type==="listOrdered"||W[fe][1].type==="listUnordered")if(W[fe][0]==="enter")se.push(fe);else{const ve=se.pop();fe=i(W,ve,fe)}for(fe=-1;++fe<W.length;){const ve=t[W[fe][0]];Rh.call(ve,W[fe][1].type)&&ve[W[fe][1].type].call(Object.assign({sliceSerialize:W[fe][2].sliceSerialize},ne),W[fe][1])}if(ne.tokenStack.length>0){const ve=ne.tokenStack[ne.tokenStack.length-1];(ve[1]||_h).call(ne,void 0,ve[0])}for(B.position={start:Ln(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Ln(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)B=t.transforms[fe](B)||B;return B}function i(W,B,ne){let se=B-1,fe=-1,ve=!1,Ye,Xe,gt,it;for(;++se<=ne;){const Re=W[se];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?fe++:fe--,it=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ye&&!it&&!fe&&!gt&&(gt=se),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!fe&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||fe===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ye){let ot=se;for(Xe=void 0;ot--;){const Ze=W[ot];if(Ze[1].type==="lineEnding"||Ze[1].type==="lineEndingBlank"){if(Ze[0]==="exit")continue;Xe&&(W[Xe][1].type="lineEndingBlank",ve=!0),Ze[1].type="lineEnding",Xe=ot}else if(!(Ze[1].type==="linePrefix"||Ze[1].type==="blockQuotePrefix"||Ze[1].type==="blockQuotePrefixWhitespace"||Ze[1].type==="blockQuoteMarker"||Ze[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(Ye._spread=!0),Ye.end=Object.assign({},Xe?W[Xe][1].start:Re[1].end),W.splice(Xe||se,0,["exit",Ye,Re[2]]),se++,ne++}if(Re[1].type==="listItemPrefix"){const ot={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ye=ot,W.splice(se,0,["enter",ot,Re[2]]),se++,ne++,gt=void 0,it=!0}}}return W[B][1]._spread=ve,ne}function o(W,B){return ne;function ne(se){s.call(this,W(se),se),B&&B.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,B,ne){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([B,ne]),W.position={start:Ln(B.start),end:void 0}}function l(W){return B;function B(ne){W&&W.call(this,ne),u.call(this,ne)}}function u(W,B){const ne=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==W.type&&(B?B.call(this,W,se[0]):(se[1]||_h).call(this,W,se[0]));else throw new Error("Cannot close `"+W.type+"` ("+Si({start:W.start,end:W.end})+"): it’s not open");ne.position.end=Ln(W.end)}function c(){return wl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function d(){const W=this.resume(),B=this.stack[this.stack.length-1];B.lang=W}function v(){const W=this.resume(),B=this.stack[this.stack.length-1];B.meta=W}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const W=this.resume(),B=this.stack[this.stack.length-1];B.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const W=this.resume(),B=this.stack[this.stack.length-1];B.value=W.replace(/(\r?\n|\r)$/g,"")}function b(W){const B=this.resume(),ne=this.stack[this.stack.length-1];ne.label=B,ne.identifier=Jt(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),B=this.stack[this.stack.length-1];B.title=W}function k(){const W=this.resume(),B=this.stack[this.stack.length-1];B.url=W}function S(W){const B=this.stack[this.stack.length-1];if(!B.depth){const ne=this.sliceSerialize(W).length;B.depth=ne}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(W){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function N(W){const ne=this.stack[this.stack.length-1].children;let se=ne[ne.length-1];(!se||se.type!=="text")&&(se=oe(),se.position={start:Ln(W.start),end:void 0},ne.push(se)),this.stack.push(se)}function O(W){const B=this.stack.pop();B.value+=this.sliceSerialize(W),B.position.end=Ln(W.end)}function M(W){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=B.children[B.children.length-1];ne.position.end=Ln(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(N.call(this,W),O.call(this,W))}function K(){this.data.atHardBreak=!0}function F(){const W=this.resume(),B=this.stack[this.stack.length-1];B.value=W}function I(){const W=this.resume(),B=this.stack[this.stack.length-1];B.value=W}function D(){const W=this.resume(),B=this.stack[this.stack.length-1];B.value=W}function j(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=B,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function G(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=B,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(W){const B=this.sliceSerialize(W),ne=this.stack[this.stack.length-2];ne.label=_$(B),ne.identifier=Jt(B).toLowerCase()}function R(){const W=this.stack[this.stack.length-1],B=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const se=W.children;ne.children=se}else ne.alt=B}function y(){const W=this.resume(),B=this.stack[this.stack.length-1];B.url=W}function _(){const W=this.resume(),B=this.stack[this.stack.length-1];B.title=W}function z(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function H(W){const B=this.resume(),ne=this.stack[this.stack.length-1];ne.label=B,ne.identifier=Jt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function X(W){this.data.characterReferenceType=W.type}function q(W){const B=this.sliceSerialize(W),ne=this.data.characterReferenceType;let se;ne?(se=vh(B,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=Sl(B);const fe=this.stack[this.stack.length-1];fe.value+=se}function Y(W){const B=this.stack.pop();B.position.end=Ln(W.end)}function Q(W){O.call(this,W);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(W)}function ee(W){O.call(this,W);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(W)}function J(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function V(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function de(){return{type:"heading",depth:0,children:[]}}function ae(){return{type:"break"}}function ge(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function rt(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function Et(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Ct(){return{type:"paragraph",children:[]}}function kt(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Ln(e){return{line:e.line,column:e.column,offset:e.offset}}function Dh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dh(e,r):L$(e,r)}}function L$(e,t){let n;for(n in t)if(Rh.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function _h(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Si({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Si({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Si({start:t.start,end:t.end})+") is still open")}function F$(e){const t=this;t.parser=n;function n(r){return j$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function B$(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function z$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
- `}]}function W$(e,t){const n=t.value?t.value+`
35
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function U$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function H$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function V$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=kr(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function K$(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Mh(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function G$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Mh(e,t);const i={src:kr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Y$(e,t){const n={src:kr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function X$(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function J$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Mh(e,t);const i={href:kr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Z$(e,t){const n={href:kr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q$(e,t,n){const r=e.all(t),i=n?eT(n):jh(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
33
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const YT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:JC},disable:{null:[]},document:{42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:Ih},flow:{35:rT,42:Wo,45:[Fh,Wo],60:sT,61:Fh,95:Wo,96:_h,126:_h},flowInitial:{[-2]:$l,[-1]:$l,32:$l},insideSpan:{null:[Tl,WT]},string:{38:Ah,92:Ph},text:{[-5]:Il,[-4]:Il,[-3]:Il,33:CT,38:Ah,42:Tl,60:[$C,hT],91:$T,92:[tT,Ph],93:Ol,95:Tl,96:BC}},Symbol.toStringTag,{value:"Module"}));function XT(e){const n=Ch([YT,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(xC),document:i(SC),flow:i(BT),string:i(UT),text:i(HT)};return r;function i(o){return a;function a(s){return qT(r,o,s)}}}function JT(e){for(;!Dh(e););return e}const Wh=/[\0\t\n\r]/g;function QT(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,c,f,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Wh.lastIndex=f,u=Wh.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(o.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ZT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function e$(e){return e.replace(ZT,t$)}function t$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Th(n.slice(o?2:1),o?16:10)}return kl(n)||e}const Uh={}.hasOwnProperty;function n$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),r$(n)(JT(XT(n).document().write(QT()(e,t,!0))))}function r$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ae),autolinkProtocol:_,autolinkEmail:_,atxHeading:o(de),blockQuote:o(J),characterEscape:_,characterReference:_,codeFenced:o(Q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(Q,a),codeText:o(q,a),codeTextData:_,data:_,codeFlowValue:_,definition:o(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(le),hardBreakEscape:o(ae),hardBreakTrailing:o(ae),htmlFlow:o(ve,a),htmlFlowData:_,htmlText:o(ve,a),htmlTextData:_,image:o(Te),label:a,link:o(Ae),listItem:o(Et),listItemValue:p,listOrdered:o(rt,f),listUnordered:o(rt),paragraph:o(kt),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(de),strong:o(Ct),thematicBreak:o(ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ee,autolinkProtocol:Z,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:K,characterReference:X,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:l(m),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:C,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(H),hardBreakTrailing:l(H),htmlFlow:l(F),htmlFlowData:O,htmlText:l(j),htmlTextData:O,image:l(G),label:R,labelText:V,lineEnding:D,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:y,resourceTitleString:$,resource:N,setextHeading:l(L),setextHeadingLineSequence:I,setextHeadingText:E,strong:l(),thematicBreak:l()}};Hh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let z={type:"root",children:[]};const ne={stack:[z],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},se=[];let fe=-1;for(;++fe<U.length;)if(U[fe][1].type==="listOrdered"||U[fe][1].type==="listUnordered")if(U[fe][0]==="enter")se.push(fe);else{const ge=se.pop();fe=i(U,ge,fe)}for(fe=-1;++fe<U.length;){const ge=t[U[fe][0]];Uh.call(ge,U[fe][1].type)&&ge[U[fe][1].type].call(Object.assign({sliceSerialize:U[fe][2].sliceSerialize},ne),U[fe][1])}if(ne.tokenStack.length>0){const ge=ne.tokenStack[ne.tokenStack.length-1];(ge[1]||Vh).call(ne,void 0,ge[0])}for(z.position={start:Ln(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Ln(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)z=t.transforms[fe](z)||z;return z}function i(U,z,ne){let se=z-1,fe=-1,ge=!1,Ye,Xe,gt,it;for(;++se<=ne;){const Re=U[se];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?fe++:fe--,it=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(Ye&&!it&&!fe&&!gt&&(gt=se),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!fe&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||fe===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(Ye){let ot=se;for(Xe=void 0;ot--;){const Qe=U[ot];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Xe&&(U[Xe][1].type="lineEndingBlank",ge=!0),Qe[1].type="lineEnding",Xe=ot}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(Ye._spread=!0),Ye.end=Object.assign({},Xe?U[Xe][1].start:Re[1].end),U.splice(Xe||se,0,["exit",Ye,Re[2]]),se++,ne++}if(Re[1].type==="listItemPrefix"){const ot={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};Ye=ot,U.splice(se,0,["enter",ot,Re[2]]),se++,ne++,gt=void 0,it=!0}}}return U[z][1]._spread=ge,ne}function o(U,z){return ne;function ne(se){s.call(this,U(se),se),z&&z.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(U,z,ne){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([z,ne]),U.position={start:Ln(z.start),end:void 0}}function l(U){return z;function z(ne){U&&U.call(this,ne),u.call(this,ne)}}function u(U,z){const ne=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==U.type&&(z?z.call(this,U,se[0]):(se[1]||Vh).call(this,U,se[0]));else throw new Error("Cannot close `"+U.type+"` ("+Ei({start:U.start,end:U.end})+"): it’s not open");ne.position.end=Ln(U.end)}function c(){return El(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),z=this.stack[this.stack.length-1];z.lang=U}function v(){const U=this.resume(),z=this.stack[this.stack.length-1];z.meta=U}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U.replace(/(\r?\n|\r)$/g,"")}function b(U){const z=this.resume(),ne=this.stack[this.stack.length-1];ne.label=z,ne.identifier=Jt(this.sliceSerialize(U)).toLowerCase()}function w(){const U=this.resume(),z=this.stack[this.stack.length-1];z.title=U}function C(){const U=this.resume(),z=this.stack[this.stack.length-1];z.url=U}function S(U){const z=this.stack[this.stack.length-1];if(!z.depth){const ne=this.sliceSerialize(U).length;z.depth=ne}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function I(U){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function _(U){const ne=this.stack[this.stack.length-1].children;let se=ne[ne.length-1];(!se||se.type!=="text")&&(se=oe(),se.position={start:Ln(U.start),end:void 0},ne.push(se)),this.stack.push(se)}function O(U){const z=this.stack.pop();z.value+=this.sliceSerialize(U),z.position.end=Ln(U.end)}function D(U){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=z.children[z.children.length-1];ne.position.end=Ln(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(_.call(this,U),O.call(this,U))}function H(){this.data.atHardBreak=!0}function F(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function j(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function M(){const U=this.resume(),z=this.stack[this.stack.length-1];z.value=U}function W(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function G(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=z,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function V(U){const z=this.sliceSerialize(U),ne=this.stack[this.stack.length-2];ne.label=e$(z),ne.identifier=Jt(z).toLowerCase()}function R(){const U=this.stack[this.stack.length-1],z=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const se=U.children;ne.children=se}else ne.alt=z}function y(){const U=this.resume(),z=this.stack[this.stack.length-1];z.url=U}function $(){const U=this.resume(),z=this.stack[this.stack.length-1];z.title=U}function N(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function B(U){const z=this.resume(),ne=this.stack[this.stack.length-1];ne.label=z,ne.identifier=Jt(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function Y(U){this.data.characterReferenceType=U.type}function K(U){const z=this.sliceSerialize(U),ne=this.data.characterReferenceType;let se;ne?(se=Th(z,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=kl(z);const fe=this.stack[this.stack.length-1];fe.value+=se}function X(U){const z=this.stack.pop();z.position.end=Ln(U.end)}function Z(U){O.call(this,U);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(U)}function ee(U){O.call(this,U);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(U)}function J(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function de(){return{type:"heading",depth:0,children:[]}}function ae(){return{type:"break"}}function ve(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function rt(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Et(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function kt(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Ln(e){return{line:e.line,column:e.column,offset:e.offset}}function Hh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Hh(e,r):i$(e,r)}}function i$(e,t){let n;for(n in t)if(Uh.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is still open")}function o$(e){const t=this;t.parser=n;function n(r){return n$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function a$(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function s$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
+ `}]}function l$(e,t){const n=t.value?t.value+`
35
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function u$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$r(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function d$(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qh(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function h$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qh(e,t);const i={src:$r(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function v$(e,t){const n={src:$r(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function m$(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function g$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qh(e,t);const i={href:$r(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function y$(e,t){const n={href:$r(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function b$(e,t,n){const r=e.all(t),i=n?x$(n):Kh(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
36
36
  `}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
37
- `});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function eT(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=jh(n[r])}return t}function jh(e){const t=e.spread;return t??e.children.length>1}function tT(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function nT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=vl(t.children[1]),l=nh(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function aT(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let v={type:"element",tagName:o,properties:p,children:[]};f&&(v.children=e.all(f),e.patch(f,v),v=e.applyData(f,v)),u.push(v)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function sT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Nh=9,Lh=32;function lT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Fh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Fh(t.slice(i),i>0,!1)),o.join("")}function Fh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Nh||o===Lh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Nh||o===Lh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function uT(e,t){const n={type:"text",value:lT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fT={blockquote:B$,break:z$,code:W$,delete:U$,emphasis:H$,footnoteReference:V$,heading:K$,html:q$,imageReference:G$,image:Y$,inlineCode:X$,linkReference:J$,link:Z$,listItem:Q$,list:tT,paragraph:nT,root:rT,strong:iT,table:oT,tableCell:sT,tableRow:aT,text:uT,thematicBreak:cT,toml:Wo,yaml:Wo,definition:Wo,footnoteDefinition:Wo};function Wo(){}const Bh=-1,Uo=0,Ho=1,Vo=2,Ol=3,Il=4,Pl=5,Al=6,zh=7,Wh=8,Uh=typeof self=="object"?self:globalThis,dT=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Uo:case Bh:return n(a,i);case Ho:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Vo:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case Ol:return n(new Date(a),i);case Il:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Pl:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case Al:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case zh:{const{name:s,message:l}=a;return n(new Uh[s](l),i)}case Wh:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new Uh[o](a),i)};return r},Hh=e=>dT(new Map,e)(0),$r="",{toString:pT}={},{keys:hT}=Object,Ti=e=>{const t=typeof e;if(t!=="object"||!e)return[Uo,t];const n=pT.call(e).slice(8,-1);switch(n){case"Array":return[Ho,$r];case"Object":return[Vo,$r];case"Date":return[Ol,$r];case"RegExp":return[Il,$r];case"Map":return[Pl,$r];case"Set":return[Al,$r]}return n.includes("Array")?[Ho,n]:n.includes("Error")?[zh,n]:[Vo,n]},Ko=([e,t])=>e===Uo&&(t==="function"||t==="symbol"),vT=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Ti(a);switch(s){case Uo:{let c=a;switch(l){case"bigint":s=Wh,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Bh],a)}return i([s,c],a)}case Ho:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case Vo:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of hT(a))(e||!Ko(Ti(a[p])))&&c.push([o(p),o(a[p])]);return f}case Ol:return i([s,a.toISOString()],a);case Il:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case Pl:{const c=[],f=i([s,c],a);for(const[p,d]of a)(e||!(Ko(Ti(p))||Ko(Ti(d))))&&c.push([o(p),o(d)]);return f}case Al:{const c=[],f=i([s,c],a);for(const p of a)(e||!Ko(Ti(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},Vh=(e,{json:t,lossy:n}={})=>{const r=[];return vT(!(t||n),!!t,new Map,r)(e),r},qo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Hh(Vh(e,t)):structuredClone(e):(e,t)=>Hh(Vh(e,t));function mT(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mT,r=e.options.footnoteBackLabel||gT,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),p=kr(f.toLowerCase());let d=0;const v=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){v.length>0&&v.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const g=c[c.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const b=g.children[g.children.length-1];b&&b.type==="text"?b.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...v)}else c.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...qo(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
37
+ `});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function x$(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Kh(n[r])}return t}function Kh(e){const t=e.spread;return t??e.children.length>1}function w$(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function S$(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E$(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function k$(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C$(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=gl(t.children[1]),l=ph(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function T$(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let v={type:"element",tagName:o,properties:p,children:[]};f&&(v.children=e.all(f),e.patch(f,v),v=e.applyData(f,v)),u.push(v)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function $$(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Gh=9,Yh=32;function O$(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Xh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Xh(t.slice(i),i>0,!1)),o.join("")}function Xh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Gh||o===Yh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Gh||o===Yh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function I$(e,t){const n={type:"text",value:O$(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function P$(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const A$={blockquote:a$,break:s$,code:l$,delete:u$,emphasis:c$,footnoteReference:f$,heading:d$,html:p$,imageReference:h$,image:v$,inlineCode:m$,linkReference:g$,link:y$,listItem:b$,list:w$,paragraph:S$,root:E$,strong:k$,table:C$,tableCell:$$,tableRow:T$,text:I$,thematicBreak:P$,toml:Uo,yaml:Uo,definition:Uo,footnoteDefinition:Uo};function Uo(){}const Jh=-1,Ho=0,Vo=1,qo=2,Pl=3,Al=4,Rl=5,_l=6,Qh=7,Zh=8,ev=typeof self=="object"?self:globalThis,R$=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Ho:case Jh:return n(a,i);case Vo:{const s=n([],i);for(const l of a)s.push(r(l));return s}case qo:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case Pl:return n(new Date(a),i);case Al:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Rl:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case _l:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Qh:{const{name:s,message:l}=a;return n(new ev[s](l),i)}case Zh:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new ev[o](a),i)};return r},tv=e=>R$(new Map,e)(0),Or="",{toString:_$}={},{keys:D$}=Object,Oi=e=>{const t=typeof e;if(t!=="object"||!e)return[Ho,t];const n=_$.call(e).slice(8,-1);switch(n){case"Array":return[Vo,Or];case"Object":return[qo,Or];case"Date":return[Pl,Or];case"RegExp":return[Al,Or];case"Map":return[Rl,Or];case"Set":return[_l,Or]}return n.includes("Array")?[Vo,n]:n.includes("Error")?[Qh,n]:[qo,n]},Ko=([e,t])=>e===Ho&&(t==="function"||t==="symbol"),M$=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Oi(a);switch(s){case Ho:{let c=a;switch(l){case"bigint":s=Zh,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Jh],a)}return i([s,c],a)}case Vo:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case qo:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of D$(a))(e||!Ko(Oi(a[p])))&&c.push([o(p),o(a[p])]);return f}case Pl:return i([s,a.toISOString()],a);case Al:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case Rl:{const c=[],f=i([s,c],a);for(const[p,d]of a)(e||!(Ko(Oi(p))||Ko(Oi(d))))&&c.push([o(p),o(d)]);return f}case _l:{const c=[],f=i([s,c],a);for(const p of a)(e||!Ko(Oi(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},nv=(e,{json:t,lossy:n}={})=>{const r=[];return M$(!(t||n),!!t,new Map,r)(e),r},Go=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tv(nv(e,t)):structuredClone(e):(e,t)=>tv(nv(e,t));function j$(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function N$(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function L$(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||j$,r=e.options.footnoteBackLabel||N$,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),p=$r(f.toLowerCase());let d=0;const v=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){v.length>0&&v.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const g=c[c.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const b=g.children[g.children.length-1];b&&b.type==="text"?b.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...v)}else c.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Go(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
38
38
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
39
- `}]}}const Go=function(e){if(e==null)return ST;if(typeof e=="function")return Yo(e);if(typeof e=="object")return Array.isArray(e)?bT(e):xT(e);if(typeof e=="string")return wT(e);throw new Error("Expected function, string, or object as test")};function bT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Go(e[n]);return Yo(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function xT(e){const t=e;return Yo(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function wT(e){return Yo(t);function t(n){return n&&n.type===e}}function Yo(e){return t;function t(n,r,i){return!!(ET(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ST(){return!0}function ET(e){return e!==null&&typeof e=="object"&&"type"in e}function oX(e){return e}const Kh=[],CT=!0,Rl=!1,kT="skip";function qh(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Go(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Kh,v,h,g;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=$T(n(l,c)),d[0]===Rl))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==kT)for(h=(r?m.children.length:-1)+a,g=c.concat(m);h>-1&&h<m.children.length;){const b=m.children[h];if(v=s(b,h,g)(),v[0]===Rl)return v;h=typeof v[1]=="number"?v[1]:h+a}}return d}}}function $T(e){return Array.isArray(e)?e:typeof e=="number"?[CT,e]:e==null?Kh:[e]}function Dl(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),qh(e,o,s,i);function s(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return a(l,f,c)}}const _l={}.hasOwnProperty,TT={};function OT(e,t){const n=t||TT,r=new Map,i=new Map,o=new Map,a={...fT,...n.handlers},s={all:u,applyData:PT,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:IT,wrap:RT};return Dl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function l(c,f){const p=c.type,d=s.handlers[p];if(_l.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...g}=c,m=qo(g);return m.children=s.all(c),m}return qo(c)}return(s.options.unknownHandler||AT)(s,c,f)}function u(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const v=s.one(p[d],c);if(v){if(d&&p[d-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=Gh(v.value)),!Array.isArray(v)&&v.type==="element")){const h=v.children[0];h&&h.type==="text"&&(h.value=Gh(h.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function IT(e,t){e.position&&(t.position=CC(e))}function PT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,qo(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function AT(e,t){const n=t.data||{},r="value"in t&&!(_l.call(n,"hProperties")||_l.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
39
+ `}]}}const Yo=function(e){if(e==null)return W$;if(typeof e=="function")return Xo(e);if(typeof e=="object")return Array.isArray(e)?F$(e):B$(e);if(typeof e=="string")return z$(e);throw new Error("Expected function, string, or object as test")};function F$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yo(e[n]);return Xo(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function B$(e){const t=e;return Xo(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function z$(e){return Xo(t);function t(n){return n&&n.type===e}}function Xo(e){return t;function t(n,r,i){return!!(U$(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function W$(){return!0}function U$(e){return e!==null&&typeof e=="object"&&"type"in e}function TX(e){return e}const rv=[],H$=!0,Dl=!1,V$="skip";function iv(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Yo(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=rv,v,h,g;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=q$(n(l,c)),d[0]===Dl))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==V$)for(h=(r?m.children.length:-1)+a,g=c.concat(m);h>-1&&h<m.children.length;){const b=m.children[h];if(v=s(b,h,g)(),v[0]===Dl)return v;h=typeof v[1]=="number"?v[1]:h+a}}return d}}}function q$(e){return Array.isArray(e)?e:typeof e=="number"?[H$,e]:e==null?rv:[e]}function Ml(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),iv(e,o,s,i);function s(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return a(l,f,c)}}const jl={}.hasOwnProperty,K$={};function G$(e,t){const n=t||K$,r=new Map,i=new Map,o=new Map,a={...A$,...n.handlers},s={all:u,applyData:X$,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:Y$,wrap:Q$};return Ml(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function l(c,f){const p=c.type,d=s.handlers[p];if(jl.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...g}=c,m=Go(g);return m.children=s.all(c),m}return Go(c)}return(s.options.unknownHandler||J$)(s,c,f)}function u(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const v=s.one(p[d],c);if(v){if(d&&p[d-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=ov(v.value)),!Array.isArray(v)&&v.type==="element")){const h=v.children[0];h&&h.type==="text"&&(h.value=ov(h.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function Y$(e,t){e.position&&(t.position=Hk(e))}function X$(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Go(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function J$(e,t){const n=t.data||{},r="value"in t&&!(jl.call(n,"hProperties")||jl.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q$(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
40
40
  `});++r<e.length;)r&&n.push({type:"text",value:`
41
41
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
42
- `}),n}function Gh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Yh(e,t){const n=OT(e,t),r=n.one(e,void 0),i=yT(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
43
- `},i),o}function DT(e,t){return e&&"run"in e?async function(n,r){const i=Yh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Yh(n,{file:r,...e||t})}}function Xh(e){if(e)throw e}var Xo=Object.prototype.hasOwnProperty,Jh=Object.prototype.toString,Zh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,ev=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Jh.call(t)==="[object Array]"},tv=function(t){if(!t||Jh.call(t)!=="[object Object]")return!1;var n=Xo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Xo.call(t,i)},nv=function(t,n){Zh&&n.name==="__proto__"?Zh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},rv=function(t,n){if(n==="__proto__")if(Xo.call(t,n)){if(Qh)return Qh(t,n).value}else return;return t[n]},_T=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=rv(s,n),i=rv(t,n),s!==i&&(c&&i&&(tv(i)||(o=ev(i)))?(o?(o=!1,a=r&&ev(r)?r:[]):a=r&&tv(r)?r:{},nv(s,{name:n,newValue:e(c,a,i)})):typeof i<"u"&&nv(s,{name:n,newValue:i}));return s};const Ml=Se(_T);function jl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MT(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const c=e[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?jT(c,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function jT(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const cn={basename:NT,dirname:LT,extname:FT,join:BT,sep:"/"};function NT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oi(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function LT(e){if(Oi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function FT(e){Oi(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function BT(...e){let t=-1,n;for(;++t<e.length;)Oi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":zT(n)}function zT(e){Oi(e);const t=e.codePointAt(0)===47;let n=WT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WT(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Oi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const UT={cwd:HT};function HT(){return"/"}function Nl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VT(e){if(typeof e=="string")e=new URL(e);else if(!Nl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return KT(e)}function KT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Ll=["history","path","basename","stem","extname","dirname"];class iv{constructor(t){let n;t?Nl(t)?n={path:t}:typeof t=="string"||qT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":UT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ll.length;){const o=Ll[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Ll.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?cn.basename(this.path):void 0}set basename(t){Bl(t,"basename"),Fl(t,"basename"),this.path=cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cn.dirname(this.path):void 0}set dirname(t){ov(this.basename,"dirname"),this.path=cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cn.extname(this.path):void 0}set extname(t){if(Fl(t,"extname"),ov(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Nl(t)&&(t=VT(t)),Bl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cn.basename(this.path,this.extname):void 0}set stem(t){Bl(t,"stem"),Fl(t,"stem"),this.path=cn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Fl(e,t){if(e&&e.includes(cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cn.sep+"`")}function Bl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ov(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GT=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},YT={}.hasOwnProperty;class zl extends GT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MT()}copy(){const t=new zl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ml(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Hl("data",this.frozen),this.namespace[t]=n,this):YT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Hl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jo(t),r=this.parser||this.Parser;return Wl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Wl("process",this.parser||this.Parser),Ul("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Jo(t),l=r.parse(s);r.run(l,s,function(c,f,p){if(c||!f||!p)return u(c);const d=f,v=r.stringify(d,p);ZT(v)?p.value=v:p.result=v,u(c,p)});function u(c,f){c||!f?a(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Wl("processSync",this.parser||this.Parser),Ul("processSync",this.compiler||this.Compiler),this.process(t,i),sv("processSync","process",n),r;function i(o,a){n=!0,Xh(o),r=a}}run(t,n,r){av(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Jo(n);i.run(t,l,u);function u(c,f,p){const d=f||t;c?s(c):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),sv("runSync","run",r),i;function o(a,s){Xh(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Jo(n),i=this.compiler||this.Compiler;return Ul("stringify",i),av(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Hl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Ml(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[d,...v]=c;const h=r[p][1];jl(h)&&jl(d)&&(d=Ml(!0,h,d)),r[p]=[u,d,...v]}}}}const XT=new zl().freeze();function Wl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ul(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Hl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function av(e){if(!jl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jo(e){return JT(e)?e:new iv(e)}function JT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZT(e){return typeof e=="string"||QT(e)}function QT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const eO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lv=[],uv={allowDangerousHtml:!0},tO=/^(https?|ircs?|mailto|xmpp)$/i,nO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||lv,l=e.remarkPlugins||lv,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uv}:uv,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||fv,d=XT().use(F$).use(l).use(DT,u).use(s),v=new iv;typeof r=="string"&&(v.value=r);for(const b of nO)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+eO+b.id,void 0);const h=d.parse(v);let g=d.runSync(h,v);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),Dl(g,m),PC(g,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function m(b,x,k){if(b.type==="raw"&&k&&typeof x=="number")return c?k.children.splice(x,1):k.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let S;for(S in xl)if(Object.hasOwn(xl,S)&&Object.hasOwn(b.properties,S)){const E=b.properties[S],T=xl[S];(T===null||T.includes(b.tagName))&&(b.properties[S]=p(String(E||""),S,b))}}if(b.type==="element"){let S=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!S&&n&&typeof x=="number"&&(S=!n(b,x,k)),S&&k&&typeof x=="number")return f&&b.children?k.children.splice(x,1,...b.children):k.children.splice(x,1),x}}}function fv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||tO.test(e.slice(0,t))?e:""}function rO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dv(e,t,n){const i=Go((n||{}).ignore||[]),o=iO(t);let a=-1;for(;++a<o.length;)qh(e,"text",s);function s(u,c){let f=-1,p;for(;++f<c.length;){const d=c[f],v=p?p.children:void 0;if(i(d,v?v.indexOf(d):void 0,p))return;p=d}if(p)return l(u,c)}function l(u,c){const f=c[c.length-1],p=o[a][0],d=o[a][1];let v=0;const g=f.children.indexOf(u);let m=!1,b=[];p.lastIndex=0;let x=p.exec(u.value);for(;x;){const k=x.index,S={index:x.index,input:x.input,stack:[...c,u]};let E=d(...x,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=k+1:(v!==k&&b.push({type:"text",value:u.value.slice(v,k)}),Array.isArray(E)?b.push(...E):E&&b.push(E),v=k+x[0].length,m=!0),!p.global)break;x=p.exec(u.value)}return m?(v<u.value.length&&b.push({type:"text",value:u.value.slice(v)}),f.children.splice(g,1,...b)):b=[u],g+b.length}}function iO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([oO(i[0]),aO(i[1])])}return t}function oO(e){return typeof e=="string"?new RegExp(rO(e),"g"):e}function aO(e){return typeof e=="function"?e:function(){return e}}function sO(e){dv(e,[/\r?\n|\r/g,lO])}function lO(){return{type:"break"}}function uO(){return function(e){sO(e)}}function pv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Vl="phrasing",Kl=["autolink","link","image","label"];function cO(){return{transforms:[gO],enter:{literalAutolink:dO,literalAutolinkEmail:ql,literalAutolinkHttp:ql,literalAutolinkWww:ql},exit:{literalAutolink:mO,literalAutolinkEmail:vO,literalAutolinkHttp:pO,literalAutolinkWww:hO}}}function fO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vl,notInConstruct:Kl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vl,notInConstruct:Kl},{character:":",before:"[ps]",after:"\\/",inConstruct:Vl,notInConstruct:Kl}]}}function dO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ql(e){this.config.enter.autolinkProtocol.call(this,e)}function pO(e){this.config.exit.autolinkProtocol.call(this,e)}function hO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function vO(e){this.config.exit.autolinkEmail.call(this,e)}function mO(e){this.exit(e)}function gO(e){dv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),bO]],{ignore:["link","linkReference"]})}function yO(e,t,n,r,i){let o="";if(!hv(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!xO(n)))return!1;const a=wO(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function bO(e,t,n,r){return!hv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function xO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=pv(e,"(");let o=pv(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function hv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||Lo(n))&&(!t||n!==47)}vv.peek=RO;function SO(){return{enter:{gfmFootnoteDefinition:CO,gfmFootnoteDefinitionLabelString:kO,gfmFootnoteCall:OO,gfmFootnoteCallString:IO},exit:{gfmFootnoteDefinition:TO,gfmFootnoteDefinitionLabelString:$O,gfmFootnoteCall:AO,gfmFootnoteCallString:PO}}}function EO(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:DO,footnoteReference:vv}}}function CO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kO(){this.buffer()}function $O(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function TO(e){this.exit(e)}function OO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function IO(){this.buffer()}function PO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function AO(e){this.exit(e)}function vv(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function RO(){return"["}function DO(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),_O)),a(),o}function _O(e,t,n){return t===0?e:(n?"":" ")+e}const MO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mv.peek=BO;function jO(){return{canContainEols:["delete"],enter:{strikethrough:LO},exit:{strikethrough:FO}}}function NO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:MO}],handlers:{delete:mv}}}function LO(e){this.enter({type:"delete",children:[]},e)}function FO(e){this.exit(e)}function mv(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function BO(){return"~"}function zO(e){return e.length}function WO(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||zO,o=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const h=[],g=[];let m=-1;for(e[c].length>u&&(u=e[c].length);++m<e[c].length;){const b=UO(e[c][m]);if(n.alignDelimiters!==!1){const x=i(b);g[m]=x,(l[m]===void 0||x>l[m])&&(l[m]=x)}h.push(b)}a[c]=h,s[c]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=gv(r[f]);else{const h=gv(r);for(;++f<u;)o[f]=h}f=-1;const p=[],d=[];for(;++f<u;){const h=o[f];let g="",m="";h===99?(g=":",m=":"):h===108?g=":":h===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-m.length);const x=g+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=g.length+b+m.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=x}a.splice(1,0,p),s.splice(1,0,d),c=-1;const v=[];for(;++c<a.length;){const h=a[c],g=s[c];f=-1;const m=[];for(;++f<u;){const b=h[f]||"";let x="",k="";if(n.alignDelimiters!==!1){const S=l[f]-(g[f]||0),E=o[f];E===114?x=" ".repeat(S):E===99?S%2?(x=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(x=" ".repeat(S/2),k=x):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(x),m.push(b),n.alignDelimiters!==!1&&m.push(k),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&m.push("|")}v.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return v.join(`
44
- `)}function UO(e){return e==null?"":String(e)}function gv(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function HO(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),VO);return i(),a}function VO(e,t,n){return">"+(n?"":" ")+e}function KO(e,t){return yv(e,t.inConstruct,!0)&&!yv(e,t.notInConstruct,!1)}function yv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function bv(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
- `&&KO(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
- `}function qO(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function GO(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function YO(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function XO(e,t,n,r){const i=YO(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(GO(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(o,JO);return f(),p}const s=n.createTracker(r),l=i.repeat(Math.max(qO(o,i)+1,3)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
42
+ `}),n}function ov(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function av(e,t){const n=G$(e,t),r=n.one(e,void 0),i=L$(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
43
+ `},i),o}function Z$(e,t){return e&&"run"in e?async function(n,r){const i=av(n,{file:r,...t});await e.run(i,r)}:function(n,r){return av(n,{file:r,...e||t})}}function sv(e){if(e)throw e}var Jo=Object.prototype.hasOwnProperty,lv=Object.prototype.toString,uv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,fv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):lv.call(t)==="[object Array]"},dv=function(t){if(!t||lv.call(t)!=="[object Object]")return!1;var n=Jo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Jo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Jo.call(t,i)},pv=function(t,n){uv&&n.name==="__proto__"?uv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},hv=function(t,n){if(n==="__proto__")if(Jo.call(t,n)){if(cv)return cv(t,n).value}else return;return t[n]},eO=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=hv(s,n),i=hv(t,n),s!==i&&(c&&i&&(dv(i)||(o=fv(i)))?(o?(o=!1,a=r&&fv(r)?r:[]):a=r&&dv(r)?r:{},pv(s,{name:n,newValue:e(c,a,i)})):typeof i<"u"&&pv(s,{name:n,newValue:i}));return s};const Nl=Ee(eO);function Ll(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tO(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const c=e[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?nO(c,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function nO(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const cn={basename:rO,dirname:iO,extname:oO,join:aO,sep:"/"};function rO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ii(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function iO(e){if(Ii(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function oO(e){Ii(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function aO(...e){let t=-1,n;for(;++t<e.length;)Ii(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":sO(n)}function sO(e){Ii(e);const t=e.codePointAt(0)===47;let n=lO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function lO(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Ii(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uO={cwd:cO};function cO(){return"/"}function Fl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function fO(e){if(typeof e=="string")e=new URL(e);else if(!Fl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return dO(e)}function dO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Bl=["history","path","basename","stem","extname","dirname"];class vv{constructor(t){let n;t?Fl(t)?n={path:t}:typeof t=="string"||pO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":uO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bl.length;){const o=Bl[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Bl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?cn.basename(this.path):void 0}set basename(t){Wl(t,"basename"),zl(t,"basename"),this.path=cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cn.dirname(this.path):void 0}set dirname(t){mv(this.basename,"dirname"),this.path=cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cn.extname(this.path):void 0}set extname(t){if(zl(t,"extname"),mv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Fl(t)&&(t=fO(t)),Wl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cn.basename(this.path,this.extname):void 0}set stem(t){Wl(t,"stem"),zl(t,"stem"),this.path=cn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new yt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zl(e,t){if(e&&e.includes(cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cn.sep+"`")}function Wl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function pO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hO=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},vO={}.hasOwnProperty;class Ul extends hO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=tO()}copy(){const t=new Ul;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Nl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ql("data",this.frozen),this.namespace[t]=n,this):vO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ql("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Qo(t),r=this.parser||this.Parser;return Hl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hl("process",this.parser||this.Parser),Vl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Qo(t),l=r.parse(s);r.run(l,s,function(c,f,p){if(c||!f||!p)return u(c);const d=f,v=r.stringify(d,p);yO(v)?p.value=v:p.result=v,u(c,p)});function u(c,f){c||!f?a(c):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Hl("processSync",this.parser||this.Parser),Vl("processSync",this.compiler||this.Compiler),this.process(t,i),yv("processSync","process",n),r;function i(o,a){n=!0,sv(o),r=a}}run(t,n,r){gv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Qo(n);i.run(t,l,u);function u(c,f,p){const d=f||t;c?s(c):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),yv("runSync","run",r),i;function o(a,s){sv(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Qo(n),i=this.compiler||this.Compiler;return Vl("stringify",i),gv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ql("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Nl(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[d,...v]=c;const h=r[p][1];Ll(h)&&Ll(d)&&(d=Nl(!0,h,d)),r[p]=[u,d,...v]}}}}const mO=new Ul().freeze();function Hl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ql(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gv(e){if(!Ll(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function yv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qo(e){return gO(e)?e:new vv(e)}function gO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yO(e){return typeof e=="string"||bO(e)}function bO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bv=[],xv={allowDangerousHtml:!0},wO=/^(https?|ircs?|mailto|xmpp)$/i,SO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function wv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||bv,l=e.remarkPlugins||bv,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xv}:xv,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||Sv,d=mO().use(o$).use(l).use(Z$,u).use(s),v=new vv;typeof r=="string"&&(v.value=r);for(const b of SO)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+xO+b.id,void 0);const h=d.parse(v);let g=d.runSync(h,v);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),Ml(g,m),Xk(g,{Fragment:T.Fragment,components:o,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function m(b,w,C){if(b.type==="raw"&&C&&typeof w=="number")return c?C.children.splice(w,1):C.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let S;for(S in Sl)if(Object.hasOwn(Sl,S)&&Object.hasOwn(b.properties,S)){const E=b.properties[S],I=Sl[S];(I===null||I.includes(b.tagName))&&(b.properties[S]=p(String(E||""),S,b))}}if(b.type==="element"){let S=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!S&&n&&typeof w=="number"&&(S=!n(b,w,C)),S&&C&&typeof w=="number")return f&&b.children?C.children.splice(w,1,...b.children):C.children.splice(w,1),w}}}function Sv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||wO.test(e.slice(0,t))?e:""}function EO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ev(e,t,n){const i=Yo((n||{}).ignore||[]),o=kO(t);let a=-1;for(;++a<o.length;)iv(e,"text",s);function s(u,c){let f=-1,p;for(;++f<c.length;){const d=c[f],v=p?p.children:void 0;if(i(d,v?v.indexOf(d):void 0,p))return;p=d}if(p)return l(u,c)}function l(u,c){const f=c[c.length-1],p=o[a][0],d=o[a][1];let v=0;const g=f.children.indexOf(u);let m=!1,b=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const C=w.index,S={index:w.index,input:w.input,stack:[...c,u]};let E=d(...w,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=C+1:(v!==C&&b.push({type:"text",value:u.value.slice(v,C)}),Array.isArray(E)?b.push(...E):E&&b.push(E),v=C+w[0].length,m=!0),!p.global)break;w=p.exec(u.value)}return m?(v<u.value.length&&b.push({type:"text",value:u.value.slice(v)}),f.children.splice(g,1,...b)):b=[u],g+b.length}}function kO(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([CO(i[0]),TO(i[1])])}return t}function CO(e){return typeof e=="string"?new RegExp(EO(e),"g"):e}function TO(e){return typeof e=="function"?e:function(){return e}}function $O(e){Ev(e,[/\r?\n|\r/g,OO])}function OO(){return{type:"break"}}function IO(){return function(e){$O(e)}}function kv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Kl="phrasing",Gl=["autolink","link","image","label"];function PO(){return{transforms:[NO],enter:{literalAutolink:RO,literalAutolinkEmail:Yl,literalAutolinkHttp:Yl,literalAutolinkWww:Yl},exit:{literalAutolink:jO,literalAutolinkEmail:MO,literalAutolinkHttp:_O,literalAutolinkWww:DO}}}function AO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kl,notInConstruct:Gl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kl,notInConstruct:Gl},{character:":",before:"[ps]",after:"\\/",inConstruct:Kl,notInConstruct:Gl}]}}function RO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yl(e){this.config.enter.autolinkProtocol.call(this,e)}function _O(e){this.config.exit.autolinkProtocol.call(this,e)}function DO(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function MO(e){this.config.exit.autolinkEmail.call(this,e)}function jO(e){this.exit(e)}function NO(e){Ev(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FO]],{ignore:["link","linkReference"]})}function LO(e,t,n,r,i){let o="";if(!Cv(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!BO(n)))return!1;const a=zO(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function FO(e,t,n,r){return!Cv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BO(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function zO(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=kv(e,"(");let o=kv(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Cv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||Fo(n))&&(!t||n!==47)}Tv.peek=QO;function WO(){return{enter:{gfmFootnoteDefinition:HO,gfmFootnoteDefinitionLabelString:VO,gfmFootnoteCall:GO,gfmFootnoteCallString:YO},exit:{gfmFootnoteDefinition:KO,gfmFootnoteDefinitionLabelString:qO,gfmFootnoteCall:JO,gfmFootnoteCallString:XO}}}function UO(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ZO,footnoteReference:Tv}}}function HO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VO(){this.buffer()}function qO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function KO(e){this.exit(e)}function GO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function YO(){this.buffer()}function XO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Jt(this.sliceSerialize(e)).toLowerCase()}function JO(e){this.exit(e)}function Tv(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function QO(){return"["}function ZO(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),eI)),a(),o}function eI(e,t,n){return t===0?e:(n?"":" ")+e}const tI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$v.peek=aI;function nI(){return{canContainEols:["delete"],enter:{strikethrough:iI},exit:{strikethrough:oI}}}function rI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tI}],handlers:{delete:$v}}}function iI(e){this.enter({type:"delete",children:[]},e)}function oI(e){this.exit(e)}function $v(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function aI(){return"~"}function sI(e){return e.length}function lI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||sI,o=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const h=[],g=[];let m=-1;for(e[c].length>u&&(u=e[c].length);++m<e[c].length;){const b=uI(e[c][m]);if(n.alignDelimiters!==!1){const w=i(b);g[m]=w,(l[m]===void 0||w>l[m])&&(l[m]=w)}h.push(b)}a[c]=h,s[c]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=Ov(r[f]);else{const h=Ov(r);for(;++f<u;)o[f]=h}f=-1;const p=[],d=[];for(;++f<u;){const h=o[f];let g="",m="";h===99?(g=":",m=":"):h===108?g=":":h===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-m.length);const w=g+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=g.length+b+m.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=w}a.splice(1,0,p),s.splice(1,0,d),c=-1;const v=[];for(;++c<a.length;){const h=a[c],g=s[c];f=-1;const m=[];for(;++f<u;){const b=h[f]||"";let w="",C="";if(n.alignDelimiters!==!1){const S=l[f]-(g[f]||0),E=o[f];E===114?w=" ".repeat(S):E===99?S%2?(w=" ".repeat(S/2+.5),C=" ".repeat(S/2-.5)):(w=" ".repeat(S/2),C=w):C=" ".repeat(S)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(b),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&m.push("|")}v.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return v.join(`
44
+ `)}function uI(e){return e==null?"":String(e)}function Ov(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function cI(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),fI);return i(),a}function fI(e,t,n){return">"+(n?"":" ")+e}function dI(e,t){return Iv(e,t.inConstruct,!0)&&!Iv(e,t.notInConstruct,!1)}function Iv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Pv(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
+ `&&dI(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
+ `}function pI(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function hI(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function vI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function mI(e,t,n,r){const i=vI(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(hI(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(o,gI);return f(),p}const s=n.createTracker(r),l=i.repeat(Math.max(pI(o,i)+1,3)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
47
47
  `,encode:["`"],...s.current()})),f()}return c+=s.move(`
48
48
  `),o&&(c+=s.move(o+`
49
- `)),c+=s.move(l),u(),c}function JO(e,t,n){return(n?"":" ")+e}function Gl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ZO(e,t,n,r){const i=Gl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
50
- `,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function QO(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}xv.peek=eI;function xv(e,t,n,r){const i=QO(n),o=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function eI(e,t,n){return n.options.emphasis||"*"}function tI(e,t){let n=!1;return Dl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Rl}),!!((!e.depth||e.depth<3)&&wl(e)&&(t.options.setext||n))}function nI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(tI(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
49
+ `)),c+=s.move(l),u(),c}function gI(e,t,n){return(n?"":" ")+e}function Xl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yI(e,t,n,r){const i=Xl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
50
+ `,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function bI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Av.peek=xI;function Av(e,t,n,r){const i=bI(n),o=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function xI(e,t,n){return n.options.emphasis||"*"}function wI(e,t){let n=!1;return Ml(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Dl}),!!((!e.depth||e.depth<3)&&El(e)&&(t.options.setext||n))}function SI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(wI(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
51
51
  `,after:`
52
52
  `});return f(),c(),p+`
53
53
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
54
54
  `))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
55
- `,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}wv.peek=rI;function wv(e){return e.value||""}function rI(){return"<"}Sv.peek=iI;function Sv(e,t,n,r){const i=Gl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function iI(){return"!"}Ev.peek=oI;function Ev(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function oI(){return"!"}Cv.peek=aI;function Cv(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function aI(){return"`"}function kv(e,t){const n=wl(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$v.peek=sI;function $v(e,t,n,r){const i=Gl(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(kv(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=c,f}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function sI(e,t,n){return kv(e,n)?"<":"["}Tv.peek=lI;function Tv(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function lI(){return"["}function Yl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uI(e){const t=Yl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function cI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ov(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function fI(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?cI(n):Yl(n);const s=e.ordered?a==="."?")":".":uI(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Ov(n)===a&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function dI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pI(e,t,n,r){const i=dI(n);let o=n.bulletCurrent||Yl(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?o:o+" ".repeat(a-o.length))+f}}function hI(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const vI=Go(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mI(e,t,n,r){return(e.children.some(function(a){return vI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Iv.peek=yI;function Iv(e,t,n,r){const i=gI(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function yI(e,t,n){return n.options.strong||"*"}function bI(e,t,n,r){return n.safe(e.value,r)}function xI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function wI(e,t,n){const r=(Ov(n)+(n.options.ruleSpaces?" ":"")).repeat(xI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Pv={blockquote:HO,break:bv,code:XO,definition:ZO,emphasis:xv,hardBreak:bv,heading:nI,html:wv,image:Sv,imageReference:Ev,inlineCode:Cv,link:$v,linkReference:Tv,list:fI,listItem:pI,paragraph:hI,root:mI,strong:Iv,text:bI,thematicBreak:wI};function SI(){return{enter:{table:EI,tableData:Av,tableHeader:Av,tableRow:kI},exit:{codeText:$I,table:CI,tableData:Xl,tableHeader:Xl,tableRow:Xl}}}function EI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function CI(e){this.exit(e),this.data.inTable=void 0}function kI(e){this.enter({type:"tableRow",children:[]},e)}function Xl(e){this.exit(e)}function Av(e){this.enter({type:"tableCell",children:[]},e)}function $I(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,TI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function TI(e,t){return t==="|"?t:e}function OI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
55
+ `,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}Rv.peek=EI;function Rv(e){return e.value||""}function EI(){return"<"}_v.peek=kI;function _v(e,t,n,r){const i=Xl(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function kI(){return"!"}Dv.peek=CI;function Dv(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function CI(){return"!"}Mv.peek=TI;function Mv(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function TI(){return"`"}function jv(e,t){const n=El(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nv.peek=$I;function Nv(e,t,n,r){const i=Xl(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(jv(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=c,f}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function $I(e,t,n){return jv(e,n)?"<":"["}Lv.peek=OI;function Lv(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function OI(){return"["}function Jl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function II(e){const t=Jl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function PI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Fv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function AI(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?PI(n):Jl(n);const s=e.ordered?a==="."?")":".":II(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Fv(n)===a&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function RI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _I(e,t,n,r){const i=RI(n);let o=n.bulletCurrent||Jl(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?o:o+" ".repeat(a-o.length))+f}}function DI(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const MI=Yo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jI(e,t,n,r){return(e.children.some(function(a){return MI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function NI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bv.peek=LI;function Bv(e,t,n,r){const i=NI(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function LI(e,t,n){return n.options.strong||"*"}function FI(e,t,n,r){return n.safe(e.value,r)}function BI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zI(e,t,n){const r=(Fv(n)+(n.options.ruleSpaces?" ":"")).repeat(BI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zv={blockquote:cI,break:Pv,code:mI,definition:yI,emphasis:Av,hardBreak:Pv,heading:SI,html:Rv,image:_v,imageReference:Dv,inlineCode:Mv,link:Nv,linkReference:Lv,list:AI,listItem:_I,paragraph:DI,root:jI,strong:Bv,text:FI,thematicBreak:zI};function WI(){return{enter:{table:UI,tableData:Wv,tableHeader:Wv,tableRow:VI},exit:{codeText:qI,table:HI,tableData:Ql,tableHeader:Ql,tableRow:Ql}}}function UI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function HI(e){this.exit(e),this.data.inTable=void 0}function VI(e){this.enter({type:"tableRow",children:[]},e)}function Ql(e){this.exit(e)}function Wv(e){this.enter({type:"tableCell",children:[]},e)}function qI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KI(e,t){return t==="|"?t:e}function GI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
56
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,v,h,g){return u(c(d,h,g),d.align)}function s(d,v,h,g){const m=f(d,h,g),b=u([m]);return b.slice(0,b.indexOf(`
57
- `))}function l(d,v,h,g){const m=h.enter("tableCell"),b=h.enter("phrasing"),x=h.containerPhrasing(d,{...g,before:o,after:o});return b(),m(),x}function u(d,v){return WO(d,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function c(d,v,h){const g=d.children;let m=-1;const b=[],x=v.enter("table");for(;++m<g.length;)b[m]=f(g[m],v,h);return x(),b}function f(d,v,h){const g=d.children;let m=-1;const b=[],x=v.enter("tableRow");for(;++m<g.length;)b[m]=l(g[m],d,v,h);return x(),b}function p(d,v,h){let g=Pv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function II(){return{exit:{taskListCheckValueChecked:Rv,taskListCheckValueUnchecked:Rv,paragraph:AI}}}function PI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RI}}}function Rv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function AI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RI(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=Pv.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function DI(){return[cO(),SO(),jO(),SI(),II()]}function _I(e){return{extensions:[fO(),EO(),NO(),OI(e),PI()]}}const MI={tokenize:zI,partial:!0},Dv={tokenize:WI,partial:!0},_v={tokenize:UI,partial:!0},Mv={tokenize:HI,partial:!0},jI={tokenize:VI,partial:!0},jv={name:"wwwAutolink",tokenize:FI,previous:Lv},Nv={name:"protocolAutolink",tokenize:BI,previous:Fv},$n={name:"emailAutolink",tokenize:LI,previous:Bv},fn={};function NI(){return{text:fn}}let ir=48;for(;ir<123;)fn[ir]=$n,ir++,ir===58?ir=65:ir===91&&(ir=97);fn[43]=$n,fn[45]=$n,fn[46]=$n,fn[95]=$n,fn[72]=[$n,Nv],fn[104]=[$n,Nv],fn[87]=[$n,jv],fn[119]=[$n,jv];function LI(e,t,n){const r=this;let i,o;return a;function a(f){return!Jl(f)||!Bv.call(r,r.previous)||Zl(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Jl(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(jI,c,u)(f):f===45||f===95||bt(f)?(o=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),i=!0,l}function c(f){return o&&i&&$t(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function FI(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Lv.call(r,r.previous)||Zl(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(MI,e.attempt(Dv,e.attempt(_v,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function BI(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&Fv.call(r,r.previous)&&!Zl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if($t(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),o?u:(o=!0,l)):n(f)}function u(f){return f===null||No(f)||Le(f)||rr(f)||Lo(f)?n(f):e.attempt(Dv,e.attempt(_v,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function zI(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function WI(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(Mv,l,s)(u):u===null||Le(u)||rr(u)||u!==45&&Lo(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function UI(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Mv,t,o)(a):a===null||Le(a)||rr(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function HI(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Le(s)||rr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Le(s)||rr(s)?t(s):r(s)}function o(s){return $t(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):$t(s)?(e.consume(s),a):n(s)}}function VI(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return bt(o)?n(o):t(o)}}function Lv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function Fv(e){return!$t(e)}function Bv(e){return!(e===47||Jl(e))}function Jl(e){return e===43||e===45||e===46||e===95||bt(e)}function Zl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const KI={tokenize:eP,partial:!0};function qI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JI,continuation:{tokenize:ZI},exit:QI}},text:{91:{name:"gfmFootnoteCall",tokenize:XI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GI,resolveTo:YI}}}}function GI(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Jt(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function YI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function XI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!a||f===null||f===91||Le(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Le(f)||(a=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function JI(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(v)}function c(v){if(a>999||v===93&&!s||v===null||v===91||Le(v))return n(v);if(v===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=Jt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Le(v)||(s=!0),a++,e.consume(v),v===92?f:c}function f(v){return v===91||v===92||v===93?(e.consume(v),a++,c):c(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ee(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function ZI(e,t,n){return e.check(Ci,t,e.attempt(KI,t,n))}function QI(e){e.exit("gfmFootnoteDefinition")}function eP(e,t,n){const r=this;return Ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function tP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Ut(p,p.length,0,Bo(d,a.slice(u+1,l),s)),Ut(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),Ut(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,c=this.events;let f=0;return p;function p(v){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(v):(a.enter("strikethroughSequenceTemporary"),d(v))}function d(v){const h=Fo(u);if(v===126)return f>1?l(v):(a.consume(v),f++,d);if(f<2&&!n)return l(v);const g=a.exit("strikethroughSequenceTemporary"),m=Fo(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class nP{constructor(){this.map=[]}add(t,n,r){rP(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function rP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function iP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function oP(){return{flow:{null:{name:"table",tokenize:aP,resolveAll:sP}}}}function aP(e,t,n){const r=this;let i=0,o=0,a;return s;function s(O){let M=r.events.length-1;for(;M>-1;){const I=r.events[M][1].type;if(I==="lineEnding"||I==="linePrefix")M--;else break}const K=M>-1?r.events[M][1].type:null,F=K==="tableHead"||K==="tableRow"?E:l;return F===E&&r.parser.lazy[r.now().line]?n(O):F(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(a=!0,o+=1),c(O)}function c(O){return O===null?n(O):pe(O)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),d):n(O):be(O)?Ee(e,c,"whitespace")(O):(o+=1,a&&(a=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||Le(O)?(e.exit("data"),c(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function d(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),a=!1,be(O)?Ee(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):v(O))}function v(O){return O===45||O===58?g(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),h):S(O)}function h(O){return be(O)?Ee(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),m):O===45?(o+=1,m(O)):O===null||pe(O)?k(O):S(O)}function m(O){return O===45?(e.enter("tableDelimiterFiller"),b(O)):S(O)}function b(O){return O===45?(e.consume(O),b):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(O))}function x(O){return be(O)?Ee(e,k,"whitespace")(O):k(O)}function k(O){return O===124?v(O):O===null||pe(O)?!a||i!==o?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return n(O)}function E(O){return e.enter("tableRow"),T(O)}function T(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),T):O===null||pe(O)?(e.exit("tableRow"),t(O)):be(O)?Ee(e,T,"whitespace")(O):(e.enter("data"),L(O))}function L(O){return O===null||O===124||Le(O)?(e.exit("data"),T(O)):(e.consume(O),O===92?N:L)}function N(O){return O===92||O===124?(e.consume(O),L):L(O)}}function sP(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,f;const p=new nP;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(zv(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",c,t]])),i=v.type==="tableDelimiterRow"?2:c?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],f=Zo(p,t,o,i,n,f)):a[1]!==0&&(f=Zo(p,t,a,i,n,f)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&zv(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=iP(t.events,n))}return e}function Zo(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Tr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Tr(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Tr(t.events,n[2]),c=Tr(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,h=n[3]-n[2]-1;e.add(v,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},Tr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function zv(e,t,n,r,i){const o=[],a=Tr(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Tr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lP={name:"tasklistCheck",tokenize:cP};function uP(){return{text:{91:lP}}}function cP(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Le(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return pe(l)?t(l):be(l)?e.check({tokenize:fP},t,n)(l):n(l)}}function fP(e,t,n){return Ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function dP(e){return hh([NI(),qI(),tP(e),oP(),uP()])}const pP={};function hP(e){const t=this,n=e||pP,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(dP(n)),o.push(DI()),a.push(_I(n))}const Ce={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}};/**
57
+ `))}function l(d,v,h,g){const m=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:o,after:o});return b(),m(),w}function u(d,v){return lI(d,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function c(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("table");for(;++m<g.length;)b[m]=f(g[m],v,h);return w(),b}function f(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("tableRow");for(;++m<g.length;)b[m]=l(g[m],d,v,h);return w(),b}function p(d,v,h){let g=zv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function YI(){return{exit:{taskListCheckValueChecked:Uv,taskListCheckValueUnchecked:Uv,paragraph:JI}}}function XI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QI}}}function Uv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function JI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function QI(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=zv.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function ZI(){return[PO(),WO(),nI(),WI(),YI()]}function eP(e){return{extensions:[AO(),UO(),rI(),GI(e),XI()]}}const tP={tokenize:sP,partial:!0},Hv={tokenize:lP,partial:!0},Vv={tokenize:uP,partial:!0},qv={tokenize:cP,partial:!0},nP={tokenize:fP,partial:!0},Kv={name:"wwwAutolink",tokenize:oP,previous:Yv},Gv={name:"protocolAutolink",tokenize:aP,previous:Xv},Tn={name:"emailAutolink",tokenize:iP,previous:Jv},fn={};function rP(){return{text:fn}}let ir=48;for(;ir<123;)fn[ir]=Tn,ir++,ir===58?ir=65:ir===91&&(ir=97);fn[43]=Tn,fn[45]=Tn,fn[46]=Tn,fn[95]=Tn,fn[72]=[Tn,Gv],fn[104]=[Tn,Gv],fn[87]=[Tn,Kv],fn[119]=[Tn,Kv];function iP(e,t,n){const r=this;let i,o;return a;function a(f){return!Zl(f)||!Jv.call(r,r.previous)||eu(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Zl(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(nP,c,u)(f):f===45||f===95||bt(f)?(o=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),i=!0,l}function c(f){return o&&i&&Tt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function oP(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Yv.call(r,r.previous)||eu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tP,e.attempt(Hv,e.attempt(Vv,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function aP(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&Xv.call(r,r.previous)&&!eu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(Tt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),o?u:(o=!0,l)):n(f)}function u(f){return f===null||Lo(f)||Be(f)||rr(f)||Fo(f)?n(f):e.attempt(Hv,e.attempt(Vv,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function sP(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function lP(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(qv,l,s)(u):u===null||Be(u)||rr(u)||u!==45&&Fo(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function uP(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(qv,t,o)(a):a===null||Be(a)||rr(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function cP(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Be(s)||rr(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Be(s)||rr(s)?t(s):r(s)}function o(s){return Tt(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):Tt(s)?(e.consume(s),a):n(s)}}function fP(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return bt(o)?n(o):t(o)}}function Yv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Be(e)}function Xv(e){return!Tt(e)}function Jv(e){return!(e===47||Zl(e))}function Zl(e){return e===43||e===45||e===46||e===95||bt(e)}function eu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const dP={tokenize:xP,partial:!0};function pP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gP,continuation:{tokenize:yP},exit:bP}},text:{91:{name:"gfmFootnoteCall",tokenize:mP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:hP,resolveTo:vP}}}}function hP(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Jt(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function vP(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function mP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!a||f===null||f===91||Be(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Be(f)||(a=!0),o++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function gP(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(v)}function c(v){if(a>999||v===93&&!s||v===null||v===91||Be(v))return n(v);if(v===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=Jt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Be(v)||(s=!0),a++,e.consume(v),v===92?f:c}function f(v){return v===91||v===92||v===93?(e.consume(v),a++,c):c(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(o)||i.push(o),ke(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function yP(e,t,n){return e.check(Ci,t,e.attempt(dP,t,n))}function bP(e){e.exit("gfmFootnoteDefinition")}function xP(e,t,n){const r=this;return ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function wP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Ut(p,p.length,0,zo(d,a.slice(u+1,l),s)),Ut(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),Ut(a,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,c=this.events;let f=0;return p;function p(v){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(v):(a.enter("strikethroughSequenceTemporary"),d(v))}function d(v){const h=Bo(u);if(v===126)return f>1?l(v):(a.consume(v),f++,d);if(f<2&&!n)return l(v);const g=a.exit("strikethroughSequenceTemporary"),m=Bo(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class SP{constructor(){this.map=[]}add(t,n,r){EP(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function EP(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function kP(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CP(){return{flow:{null:{name:"table",tokenize:TP,resolveAll:$P}}}}function TP(e,t,n){const r=this;let i=0,o=0,a;return s;function s(O){let D=r.events.length-1;for(;D>-1;){const j=r.events[D][1].type;if(j==="lineEnding"||j==="linePrefix")D--;else break}const H=D>-1?r.events[D][1].type:null,F=H==="tableHead"||H==="tableRow"?E:l;return F===E&&r.parser.lazy[r.now().line]?n(O):F(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(a=!0,o+=1),c(O)}function c(O){return O===null?n(O):he(O)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),d):n(O):be(O)?ke(e,c,"whitespace")(O):(o+=1,a&&(a=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||Be(O)?(e.exit("data"),c(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function d(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),a=!1,be(O)?ke(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):v(O))}function v(O){return O===45||O===58?g(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),h):S(O)}function h(O){return be(O)?ke(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),m):O===45?(o+=1,m(O)):O===null||he(O)?C(O):S(O)}function m(O){return O===45?(e.enter("tableDelimiterFiller"),b(O)):S(O)}function b(O){return O===45?(e.consume(O),b):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(O))}function w(O){return be(O)?ke(e,C,"whitespace")(O):C(O)}function C(O){return O===124?v(O):O===null||he(O)?!a||i!==o?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return n(O)}function E(O){return e.enter("tableRow"),I(O)}function I(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),I):O===null||he(O)?(e.exit("tableRow"),t(O)):be(O)?ke(e,I,"whitespace")(O):(e.enter("data"),L(O))}function L(O){return O===null||O===124||Be(O)?(e.exit("data"),I(O)):(e.consume(O),O===92?_:L)}function _(O){return O===92||O===124?(e.consume(O),L):L(O)}}function $P(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,f;const p=new SP;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Qv(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",c,t]])),i=v.type==="tableDelimiterRow"?2:c?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=Zo(p,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],f=Zo(p,t,o,i,n,f)):a[1]!==0&&(f=Zo(p,t,a,i,n,f)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Qv(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=kP(t.events,n))}return e}function Zo(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ir(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=Ir(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Ir(t.events,n[2]),c=Ir(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,h=n[3]-n[2]-1;e.add(v,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},Ir(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Qv(e,t,n,r,i){const o=[],a=Ir(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ir(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const OP={name:"tasklistCheck",tokenize:PP};function IP(){return{text:{91:OP}}}function PP(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Be(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return he(l)?t(l):be(l)?e.check({tokenize:AP},t,n)(l):n(l)}}function AP(e,t,n){return ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function RP(e){return Ch([rP(),pP(),wP(e),CP(),IP()])}const _P={};function DP(e){const t=this,n=e||_P,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(RP(n)),o.push(ZI()),a.push(eP(n))}const we={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},error:{container:{className:"bpReset bpErrorContainer"},header:{className:"bpErrorHeader"},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}};/**
58
58
  * @license lucide-react v0.424.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const vP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wv=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
62
+ */const MP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zv=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
63
63
  * @license lucide-react v0.424.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */var mP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
67
+ */var jP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
68
68
  * @license lucide-react v0.424.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const gP=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>A.createElement("svg",{ref:l,...mP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wv("lucide",i),...s},[...a.map(([u,c])=>A.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
72
+ */const NP=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>A.createElement("svg",{ref:l,...jP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zv("lucide",i),...s},[...a.map(([u,c])=>A.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
73
73
  * @license lucide-react v0.424.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const We=(e,t)=>{const n=A.forwardRef(({className:r,...i},o)=>A.createElement(gP,{ref:o,iconNode:t,className:Wv(`lucide-${vP(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
77
+ */const je=(e,t)=>{const n=A.forwardRef(({className:r,...i},o)=>A.createElement(NP,{ref:o,iconNode:t,className:Zv(`lucide-${MP(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
78
78
  * @license lucide-react v0.424.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const yP=We("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
82
+ */const LP=je("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
83
83
  * @license lucide-react v0.424.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const bP=We("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
87
+ */const em=je("BotOff",[["path",{d:"M13.67 8H18a2 2 0 0 1 2 2v4.33",key:"7az073"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}],["path",{d:"M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586",key:"s09a7a"}],["path",{d:"M9 13v2",key:"rq6x2g"}],["path",{d:"M9.67 4H12v2.33",key:"110xot"}]]);/**
88
88
  * @license lucide-react v0.424.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const xP=We("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
92
+ */const FP=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
93
93
  * @license lucide-react v0.424.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const wP=We("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
97
+ */const BP=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
98
98
  * @license lucide-react v0.424.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const SP=We("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
102
+ */const zP=je("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
103
103
  * @license lucide-react v0.424.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const EP=We("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
107
+ */const WP=je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
108
108
  * @license lucide-react v0.424.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const Uv=We("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
112
+ */const UP=je("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
113
113
  * @license lucide-react v0.424.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const CP=We("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
117
+ */const tm=je("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
118
118
  * @license lucide-react v0.424.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const kP=We("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
122
+ */const HP=je("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
123
123
  * @license lucide-react v0.424.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const $P=We("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
127
+ */const VP=je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
128
128
  * @license lucide-react v0.424.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const Hv=We("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
132
+ */const qP=je("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
133
133
  * @license lucide-react v0.424.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const TP=We("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/**
137
+ */const nm=je("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
138
138
  * @license lucide-react v0.424.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const OP=We("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
142
+ */const KP=je("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/**
143
143
  * @license lucide-react v0.424.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const IP=We("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
147
+ */const GP=je("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
148
148
  * @license lucide-react v0.424.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const PP=We("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
152
+ */const YP=je("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
153
153
  * @license lucide-react v0.424.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const AP=We("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
157
+ */const XP=je("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
158
158
  * @license lucide-react v0.424.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const RP=We("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
162
+ */const JP=je("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
163
163
  * @license lucide-react v0.424.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const DP=We("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
167
+ */const QP=je("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
168
168
  * @license lucide-react v0.424.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const _P=We("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
172
+ */const ZP=je("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
173
173
  * @license lucide-react v0.424.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const MP=We("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
177
+ */const eA=je("MonitorCog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m15.2 4.9-.9-.4",key:"12wd2u"}],["path",{d:"m15.2 7.1-.9.4",key:"1r2vl7"}],["path",{d:"m16.9 3.2-.4-.9",key:"3zbo91"}],["path",{d:"m16.9 8.8-.4.9",key:"1qr2dn"}],["path",{d:"m19.5 2.3-.4.9",key:"1rjrkq"}],["path",{d:"m19.5 9.7-.4-.9",key:"heryx5"}],["path",{d:"m21.7 4.5-.9.4",key:"17fqt1"}],["path",{d:"m21.7 7.5-.9-.4",key:"14zyni"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
178
178
  * @license lucide-react v0.424.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const jP=We("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
182
+ */const tA=je("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
183
183
  * @license lucide-react v0.424.0 - ISC
184
184
  *
185
185
  * This source code is licensed under the ISC license.
186
186
  * See the LICENSE file in the root directory of this source tree.
187
- */const NP=We("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
187
+ */const nA=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
188
188
  * @license lucide-react v0.424.0 - ISC
189
189
  *
190
190
  * This source code is licensed under the ISC license.
191
191
  * See the LICENSE file in the root directory of this source tree.
192
- */const LP=We("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
192
+ */const rA=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
193
193
  * @license lucide-react v0.424.0 - ISC
194
194
  *
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
- */const FP=We("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
197
+ */const iA=je("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
198
198
  * @license lucide-react v0.424.0 - ISC
199
199
  *
200
200
  * This source code is licensed under the ISC license.
201
201
  * See the LICENSE file in the root directory of this source tree.
202
- */const BP=We("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
202
+ */const oA=je("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
203
203
  * @license lucide-react v0.424.0 - ISC
204
204
  *
205
205
  * This source code is licensed under the ISC license.
206
206
  * See the LICENSE file in the root directory of this source tree.
207
- */const zP=We("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),WP=({text:e})=>{const{message:{blocks:{text:t}}}=Ce,n={h1:({node:r,...i})=>$.jsx("h1",{...i,...t.heading1}),h2:({node:r,...i})=>$.jsx("h2",{...i,...t.heading2}),h3:({node:r,...i})=>$.jsx("h3",{...i,...t.heading3}),h4:({node:r,...i})=>$.jsx("h4",{...i,...t.heading4}),h5:"h4",h6:"h4",em:({node:r,...i})=>$.jsx("em",{...i,...t.italic}),strong:({node:r,...i})=>$.jsx("strong",{...i,...t.bold}),p:({node:r,...i})=>$.jsx("p",{...i,...t.text}),hr:({node:r,...i})=>$.jsx("hr",{...i,...t.horizontalRule}),a:({node:r,...i})=>$.jsx("a",{...i,...t.link,target:"_blank"}),img:({node:r,...i})=>$.jsx("img",{...i,...t.image}),ol:({node:r,...i})=>$.jsx("ol",{...i,...t.orderedList}),ul:({node:r,...i})=>$.jsx("ul",{...i,...t.unorderedList}),li:({node:r,...i})=>$.jsx("li",{...i,...t.listItem}),br:({node:r,...i})=>$.jsx("br",{...i,...t.lineBreak}),pre:({node:r,...i})=>{var f,p;const o=r==null?void 0:r.children[0],a=UP(((p=(f=o==null?void 0:o.properties)==null?void 0:f.className)==null?void 0:p[0])||""),[s,l]=A.useState(!1),u=A.useRef(null),c=()=>{if(!u.current)return;const d=u.current.textContent||"";navigator.clipboard.writeText(d).then(()=>{l(!0),setTimeout(()=>{l(!1)},1500)}).catch(v=>{console.error("Failed to copy code to clipboard:",v)})};return $.jsxs("div",{...t.codeBlockContainer,children:[$.jsxs("div",{...t.codeBlockTitle,children:[a?$.jsx("span",{children:a}):"Code",s?$.jsx(bP,{...t.codeBlockCopyIcon}):$.jsx(TP,{...t.codeBlockCopyIcon,onClick:c})]}),$.jsx("pre",{ref:u,...i,...t.codeBlock})]})},input:({node:r,...i})=>$.jsx("input",{...i,...t.input,disabled:!1}),code:({node:r,...i})=>$.jsx("code",{...i,...t.code}),table:({node:r,...i})=>$.jsx("div",{...t.tableContainer,children:$.jsx("table",{...i,...t.table})}),th:({node:r,...i})=>$.jsx("th",{...i,...t.tableHeader}),tr:({node:r,...i})=>$.jsx("tr",{...i,...t.tableRow}),td:({node:r,...i})=>$.jsx("td",{...i,...t.tableData})};return $.jsx(cv,{urlTransform:r=>r.startsWith("tel:")?r:fv(r),components:n,remarkPlugins:[hP,uO],children:e})},UP=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},HP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Vv=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,d))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(HP?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},VP=e=>e?Vv(e):Vv;var Ql={exports:{}},eu={},Qo={exports:{}},tu={};/**
207
+ */const aA=je("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
208
+ * @license lucide-react v0.424.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const sA=je("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
213
+ * @license lucide-react v0.424.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const lA=je("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
218
+ * @license lucide-react v0.424.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const uA=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cA=({text:e})=>{const{message:{blocks:{text:t}}}=we,n={h1:({node:r,...i})=>T.jsx("h1",{...i,...t.heading1}),h2:({node:r,...i})=>T.jsx("h2",{...i,...t.heading2}),h3:({node:r,...i})=>T.jsx("h3",{...i,...t.heading3}),h4:({node:r,...i})=>T.jsx("h4",{...i,...t.heading4}),h5:"h4",h6:"h4",em:({node:r,...i})=>T.jsx("em",{...i,...t.italic}),strong:({node:r,...i})=>T.jsx("strong",{...i,...t.bold}),p:({node:r,...i})=>T.jsx("p",{...i,...t.text}),hr:({node:r,...i})=>T.jsx("hr",{...i,...t.horizontalRule}),a:({node:r,...i})=>T.jsx("a",{...i,...t.link,target:"_blank",rel:"noreferrer noopener"}),img:({node:r,...i})=>T.jsx("img",{...i,...t.image}),ol:({node:r,...i})=>T.jsx("ol",{...i,...t.orderedList}),ul:({node:r,...i})=>T.jsx("ul",{...i,...t.unorderedList}),li:({node:r,...i})=>T.jsx("li",{...i,...t.listItem}),br:({node:r,...i})=>T.jsx("br",{...i,...t.lineBreak}),pre:({node:r,...i})=>{var f,p;const o=r==null?void 0:r.children[0],a=fA(((p=(f=o==null?void 0:o.properties)==null?void 0:f.className)==null?void 0:p[0])||""),[s,l]=A.useState(!1),u=A.useRef(null),c=()=>{if(!u.current)return;const d=u.current.textContent||"";navigator.clipboard.writeText(d).then(()=>{l(!0),setTimeout(()=>{l(!1)},1500)}).catch(v=>{console.error("Failed to copy code to clipboard:",v)})};return T.jsxs("div",{...t.codeBlockContainer,children:[T.jsxs("div",{...t.codeBlockTitle,children:[a?T.jsx("span",{children:a}):"Code",s?T.jsx(FP,{...t.codeBlockCopyIcon}):T.jsx(KP,{...t.codeBlockCopyIcon,onClick:c})]}),T.jsx("pre",{ref:u,...i,...t.codeBlock})]})},input:({node:r,...i})=>T.jsx("input",{...i,...t.input,disabled:!1}),code:({node:r,...i})=>T.jsx("code",{...i,...t.code}),table:({node:r,...i})=>T.jsx("div",{...t.tableContainer,children:T.jsx("table",{...i,...t.table})}),th:({node:r,...i})=>T.jsx("th",{...i,...t.tableHeader}),tr:({node:r,...i})=>T.jsx("tr",{...i,...t.tableRow}),td:({node:r,...i})=>T.jsx("td",{...i,...t.tableData})};return T.jsx(wv,{urlTransform:r=>r.startsWith("tel:")?r:Sv(r),components:n,remarkPlugins:[DP,IO],children:e})},fA=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},dA={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rm=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,d))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(dA?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},pA=e=>e?rm(e):rm;var tu={exports:{}},nu={},ea={exports:{}},ru={};/**
208
223
  * @license React
209
224
  * use-sync-external-store-shim.production.min.js
210
225
  *
@@ -212,7 +227,7 @@ React keys must be passed directly to JSX without using spread:
212
227
  *
213
228
  * This source code is licensed under the MIT license found in the
214
229
  * LICENSE file in the root directory of this source tree.
215
- */var Kv;function KP(){if(Kv)return tu;Kv=1;var e=A;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),v=r({inst:{value:d,getSnapshot:p}}),h=v[0].inst,g=v[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[f,d,p]),i(function(){return l(h)&&g({inst:h}),f(function(){l(h)&&g({inst:h})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function u(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return tu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,tu}var nu={};/**
230
+ */var im;function hA(){if(im)return ru;im=1;var e=A;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),v=r({inst:{value:d,getSnapshot:p}}),h=v[0].inst,g=v[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[f,d,p]),i(function(){return l(h)&&g({inst:h}),f(function(){l(h)&&g({inst:h})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function u(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return ru.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,ru}var iu={};/**
216
231
  * @license React
217
232
  * use-sync-external-store-shim.development.js
218
233
  *
@@ -220,7 +235,7 @@ React keys must be passed directly to JSX without using spread:
220
235
  *
221
236
  * This source code is licensed under the MIT license found in the
222
237
  * LICENSE file in the root directory of this source tree.
223
- */var qv;function qP(){return qv||(qv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=A,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(x){{for(var k=arguments.length,S=new Array(k>1?k-1:0),E=1;E<k;E++)S[E-1]=arguments[E];r("error",x,S)}}function r(x,k,S){{var E=t.ReactDebugCurrentFrame,T=E.getStackAddendum();T!==""&&(k+="%s",S=S.concat([T]));var L=S.map(function(N){return String(N)});L.unshift("Warning: "+k),Function.prototype.apply.call(console[x],console,L)}}function i(x,k){return x===k&&(x!==0||1/x===1/k)||x!==x&&k!==k}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,c=!1,f=!1;function p(x,k,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=k();if(!f){var T=k();o(E,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var L=a({inst:{value:E,getSnapshot:k}}),N=L[0].inst,O=L[1];return l(function(){N.value=E,N.getSnapshot=k,d(N)&&O({inst:N})},[x,E,k]),s(function(){d(N)&&O({inst:N});var M=function(){d(N)&&O({inst:N})};return x(M)},[x]),u(E),E}function d(x){var k=x.getSnapshot,S=x.value;try{var E=k();return!o(S,E)}catch{return!0}}function v(x,k,S){return k()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,m=g?v:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;nu.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),nu}var Gv;function Yv(){return Gv||(Gv=1,process.env.NODE_ENV==="production"?Qo.exports=KP():Qo.exports=qP()),Qo.exports}/**
238
+ */var om;function vA(){return om||(om=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=A,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var C=arguments.length,S=new Array(C>1?C-1:0),E=1;E<C;E++)S[E-1]=arguments[E];r("error",w,S)}}function r(w,C,S){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(C+="%s",S=S.concat([I]));var L=S.map(function(_){return String(_)});L.unshift("Warning: "+C),Function.prototype.apply.call(console[w],console,L)}}function i(w,C){return w===C&&(w!==0||1/w===1/C)||w!==w&&C!==C}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,c=!1,f=!1;function p(w,C,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=C();if(!f){var I=C();o(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var L=a({inst:{value:E,getSnapshot:C}}),_=L[0].inst,O=L[1];return l(function(){_.value=E,_.getSnapshot=C,d(_)&&O({inst:_})},[w,E,C]),s(function(){d(_)&&O({inst:_});var D=function(){d(_)&&O({inst:_})};return w(D)},[w]),u(E),E}function d(w){var C=w.getSnapshot,S=w.value;try{var E=C();return!o(S,E)}catch{return!0}}function v(w,C,S){return C()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,m=g?v:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;iu.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),iu}var am;function sm(){return am||(am=1,process.env.NODE_ENV==="production"?ea.exports=hA():ea.exports=vA()),ea.exports}/**
224
239
  * @license React
225
240
  * use-sync-external-store-shim/with-selector.production.min.js
226
241
  *
@@ -228,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
228
243
  *
229
244
  * This source code is licensed under the MIT license found in the
230
245
  * LICENSE file in the root directory of this source tree.
231
- */var Xv;function GP(){if(Xv)return eu;Xv=1;var e=A,t=Yv();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return eu.useSyncExternalStoreWithSelector=function(u,c,f,p,d){var v=o(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function m(E){if(!b){if(b=!0,x=E,E=p(E),d!==void 0&&h.hasValue){var T=h.value;if(d(T,E))return k=T}return k=E}if(T=k,r(x,E))return T;var L=p(E);return d!==void 0&&d(T,L)?T:(x=E,k=L)}var b=!1,x,k,S=f===void 0?null:f;return[function(){return m(c())},S===null?void 0:function(){return m(S())}]},[c,f,p,d]);var g=i(u,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},eu}var ru={};/**
246
+ */var lm;function mA(){if(lm)return nu;lm=1;var e=A,t=sm();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return nu.useSyncExternalStoreWithSelector=function(u,c,f,p,d){var v=o(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function m(E){if(!b){if(b=!0,w=E,E=p(E),d!==void 0&&h.hasValue){var I=h.value;if(d(I,E))return C=I}return C=E}if(I=C,r(w,E))return I;var L=p(E);return d!==void 0&&d(I,L)?I:(w=E,C=L)}var b=!1,w,C,S=f===void 0?null:f;return[function(){return m(c())},S===null?void 0:function(){return m(S())}]},[c,f,p,d]);var g=i(u,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},nu}var ou={};/**
232
247
  * @license React
233
248
  * use-sync-external-store-shim/with-selector.development.js
234
249
  *
@@ -236,56 +251,56 @@ React keys must be passed directly to JSX without using spread:
236
251
  *
237
252
  * This source code is licensed under the MIT license found in the
238
253
  * LICENSE file in the root directory of this source tree.
239
- */var Jv;function YP(){return Jv||(Jv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=A,t=Yv();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(c,f,p,d,v){var h=o(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var m=s(function(){var S=!1,E,T,L=function(K){if(!S){S=!0,E=K;var F=d(K);if(v!==void 0&&g.hasValue){var I=g.value;if(v(I,F))return T=I,I}return T=F,F}var D=E,j=T;if(r(D,K))return j;var G=d(K);return v!==void 0&&v(j,G)?j:(E=K,T=G,G)},N=p===void 0?null:p,O=function(){return L(f())},M=N===null?void 0:function(){return L(N())};return[O,M]},[f,p,d,v]),b=m[0],x=m[1],k=i(c,b,x);return a(function(){g.hasValue=!0,g.value=k},[k]),l(k),k}ru.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ru}process.env.NODE_ENV==="production"?Ql.exports=GP():Ql.exports=YP();var XP=Ql.exports;const JP=Se(XP),Zv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:ZP}=A,{useSyncExternalStoreWithSelector:QP}=JP;let Qv=!1;const eA=e=>e;function tA(e,t=eA,n){(Zv?"production":void 0)!=="production"&&n&&!Qv&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Qv=!0);const r=QP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ZP(r),r}const nA=e=>{(Zv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?VP(e):e,n=(r,i)=>tA(t,r,i);return Object.assign(n,t),n},Or=e=>nA,ea={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},iu=new Map,ta=e=>{const t=iu.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},rA=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=iu.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return iu.set(n.name,i),{type:"tracked",store:e,...i}},na=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let u;try{u=(o??(ea?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(ea?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=rA(s,u,l);let p=!0;i.setState=(h,g,m)=>{const b=n(h,g);if(!p)return b;const x=m===void 0?{type:a||"anonymous"}:typeof m=="string"?{type:m}:m;return s===void 0?(c==null||c.send(x,r()),b):(c==null||c.send({...x,type:`${s}/${x.type}`},{...ta(l.name),[s]:i.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},v=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(v):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?v:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const g=i.dispatch;i.dispatch=(...m)=>{(ea?"production":void 0)!=="production"&&m[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),g(...m)}}return c.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ou(h.payload,m=>{if(m.type==="__setState"){if(s===void 0){d(m.state);return}Object.keys(m.state).length!==1&&console.error(`
254
+ */var um;function gA(){return um||(um=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=A,t=sm();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(c,f,p,d,v){var h=o(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var m=s(function(){var S=!1,E,I,L=function(H){if(!S){S=!0,E=H;var F=d(H);if(v!==void 0&&g.hasValue){var j=g.value;if(v(j,F))return I=j,j}return I=F,F}var M=E,W=I;if(r(M,H))return W;var G=d(H);return v!==void 0&&v(W,G)?W:(E=H,I=G,G)},_=p===void 0?null:p,O=function(){return L(f())},D=_===null?void 0:function(){return L(_())};return[O,D]},[f,p,d,v]),b=m[0],w=m[1],C=i(c,b,w);return a(function(){g.hasValue=!0,g.value=C},[C]),l(C),C}ou.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ou}process.env.NODE_ENV==="production"?tu.exports=mA():tu.exports=gA();var yA=tu.exports;const bA=Ee(yA),cm={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:xA}=A,{useSyncExternalStoreWithSelector:wA}=bA;let fm=!1;const SA=e=>e;function EA(e,t=SA,n){(cm?"production":void 0)!=="production"&&n&&!fm&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),fm=!0);const r=wA(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return xA(r),r}const kA=e=>{(cm?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?pA(e):e,n=(r,i)=>EA(t,r,i);return Object.assign(n,t),n},or=e=>kA,ta={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},au=new Map,na=e=>{const t=au.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},CA=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=au.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return au.set(n.name,i),{type:"tracked",store:e,...i}},ra=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let u;try{u=(o??(ta?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(ta?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=CA(s,u,l);let p=!0;i.setState=(h,g,m)=>{const b=n(h,g);if(!p)return b;const w=m===void 0?{type:a||"anonymous"}:typeof m=="string"?{type:m}:m;return s===void 0?(c==null||c.send(w,r()),b):(c==null||c.send({...w,type:`${s}/${w.type}`},{...na(l.name),[s]:i.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},v=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(v):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?v:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const g=i.dispatch;i.dispatch=(...m)=>{(ta?"production":void 0)!=="production"&&m[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),g(...m)}}return c.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return su(h.payload,m=>{if(m.type==="__setState"){if(s===void 0){d(m.state);return}Object.keys(m.state).length!==1&&console.error(`
240
255
  [zustand devtools middleware] Unsupported __setState action format.
241
256
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
242
257
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
243
- `);const b=m.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(m)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(v),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(ta(l.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(ta(l.name));case"ROLLBACK":return ou(h.state,m=>{if(s===void 0){d(m),c==null||c.init(i.getState());return}d(m[s]),c==null||c.init(ta(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ou(h.state,m=>{if(s===void 0){d(m);return}JSON.stringify(i.getState())!==JSON.stringify(m[s])&&d(m[s])});case"IMPORT_STATE":{const{nextLiftedState:m}=h.payload,b=(g=m.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),c==null||c.send(null,m);return}case"PAUSE_RECORDING":return p=!p}return}}),v},ou=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function em(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Ii=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ii(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ii(r)(n)}}}},iA=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,m)=>({...m,...g}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...g)},r,i);const c=Ii(o.serialize),f=()=>{const g=o.partialize({...r()});let m;const b=c({state:g,version:o.version}).then(x=>u.setItem(o.name,x)).catch(x=>{m=x});if(m)throw m;return b},p=i.setState;i.setState=(g,m)=>{p(g,m),f()};const d=e((...g)=>{n(...g),f()},r,i);let v;const h=()=>{var g;if(!u)return;a=!1,s.forEach(b=>b(r()));const m=((g=o.onRehydrateStorage)==null?void 0:g.call(o,r()))||void 0;return Ii(u.getItem.bind(u))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var x;return v=o.merge(b,(x=r())!=null?x:d),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),a=!0,l.forEach(b=>b(v))}).catch(b=>{m==null||m(void 0,b)})};return i.persist={setOptions:g=>{o={...o,...g},g.getStorage&&(u=g.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),v||d},oA=(e,t)=>(n,r,i)=>{let o={storage:em(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},f=i.setState;i.setState=(h,g)=>{f(h,g),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const v=()=>{var h,g;if(!u)return;a=!1,s.forEach(b=>{var x;return b((x=r())!=null?x:p)});const m=((g=o.onRehydrateStorage)==null?void 0:g.call(o,(h=r())!=null?h:p))||void 0;return Ii(u.getItem.bind(u))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return[!0,o.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var x;const[k,S]=b;if(d=o.merge(S,(x=r())!=null?x:p),n(d,!0),k)return c()}).then(()=>{m==null||m(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{m==null||m(void 0,b)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||v(),d||p},tm=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ea?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),iA(e,t)):oA(e,t),nm=Or()(na(tm(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));function ra(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=rm(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const rm=e=>{switch(e.type){case"audio":return im(e);case"card":return aA(e);case"carousel":return sA(e);case"choice":return lA(e);case"dropdown":return uA(e);case"file":return om(e);case"image":return am(e);case"location":return sm(e);case"markdown":return lm(e);case"text":return um(e);case"video":return cm(e);case"bloc":return cA(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Pi=e=>({block:e,type:"bubble"}),im=e=>({payload:{type:"audio",url:e.audioUrl}}),aA=e=>({payload:Pi(fm(e))}),sA=e=>({payload:{type:"carousel",blocks:e.items.map(t=>fm({type:"card",...t}))}}),lA=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=_p(),i=Pi({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},uA=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:Pi({type:"column",blocks:r})}},om=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),am=e=>({payload:{type:"image",url:e.imageUrl}}),sm=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),lm=e=>({payload:Pi({type:"text",text:e.markdown})}),um=e=>({payload:Pi({type:"text",text:e.text,value:e.value})}),cm=e=>({payload:{type:"video",url:e.videoUrl}}),cA=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return im({...n.payload,type:n.type}).payload;case"file":return om({...n.payload,type:n.type}).payload;case"image":return am({...n.payload,type:n.type}).payload;case"location":return sm({...n.payload,type:n.type}).payload;case"markdown":return lm({...n.payload,type:n.type}).payload;case"text":return um({...n.payload,type:n.type}).payload;case"video":return cm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),fm=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},Ir=Or()(na(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(a=>{var s;return((s=a.metadata)==null?void 0:s.clientMessageId)===r});if(o!==-1)return{messages:[...n.slice(0,o),t,...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(o=>ra(o)).filter(Boolean)}}),{name:"messagesStore"})),fA=(e,t)=>Or()(na(tm(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e,storage:em(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),vi=class vi{constructor(){}static getInstance(t="bp-webchat",n){return vi._instances[t]||(vi._instances[t]=fA(t,n)),vi._instances[t]}};fp(vi,"_instances",{});let au=vi;const dm=au.getInstance,ia=Or()(na(e=>({eventEmitter:OE,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),dA=8,Ai=Or()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(a=>a.name===n.name)?r.map(a=>a.name===n.name?{...a,...n}:a):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(a=>a.name===n.name),o=t().files.length===dA;if(!(!i&&o)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:a,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:a,instance:n,status:"uploaded"})}catch(a){console.error("Error sending file:",a),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),pA=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=ia(x=>x.eventEmitter),[u,c]=A.useState(!1),[f,p]=A.useState(!1),[d,v]=A.useState(!1),{message:{blocks:{button:h}}}=Ce;A.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||v(!0)})},[l,r,i]);const m={...s,onClick:x=>{if((d||a)&&n==="link"){x.preventDefault();return}c(!0),i||v(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?$.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):$.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},pm=A.createContext(null);function hA(){const e=A.useContext(pm);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const hm=A.createContext({open:void 0,showModal:void 0,hideModal:void 0});function su(){return A.useContext(hm)}const vm=A.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:u,...c},f)=>{const[p,d]=A.useState(""),{showModal:v,hideModal:h}=su(),{message:{blocks:{bubble:{container:g,feedbackContainer:m,feedbackIcon:b}}}}=Ce;return t=="incoming"?$.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...c,...g,ref:f,children:[$.jsx(ar,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}}),u&&v&&h&&$.jsxs("div",{...m,children:[$.jsx(LP,{...b,"data-selected":o==="positive",onClick:()=>{u(i,{value:"positive"})}}),$.jsx(NP,{...b,"data-selected":o==="negative",onClick:()=>v({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{u(i,{value:"negative",comment:p}),h()},content:$.jsx(vA,{setFeedbackComment:d})})})]})]}):$.jsx("div",{"data-direction":"outgoing",...c,...g,ref:f,children:$.jsx(ar,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}})})});vm.displayName="Bubble";const vA=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=Ce;return $.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var Vt=function(){return Vt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vt.apply(this,arguments)};function mm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pr(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function Ar(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function gm(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function lu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function mA(){var e=A.useRef(!1),t=A.useCallback(function(){return e.current},[]);return A.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function gA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=A.useRef(0),i=mA(),o=A.useState(n),a=o[0],s=o[1],l=A.useCallback(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=++r.current;return a.loading||s(function(p){return Vt(Vt({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function yA(e,t){t===void 0&&(t=[]);var n=gA(e,t,{loading:!0}),r=n[0],i=n[1];return A.useEffect(function(){i()},[i]),r}const ym=A.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=A.useId(),{setIsLoading:a}=hA(),[s,l]=A.useState(n),[u,c]=A.useState(!1),{message:{blocks:{image:f}}}=Ce;return A.useLayoutEffect(()=>{a(p=>[...p,o])},[]),yA(async()=>{if(e){try{const{width:p,height:d}=await HE(e);s==="auto"&&l(bA(p,d))}catch(p){l("square"),console.error(p)}a(p=>p.filter(d=>d!==o))}},[e]),$.jsxs($.Fragment,{children:[u?null:$.jsx("div",{"data-orientation":s,...f.placeholder}),$.jsx("img",{"data-orientation":s,"data-loaded":u,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});ym.displayName="Image";function bA(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const bm=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=Ce;return $.jsx("div",{children:$.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});bm.displayName="Video";const xm=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=Ce;return $.jsx("div",{children:$.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});xm.displayName="Audio";const wm=A.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=Ce;return $.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[$.jsx("p",{...s.title,children:n}),$.jsx(RP,{...s.icon})]})});wm.displayName="Location";const Sm=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...u},c)=>{const{message:{blocks:{column:f}}}=Ce;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...f,ref:c,children:e.map((p,d)=>$.jsx(ar,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Sm.displayName="Column";const Em=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:u,...c},f)=>{const{message:{blocks:{row:p}}}=Ce;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,v)=>$.jsx(ar,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:u}},v))})});Em.displayName="Row";function xA(e){return Object.prototype.toString.call(e)==="[object Object]"}function Cm(e){return xA(e)||Array.isArray(e)}function wA(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function uu(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Cm(s)||!Cm(l)?s===l:uu(s,l)})}function km(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function SA(e,t){if(e.length!==t.length)return!1;const n=km(e),r=km(t);return n.every((i,o)=>{const a=r[o];return uu(i,a)})}function cu(e){return typeof e=="number"}function $m(e){return typeof e=="string"}function fu(e){return typeof e=="boolean"}function Tm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Je(e){return Math.abs(e)}function du(e){return Math.sign(e)}function oa(e,t){return Je(e-t)}function EA(e,t){if(e===0||t===0||Je(e)<=Je(t))return 0;const n=oa(Je(e),Je(t));return Je(n/e)}function Ri(e){return sa(e).map(Number)}function Tn(e){return e[aa(e)]}function aa(e){return Math.max(0,e.length-1)}function sa(e){return Object.keys(e)}function Om(e,t){return[e,t].reduce((n,r)=>(sa(r).forEach(i=>{const o=n[i],a=r[i],s=Tm(o)&&Tm(a);n[i]=s?Om(o,a):a}),n),{})}function Im(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function CA(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(u){return o(u)/2}function o(u){return t-u}function a(){return t*Number(e)}function s(u){return cu(e)?a():n[e](u)}return{measure:s}}function kA(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function Fn(e,t){const n=Je(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function Pm(e,t,n){const{constrain:r}=Fn(0,e),i=e+1;let o=a(t);function a(p){return n?Je((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),f}function u(p){return c().set(s()+p)}function c(){return Pm(e,s(),n)}const f={get:s,set:l,add:u,clone:c};return f}function $A(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Di(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function TA(e,t,n,r,i,o,a,s,l,u,c,f,p,d,v,h,g,m,b){const{cross:x}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Di(),T=Di(),L=Fn(50,225).constrain(v.measure(20)),N={mouse:300,touch:400},O={mouse:500,touch:600},M=h?43:25;let K=!1,F=0,I=0,D=!1,j=!1,G=!1,U=!1;function R(Z,V){if(!V)return;function ie(de){(fu(V)||V(Z,de))&&X(de)}const le=n;E.add(le,"dragstart",de=>de.preventDefault(),S).add(le,"touchmove",()=>{},S).add(le,"touchend",()=>{}).add(le,"touchstart",ie).add(le,"mousedown",ie).add(le,"touchcancel",Y).add(le,"contextmenu",Y).add(le,"click",Q,!0)}function y(){E.clear(),T.clear()}function _(){const Z=U?r:n;T.add(Z,"touchmove",q,S).add(Z,"touchend",Y).add(Z,"mousemove",q,S).add(Z,"mouseup",Y)}function z(Z){const V=Z.nodeName||"";return k.includes(V)}function w(){return(h?O:N)[U?"mouse":"touch"]}function H(Z,V){const ie=p.add(du(Z)*-1),le=f.byDistance(Z,!h).distance;return h||Je(Z)<L?le:m&&V?le*.5:f.byIndex(ie.get(),0).distance}function X(Z){const V=Im(Z,i);U=V,!(V&&Z.button!==0)&&(z(Z.target)||(G=h&&V&&!Z.buttons&&K,K=oa(o.get(),s.get())>=2,D=!0,a.pointerDown(Z),c.useFriction(0).useDuration(0),o.set(s),_(),F=a.readPoint(Z),I=a.readPoint(Z,x),d.emit("pointerDown")))}function q(Z){const V=a.readPoint(Z),ie=a.readPoint(Z,x),le=oa(V,F),de=oa(ie,I);if(!j&&!U&&(!Z.cancelable||(j=le>de,!j)))return Y(Z);const ae=a.pointerMove(Z);le>g&&(G=!0),c.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(ae)),Z.preventDefault()}function Y(Z){const ie=f.byDistance(0,!1).index!==p.get(),le=a.pointerUp(Z)*w(),de=H(t.apply(le),ie),ae=EA(le,de),ge=M-10*ae,$e=b+ae/50;j=!1,D=!1,T.clear(),c.useDuration(ge).useFriction($e),u.distance(de,!h),U=!1,d.emit("pointerUp")}function Q(Z){G&&(Z.stopPropagation(),Z.preventDefault())}function ee(){return D}return{init:R,pointerDown:ee,destroy:y}}function OA(e,t){let r,i;function o(f){return f.timeStamp}function a(f,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Im(f,t)?f:f.touches[0])[v]}function s(f){return r=f,i=f,a(f)}function l(f){const p=a(f)-a(i),d=o(f)-o(r)>170;return i=f,d&&(r=f),p}function u(f){if(!r||!i)return 0;const p=a(i)-a(r),d=o(f)-o(r),v=o(f)-o(i)>170,h=p/d;return d&&!v&&Je(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function IA(e){function t(r){return e*(r/100)}return{measure:t}}function PA(e,t,n,r,i){let o,a,s=[],l=!1;function u(d){return i.measureSize(d.getBoundingClientRect())}function c(d,v){if(!v)return;a=u(e),s=r.map(u);function h(m){for(const b of m){const x=b.target===e,k=r.indexOf(b.target),S=x?a:s[k],E=u(x?e:r[k]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(m=>{l||(fu(v)||v(d,m))&&h(m)}),[e].concat(r).forEach(m=>o.observe(m))}function f(){o&&o.disconnect(),l=!0}return{init:c,destroy:f}}function AA(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,u=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let T=0;return E?(o=0,e.set(t),T=S):(o+=S/s,o*=l,u+=o,e.add(o),T=u-c),a=du(T),c=u,i=Je(S)<.001,k}function p(){return i}function d(){return s}function v(){return a}function h(){return o}function g(){return b(n)}function m(){return x(r)}function b(S){return s=S,k}function x(S){return l=S,k}const k={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:x,useDuration:b};return k}function RA(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Fn(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!u())return;const v=e.reachedMin(t.get())?"min":"max",h=Je(e[v]-t.get()),g=n.get()-t.get(),m=s.constrain(h/a);n.subtract(g*m),!d&&Je(g)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:c,toggleActive:f}}function DA(e,t,n,r){const i=Fn(-t+e,n[0]),o=l(),a=u();function s(){const f=o[0],p=Tn(o),d=o.lastIndexOf(f),v=o.indexOf(p)+1;return Fn(d,v)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function u(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:f,max:p}=s();return o.slice(f,p)}return{snapsContained:a}}function _A(e,t,n){const r=t[0],i=n?r-e:Tn(t);return{limit:Fn(i,r)}}function MA(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Fn(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function c(p){if(!u(p))return;const d=e*(p*-1);r.forEach(v=>v.add(d))}return{loop:c}}function jA(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function NA(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:u}=o,c=d().map(t.measure),f=v(),p=h();function d(){return u(r).map(m=>Tn(m)[l]-m[0][s]).map(Je)}function v(){return r.map(m=>n[s]-m[s]).map(m=>-Je(m))}function h(){const b=Tn(f)-Tn(i);return u(f).map(x=>x[0]).map((x,k,S)=>{const E=!k,T=k===aa(S);return a&&E?0:a&&T?b:x+c[k]})}return{snaps:f,snapsAligned:p}}function LA(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(v){return v.concat().sort((h,g)=>Je(h)-Je(g))[0]}function u(v){const h=e?a(v):s(v),g=t.map(b=>b-h).map(b=>c(b,0)).map((b,x)=>({diff:b,index:x})).sort((b,x)=>Je(b.diff)-Je(x.diff)),{index:m}=g[0];return{index:m,distance:h}}function c(v,h){const g=[v,v+n,v-n];if(!e)return g[0];if(!h)return l(g);const m=g.filter(b=>du(b)===h);return l(m)}function f(v,h){const g=t[v]-i.get(),m=c(g,h);return{index:v,distance:m}}function p(v,h){const g=i.get()+v,{index:m,distance:b}=u(g),x=!e&&o(g);if(!h||x)return{index:m,distance:v};const k=t[m]-b,S=v+c(k,0);return{index:m,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function FA(e,t,n,r,i,o,a){function s(f){const p=f.distance,d=f.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function u(f,p){const d=t.clone().set(f),v=r.byIndex(d.get(),p);s(v)}return{distance:l,index:u}}function la(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return cu(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function Am(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function u(p){o=!p}function c(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function BA(e,t,n,r,i,o,a,s,l){const u=Ri(i),c=Ri(i).reverse(),f=h().concat(g());function p(S,E){return S.reduce((T,L)=>T-i[L],E)}function d(S,E){return S.reduce((T,L)=>p(T,E)>0?T.concat([L]):T,[])}function v(S,E){const T=E==="start",L=T?-r:r,N=a.findSlideBounds([L]);return S.map(O=>{const M=T?0:-r,K=T?r:0,I=N.filter(D=>D.index===O)[0][T?"end":"start"];return{index:O,slideLocation:la(-1),translate:Am(e,t,l[O]),target:()=>s.get()>I?M:K}})}function h(){const S=o[0]-1,E=d(c,S);return v(E,"end")}function g(){const S=n-o[0]-1,E=d(u,S);return v(E,"start")}function m(){return f.every(({index:S})=>{const E=u.filter(T=>T!==S);return p(E,n)<=.1})}function b(){f.forEach(S=>{const{target:E,translate:T,slideLocation:L}=S,N=E();N!==L.get()&&(T.to(N),L.set(N))})}function x(){f.forEach(S=>S.translate.clear())}return{canLoop:m,clear:x,loop:b,loopPoints:f}}function zA(e,t){let n,r=!1;function i(s,l){if(!l)return;function u(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(fu(l)||l(s,c))&&u(c)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function WA(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,u=.5,c=o?[0,t,-t]:[0],f=d(c,a);function p(g){const m=g||0;return n.map(b=>Fn(u,b-u).constrain(b*m))}function d(g,m){const b=g||c,x=p(m);return b.reduce((k,S)=>{const E=r.map((T,L)=>({start:T-n[L]+x[L]+S,end:T+e-x[L]+S,index:L}));return k.concat(E)},[])}function v(g,m){const b=o?s(g):l(g);return(m||f).reduce((k,S)=>{const{index:E,start:T,end:L}=S,N=k.includes(E),O=T<b&&L>b;return!N&&O?k.concat([E]):k},[])}return{check:v,findSlideBounds:d}}function UA(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,c=v(),f=h(),p=n.map(a),d=g();function v(){if(!u)return 0;const b=n[0];return Je(t[s]-b[s])}function h(){if(!u)return 0;const b=o.getComputedStyle(Tn(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,x,k)=>{const S=!x,E=x===aa(k);return S?p[x]+c:E?p[x]+f:k[x+1][s]-b[s]}).map(Je)}return{slideSizes:p,slideSizesWithGaps:d}}function HA(e,t,n){const r=cu(n);function i(l,u){return Ri(l).filter(c=>c%u===0).map(c=>l.slice(c,c+u))}function o(l){return Ri(l).reduce((u,c)=>{const p=t.slice(Tn(u),c+1).reduce((d,v)=>d+v,0);return!c||p>e?u.concat(c):u},[]).map((u,c,f)=>l.slice(u,f[c+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function VA(e,t,n,r,i,o,a,s){const{align:l,axis:u,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:v,dragFree:h,dragThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:x}=o,k=t.getBoundingClientRect(),S=n.map($e=>$e.getBoundingClientRect()),E=$A(c),T=kA(u,c),L=T.measureSize(k),N=IA(L),O=CA(l,L),M=!d&&!!x,K=d||!!x,{slideSizes:F,slideSizesWithGaps:I}=UA(T,k,S,n,K,i),D=HA(L,I,m),{snaps:j,snapsAligned:G}=NA(T,O,k,S,I,D,M),U=-Tn(j)+Tn(I),{snapsContained:R}=DA(L,U,G,x),y=M?R:G,{limit:_}=_A(U,y,d),z=Pm(aa(y),f,d),w=z.clone(),H=Ri(n),X=({dragHandler:$e,scrollBody:Ae,scrollBounds:rt,eventHandler:Et,animation:Ct,options:{loop:kt}})=>{const oe=$e.pointerDown();kt||rt.constrain(oe);const ce=Ae.seek().settled();ce&&!oe&&(Ct.stop(),Et.emit("settle")),ce||Et.emit("scroll")},q=({scrollBody:$e,translate:Ae,location:rt,offsetLocation:Et,scrollLooper:Ct,slideLooper:kt,options:{loop:oe}},ce)=>{const W=$e.velocity();Et.set(rt.get()-W+W*ce),oe&&(Ct.loop($e.direction()),kt.loop()),Ae.to(Et.get())},Y={start:()=>s.start(ge),stop:()=>s.stop(ge),update:()=>X(ge),render:$e=>q(ge,$e)},Q=.68,ee=y[z.get()],J=la(ee),Z=la(ee),V=la(ee),ie=AA(J,V,v,Q),le=LA(d,y,U,_,V),de=FA(Y,z,w,le,ie,V,a),ae=WA(L,U,F,j,_,d,p),ge={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:k,slideRects:S,animation:Y,axis:T,direction:E,dragHandler:TA(T,E,e,r,i,V,OA(T,i),J,Y,de,ie,le,z,a,N,h,g,b,Q),eventStore:Di(),percentOfView:N,index:z,indexPrevious:w,limit:_,location:J,offsetLocation:Z,options:o,resizeHandler:PA(t,a,i,n,T),scrollBody:ie,scrollBounds:RA(_,J,V,ie,N),scrollLooper:MA(U,_,Z,[J,Z,V]),scrollProgress:jA(_),scrollSnaps:y,scrollTarget:le,scrollTo:de,slideLooper:BA(T,E,L,U,I,y,ae,Z,n),slidesHandler:zA(t,a),slidesInView:ae,slideIndexes:H,slidesToScroll:D,target:V,translate:Am(T,E,t)};return ge}function KA(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:v})=>v.update()),i-=t;const d=Je(i/t);n.forEach(({animation:v})=>v.render(d)),o&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!o&&(o=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function u(){r=null,i=0}return{start:s,stop:l,reset:u,window:e}}function qA(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(u=>u(t,l)),s}function o(l,u){return e[l]=r(l).concat([u]),s}function a(l,u){return e[l]=r(l).filter(c=>c!==u),s}const s={init:n,emit:i,off:a,on:o};return s}const GA={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function YA(e){function t(o,a){return Om(o,a||{})}function n(o){const a=o.breakpoints||{},s=sa(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>sa(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function XA(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function Rr(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=YA(i),a=XA(o),s=Di(),l=Di(),u=qA(),{animationRealms:c}=Rr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=o,{on:v,off:h,emit:g}=u,m=F;let b=!1,x,k=f(GA,Rr.globalOptions),S=f(k),E=[],T,L,N;function O(){const{container:ie,slides:le}=S;L=($m(ie)?e.querySelector(ie):ie)||e.children[0];const ae=$m(le)?L.querySelectorAll(le):le;N=[].slice.call(ae||L.children)}function M(ie,le){const de=VA(e,L,N,r,i,ie,u,le);if(ie.loop&&!de.slideLooper.canLoop()){const ae=Object.assign({},ie,{loop:!1});return M(ae,le)}return de}function K(ie,le){if(b)return;const de=c.find(ge=>ge.window===i),ae=de||KA(i);de||c.push(ae),k=f(k,ie),S=p(k),E=le||E,O(),x=M(S,ae),d([k,...E.map(({options:ge})=>ge)]).forEach(ge=>s.add(ge,"change",F)),S.active&&(x.translate.to(x.location.get()),x.eventHandler.init(V),x.resizeHandler.init(V,S.watchResize),x.slidesHandler.init(V,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&ae.reset()}),x.options.loop&&x.slideLooper.loop(),L.offsetParent&&N.length&&x.dragHandler.init(V,S.watchDrag),T=a.init(E,V))}function F(ie,le){const de=X();I(),K(f({startIndex:de},ie),le),u.emit("reInit")}function I(){x.dragHandler.destroy(),x.animation.stop(),x.eventStore.clear(),x.translate.clear(),x.slideLooper.clear(),x.resizeHandler.destroy(),x.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(){b||(b=!0,s.clear(),I(),u.emit("destroy"))}function j(ie){const le=x[ie?"target":"location"].get(),de=S.loop?"removeOffset":"constrain";return x.slidesInView.check(x.limit[de](le))}function G(ie){const le=j(ie);return x.slideIndexes.filter(de=>!le.includes(de))}function U(ie,le,de){!S.active||b||(x.scrollBody.useBaseFriction().useDuration(le?0:S.duration),x.scrollTo.index(ie,de||0))}function R(ie){const le=x.index.add(1).get();U(le,ie===!0,-1)}function y(ie){const le=x.index.add(-1).get();U(le,ie===!0,1)}function _(){return x.index.add(1).get()!==X()}function z(){return x.index.add(-1).get()!==X()}function w(){return x.scrollSnaps.map(x.scrollProgress.get)}function H(){return x.scrollProgress.get(x.location.get())}function X(){return x.index.get()}function q(){return x.indexPrevious.get()}function Y(){return T}function Q(){return x}function ee(){return e}function J(){return L}function Z(){return N}const V={canScrollNext:_,canScrollPrev:z,containerNode:J,internalEngine:Q,destroy:D,off:h,on:v,emit:g,plugins:Y,previousScrollSnap:q,reInit:m,rootNode:ee,scrollNext:R,scrollPrev:y,scrollProgress:H,scrollSnapList:w,scrollTo:U,selectedScrollSnap:X,slideNodes:Z,slidesInView:j,slidesNotInView:G};return K(t,n),setTimeout(()=>u.emit("init"),0),V}Rr.animationRealms=[],Rr.globalOptions=void 0;function pu(e={},t=[]){const n=A.useRef(e),r=A.useRef(t),[i,o]=A.useState(),[a,s]=A.useState(),l=A.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return A.useEffect(()=>{if(wA()&&a){Rr.globalOptions=pu.globalOptions;const u=Rr(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),A.useEffect(()=>{uu(n.current,e)||(n.current=e,l())},[e,l]),A.useEffect(()=>{SA(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}pu.globalOptions=void 0;const Rm=A.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a,addMessageFeedback:s},l)=>{const[u,c]=pu({skipSnaps:!0,loop:!0}),[f,p]=A.useState(!0),[d,v]=A.useState(!0),h=A.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),g=A.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:m}}}=Ce,b=A.useCallback(x=>{p(!x.canScrollPrev()),v(!x.canScrollNext())},[]);return A.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),$.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:u,children:[$.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((x,k)=>$.jsx(ar,{block:{...x,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},k))}),e.length>1&&$.jsxs($.Fragment,{children:[$.jsx(wP,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),$.jsx(SP,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Rm.displayName="Carousel";const Dm=Math.floor;function _m(e){return Mm(e)?(e.nodeName||"").toLowerCase():"#document"}function _i(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function JA(e){var t;return(t=(Mm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mm(e){return e instanceof Node||e instanceof _i(e).Node}function Kt(e){return e instanceof Element||e instanceof _i(e).Element}function Dr(e){return e instanceof HTMLElement||e instanceof _i(e).HTMLElement}function hu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _i(e).ShadowRoot}function ZA(e){return["html","body","#document"].includes(_m(e))}function QA(e){return _i(e).getComputedStyle(e)}function eR(e){if(_m(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hu(e)&&e.host||JA(e);return hu(t)?t.host:t}function Bn(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Pt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&hu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function jm(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function tR(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Nm(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(jm())||t.test(tR()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Lm(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Fm(){return/apple/i.test(navigator.vendor)}function nR(){return jm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Bm(e,t){return["mouse","pen"].includes(e)}function rR(e){return"nativeEvent"in e}function iR(e){return e.matches("html,body")}function Zt(e){return(e==null?void 0:e.ownerDocument)||document}function vu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function zm(e){return"composedPath"in e?e.composedPath()[0]:e.target}const oR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Wm(e){return Dr(e)&&e.matches(oR)}function ht(e){e.preventDefault(),e.stopPropagation()}const _r=Math.min,Nt=Math.max,ua=Math.round,ca=Math.floor,dn=e=>({x:e,y:e});function Um(e,t,n){return Nt(e,_r(t,n))}function fa(e,t){return typeof e=="function"?e(t):e}function Mi(e){return e.split("-")[0]}function mu(e){return e.split("-")[1]}function Hm(e){return e==="x"?"y":"x"}function aR(e){return e==="y"?"height":"width"}function ji(e){return["top","bottom"].includes(Mi(e))?"y":"x"}function sR(e){return Hm(ji(e))}function lR(e){return{top:0,right:0,bottom:0,left:0,...e}}function uR(e){return typeof e!="number"?lR(e):{top:e,right:e,bottom:e,left:e}}function da(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vm(e,t,n){let{reference:r,floating:i}=e;const o=ji(t),a=sR(t),s=aR(a),l=Mi(t),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(mu(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const cR=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=Vm(u,r,l),p=r,d={},v=0;for(let h=0;h<s.length;h++){const{name:g,fn:m}=s[h],{x:b,y:x,data:k,reset:S}=await m({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,f=x??f,d={...d,[g]:{...d[g],...k}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=Vm(u,p,l)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function Km(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=fa(t,e),v=uR(d),g=s[p?f==="floating"?"reference":"floating":f],m=da(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),k=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},S=da(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);return{top:(m.top-S.top+v.top)/k.y,bottom:(S.bottom-m.bottom+v.bottom)/k.y,left:(m.left-S.left+v.left)/k.x,right:(S.right-m.right+v.right)/k.x}}async function fR(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Mi(n),s=mu(n),l=ji(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,f=fa(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(d=s==="end"?v*-1:v),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}const dR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await fR(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},pR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...l}=fa(e,t),u={x:n,y:r},c=await Km(t,l),f=ji(Mi(i)),p=Hm(f);let d=u[p],v=u[f];if(o){const g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=d+c[g],x=d-c[m];d=Um(b,d,x)}if(a){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=v+c[g],x=v-c[m];v=Um(b,v,x)}const h=s.fn({...t,[p]:d,[f]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[f]:a}}}}}},hR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=fa(e,t),c=await Km(t,u),f=Mi(i),p=mu(i),d=ji(i)==="y",{width:v,height:h}=o.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=p==="end"?"top":"bottom");const b=h-c.top-c.bottom,x=v-c.left-c.right,k=_r(h-c[g],b),S=_r(v-c[m],x),E=!t.middlewareData.shift;let T=k,L=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=b),E&&!p){const O=Nt(c.left,0),M=Nt(c.right,0),K=Nt(c.top,0),F=Nt(c.bottom,0);d?L=v-2*(O!==0||M!==0?O+M:Nt(c.left,c.right)):T=h-2*(K!==0||F!==0?K+F:Nt(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:T});const N=await a.getDimensions(s.floating);return v!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function pa(){return typeof window<"u"}function Mr(e){return qm(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pn(e){var t;return(t=(qm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qm(e){return pa()?e instanceof Node||e instanceof Lt(e).Node:!1}function Qt(e){return pa()?e instanceof Element||e instanceof Lt(e).Element:!1}function hn(e){return pa()?e instanceof HTMLElement||e instanceof Lt(e).HTMLElement:!1}function Gm(e){return!pa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Ni(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=en(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vR(e){return["table","td","th"].includes(Mr(e))}function ha(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gu(e){const t=yu(),n=Qt(e)?en(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mR(e){let t=zn(e);for(;hn(t)&&!jr(t);){if(gu(t))return t;if(ha(t))return null;t=zn(t)}return null}function yu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(e){return["html","body","#document"].includes(Mr(e))}function en(e){return Lt(e).getComputedStyle(e)}function va(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gm(e)&&e.host||pn(e);return Gm(t)?t.host:t}function Ym(e){const t=zn(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:hn(t)&&Ni(t)?t:Ym(t)}function Wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ym(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Lt(i);if(o){const s=bu(a);return t.concat(a,a.visualViewport||[],Ni(i)?i:[],s&&n?Wn(s):[])}return t.concat(i,Wn(i,[],n))}function bu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xm(e){const t=en(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=hn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ua(n)!==o||ua(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function xu(e){return Qt(e)?e:e.contextElement}function Nr(e){const t=xu(e);if(!hn(t))return dn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Xm(t);let a=(o?ua(n.width):n.width)/r,s=(o?ua(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const gR=dn(0);function Jm(e){const t=Lt(e);return!yu()||!t.visualViewport?gR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=xu(e);let a=dn(1);t&&(r?Qt(r)&&(a=Nr(r)):a=Nr(e));const s=yR(o,n,r)?Jm(o):dn(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const p=Lt(o),d=r&&Qt(r)?Lt(r):r;let v=p,h=bu(v);for(;h&&r&&d!==v;){const g=Nr(h),m=h.getBoundingClientRect(),b=en(h),x=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,k=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=x,u+=k,v=Lt(h),h=bu(v)}}return da({width:c,height:f,x:l,y:u})}function wu(e,t){const n=va(e).scrollLeft;return t?t.left+n:or(pn(e)).left+n}function Zm(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:wu(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function bR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=pn(r),s=t?ha(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=dn(1);const c=dn(0),f=hn(r);if((f||!f&&!o)&&((Mr(r)!=="body"||Ni(a))&&(l=va(r)),hn(r))){const d=or(r);u=Nr(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const p=a&&!f&&!o?Zm(a,l,!0):dn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function xR(e){return Array.from(e.getClientRects())}function wR(e){const t=pn(e),n=va(e),r=e.ownerDocument.body,i=Nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+wu(e);const s=-n.scrollTop;return en(r).direction==="rtl"&&(a+=Nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function SR(e,t){const n=Lt(e),r=pn(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=yu();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function ER(e,t){const n=or(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=hn(e)?Nr(e):dn(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function Qm(e,t,n){let r;if(t==="viewport")r=SR(e,n);else if(t==="document")r=wR(pn(e));else if(Qt(t))r=ER(t,n);else{const i=Jm(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return da(r)}function eg(e,t){const n=zn(e);return n===t||!Qt(n)||jr(n)?!1:en(n).position==="fixed"||eg(n,t)}function CR(e,t){const n=t.get(e);if(n)return n;let r=Wn(e,[],!1).filter(s=>Qt(s)&&Mr(s)!=="body"),i=null;const o=en(e).position==="fixed";let a=o?zn(e):e;for(;Qt(a)&&!jr(a);){const s=en(a),l=gu(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ni(a)&&!l&&eg(e,a))?r=r.filter(c=>c!==a):i=s,a=zn(a)}return t.set(e,r),r}function kR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?ha(t)?[]:CR(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const f=Qm(t,c,i);return u.top=Nt(f.top,u.top),u.right=_r(f.right,u.right),u.bottom=_r(f.bottom,u.bottom),u.left=Nt(f.left,u.left),u},Qm(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $R(e){const{width:t,height:n}=Xm(e);return{width:t,height:n}}function TR(e,t,n){const r=hn(t),i=pn(t),o=n==="fixed",a=or(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=dn(0);function u(){l.x=wu(i)}if(r||!r&&!o)if((Mr(t)!=="body"||Ni(i))&&(s=va(t)),r){const d=or(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?Zm(i,s):dn(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function Su(e){return en(e).position==="static"}function tg(e,t){if(!hn(e)||en(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pn(e)===n&&(n=n.ownerDocument.body),n}function ng(e,t){const n=Lt(e);if(ha(e))return n;if(!hn(e)){let i=zn(e);for(;i&&!jr(i);){if(Qt(i)&&!Su(i))return i;i=zn(i)}return n}let r=tg(e,t);for(;r&&vR(r)&&Su(r);)r=tg(r,t);return r&&jr(r)&&Su(r)&&!gu(r)?n:r||mR(e)||n}const OR=async function(e){const t=this.getOffsetParent||ng,n=this.getDimensions,r=await n(e.floating);return{reference:TR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function IR(e){return en(e).direction==="rtl"}const PR={convertOffsetParentRelativeRectToViewportRelativeRect:bR,getDocumentElement:pn,getClippingRect:kR,getOffsetParent:ng,getElementRects:OR,getClientRects:xR,getDimensions:$R,getScale:Nr,isElement:Qt,isRTL:IR};function rg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AR(e,t){let n=null,r;const i=pn(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;const v=ca(f),h=ca(i.clientWidth-(c+p)),g=ca(i.clientHeight-(f+d)),m=ca(c),x={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Nt(0,_r(1,l))||1};let k=!0;function S(E){const T=E[0].intersectionRatio;if(T!==l){if(!k)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!rg(u,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),o}function RR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=xu(e),c=i||o?[...u?Wn(u):[],...Wn(t)]:[];c.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});const f=u&&s?AR(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(m=>{let[b]=m;b&&b.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let v,h=l?or(e):null;l&&g();function g(){const m=or(e);h&&!rg(h,m)&&n(),h=m,v=requestAnimationFrame(g)}return n(),()=>{var m;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const DR=dR,_R=pR,MR=hR,jR=(e,t,n)=>{const r=new Map,i={platform:PR,...n},o={...i.platform,_c:r};return cR(e,t,{...i,platform:o})};var ma=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ga(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ga(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ga(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ig(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function og(e,t){const n=ig(e);return Math.round(t*n)/n}function Eu(e){const t=C.useRef(e);return ma(()=>{t.current=e}),t}function NR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);ga(p,r)||d(r);const[v,h]=C.useState(null),[g,m]=C.useState(null),b=C.useCallback(U=>{U!==E.current&&(E.current=U,h(U))},[]),x=C.useCallback(U=>{U!==T.current&&(T.current=U,m(U))},[]),k=o||v,S=a||g,E=C.useRef(null),T=C.useRef(null),L=C.useRef(c),N=l!=null,O=Eu(l),M=Eu(i),K=Eu(u),F=C.useCallback(()=>{if(!E.current||!T.current)return;const U={placement:t,strategy:n,middleware:p};M.current&&(U.platform=M.current),jR(E.current,T.current,U).then(R=>{const y={...R,isPositioned:K.current!==!1};I.current&&!ga(L.current,y)&&(L.current=y,pp.flushSync(()=>{f(y)}))})},[p,t,n,M,K]);ma(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const I=C.useRef(!1);ma(()=>(I.current=!0,()=>{I.current=!1}),[]),ma(()=>{if(k&&(E.current=k),S&&(T.current=S),k&&S){if(O.current)return O.current(k,S,F);F()}},[k,S,F,O,N]);const D=C.useMemo(()=>({reference:E,floating:T,setReference:b,setFloating:x}),[b,x]),j=C.useMemo(()=>({reference:k,floating:S}),[k,S]),G=C.useMemo(()=>{const U={position:n,left:0,top:0};if(!j.floating)return U;const R=og(j.floating,c.x),y=og(j.floating,c.y);return s?{...U,transform:"translate("+R+"px, "+y+"px)",...ig(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:y}},[n,s,j.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:F,refs:D,elements:j,floatingStyles:G}),[c,F,D,j,G])}const LR=(e,t)=>({...DR(e),options:[e,t]}),FR=(e,t)=>({..._R(e),options:[e,t]}),BR=(e,t)=>({...MR(e),options:[e,t]});/*!
258
+ `);const b=m.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(m)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(v),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(na(l.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(na(l.name));case"ROLLBACK":return su(h.state,m=>{if(s===void 0){d(m),c==null||c.init(i.getState());return}d(m[s]),c==null||c.init(na(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return su(h.state,m=>{if(s===void 0){d(m);return}JSON.stringify(i.getState())!==JSON.stringify(m[s])&&d(m[s])});case"IMPORT_STATE":{const{nextLiftedState:m}=h.payload,b=(g=m.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),c==null||c.send(null,m);return}case"PAUSE_RECORDING":return p=!p}return}}),v},su=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function dm(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Pi=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Pi(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Pi(r)(n)}}}},TA=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,m)=>({...m,...g}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...g)},r,i);const c=Pi(o.serialize),f=()=>{const g=o.partialize({...r()});let m;const b=c({state:g,version:o.version}).then(w=>u.setItem(o.name,w)).catch(w=>{m=w});if(m)throw m;return b},p=i.setState;i.setState=(g,m)=>{p(g,m),f()};const d=e((...g)=>{n(...g),f()},r,i);let v;const h=()=>{var g;if(!u)return;a=!1,s.forEach(b=>b(r()));const m=((g=o.onRehydrateStorage)==null?void 0:g.call(o,r()))||void 0;return Pi(u.getItem.bind(u))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return v=o.merge(b,(w=r())!=null?w:d),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),a=!0,l.forEach(b=>b(v))}).catch(b=>{m==null||m(void 0,b)})};return i.persist={setOptions:g=>{o={...o,...g},g.getStorage&&(u=g.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),v||d},$A=(e,t)=>(n,r,i)=>{let o={storage:dm(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let u=o.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=o.partialize({...r()});return u.setItem(o.name,{state:h,version:o.version})},f=i.setState;i.setState=(h,g)=>{f(h,g),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const v=()=>{var h,g;if(!u)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const m=((g=o.onRehydrateStorage)==null?void 0:g.call(o,(h=r())!=null?h:p))||void 0;return Pi(u.getItem.bind(u))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return[!0,o.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[C,S]=b;if(d=o.merge(S,(w=r())!=null?w:p),n(d,!0),C)return c()}).then(()=>{m==null||m(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{m==null||m(void 0,b)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||v(),d||p},pm=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ta?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),TA(e,t)):$A(e,t),hm=or()(ra(pm(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));function ia(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=vm(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const vm=e=>{switch(e.type){case"audio":return mm(e);case"card":return OA(e);case"carousel":return IA(e);case"choice":return PA(e);case"dropdown":return AA(e);case"file":return gm(e);case"image":return ym(e);case"location":return bm(e);case"markdown":return xm(e);case"text":return wm(e);case"video":return Sm(e);case"bloc":return RA(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Ai=e=>({block:e,type:"bubble"}),mm=e=>({payload:{type:"audio",url:e.audioUrl}}),OA=e=>({payload:Ai(Em(e))}),IA=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Em({type:"card",...t}))}}),PA=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=Dp(),i=Ai({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},AA=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:Ai({type:"column",blocks:r})}},gm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),ym=e=>({payload:{type:"image",url:e.imageUrl}}),bm=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),xm=e=>({payload:Ai({type:"text",text:e.markdown})}),wm=e=>({payload:Ai({type:"text",text:e.text,value:e.value})}),Sm=e=>({payload:{type:"video",url:e.videoUrl}}),RA=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return mm({...n.payload,type:n.type}).payload;case"file":return gm({...n.payload,type:n.type}).payload;case"image":return ym({...n.payload,type:n.type}).payload;case"location":return bm({...n.payload,type:n.type}).payload;case"markdown":return xm({...n.payload,type:n.type}).payload;case"text":return wm({...n.payload,type:n.type}).payload;case"video":return Sm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Em=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},ar=or()(ra(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(o=>ia(o)).filter(Boolean)}}),{name:"messagesStore"})),_A=(e,t)=>or()(ra(pm(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:dm(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),mi=class mi{constructor(){}static getInstance(t="bp-webchat",n){return mi._instances[t]||(mi._instances[t]=_A(t,n)),mi._instances[t]}};fE(mi,"_instances",{});let lu=mi;const km=lu.getInstance,Cm=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}},oa=or()(ra(e=>({eventEmitter:Cm(),messageContainerRef:A.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),DA=8,Ri=or()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(a=>a.name===n.name)?r.map(a=>a.name===n.name?{...a,...n}:a):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(a=>a.name===n.name),o=t().files.length===DA;if(!(!i&&o)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:a,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:a,instance:n,status:"uploaded"})}catch(a){console.error("Error sending file:",a),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),aa=or()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)}))})),MA=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=oa(w=>w.eventEmitter),[u,c]=A.useState(!1),[f,p]=A.useState(!1),[d,v]=A.useState(!1),{message:{blocks:{button:h}}}=we;A.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||v(!0)})},[l,r,i]);const m={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}c(!0),i||v(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":u?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?T.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):T.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Tm=A.createContext(null);function jA(){const e=A.useContext(Tm);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const $m=A.createContext({open:void 0,showModal:void 0,hideModal:void 0});function uu(){return A.useContext($m)}const Om=A.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:u,...c},f)=>{const[p,d]=A.useState(""),{showModal:v,hideModal:h}=uu(),{message:{blocks:{bubble:{container:g,feedbackContainer:m,feedbackIcon:b}}}}=we;return t=="incoming"?T.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...c,...g,ref:f,children:[T.jsx(lr,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l}}),u&&v&&h&&e.type==="text"&&T.jsxs("div",{...m,children:[T.jsx(oA,{...b,"data-selected":o==="positive",onClick:()=>{u(i,{value:"positive"})}}),T.jsx(iA,{...b,"data-selected":o==="negative",onClick:()=>v({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{u(i,{value:"negative",comment:p}),h()},content:T.jsx(NA,{setFeedbackComment:d})})})]})]}):T.jsx("div",{"data-direction":"outgoing",...c,...g,ref:f,children:T.jsx(lr,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:u}})})});Om.displayName="Bubble";const NA=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=we;return T.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var Vt=function(){return Vt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Vt.apply(this,arguments)};function Im(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pr(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function Ar(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Pm(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function cu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function LA(){var e=A.useRef(!1),t=A.useCallback(function(){return e.current},[]);return A.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function FA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=A.useRef(0),i=LA(),o=A.useState(n),a=o[0],s=o[1],l=A.useCallback(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=++r.current;return a.loading||s(function(p){return Vt(Vt({},p),{loading:!0})}),e.apply(void 0,u).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Am(e,t){t===void 0&&(t=[]);var n=FA(e,t,{loading:!0}),r=n[0],i=n[1];return A.useEffect(function(){i()},[i]),r}const Rm=A.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=A.useId(),{setIsLoading:a}=jA(),[s,l]=A.useState(n),[u,c]=A.useState(!1),{message:{blocks:{image:f}}}=we;return A.useLayoutEffect(()=>{a(p=>[...p,o])},[]),Am(async()=>{if(e){try{const{width:p,height:d}=await ik(e);s==="auto"&&l(BA(p,d))}catch(p){l("square"),console.error(p)}a(p=>p.filter(d=>d!==o))}},[e]),T.jsxs(T.Fragment,{children:[u?null:T.jsx("div",{"data-orientation":s,...f.placeholder}),T.jsx("img",{"data-orientation":s,"data-loaded":u,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});Rm.displayName="Image";function BA(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const _m=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=we;return T.jsx("div",{children:T.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});_m.displayName="Video";const Dm=A.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=we;return T.jsx("div",{children:T.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});Dm.displayName="Audio";const Mm=A.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=we;return T.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[T.jsx("p",{...s.title,children:n}),T.jsx(QP,{...s.icon})]})});Mm.displayName="Location";const jm=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...u},c)=>{const{message:{blocks:{column:f}}}=we;return T.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...f,ref:c,children:e.map((p,d)=>T.jsx(lr,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});jm.displayName="Column";const Nm=A.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:u,...c},f)=>{const{message:{blocks:{row:p}}}=we;return T.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,v)=>T.jsx(lr,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:u}},v))})});Nm.displayName="Row";function zA(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lm(e){return zA(e)||Array.isArray(e)}function WA(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fu(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Lm(s)||!Lm(l)?s===l:fu(s,l)})}function Fm(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function UA(e,t){if(e.length!==t.length)return!1;const n=Fm(e),r=Fm(t);return n.every((i,o)=>{const a=r[o];return fu(i,a)})}function du(e){return typeof e=="number"}function Bm(e){return typeof e=="string"}function pu(e){return typeof e=="boolean"}function zm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Je(e){return Math.abs(e)}function hu(e){return Math.sign(e)}function sa(e,t){return Je(e-t)}function HA(e,t){if(e===0||t===0||Je(e)<=Je(t))return 0;const n=sa(Je(e),Je(t));return Je(n/e)}function _i(e){return ua(e).map(Number)}function $n(e){return e[la(e)]}function la(e){return Math.max(0,e.length-1)}function ua(e){return Object.keys(e)}function Wm(e,t){return[e,t].reduce((n,r)=>(ua(r).forEach(i=>{const o=n[i],a=r[i],s=zm(o)&&zm(a);n[i]=s?Wm(o,a):a}),n),{})}function Um(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function VA(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(u){return o(u)/2}function o(u){return t-u}function a(){return t*Number(e)}function s(u){return du(e)?a():n[e](u)}return{measure:s}}function qA(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function Fn(e,t){const n=Je(e-t);function r(u){return u<e}function i(u){return u>t}function o(u){return r(u)||i(u)}function a(u){return o(u)?r(u)?e:t:u}function s(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function Hm(e,t,n){const{constrain:r}=Fn(0,e),i=e+1;let o=a(t);function a(p){return n?Je((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),f}function u(p){return c().set(s()+p)}function c(){return Hm(e,s(),n)}const f={get:s,set:l,add:u,clone:c};return f}function KA(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Di(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function GA(e,t,n,r,i,o,a,s,l,u,c,f,p,d,v,h,g,m,b){const{cross:w}=e,C=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Di(),I=Di(),L=Fn(50,225).constrain(v.measure(20)),_={mouse:300,touch:400},O={mouse:500,touch:600},D=h?43:25;let H=!1,F=0,j=0,M=!1,W=!1,G=!1,V=!1;function R(Q,q){if(!q)return;function ie(de){(pu(q)||q(Q,de))&&Y(de)}const le=n;E.add(le,"dragstart",de=>de.preventDefault(),S).add(le,"touchmove",()=>{},S).add(le,"touchend",()=>{}).add(le,"touchstart",ie).add(le,"mousedown",ie).add(le,"touchcancel",X).add(le,"contextmenu",X).add(le,"click",Z,!0)}function y(){E.clear(),I.clear()}function $(){const Q=V?r:n;I.add(Q,"touchmove",K,S).add(Q,"touchend",X).add(Q,"mousemove",K,S).add(Q,"mouseup",X)}function N(Q){const q=Q.nodeName||"";return C.includes(q)}function x(){return(h?O:_)[V?"mouse":"touch"]}function B(Q,q){const ie=p.add(hu(Q)*-1),le=f.byDistance(Q,!h).distance;return h||Je(Q)<L?le:m&&q?le*.5:f.byIndex(ie.get(),0).distance}function Y(Q){const q=Um(Q,i);V=q,!(q&&Q.button!==0)&&(N(Q.target)||(G=h&&q&&!Q.buttons&&H,H=sa(o.get(),s.get())>=2,M=!0,a.pointerDown(Q),c.useFriction(0).useDuration(0),o.set(s),$(),F=a.readPoint(Q),j=a.readPoint(Q,w),d.emit("pointerDown")))}function K(Q){const q=a.readPoint(Q),ie=a.readPoint(Q,w),le=sa(q,F),de=sa(ie,j);if(!W&&!V&&(!Q.cancelable||(W=le>de,!W)))return X(Q);const ae=a.pointerMove(Q);le>g&&(G=!0),c.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(ae)),Q.preventDefault()}function X(Q){const ie=f.byDistance(0,!1).index!==p.get(),le=a.pointerUp(Q)*x(),de=B(t.apply(le),ie),ae=HA(le,de),ve=D-10*ae,Te=b+ae/50;W=!1,M=!1,I.clear(),c.useDuration(ve).useFriction(Te),u.distance(de,!h),V=!1,d.emit("pointerUp")}function Z(Q){G&&(Q.stopPropagation(),Q.preventDefault())}function ee(){return M}return{init:R,pointerDown:ee,destroy:y}}function YA(e,t){let r,i;function o(f){return f.timeStamp}function a(f,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Um(f,t)?f:f.touches[0])[v]}function s(f){return r=f,i=f,a(f)}function l(f){const p=a(f)-a(i),d=o(f)-o(r)>170;return i=f,d&&(r=f),p}function u(f){if(!r||!i)return 0;const p=a(i)-a(r),d=o(f)-o(r),v=o(f)-o(i)>170,h=p/d;return d&&!v&&Je(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:a}}function XA(e){function t(r){return e*(r/100)}return{measure:t}}function JA(e,t,n,r,i){let o,a,s=[],l=!1;function u(d){return i.measureSize(d.getBoundingClientRect())}function c(d,v){if(!v)return;a=u(e),s=r.map(u);function h(m){for(const b of m){const w=b.target===e,C=r.indexOf(b.target),S=w?a:s[C],E=u(w?e:r[C]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(m=>{l||(pu(v)||v(d,m))&&h(m)}),[e].concat(r).forEach(m=>o.observe(m))}function f(){o&&o.disconnect(),l=!0}return{init:c,destroy:f}}function QA(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,u=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let I=0;return E?(o=0,e.set(t),I=S):(o+=S/s,o*=l,u+=o,e.add(o),I=u-c),a=hu(I),c=u,i=Je(S)<.001,C}function p(){return i}function d(){return s}function v(){return a}function h(){return o}function g(){return b(n)}function m(){return w(r)}function b(S){return s=S,C}function w(S){return l=S,C}const C={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:w,useDuration:b};return C}function ZA(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Fn(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!u())return;const v=e.reachedMin(t.get())?"min":"max",h=Je(e[v]-t.get()),g=n.get()-t.get(),m=s.constrain(h/a);n.subtract(g*m),!d&&Je(g)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:c,toggleActive:f}}function eR(e,t,n,r){const i=Fn(-t+e,n[0]),o=l(),a=u();function s(){const f=o[0],p=$n(o),d=o.lastIndexOf(f),v=o.indexOf(p)+1;return Fn(d,v)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function u(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:f,max:p}=s();return o.slice(f,p)}return{snapsContained:a}}function tR(e,t,n){const r=t[0],i=n?r-e:$n(t);return{limit:Fn(i,r)}}function nR(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Fn(o,a);function u(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function c(p){if(!u(p))return;const d=e*(p*-1);r.forEach(v=>v.add(d))}return{loop:c}}function rR(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function iR(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:u}=o,c=d().map(t.measure),f=v(),p=h();function d(){return u(r).map(m=>$n(m)[l]-m[0][s]).map(Je)}function v(){return r.map(m=>n[s]-m[s]).map(m=>-Je(m))}function h(){const b=$n(f)-$n(i);return u(f).map(w=>w[0]).map((w,C,S)=>{const E=!C,I=C===la(S);return a&&E?0:a&&I?b:w+c[C]})}return{snaps:f,snapsAligned:p}}function oR(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(v){return v.concat().sort((h,g)=>Je(h)-Je(g))[0]}function u(v){const h=e?a(v):s(v),g=t.map(b=>b-h).map(b=>c(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>Je(b.diff)-Je(w.diff)),{index:m}=g[0];return{index:m,distance:h}}function c(v,h){const g=[v,v+n,v-n];if(!e)return g[0];if(!h)return l(g);const m=g.filter(b=>hu(b)===h);return l(m)}function f(v,h){const g=t[v]-i.get(),m=c(g,h);return{index:v,distance:m}}function p(v,h){const g=i.get()+v,{index:m,distance:b}=u(g),w=!e&&o(g);if(!h||w)return{index:m,distance:v};const C=t[m]-b,S=v+c(C,0);return{index:m,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function aR(e,t,n,r,i,o,a){function s(f){const p=f.distance,d=f.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function u(f,p){const d=t.clone().set(f),v=r.byIndex(d.get(),p);s(v)}return{distance:l,index:u}}function ca(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return du(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function Vm(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function u(p){o=!p}function c(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function sR(e,t,n,r,i,o,a,s,l){const u=_i(i),c=_i(i).reverse(),f=h().concat(g());function p(S,E){return S.reduce((I,L)=>I-i[L],E)}function d(S,E){return S.reduce((I,L)=>p(I,E)>0?I.concat([L]):I,[])}function v(S,E){const I=E==="start",L=I?-r:r,_=a.findSlideBounds([L]);return S.map(O=>{const D=I?0:-r,H=I?r:0,j=_.filter(M=>M.index===O)[0][I?"end":"start"];return{index:O,slideLocation:ca(-1),translate:Vm(e,t,l[O]),target:()=>s.get()>j?D:H}})}function h(){const S=o[0]-1,E=d(c,S);return v(E,"end")}function g(){const S=n-o[0]-1,E=d(u,S);return v(E,"start")}function m(){return f.every(({index:S})=>{const E=u.filter(I=>I!==S);return p(E,n)<=.1})}function b(){f.forEach(S=>{const{target:E,translate:I,slideLocation:L}=S,_=E();_!==L.get()&&(I.to(_),L.set(_))})}function w(){f.forEach(S=>S.translate.clear())}return{canLoop:m,clear:w,loop:b,loopPoints:f}}function lR(e,t){let n,r=!1;function i(s,l){if(!l)return;function u(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(pu(l)||l(s,c))&&u(c)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function uR(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,u=.5,c=o?[0,t,-t]:[0],f=d(c,a);function p(g){const m=g||0;return n.map(b=>Fn(u,b-u).constrain(b*m))}function d(g,m){const b=g||c,w=p(m);return b.reduce((C,S)=>{const E=r.map((I,L)=>({start:I-n[L]+w[L]+S,end:I+e-w[L]+S,index:L}));return C.concat(E)},[])}function v(g,m){const b=o?s(g):l(g);return(m||f).reduce((C,S)=>{const{index:E,start:I,end:L}=S,_=C.includes(E),O=I<b&&L>b;return!_&&O?C.concat([E]):C},[])}return{check:v,findSlideBounds:d}}function cR(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,u=n[0]&&i,c=v(),f=h(),p=n.map(a),d=g();function v(){if(!u)return 0;const b=n[0];return Je(t[s]-b[s])}function h(){if(!u)return 0;const b=o.getComputedStyle($n(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,w,C)=>{const S=!w,E=w===la(C);return S?p[w]+c:E?p[w]+f:C[w+1][s]-b[s]}).map(Je)}return{slideSizes:p,slideSizesWithGaps:d}}function fR(e,t,n){const r=du(n);function i(l,u){return _i(l).filter(c=>c%u===0).map(c=>l.slice(c,c+u))}function o(l){return _i(l).reduce((u,c)=>{const p=t.slice($n(u),c+1).reduce((d,v)=>d+v,0);return!c||p>e?u.concat(c):u},[]).map((u,c,f)=>l.slice(u,f[c+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function dR(e,t,n,r,i,o,a,s){const{align:l,axis:u,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:v,dragFree:h,dragThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:w}=o,C=t.getBoundingClientRect(),S=n.map(Te=>Te.getBoundingClientRect()),E=KA(c),I=qA(u,c),L=I.measureSize(C),_=XA(L),O=VA(l,L),D=!d&&!!w,H=d||!!w,{slideSizes:F,slideSizesWithGaps:j}=cR(I,C,S,n,H,i),M=fR(L,j,m),{snaps:W,snapsAligned:G}=iR(I,O,C,S,j,M,D),V=-$n(W)+$n(j),{snapsContained:R}=eR(L,V,G,w),y=D?R:G,{limit:$}=tR(V,y,d),N=Hm(la(y),f,d),x=N.clone(),B=_i(n),Y=({dragHandler:Te,scrollBody:Ae,scrollBounds:rt,eventHandler:Et,animation:kt,options:{loop:Ct}})=>{const oe=Te.pointerDown();Ct||rt.constrain(oe);const ce=Ae.seek().settled();ce&&!oe&&(kt.stop(),Et.emit("settle")),ce||Et.emit("scroll")},K=({scrollBody:Te,translate:Ae,location:rt,offsetLocation:Et,scrollLooper:kt,slideLooper:Ct,options:{loop:oe}},ce)=>{const U=Te.velocity();Et.set(rt.get()-U+U*ce),oe&&(kt.loop(Te.direction()),Ct.loop()),Ae.to(Et.get())},X={start:()=>s.start(ve),stop:()=>s.stop(ve),update:()=>Y(ve),render:Te=>K(ve,Te)},Z=.68,ee=y[N.get()],J=ca(ee),Q=ca(ee),q=ca(ee),ie=QA(J,q,v,Z),le=oR(d,y,V,$,q),de=aR(X,N,x,le,ie,q,a),ae=uR(L,V,F,W,$,d,p),ve={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:C,slideRects:S,animation:X,axis:I,direction:E,dragHandler:GA(I,E,e,r,i,q,YA(I,i),J,X,de,ie,le,N,a,_,h,g,b,Z),eventStore:Di(),percentOfView:_,index:N,indexPrevious:x,limit:$,location:J,offsetLocation:Q,options:o,resizeHandler:JA(t,a,i,n,I),scrollBody:ie,scrollBounds:ZA($,J,q,ie,_),scrollLooper:nR(V,$,Q,[J,Q,q]),scrollProgress:rR($),scrollSnaps:y,scrollTarget:le,scrollTo:de,slideLooper:sR(I,E,L,V,j,y,ae,Q,n),slidesHandler:lR(t,a),slidesInView:ae,slideIndexes:B,slidesToScroll:M,target:q,translate:Vm(I,E,t)};return ve}function pR(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:v})=>v.update()),i-=t;const d=Je(i/t);n.forEach(({animation:v})=>v.render(d)),o&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!o&&(o=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function u(){r=null,i=0}return{start:s,stop:l,reset:u,window:e}}function hR(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(u=>u(t,l)),s}function o(l,u){return e[l]=r(l).concat([u]),s}function a(l,u){return e[l]=r(l).filter(c=>c!==u),s}const s={init:n,emit:i,off:a,on:o};return s}const vR={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function mR(e){function t(o,a){return Wm(o,a||{})}function n(o){const a=o.breakpoints||{},s=ua(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,u)=>t(l,u),{});return t(o,s)}function r(o){return o.map(a=>ua(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function gR(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function Rr(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=mR(i),a=gR(o),s=Di(),l=Di(),u=hR(),{animationRealms:c}=Rr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=o,{on:v,off:h,emit:g}=u,m=F;let b=!1,w,C=f(vR,Rr.globalOptions),S=f(C),E=[],I,L,_;function O(){const{container:ie,slides:le}=S;L=(Bm(ie)?e.querySelector(ie):ie)||e.children[0];const ae=Bm(le)?L.querySelectorAll(le):le;_=[].slice.call(ae||L.children)}function D(ie,le){const de=dR(e,L,_,r,i,ie,u,le);if(ie.loop&&!de.slideLooper.canLoop()){const ae=Object.assign({},ie,{loop:!1});return D(ae,le)}return de}function H(ie,le){if(b)return;const de=c.find(ve=>ve.window===i),ae=de||pR(i);de||c.push(ae),C=f(C,ie),S=p(C),E=le||E,O(),w=D(S,ae),d([C,...E.map(({options:ve})=>ve)]).forEach(ve=>s.add(ve,"change",F)),S.active&&(w.translate.to(w.location.get()),w.eventHandler.init(q),w.resizeHandler.init(q,S.watchResize),w.slidesHandler.init(q,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&ae.reset()}),w.options.loop&&w.slideLooper.loop(),L.offsetParent&&_.length&&w.dragHandler.init(q,S.watchDrag),I=a.init(E,q))}function F(ie,le){const de=Y();j(),H(f({startIndex:de},ie),le),u.emit("reInit")}function j(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function M(){b||(b=!0,s.clear(),j(),u.emit("destroy"))}function W(ie){const le=w[ie?"target":"location"].get(),de=S.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[de](le))}function G(ie){const le=W(ie);return w.slideIndexes.filter(de=>!le.includes(de))}function V(ie,le,de){!S.active||b||(w.scrollBody.useBaseFriction().useDuration(le?0:S.duration),w.scrollTo.index(ie,de||0))}function R(ie){const le=w.index.add(1).get();V(le,ie===!0,-1)}function y(ie){const le=w.index.add(-1).get();V(le,ie===!0,1)}function $(){return w.index.add(1).get()!==Y()}function N(){return w.index.add(-1).get()!==Y()}function x(){return w.scrollSnaps.map(w.scrollProgress.get)}function B(){return w.scrollProgress.get(w.location.get())}function Y(){return w.index.get()}function K(){return w.indexPrevious.get()}function X(){return I}function Z(){return w}function ee(){return e}function J(){return L}function Q(){return _}const q={canScrollNext:$,canScrollPrev:N,containerNode:J,internalEngine:Z,destroy:M,off:h,on:v,emit:g,plugins:X,previousScrollSnap:K,reInit:m,rootNode:ee,scrollNext:R,scrollPrev:y,scrollProgress:B,scrollSnapList:x,scrollTo:V,selectedScrollSnap:Y,slideNodes:Q,slidesInView:W,slidesNotInView:G};return H(t,n),setTimeout(()=>u.emit("init"),0),q}Rr.animationRealms=[],Rr.globalOptions=void 0;function vu(e={},t=[]){const n=A.useRef(e),r=A.useRef(t),[i,o]=A.useState(),[a,s]=A.useState(),l=A.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return A.useEffect(()=>{if(WA()&&a){Rr.globalOptions=vu.globalOptions;const u=Rr(a,n.current,r.current);return o(u),()=>u.destroy()}else o(void 0)},[a,o]),A.useEffect(()=>{fu(n.current,e)||(n.current=e,l())},[e,l]),A.useEffect(()=>{UA(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}vu.globalOptions=void 0;const qm=A.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a,addMessageFeedback:s},l)=>{const[u,c]=vu({skipSnaps:!0,loop:!0}),[f,p]=A.useState(!0),[d,v]=A.useState(!0),h=A.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),g=A.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:m}}}=we,b=A.useCallback(w=>{p(!w.canScrollPrev()),v(!w.canScrollNext())},[]);return A.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),T.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:u,children:[T.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,C)=>T.jsx(lr,{block:{...w,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},C))}),e.length>1&&T.jsxs(T.Fragment,{children:[T.jsx(zP,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),T.jsx(WP,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});qm.displayName="Carousel";const Km=Math.floor;function Gm(e){return Ym(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yR(e){var t;return(t=(Ym(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ym(e){return e instanceof Node||e instanceof Mi(e).Node}function qt(e){return e instanceof Element||e instanceof Mi(e).Element}function _r(e){return e instanceof HTMLElement||e instanceof Mi(e).HTMLElement}function mu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot}function bR(e){return["html","body","#document"].includes(Gm(e))}function xR(e){return Mi(e).getComputedStyle(e)}function wR(e){if(Gm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mu(e)&&e.host||yR(e);return mu(t)?t.host:t}function Bn(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Pt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&mu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Xm(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function SR(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Jm(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Xm())||t.test(SR()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qm(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Zm(){return/apple/i.test(navigator.vendor)}function ER(){return Xm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function eg(e,t){return["mouse","pen"].includes(e)}function kR(e){return"nativeEvent"in e}function CR(e){return e.matches("html,body")}function Qt(e){return(e==null?void 0:e.ownerDocument)||document}function gu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function tg(e){return"composedPath"in e?e.composedPath()[0]:e.target}const TR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ng(e){return _r(e)&&e.matches(TR)}function ht(e){e.preventDefault(),e.stopPropagation()}const Dr=Math.min,Nt=Math.max,fa=Math.round,da=Math.floor,dn=e=>({x:e,y:e});function rg(e,t,n){return Nt(e,Dr(t,n))}function pa(e,t){return typeof e=="function"?e(t):e}function ji(e){return e.split("-")[0]}function yu(e){return e.split("-")[1]}function ig(e){return e==="x"?"y":"x"}function $R(e){return e==="y"?"height":"width"}function Ni(e){return["top","bottom"].includes(ji(e))?"y":"x"}function OR(e){return ig(Ni(e))}function IR(e){return{top:0,right:0,bottom:0,left:0,...e}}function PR(e){return typeof e!="number"?IR(e):{top:e,right:e,bottom:e,left:e}}function ha(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function og(e,t,n){let{reference:r,floating:i}=e;const o=Ni(t),a=OR(t),s=$R(a),l=ji(t),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(yu(t)){case"start":d[a]-=p*(n&&u?-1:1);break;case"end":d[a]+=p*(n&&u?-1:1);break}return d}const AR=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=og(u,r,l),p=r,d={},v=0;for(let h=0;h<s.length;h++){const{name:g,fn:m}=s[h],{x:b,y:w,data:C,reset:S}=await m({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,f=w??f,d={...d,[g]:{...d[g],...C}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=og(u,p,l)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function ag(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=pa(t,e),v=PR(d),g=s[p?f==="floating"?"reference":"floating":f],m=ha(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=ha(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-S.top+v.top)/C.y,bottom:(S.bottom-m.bottom+v.bottom)/C.y,left:(m.left-S.left+v.left)/C.x,right:(S.right-m.right+v.right)/C.x}}async function RR(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ji(n),s=yu(n),l=Ni(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,f=pa(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(d=s==="end"?v*-1:v),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}const _R=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await RR(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},DR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...l}=pa(e,t),u={x:n,y:r},c=await ag(t,l),f=Ni(ji(i)),p=ig(f);let d=u[p],v=u[f];if(o){const g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=d+c[g],w=d-c[m];d=rg(b,d,w)}if(a){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=v+c[g],w=v-c[m];v=rg(b,v,w)}const h=s.fn({...t,[p]:d,[f]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[f]:a}}}}}},MR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=pa(e,t),c=await ag(t,u),f=ji(i),p=yu(i),d=Ni(i)==="y",{width:v,height:h}=o.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=p==="end"?"top":"bottom");const b=h-c.top-c.bottom,w=v-c.left-c.right,C=Dr(h-c[g],b),S=Dr(v-c[m],w),E=!t.middlewareData.shift;let I=C,L=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=b),E&&!p){const O=Nt(c.left,0),D=Nt(c.right,0),H=Nt(c.top,0),F=Nt(c.bottom,0);d?L=v-2*(O!==0||D!==0?O+D:Nt(c.left,c.right)):I=h-2*(H!==0||F!==0?H+F:Nt(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:I});const _=await a.getDimensions(s.floating);return v!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function va(){return typeof window<"u"}function Mr(e){return sg(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pn(e){var t;return(t=(sg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sg(e){return va()?e instanceof Node||e instanceof Lt(e).Node:!1}function Zt(e){return va()?e instanceof Element||e instanceof Lt(e).Element:!1}function hn(e){return va()?e instanceof HTMLElement||e instanceof Lt(e).HTMLElement:!1}function lg(e){return!va()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Li(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=en(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function jR(e){return["table","td","th"].includes(Mr(e))}function ma(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function bu(e){const t=xu(),n=Zt(e)?en(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function NR(e){let t=zn(e);for(;hn(t)&&!jr(t);){if(bu(t))return t;if(ma(t))return null;t=zn(t)}return null}function xu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(e){return["html","body","#document"].includes(Mr(e))}function en(e){return Lt(e).getComputedStyle(e)}function ga(e){return Zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lg(e)&&e.host||pn(e);return lg(t)?t.host:t}function ug(e){const t=zn(e);return jr(t)?e.ownerDocument?e.ownerDocument.body:e.body:hn(t)&&Li(t)?t:ug(t)}function Wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ug(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Lt(i);if(o){const s=wu(a);return t.concat(a,a.visualViewport||[],Li(i)?i:[],s&&n?Wn(s):[])}return t.concat(i,Wn(i,[],n))}function wu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cg(e){const t=en(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=hn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=fa(n)!==o||fa(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Su(e){return Zt(e)?e:e.contextElement}function Nr(e){const t=Su(e);if(!hn(t))return dn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=cg(t);let a=(o?fa(n.width):n.width)/r,s=(o?fa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const LR=dn(0);function fg(e){const t=Lt(e);return!xu()||!t.visualViewport?LR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function sr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Su(e);let a=dn(1);t&&(r?Zt(r)&&(a=Nr(r)):a=Nr(e));const s=FR(o,n,r)?fg(o):dn(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const p=Lt(o),d=r&&Zt(r)?Lt(r):r;let v=p,h=wu(v);for(;h&&r&&d!==v;){const g=Nr(h),m=h.getBoundingClientRect(),b=en(h),w=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,C=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=C,v=Lt(h),h=wu(v)}}return ha({width:c,height:f,x:l,y:u})}function Eu(e,t){const n=ga(e).scrollLeft;return t?t.left+n:sr(pn(e)).left+n}function dg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Eu(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function BR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=pn(r),s=t?ma(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=dn(1);const c=dn(0),f=hn(r);if((f||!f&&!o)&&((Mr(r)!=="body"||Li(a))&&(l=ga(r)),hn(r))){const d=sr(r);u=Nr(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const p=a&&!f&&!o?dg(a,l,!0):dn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-l.scrollTop*u.y+c.y+p.y}}function zR(e){return Array.from(e.getClientRects())}function WR(e){const t=pn(e),n=ga(e),r=e.ownerDocument.body,i=Nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Eu(e);const s=-n.scrollTop;return en(r).direction==="rtl"&&(a+=Nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function UR(e,t){const n=Lt(e),r=pn(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=xu();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function HR(e,t){const n=sr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=hn(e)?Nr(e):dn(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function pg(e,t,n){let r;if(t==="viewport")r=UR(e,n);else if(t==="document")r=WR(pn(e));else if(Zt(t))r=HR(t,n);else{const i=fg(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ha(r)}function hg(e,t){const n=zn(e);return n===t||!Zt(n)||jr(n)?!1:en(n).position==="fixed"||hg(n,t)}function VR(e,t){const n=t.get(e);if(n)return n;let r=Wn(e,[],!1).filter(s=>Zt(s)&&Mr(s)!=="body"),i=null;const o=en(e).position==="fixed";let a=o?zn(e):e;for(;Zt(a)&&!jr(a);){const s=en(a),l=bu(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Li(a)&&!l&&hg(e,a))?r=r.filter(c=>c!==a):i=s,a=zn(a)}return t.set(e,r),r}function qR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?ma(t)?[]:VR(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const f=pg(t,c,i);return u.top=Nt(f.top,u.top),u.right=Dr(f.right,u.right),u.bottom=Dr(f.bottom,u.bottom),u.left=Nt(f.left,u.left),u},pg(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function KR(e){const{width:t,height:n}=cg(e);return{width:t,height:n}}function GR(e,t,n){const r=hn(t),i=pn(t),o=n==="fixed",a=sr(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=dn(0);function u(){l.x=Eu(i)}if(r||!r&&!o)if((Mr(t)!=="body"||Li(i))&&(s=ga(t)),r){const d=sr(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?dg(i,s):dn(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function ku(e){return en(e).position==="static"}function vg(e,t){if(!hn(e)||en(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pn(e)===n&&(n=n.ownerDocument.body),n}function mg(e,t){const n=Lt(e);if(ma(e))return n;if(!hn(e)){let i=zn(e);for(;i&&!jr(i);){if(Zt(i)&&!ku(i))return i;i=zn(i)}return n}let r=vg(e,t);for(;r&&jR(r)&&ku(r);)r=vg(r,t);return r&&jr(r)&&ku(r)&&!bu(r)?n:r||NR(e)||n}const YR=async function(e){const t=this.getOffsetParent||mg,n=this.getDimensions,r=await n(e.floating);return{reference:GR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function XR(e){return en(e).direction==="rtl"}const JR={convertOffsetParentRelativeRectToViewportRelativeRect:BR,getDocumentElement:pn,getClippingRect:qR,getOffsetParent:mg,getElementRects:YR,getClientRects:zR,getDimensions:KR,getScale:Nr,isElement:Zt,isRTL:XR};function gg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QR(e,t){let n=null,r;const i=pn(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;const v=da(f),h=da(i.clientWidth-(c+p)),g=da(i.clientHeight-(f+d)),m=da(c),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Nt(0,Dr(1,l))||1};let C=!0;function S(E){const I=E[0].intersectionRatio;if(I!==l){if(!C)return a();I?a(!1,I):r=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!gg(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return a(!0),o}function ZR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Su(e),c=i||o?[...u?Wn(u):[],...Wn(t)]:[];c.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});const f=u&&s?QR(u,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(m=>{let[b]=m;b&&b.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let v,h=l?sr(e):null;l&&g();function g(){const m=sr(e);h&&!gg(h,m)&&n(),h=m,v=requestAnimationFrame(g)}return n(),()=>{var m;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const e_=_R,t_=DR,n_=MR,r_=(e,t,n)=>{const r=new Map,i={platform:JR,...n},o={...i.platform,_c:r};return AR(e,t,{...i,platform:o})};var ya=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ba(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ba(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function yg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bg(e,t){const n=yg(e);return Math.round(t*n)/n}function Cu(e){const t=k.useRef(e);return ya(()=>{t.current=e}),t}function i_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=k.useState(r);ba(p,r)||d(r);const[v,h]=k.useState(null),[g,m]=k.useState(null),b=k.useCallback(V=>{V!==E.current&&(E.current=V,h(V))},[]),w=k.useCallback(V=>{V!==I.current&&(I.current=V,m(V))},[]),C=o||v,S=a||g,E=k.useRef(null),I=k.useRef(null),L=k.useRef(c),_=l!=null,O=Cu(l),D=Cu(i),H=Cu(u),F=k.useCallback(()=>{if(!E.current||!I.current)return;const V={placement:t,strategy:n,middleware:p};D.current&&(V.platform=D.current),r_(E.current,I.current,V).then(R=>{const y={...R,isPositioned:H.current!==!1};j.current&&!ba(L.current,y)&&(L.current=y,hp.flushSync(()=>{f(y)}))})},[p,t,n,D,H]);ya(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[u]);const j=k.useRef(!1);ya(()=>(j.current=!0,()=>{j.current=!1}),[]),ya(()=>{if(C&&(E.current=C),S&&(I.current=S),C&&S){if(O.current)return O.current(C,S,F);F()}},[C,S,F,O,_]);const M=k.useMemo(()=>({reference:E,floating:I,setReference:b,setFloating:w}),[b,w]),W=k.useMemo(()=>({reference:C,floating:S}),[C,S]),G=k.useMemo(()=>{const V={position:n,left:0,top:0};if(!W.floating)return V;const R=bg(W.floating,c.x),y=bg(W.floating,c.y);return s?{...V,transform:"translate("+R+"px, "+y+"px)",...yg(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:y}},[n,s,W.floating,c.x,c.y]);return k.useMemo(()=>({...c,update:F,refs:M,elements:W,floatingStyles:G}),[c,F,M,W,G])}const o_=(e,t)=>({...e_(e),options:[e,t]}),a_=(e,t)=>({...t_(e),options:[e,t]}),s_=(e,t)=>({...n_(e),options:[e,t]});/*!
244
259
  * tabbable 6.2.0
245
260
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
246
- */var zR=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Cu=zR.join(","),ag=typeof Element>"u",Li=ag?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ya=!ag&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ba=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},WR=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},UR=function(t,n,r){if(ba(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Cu));return n&&Li.call(t,Cu)&&i.unshift(t),i=i.filter(r),i},HR=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!ba(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var c=Li.call(a,Cu);c&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!ba(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},sg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||WR(t))&&!sg(t)?0:t.tabIndex},VR=function(t,n){var r=lg(t);return r<0&&n&&!sg(t)?0:r},KR=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ug=function(t){return t.tagName==="INPUT"},qR=function(t){return ug(t)&&t.type==="hidden"},GR=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YR=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},XR=function(t){if(!t.name)return!0;var n=t.form||ya(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=YR(i,t.form);return!o||o===t},JR=function(t){return ug(t)&&t.type==="radio"},ZR=function(t){return JR(t)&&!XR(t)},QR=function(t){var n,r=t&&ya(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;r=ya(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},cg=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},eD=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Li.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Li.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=ya(t);if(l&&!l.shadowRoot&&i(l)===!0)return cg(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(QR(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return cg(t);return!1},tD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Li.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},nD=function(t,n){return!(n.disabled||ba(n)||qR(n)||eD(n,t)||GR(n)||tD(n))},fg=function(t,n){return!(ZR(n)||lg(n)<0||!nD(t,n))},rD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iD=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=VR(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(KR).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},ku=function(t,n){n=n||{};var r;return n.getShadowRoot?r=HR([t],n.includeContainer,{filter:fg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:rD}):r=UR(t,n.includeContainer,fg.bind(null,n)),iD(r)};const $u="ArrowUp",xa="ArrowDown",Lr="ArrowLeft",Fi="ArrowRight";function wa(e,t,n){return Math.floor(e/t)!==n}function Bi(e,t){return t<0||t>=e.current.length}function Tu(e,t){return xt(e,{disabledIndices:t})}function dg(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function oD(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,f=u;if(n.key===$u){if(c&&ht(n),u===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||f<0)){const p=u%o,d=l%o,v=l-(d-p);d===p?f=l:f=d>p?v:v-o}Bi(e,f)&&(f=u)}if(n.key===xa&&(c&&ht(n),u===-1?f=s:(f=xt(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(f=xt(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),Bi(e,f)&&(f=u)),r==="both"){const p=Dm(u/o);n.key===Fi&&(c&&ht(n),u%o!==o-1?(f=xt(e,{startingIndex:u,disabledIndices:a}),i&&wa(f,o,p)&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a})),wa(f,o,p)&&(f=u)),n.key===Lr&&(c&&ht(n),u%o!==0?(f=xt(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&wa(f,o,p)&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),wa(f,o,p)&&(f=u));const d=Dm(l/o)===p;Bi(e,f)&&(i&&d?f=n.key===Lr?l:xt(e,{startingIndex:u-u%o-1,disabledIndices:a}):f=u)}return f}let pg=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(pg);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():pg=requestAnimationFrame(o)}var st=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sa.apply(this,arguments)}let Ou=!1,aD=0;const hg=()=>"floating-ui-"+aD++;function sD(){const[e,t]=C.useState(()=>Ou?hg():void 0);return st(()=>{e==null&&t(hg())},[]),C.useEffect(()=>{Ou||(Ou=!0)},[]),e}const Iu=C.useId||sD;function lD(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const uD=C.createContext(null),cD=C.createContext(null),vg=()=>{var e;return((e=C.useContext(uD))==null?void 0:e.id)||null},Ea=()=>C.useContext(cD);function zi(e){return"data-floating-ui-"+e}function Un(e){const t=A.useRef(e);return st(()=>{t.current=e}),t}function fD(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function Fr(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function dD(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),Fr(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let Br=new WeakMap,Ca=new WeakSet,ka={},Pu=0;const pD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,mg=e=>e&&(e.host||mg(e.parentNode)),hD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=mg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function vD(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=hD(t,e),s=new Set,l=new Set(a),u=[];ka[i]||(ka[i]=new WeakMap);const c=ka[i];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,v=>{if(s.has(v))p(v);else{const h=o?v.getAttribute(o):null,g=h!==null&&h!=="false",m=(Br.get(v)||0)+1,b=(c.get(v)||0)+1;Br.set(v,m),c.set(v,b),u.push(v),m===1&&g&&Ca.add(v),b===1&&v.setAttribute(i,""),!g&&o&&v.setAttribute(o,"true")}})}return Pu++,()=>{u.forEach(d=>{const v=(Br.get(d)||0)-1,h=(c.get(d)||0)-1;Br.set(d,v),c.set(d,h),v||(!Ca.has(d)&&o&&d.removeAttribute(o),Ca.delete(d)),h||d.removeAttribute(i)}),Pu--,Pu||(Br=new WeakMap,Br=new WeakMap,Ca=new WeakSet,ka={})}}function gg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zt(e[0]).body;return vD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Au=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function yg(e,t){const n=ku(e,Au());t==="prev"&&n.reverse();const r=n.indexOf(Bn(Zt(e)));return n.slice(r+1)[0]}function bg(){return yg(document.body,"next")}function xg(){return yg(document.body,"prev")}function Wi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pt(n,r)}function mD(e){ku(e,Au()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function gD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ru={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let yD;function wg(e){e.key==="Tab"&&(e.target,clearTimeout(yD))}const $a=C.forwardRef(function(t,n){const[r,i]=C.useState();st(()=>(Fm()&&i("button"),document.addEventListener("keydown",wg),()=>{document.removeEventListener("keydown",wg)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zi("focus-guard")]:"",style:Ru};return C.createElement("span",Sa({},t,o))}),Sg=C.createContext(null);function bD(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=C.useState(null),o=Iu(),a=Eg(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=C.useRef();return st(()=>()=>{r==null||r.remove()},[r,s]),st(()=>{if(l.current===s)return;l.current=s;const{id:u,root:c,portalContext:f,uniqueId:p}=s,d=u?document.getElementById(u):null,v=zi("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(v,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Kt(h)&&(h=h.current),h=h||document.body;let g=null;u&&(g=document.createElement("div"),g.id=u,h.appendChild(g));const m=document.createElement("div");m.id=p,m.setAttribute(v,""),h=g||h,h.appendChild(m),i(m)}},[s]),r}function xD(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=bD({id:n,root:r}),[a,s]=C.useState(null),l=C.useRef(null),u=C.useRef(null),c=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return C.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(v){o&&Wi(v)&&(v.type==="focusin"?gD:mD)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),C.createElement(Sg.Provider,{value:C.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&C.createElement($a,{"data-type":"outside",ref:l,onFocus:d=>{if(Wi(d,o)){var v;(v=c.current)==null||v.focus()}else{const h=xg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&C.createElement("span",{"aria-owns":o.id,style:Ru}),o&&er.createPortal(t,o),p&&o&&C.createElement($a,{"data-type":"outside",ref:u,onFocus:d=>{if(Wi(d,o)){var v;(v=f.current)==null||v.focus()}else{const h=bg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Eg=()=>C.useContext(Sg),wD=C.forwardRef(function(t,n){return C.createElement("button",Sa({},t,{type:"button",ref:n,tabIndex:-1,style:Ru}))});function SD(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:v,events:h,dataRef:g,elements:{domReference:m,floating:b}}=t,x=pD()?o:!0,k=Un(i),S=Un(a),E=Un(s),T=Ea(),L=Eg(),N=typeof a=="number"&&a<0,O=C.useRef(null),M=C.useRef(null),K=C.useRef(!1),F=C.useRef(null),I=C.useRef(!1),D=L!=null,j=m&&m.getAttribute("role")==="combobox"&&Wm(m)&&N,G=C.useCallback(function(_){return _===void 0&&(_=b),_?ku(_,Au()):[]},[b]),U=C.useCallback(_=>{const z=G(_);return k.current.map(w=>m&&w==="reference"?m:b&&w==="floating"?b:z).filter(Boolean).flat()},[m,b,k,G]);C.useEffect(()=>{if(r||!l)return;function _(w){if(w.key==="Tab"){Pt(b,Bn(Zt(b)))&&G().length===0&&!j&&ht(w);const H=U(),X=zm(w);k.current[0]==="reference"&&X===m&&(ht(w),w.shiftKey?On(H[H.length-1]):On(H[1])),k.current[1]==="floating"&&X===b&&w.shiftKey&&(ht(w),On(H[0]))}}const z=Zt(b);return z.addEventListener("keydown",_),()=>{z.removeEventListener("keydown",_)}},[r,m,b,l,k,p,j,G,U]),C.useEffect(()=>{if(r||!c)return;function _(){I.current=!0,setTimeout(()=>{I.current=!1})}function z(w){const H=w.relatedTarget;queueMicrotask(()=>{const X=!(Pt(m,H)||Pt(b,H)||Pt(H,b)||Pt(L==null?void 0:L.portalNode,H)||H!=null&&H.hasAttribute(zi("focus-guard"))||T&&(Fr(T.nodesRef.current,d).find(q=>{var Y,Q;return Pt((Y=q.context)==null?void 0:Y.elements.floating,H)||Pt((Q=q.context)==null?void 0:Q.elements.domReference,H)})||fD(T.nodesRef.current,d).find(q=>{var Y,Q;return((Y=q.context)==null?void 0:Y.elements.floating)===H||((Q=q.context)==null?void 0:Q.elements.domReference)===H})));H&&X&&!I.current&&H!==F.current&&(K.current=!0,v(!1,w))})}if(b&&Dr(m))return m.addEventListener("focusout",z),m.addEventListener("pointerdown",_),!l&&b.addEventListener("focusout",z),()=>{m.removeEventListener("focusout",z),m.removeEventListener("pointerdown",_),!l&&b.removeEventListener("focusout",z)}},[r,m,b,l,d,T,L,v,c]),C.useEffect(()=>{var _;if(r)return;const z=Array.from((L==null||(_=L.portalNode)==null?void 0:_.querySelectorAll("["+zi("portal")+"]"))||[]);if(b){const w=[b,...z,O.current,M.current,k.current.includes("reference")||j?m:null].filter(X=>X!=null),H=l?gg(w,x,!x):gg(w);return()=>{H()}}},[r,m,b,l,k,L,j,x]),st(()=>{if(r||!b)return;const _=Zt(b),z=Bn(_);queueMicrotask(()=>{const w=U(b),H=S.current,X=(typeof H=="number"?w[H]:H.current)||b,q=Pt(b,z);!N&&!q&&f&&On(X,{preventScroll:X===b})})},[r,f,b,N,U,S]),st(()=>{if(r||!b)return;let _=!1;const z=Zt(b),w=Bn(z),H=g.current;F.current=w;function X(q){if(q.type==="escapeKey"&&p.domReference.current&&(F.current=p.domReference.current),["referencePress","escapeKey"].includes(q.type))return;const Y=q.data.returnFocus;typeof Y=="object"?(K.current=!1,_=Y.preventScroll):K.current=!Y}return h.on("dismiss",X),()=>{h.off("dismiss",X);const q=Bn(z);(Pt(b,q)||T&&Fr(T.nodesRef.current,d).some(Q=>{var ee;return Pt((ee=Q.context)==null?void 0:ee.elements.floating,q)})||H.openEvent&&["click","mousedown"].includes(H.openEvent.type))&&p.domReference.current&&(F.current=p.domReference.current),E.current&&Dr(F.current)&&!K.current&&On(F.current,{cancelPrevious:!1,preventScroll:_})}},[r,b,E,g,p,h,T,d]),st(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:c,open:f,onOpenChange:v,refs:p}),()=>{L.setFocusManagerState(null)}},[r,L,l,f,v,p,c]),st(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!N){const _=()=>{const w=b.getAttribute("tabindex");k.current.includes("floating")||Bn(Zt(b))!==p.domReference.current&&G().length===0?w!=="0"&&b.setAttribute("tabindex","0"):w!=="-1"&&b.setAttribute("tabindex","-1")};_();const z=new MutationObserver(_);return z.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{z.disconnect()}}},[r,b,p,k,G,N]);function R(_){return r||!u||!l?null:C.createElement(wD,{ref:_==="start"?O:M,onClick:z=>v(!1,z.nativeEvent)},typeof u=="string"?u:"Dismiss")}const y=!r&&x&&!j&&(D||l);return C.createElement(C.Fragment,null,y&&C.createElement($a,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:_=>{if(l){const w=U();On(i[0]==="reference"?w[0]:w[w.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(K.current=!1,Wi(_,L.portalNode)){const w=bg()||m;w==null||w.focus()}else{var z;(z=L.beforeOutsideRef.current)==null||z.focus()}}}),!j&&R("start"),n,R("end"),y&&C.createElement($a,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:_=>{if(l)On(U()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(c&&(K.current=!0),Wi(_,L.portalNode)){const w=xg()||m;w==null||w.focus()}else{var z;(z=L.afterOutsideRef.current)==null||z.focus()}}}))}function Cg(e){return Dr(e.target)&&e.target.tagName==="BUTTON"}function kg(e){return Wm(e)}function ED(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Bm(f.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}Bm(f.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||Cg(d))&&(d.key===" "&&!kg(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||Cg(d)||kg(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,c,o,l,n,r])}const CD=C.useInsertionEffect||(e=>e());function Hn(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return CD(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const kD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$D={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},TD=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function OD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:m}=t,b=Ea(),x=vg()!=null,k=Hn(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,E=C.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:L}=TD(m),N=Hn(M=>{if(!n||!c||!f||M.key!=="Escape")return;const K=b?Fr(b.nodesRef.current,o):[];if(!T&&(M.stopPropagation(),K.length>0)){let F=!0;if(K.forEach(I=>{var D;if((D=I.context)!=null&&D.open&&!I.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,rR(M)?M.nativeEvent:M)}),O=Hn(M=>{const K=E.current;if(E.current=!1,K||typeof S=="function"&&!S(M))return;const F=zm(M),I="["+zi("inert")+"]",D=Zt(l).querySelectorAll(I);let j=Kt(F)?F:null;for(;j&&!ZA(j);){const R=eR(j);if(R===Zt(l).body||!Kt(R))break;j=R}if(D.length&&Kt(F)&&!iR(F)&&!Pt(F,l)&&Array.from(D).every(R=>!Pt(j,R)))return;if(Dr(F)&&l){const R=F.clientWidth>0&&F.scrollWidth>F.clientWidth,y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let _=y&&M.offsetX>F.clientWidth;if(y&&QA(F).direction==="rtl"&&(_=M.offsetX<=F.offsetWidth-F.clientWidth),_||R&&M.offsetY>F.clientHeight)return}const G=b&&Fr(b.nodesRef.current,o).some(R=>{var y;return vu(M,(y=R.context)==null?void 0:y.elements.floating)});if(vu(M,l)||vu(M,s)||G)return;const U=b?Fr(b.nodesRef.current,o):[];if(U.length>0){let R=!0;if(U.forEach(y=>{var _;if((_=y.context)!=null&&_.open&&!y.context.dataRef.current.__outsidePressBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:Nm(M)||Lm(M)}}),r(!1,M)});return C.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=T,u.current.__outsidePressBubbles=L;function M(I){r(!1,I)}const K=Zt(l);f&&K.addEventListener("keydown",N),S&&K.addEventListener(d,O);let F=[];return g&&(Kt(s)&&(F=Wn(s)),Kt(l)&&(F=F.concat(Wn(l))),!Kt(a)&&a&&a.contextElement&&(F=F.concat(Wn(a.contextElement)))),F=F.filter(I=>{var D;return I!==((D=K.defaultView)==null?void 0:D.visualViewport)}),F.forEach(I=>{I.addEventListener("scroll",M,{passive:!0})}),()=>{f&&K.removeEventListener("keydown",N),S&&K.removeEventListener(d,O),F.forEach(I=>{I.removeEventListener("scroll",M)})}},[u,l,s,a,f,S,d,n,r,g,c,T,L,N,O]),C.useEffect(()=>{E.current=!1},[S,d]),C.useMemo(()=>c?{reference:{onKeyDown:N,[kD[h]]:M=>{v&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:N,[$D[d]]:()=>{E.current=!0}}}:{},[c,i,v,d,h,r,N])}let Du;process.env.NODE_ENV!=="production"&&(Du=new Set);function ID(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!Kt(e.elements.reference)){var a;if(!((a=Du)!=null&&a.has(T))){var s;(s=Du)==null||s.add(T),console.error(T)}}}const[l,u]=C.useState(null),c=((t=e.elements)==null?void 0:t.reference)||l,f=NR(e),p=Ea(),d=Hn((T,L)=>{T&&(h.current.openEvent=L),r==null||r(T,L)}),v=C.useRef(null),h=C.useRef({}),g=C.useState(()=>lD())[0],m=Iu(),b=C.useCallback(T=>{const L=Kt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;f.refs.setReference(L)},[f.refs]),x=C.useCallback(T=>{(Kt(T)||T===null)&&(v.current=T,u(T)),(Kt(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!Kt(T))&&f.refs.setReference(T)},[f.refs]),k=C.useMemo(()=>({...f.refs,setReference:x,setPositionReference:b,domReference:v}),[f.refs,x,b]),S=C.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=C.useMemo(()=>({...f,refs:k,elements:S,dataRef:h,nodeId:i,floatingId:m,events:g,open:n,onOpenChange:d}),[f,i,m,g,n,d,k,S]);return st(()=>{const T=p==null?void 0:p.nodesRef.current.find(L=>L.id===i);T&&(T.context=E)}),C.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function _u(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[s]=l}),i),{})}}function PD(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(o=>_u(o,e,"reference"),t),r=C.useCallback(o=>_u(o,e,"floating"),t),i=C.useCallback(o=>_u(o,e,"item"),e.map(o=>o==null?void 0:o.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let $g=!1;function Ta(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Tg(e,t){return Ta(t,e===$u||e===xa,e===Lr||e===Fi)}function Mu(e,t,n){return Ta(t,e===xa,n?e===Lr:e===Fi)||e==="Enter"||e==" "||e===""}function AD(e,t,n){return Ta(t,n?e===Lr:e===Fi,e===xa)}function Og(e,t,n){return Ta(t,n?e===Fi:e===Lr,e===$u)}function RD(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:v=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:T=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const N=vg(),O=Ea(),M=Hn(u),K=C.useRef(m),F=C.useRef(f??-1),I=C.useRef(null),D=C.useRef(!0),j=C.useRef(M),G=C.useRef(!!a),U=C.useRef(!1),R=C.useRef(!1),y=Un(k),_=Un(n),z=Un(T),[w,H]=C.useState(),[X,q]=C.useState(),Y=Hn(function(J,Z,V){V===void 0&&(V=!1);const ie=J.current[Z.current];ie&&(g?(H(ie.id),O==null||O.events.emit("virtualfocus",ie),L&&(L.current=ie)):On(ie,{preventScroll:!0,sync:nR()&&Fm()?$g||U.current:!1}),requestAnimationFrame(()=>{const le=z.current;le&&ie&&(V||!D.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le))}))});st(()=>{document.createElement("div").focus({get preventScroll(){return $g=!0,!1}})},[]),st(()=>{c&&(n&&a?K.current&&f!=null&&(R.current=!0,M(f)):G.current&&(F.current=-1,j.current(null)))},[c,n,a,f,M]),st(()=>{if(c&&n&&a)if(l==null){if(U.current=!1,f!=null)return;if(G.current&&(F.current=-1,Y(s,F)),!G.current&&K.current&&(I.current!=null||K.current===!0&&I.current==null)){let J=0;const Z=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Z),J++):(F.current=I.current==null||Mu(I.current,S,h)||v?Tu(s,y.current):dg(s,y.current),I.current=null,M(F.current))};Z()}}else Bi(s,l)||(F.current=l,Y(s,F,R.current),R.current=!1)},[c,n,a,l,f,v,s,S,h,M,Y,y]),st(()=>{var J,Z;if(!c||a||!O||g||!G.current)return;const V=O.nodesRef.current,ie=(J=V.find(ae=>ae.id===N))==null||(Z=J.context)==null?void 0:Z.elements.floating,le=Bn(Zt(a)),de=V.some(ae=>ae.context&&Pt(ae.context.elements.floating,le));ie&&!de&&D.current&&ie.focus({preventScroll:!0})},[c,a,O,N,g]),st(()=>{if(!c||!O||!g||N)return;function J(Z){q(Z.id),L&&(L.current=Z)}return O.events.on("virtualfocus",J),()=>{O.events.off("virtualfocus",J)}},[c,O,g,N,L]),st(()=>{j.current=M,G.current=!!a}),st(()=>{n||(I.current=null)},[n]);const Q=l!=null,ee=C.useMemo(()=>{function J(V){if(!n)return;const ie=s.current.indexOf(V);ie!==-1&&M(ie)}return{onFocus(V){let{currentTarget:ie}=V;J(ie)},onClick:V=>{let{currentTarget:ie}=V;return ie.focus({preventScroll:!0})},...b&&{onMouseMove(V){let{currentTarget:ie}=V;J(ie)},onPointerLeave(V){let{pointerType:ie}=V;!D.current||ie==="touch"||(F.current=-1,Y(s,F),M(null),g||On(i.floating.current,{preventScroll:!0}))}}}},[n,i,Y,b,s,M,g]);return C.useMemo(()=>{if(!c)return{};const J=y.current;function Z(ae){if(D.current=!1,U.current=!0,!_.current&&ae.currentTarget===i.floating.current)return;if(v&&Og(ae.key,S,h)){ht(ae),r(!1,ae.nativeEvent),Dr(o)&&!g&&o.focus();return}const ge=F.current,$e=Tu(s,J),Ae=dg(s,J);if(ae.key==="Home"&&(ht(ae),F.current=$e,M(F.current)),ae.key==="End"&&(ht(ae),F.current=Ae,M(F.current)),!(E>1&&(F.current=oD(s,{event:ae,orientation:S,loop:d,cols:E,disabledIndices:J,minIndex:$e,maxIndex:Ae,prevIndex:F.current,stopEvent:!0}),M(F.current),S==="both"))&&Tg(ae.key,S)){if(ht(ae),n&&!g&&Bn(ae.currentTarget.ownerDocument)===ae.currentTarget){F.current=Mu(ae.key,S,h)?$e:Ae,M(F.current);return}Mu(ae.key,S,h)?d?F.current=ge>=Ae?p&&ge!==s.current.length?-1:$e:xt(s,{startingIndex:ge,disabledIndices:J}):F.current=Math.min(Ae,xt(s,{startingIndex:ge,disabledIndices:J})):d?F.current=ge<=$e?p&&ge!==-1?s.current.length:Ae:xt(s,{startingIndex:ge,decrement:!0,disabledIndices:J}):F.current=Math.max($e,xt(s,{startingIndex:ge,decrement:!0,disabledIndices:J})),Bi(s,F.current)?M(null):M(F.current)}}function V(ae){m==="auto"&&Nm(ae.nativeEvent)&&(K.current=!0)}function ie(ae){K.current=m,m==="auto"&&Lm(ae.nativeEvent)&&(K.current=!0)}const le=g&&n&&Q&&{"aria-activedescendant":X||w},de=s.current.find(ae=>(ae==null?void 0:ae.id)===w);return{reference:{...le,onKeyDown(ae){D.current=!1;const ge=ae.key.indexOf("Arrow")===0,$e=AD(ae.key,S,h),Ae=Og(ae.key,S,h),rt=Tg(ae.key,S),Et=(v?$e:rt)||ae.key==="Enter"||ae.key.trim()==="";if(g&&n){const ce=O==null?void 0:O.nodesRef.current.find(B=>B.parentId==null),W=O&&ce?dD(O.nodesRef.current,ce.id):null;if(ge&&W&&L){const B=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if($e||Ae){var Ct,kt;const ne=((Ct=W.context)==null?void 0:Ct.elements.domReference)===ae.currentTarget,se=Ae&&!ne?(kt=W.context)==null?void 0:kt.elements.domReference:$e?de:null;se&&(ht(ae),se.dispatchEvent(B),q(void 0))}if(rt&&W.context&&W.context.open&&W.parentId&&ae.currentTarget!==W.context.elements.domReference){var oe;ht(ae),(oe=W.context.elements.domReference)==null||oe.dispatchEvent(B);return}}return Z(ae)}if(!(!n&&!x&&ge)){if(Et&&(I.current=v&&rt?null:ae.key),v){$e&&(ht(ae),n?(F.current=Tu(s,J),M(F.current)):r(!0,ae.nativeEvent));return}rt&&(f!=null&&(F.current=f),ht(ae),!n&&x?r(!0,ae.nativeEvent):Z(ae),n&&M(F.current))}},onFocus(){n&&M(null)},onPointerDown:ie,onMouseDown:V,onClick:V},floating:{"aria-orientation":S==="both"?void 0:S,...le,onKeyDown:Z,onPointerMove(){D.current=!0}},item:ee}},[o,i,w,X,y,_,s,c,S,h,g,n,Q,v,f,x,p,E,d,m,M,r,ee,O,L])}function DD(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=Iu();return C.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function _D(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,v=C.useRef(),h=C.useRef(""),g=C.useRef((n=d??a)!=null?n:-1),m=C.useRef(null),b=Hn(s),x=Hn(l),k=Un(c),S=Un(p);return st(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),st(()=>{if(r&&h.current===""){var E;g.current=(E=d??a)!=null?E:-1}},[r,d,a]),C.useMemo(()=>{if(!u)return{};function E(N){N?i.current.typing||(i.current.typing=N,x(N)):i.current.typing&&(i.current.typing=N,x(N))}function T(N,O,M){const K=k.current?k.current(O,M):O.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return K?N.indexOf(K):-1}function L(N){const O=o.current;if(h.current.length>0&&h.current[0]!==" "&&(T(O,O,h.current)===-1?E(!1):N.key===" "&&ht(N)),O==null||S.current.includes(N.key)||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;r&&N.key!==" "&&(ht(N),E(!0)),O.every(I=>{var D,j;return I?((D=I[0])==null?void 0:D.toLocaleLowerCase())!==((j=I[1])==null?void 0:j.toLocaleLowerCase()):!0})&&h.current===N.key&&(h.current="",g.current=m.current),h.current+=N.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,E(!1)},f);const K=g.current,F=T(O,[...O.slice((K||0)+1),...O.slice(0,(K||0)+1)],h.current);F!==-1?(b(F),m.current=F):N.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(N){N.key===" "&&E(!1)}}}},[u,r,i,o,f,S,k,b,x])}const MD=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var I,D,j,G,U;const i=ia(R=>R.messageContainerRef),[o,a]=C.useState(!1),[s,l]=C.useState(null),[u,c]=C.useState(null),{message:{blocks:{dropdown:f}}}=Ce,p=e.reduce((R,y)=>(R[y.label]=y.value,R),{}),d=p?Object.keys(p):[],v=R=>{a(u!==null&&!t?!1:R)},{refs:h,floatingStyles:g,context:m}=ID({placement:"bottom-start",open:o,onOpenChange:v,whileElementsMounted:RR,middleware:[LR(5),FR({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),BR({apply({rects:R,elements:y,availableHeight:_}){Object.assign(y.floating.style,{maxHeight:`${_}px`,minWidth:`${R.reference.width}px`})},padding:10})]}),b=C.useRef([]),x=C.useRef(d),k=C.useRef(!1),S=ED(m,{event:"mousedown"}),E=OD(m),T=DD(m,{role:"listbox"}),L=RD(m,{listRef:b,activeIndex:s,selectedIndex:u,onNavigate:l,loop:!0}),N=_D(m,{listRef:x,activeIndex:s,selectedIndex:u,onMatch:o?l:c,onTypingChange(R){k.current=R}}),{getReferenceProps:O,getFloatingProps:M,getItemProps:K}=PD([E,T,L,N,S]),F=R=>{c(R),d[R]!==void 0&&(n==null||n({type:"text",text:d[R]??"",value:p[d[R]]??""})),a(!1)};return $.jsxs($.Fragment,{children:[$.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(I=f.button)==null?void 0:I.container,...O(),children:[$.jsx("span",{...(D=f.button)==null?void 0:D.text,children:u?d[u]:"Select..."}),$.jsx(xP,{...(j=f.button)==null?void 0:j.icon})]}),o&&$.jsx(xD,{children:$.jsx(SD,{context:m,modal:!1,children:$.jsx("div",{ref:h.setFloating,className:(U=(G=f.content)==null?void 0:G.container)==null?void 0:U.className,style:{...g},...M(),children:d.map((R,y)=>{var _;return $.jsx("div",{ref:z=>{b.current[y]=z},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===u&&y===s,"data-active":y===s?"":void 0,...(_=f.content)==null?void 0:_.item,...K({onClick(){F(y)},onKeyDown(z){z.key==="Enter"&&(z.preventDefault(),F(y)),z.key===" "&&!k.current&&(z.preventDefault(),F(y))}}),children:R},R)})})})})]})},Ig=A.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=Ce;return $.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[$.jsx("p",{...o.title,children:e||t}),$.jsx($P,{...o.icon})]})});Ig.displayName="File";const jD=Or()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=A;const Pg={audio:xm,bubble:vm,button:pA,carousel:Rm,column:Sm,dropdown:MD,file:Ig,image:ym,location:wm,row:Em,text:WP,video:bm,custom:({url:e,name:t,data:n,...r})=>{const i=jD(u=>u.getCustomComponent),[o,a]=A.useState(null),[s,l]=A.useState(null);return A.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?$.jsx("div",{style:{color:"red"},children:s}):o?$.jsx(o,{...n,...r}):null}},ar=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Pg[e.type],i={...n,...e};return $.jsx(r,{...i})};function Ag(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ag(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ui(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ag(e))&&(r&&(r+=" "),r+=t);return r}const ND=({disabled:e,onFileSelected:t})=>{const n=A.useRef(null),{uploadButton:r}=Ce.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return $.jsxs($.Fragment,{children:[$.jsx(MP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),$.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},LD=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=Ce.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(Ia(e)),f=A.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?$.jsx(Oa,{name:e,status:r,removeButton:$.jsx("div",{...o}),extension:Ia(e),children:$.jsx("div",{...a.container,children:$.jsx(ju,{type:t,...a.icon})})}):r==="error"?$.jsx(Oa,{name:e,status:r,removeButton:$.jsx(Rg,{removeFile:()=>i(e)}),extension:"Upload Error",children:$.jsxs("div",{...a.container,children:[$.jsx(EP,{...l}),$.jsx(ju,{type:t,...a.icon})]})}):r=="uploaded"&&c?$.jsx(Oa,{name:e,status:r,removeButton:$.jsx(Rg,{removeFile:()=>i(e)}),extension:Ia(e),children:$.jsx("div",{...a.container,children:$.jsx("img",{src:f,alt:e,...u})})}):$.jsx(Oa,{name:e,status:r,removeButton:$.jsx(Uv,{onClick:()=>i(e),...s}),extension:Ia(e),children:$.jsx("div",{...a.container,children:$.jsx(ju,{type:t,...a.icon})})})},Oa=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=Ce.composer.fileWidget;return $.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,$.jsxs("div",{...a.container,children:[$.jsx("div",{...a.name,children:e}),$.jsx("div",{...a.type,children:i})]})]})},ju=({type:e,...t})=>e==="image"?$.jsx(IP,{...t}):e==="video"?$.jsx(FP,{...t}):e==="audio"?$.jsx(BP,{...t}):$.jsx(Hv,{...t}),Ia=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Rg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=Ce;return $.jsx(Uv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Nu(){return Nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nu.apply(null,arguments)}function FD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var BD=A.useLayoutEffect,zD=function(t){var n=C.useRef(t);return BD(function(){n.current=t}),n},Dg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},WD=function(t,n){var r=A.useRef();return A.useCallback(function(i){t.current=i,r.current&&Dg(r.current,null),r.current=n,n&&Dg(n,i)},[n])},_g={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},UD=function(t){Object.keys(_g).forEach(function(n){t.style.setProperty(n,_g[n],"important")})},Mg=UD,Tt=null,jg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function HD(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Tt||(Tt=document.createElement("textarea"),Tt.setAttribute("tabindex","-1"),Tt.setAttribute("aria-hidden","true"),Mg(Tt)),Tt.parentNode===null&&document.body.appendChild(Tt);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;Tt.style[d]=a[d]}),Mg(Tt),Tt.value=t;var l=jg(Tt,e);Tt.value=t,l=jg(Tt,e),Tt.value="x";var u=Tt.scrollHeight-i,c=u*n;s==="border-box"&&(c=c+i+o),l=Math.max(c,l);var f=u*r;return s==="border-box"&&(f=f+i+o),l=Math.min(f,l),[l,u]}var Ng=function(){},VD=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},KD=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],qD=!!document.documentElement.currentStyle,GD=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=VD(KD,n),i=r.boxSizing;if(i==="")return null;qD&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},YD=GD;function Lg(e,t,n){var r=zD(n);C.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var XD=function(t){Lg(window,"resize",t)},JD=function(t){Lg(document.fonts,"loadingdone",t)},ZD=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],QD=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?Ng:a,l=t.onHeightChange,u=l===void 0?Ng:l,c=FD(t,ZD),f=c.value!==void 0,p=C.useRef(null),d=WD(p,n),v=C.useRef(0),h=C.useRef(),g=function(){var x=p.current,k=r&&h.current?h.current:YD(x);if(k){h.current=k;var S=HD(k,x.value||x.placeholder||"x",o,i),E=S[0],T=S[1];v.current!==E&&(v.current=E,x.style.setProperty("height",E+"px","important"),u(E,{rowHeight:T}))}},m=function(x){f||g(),s(x)};return C.useLayoutEffect(g),XD(g),JD(g),C.createElement("textarea",Nu({},c,{onChange:m,ref:d}))},e_=C.forwardRef(QD);const t_=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s})=>{const l=nm(c=>c.messageHistory),{input:u}=Ce.composer;return $.jsx(e_,{...u,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>o(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),o(`${r}
247
- `)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<l.length-1&&o(l[i+1]??""),a(Math.min(i+1,l.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),o(i===0?"":l[i-1]??""),a(Math.max(i-1,-1))))}})},n_=({disabled:e,setTextInput:t})=>{const[n,r]=A.useState(!1),i=A.useRef(null),{voiceButton:o}=Ce.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{i.current||(i.current=new a);const l=i.current;l&&(l.continuous=!0,l.onresult=u=>{var f,p,d;const c=((d=(p=(f=u.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(c??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return $.jsx(DP,{...o,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Fg=A.memo(A.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:o,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:u,...c},f)=>{const{composer:p}=Ce,d=n||r||!o,[v,h]=A.useState(""),[g,m]=A.useState(-1),b=Ai(N=>N.files),x=Ai(N=>N.setFiles),k=Ai(N=>N.deleteFile),S=Ai(N=>N.uploadFile),E=nm(N=>N.addMessageToHistory),T=!!v||b.filter(N=>N.status==="uploaded").length>0,L=()=>{const N=b.filter(K=>K.status==="uploaded");if(!N.length&&!v)return;const O=(N==null?void 0:N.map(K=>{const F=K.url,I=K.type;return{video:{type:"video",videoUrl:F},audio:{type:"audio",audioUrl:F},image:{type:"image",imageUrl:F}}[I]??{title:K.name,type:"file",fileUrl:F}}))??[];v&&O.push({type:"text",text:v});let M;O.length==1?M=O[0]:M={type:"bloc",items:O.map(F=>{const{type:I,...D}=F;return{type:I,payload:D}})},l==null||l(M),x([]),h(""),E(v),m(-1)};return r?null:$.jsxs($.Fragment,{children:[$.jsxs("div",{"data-disabled":d,...c,className:Ui(p.container.className,e),ref:f,children:[b.length>0&&$.jsx("div",{...p==null?void 0:p.fileContainer,children:b.map(N=>$.jsx(LD,{...N,removeFile:k},N.name))}),$.jsxs("div",{...p.inputContainer,children:[i&&$.jsx(ND,{disabled:d||!u,onFileSelected:N=>{u&&S(N,u)}}),$.jsx(t_,{inputRef:t,composerPlaceholder:a,composerDisabled:d,textInput:v,historyIndex:g,setTextInput:h,setHistoryIndex:m,sendComposerMessage:L}),!d&&$.jsxs($.Fragment,{children:[$.jsx(yP,{...p.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":T,onClick:()=>L()}),$.jsx(n_,{disabled:T,setTextInput:h})]})]})]}),$.jsx(cv,{allowedElements:["a","strong","code","em","p","span"],...p.footer,children:s})]})}));var Lu={exports:{}},Pa={exports:{}},De={};/** @license React v16.13.1
261
+ */var l_=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Tu=l_.join(","),xg=typeof Element>"u",Fi=xg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xa=!xg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},wa=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},u_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},c_=function(t,n,r){if(wa(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Tu));return n&&Fi.call(t,Tu)&&i.unshift(t),i=i.filter(r),i},f_=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var c=Fi.call(a,Tu);c&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},wg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||u_(t))&&!wg(t)?0:t.tabIndex},d_=function(t,n){var r=Sg(t);return r<0&&n&&!wg(t)?0:r},p_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Eg=function(t){return t.tagName==="INPUT"},h_=function(t){return Eg(t)&&t.type==="hidden"},v_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},m_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},g_=function(t){if(!t.name)return!0;var n=t.form||xa(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=m_(i,t.form);return!o||o===t},y_=function(t){return Eg(t)&&t.type==="radio"},b_=function(t){return y_(t)&&!g_(t)},x_=function(t){var n,r=t&&xa(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;r=xa(i),i=(u=r)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},kg=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},w_=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Fi.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Fi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=xa(t);if(l&&!l.shadowRoot&&i(l)===!0)return kg(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(x_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kg(t);return!1},S_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Fi.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},E_=function(t,n){return!(n.disabled||wa(n)||h_(n)||w_(n,t)||v_(n)||S_(n))},Cg=function(t,n){return!(b_(n)||Sg(n)<0||!E_(t,n))},k_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},C_=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=d_(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(p_).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},$u=function(t,n){n=n||{};var r;return n.getShadowRoot?r=f_([t],n.includeContainer,{filter:Cg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:k_}):r=c_(t,n.includeContainer,Cg.bind(null,n)),C_(r)};const Ou="ArrowUp",Sa="ArrowDown",Lr="ArrowLeft",Bi="ArrowRight";function Ea(e,t,n){return Math.floor(e/t)!==n}function zi(e,t){return t<0||t>=e.current.length}function Iu(e,t){return xt(e,{disabledIndices:t})}function Tg(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,u;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((u=a[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function T_(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,f=u;if(n.key===Ou){if(c&&ht(n),u===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:o,decrement:!0,disabledIndices:a}),i&&(u-o<s||f<0)){const p=u%o,d=l%o,v=l-(d-p);d===p?f=l:f=d>p?v:v-o}zi(e,f)&&(f=u)}if(n.key===Sa&&(c&&ht(n),u===-1?f=s:(f=xt(e,{startingIndex:u,amount:o,disabledIndices:a}),i&&u+o>l&&(f=xt(e,{startingIndex:u%o-o,amount:o,disabledIndices:a}))),zi(e,f)&&(f=u)),r==="both"){const p=Km(u/o);n.key===Bi&&(c&&ht(n),u%o!==o-1?(f=xt(e,{startingIndex:u,disabledIndices:a}),i&&Ea(f,o,p)&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u-u%o-1,disabledIndices:a})),Ea(f,o,p)&&(f=u)),n.key===Lr&&(c&&ht(n),u%o!==0?(f=xt(e,{startingIndex:u,disabledIndices:a,decrement:!0}),i&&Ea(f,o,p)&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a}))):i&&(f=xt(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:a})),Ea(f,o,p)&&(f=u));const d=Km(l/o)===p;zi(e,f)&&(i&&d?f=n.key===Lr?l:xt(e,{startingIndex:u-u%o-1,disabledIndices:a}):f=u)}return f}let $g=0;function On(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame($g);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():$g=requestAnimationFrame(o)}var st=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ka(){return ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ka.apply(this,arguments)}let Pu=!1,$_=0;const Og=()=>"floating-ui-"+$_++;function O_(){const[e,t]=k.useState(()=>Pu?Og():void 0);return st(()=>{e==null&&t(Og())},[]),k.useEffect(()=>{Pu||(Pu=!0)},[]),e}const Au=k.useId||O_;function I_(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const P_=k.createContext(null),A_=k.createContext(null),Ig=()=>{var e;return((e=k.useContext(P_))==null?void 0:e.id)||null},Ca=()=>k.useContext(A_);function Wi(e){return"data-floating-ui-"+e}function Un(e){const t=A.useRef(e);return st(()=>{t.current=e}),t}function R_(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function Fr(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function __(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),Fr(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let Br=new WeakMap,Ta=new WeakSet,$a={},Ru=0;const D_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Pg=e=>e&&(e.host||Pg(e.parentNode)),M_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Pg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function j_(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=M_(t,e),s=new Set,l=new Set(a),u=[];$a[i]||($a[i]=new WeakMap);const c=$a[i];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,v=>{if(s.has(v))p(v);else{const h=o?v.getAttribute(o):null,g=h!==null&&h!=="false",m=(Br.get(v)||0)+1,b=(c.get(v)||0)+1;Br.set(v,m),c.set(v,b),u.push(v),m===1&&g&&Ta.add(v),b===1&&v.setAttribute(i,""),!g&&o&&v.setAttribute(o,"true")}})}return Ru++,()=>{u.forEach(d=>{const v=(Br.get(d)||0)-1,h=(c.get(d)||0)-1;Br.set(d,v),c.set(d,h),v||(!Ta.has(d)&&o&&d.removeAttribute(o),Ta.delete(d)),h||d.removeAttribute(i)}),Ru--,Ru||(Br=new WeakMap,Br=new WeakMap,Ta=new WeakSet,$a={})}}function Ag(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Qt(e[0]).body;return j_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const _u=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Rg(e,t){const n=$u(e,_u());t==="prev"&&n.reverse();const r=n.indexOf(Bn(Qt(e)));return n.slice(r+1)[0]}function _g(){return Rg(document.body,"next")}function Dg(){return Rg(document.body,"prev")}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pt(n,r)}function N_(e){$u(e,_u()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function L_(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Du={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let F_;function Mg(e){e.key==="Tab"&&(e.target,clearTimeout(F_))}const Oa=k.forwardRef(function(t,n){const[r,i]=k.useState();st(()=>(Zm()&&i("button"),document.addEventListener("keydown",Mg),()=>{document.removeEventListener("keydown",Mg)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Wi("focus-guard")]:"",style:Du};return k.createElement("span",ka({},t,o))}),jg=k.createContext(null);function B_(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=k.useState(null),o=Au(),a=Ng(),s=k.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=k.useRef();return st(()=>()=>{r==null||r.remove()},[r,s]),st(()=>{if(l.current===s)return;l.current=s;const{id:u,root:c,portalContext:f,uniqueId:p}=s,d=u?document.getElementById(u):null,v=Wi("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(v,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!qt(h)&&(h=h.current),h=h||document.body;let g=null;u&&(g=document.createElement("div"),g.id=u,h.appendChild(g));const m=document.createElement("div");m.id=p,m.setAttribute(v,""),h=g||h,h.appendChild(m),i(m)}},[s]),r}function z_(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=B_({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),u=k.useRef(null),c=k.useRef(null),f=k.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return k.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(v){o&&Ui(v)&&(v.type==="focusin"?L_:N_)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),k.createElement(jg.Provider,{value:k.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&k.createElement(Oa,{"data-type":"outside",ref:l,onFocus:d=>{if(Ui(d,o)){var v;(v=c.current)==null||v.focus()}else{const h=Dg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&k.createElement("span",{"aria-owns":o.id,style:Du}),o&&er.createPortal(t,o),p&&o&&k.createElement(Oa,{"data-type":"outside",ref:u,onFocus:d=>{if(Ui(d,o)){var v;(v=f.current)==null||v.focus()}else{const h=_g()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Ng=()=>k.useContext(jg),W_=k.forwardRef(function(t,n){return k.createElement("button",ka({},t,{type:"button",ref:n,tabIndex:-1,style:Du}))});function U_(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:v,events:h,dataRef:g,elements:{domReference:m,floating:b}}=t,w=D_()?o:!0,C=Un(i),S=Un(a),E=Un(s),I=Ca(),L=Ng(),_=typeof a=="number"&&a<0,O=k.useRef(null),D=k.useRef(null),H=k.useRef(!1),F=k.useRef(null),j=k.useRef(!1),M=L!=null,W=m&&m.getAttribute("role")==="combobox"&&ng(m)&&_,G=k.useCallback(function($){return $===void 0&&($=b),$?$u($,_u()):[]},[b]),V=k.useCallback($=>{const N=G($);return C.current.map(x=>m&&x==="reference"?m:b&&x==="floating"?b:N).filter(Boolean).flat()},[m,b,C,G]);k.useEffect(()=>{if(r||!l)return;function $(x){if(x.key==="Tab"){Pt(b,Bn(Qt(b)))&&G().length===0&&!W&&ht(x);const B=V(),Y=tg(x);C.current[0]==="reference"&&Y===m&&(ht(x),x.shiftKey?On(B[B.length-1]):On(B[1])),C.current[1]==="floating"&&Y===b&&x.shiftKey&&(ht(x),On(B[0]))}}const N=Qt(b);return N.addEventListener("keydown",$),()=>{N.removeEventListener("keydown",$)}},[r,m,b,l,C,p,W,G,V]),k.useEffect(()=>{if(r||!c)return;function $(){j.current=!0,setTimeout(()=>{j.current=!1})}function N(x){const B=x.relatedTarget;queueMicrotask(()=>{const Y=!(Pt(m,B)||Pt(b,B)||Pt(B,b)||Pt(L==null?void 0:L.portalNode,B)||B!=null&&B.hasAttribute(Wi("focus-guard"))||I&&(Fr(I.nodesRef.current,d).find(K=>{var X,Z;return Pt((X=K.context)==null?void 0:X.elements.floating,B)||Pt((Z=K.context)==null?void 0:Z.elements.domReference,B)})||R_(I.nodesRef.current,d).find(K=>{var X,Z;return((X=K.context)==null?void 0:X.elements.floating)===B||((Z=K.context)==null?void 0:Z.elements.domReference)===B})));B&&Y&&!j.current&&B!==F.current&&(H.current=!0,v(!1,x))})}if(b&&_r(m))return m.addEventListener("focusout",N),m.addEventListener("pointerdown",$),!l&&b.addEventListener("focusout",N),()=>{m.removeEventListener("focusout",N),m.removeEventListener("pointerdown",$),!l&&b.removeEventListener("focusout",N)}},[r,m,b,l,d,I,L,v,c]),k.useEffect(()=>{var $;if(r)return;const N=Array.from((L==null||($=L.portalNode)==null?void 0:$.querySelectorAll("["+Wi("portal")+"]"))||[]);if(b){const x=[b,...N,O.current,D.current,C.current.includes("reference")||W?m:null].filter(Y=>Y!=null),B=l?Ag(x,w,!w):Ag(x);return()=>{B()}}},[r,m,b,l,C,L,W,w]),st(()=>{if(r||!b)return;const $=Qt(b),N=Bn($);queueMicrotask(()=>{const x=V(b),B=S.current,Y=(typeof B=="number"?x[B]:B.current)||b,K=Pt(b,N);!_&&!K&&f&&On(Y,{preventScroll:Y===b})})},[r,f,b,_,V,S]),st(()=>{if(r||!b)return;let $=!1;const N=Qt(b),x=Bn(N),B=g.current;F.current=x;function Y(K){if(K.type==="escapeKey"&&p.domReference.current&&(F.current=p.domReference.current),["referencePress","escapeKey"].includes(K.type))return;const X=K.data.returnFocus;typeof X=="object"?(H.current=!1,$=X.preventScroll):H.current=!X}return h.on("dismiss",Y),()=>{h.off("dismiss",Y);const K=Bn(N);(Pt(b,K)||I&&Fr(I.nodesRef.current,d).some(Z=>{var ee;return Pt((ee=Z.context)==null?void 0:ee.elements.floating,K)})||B.openEvent&&["click","mousedown"].includes(B.openEvent.type))&&p.domReference.current&&(F.current=p.domReference.current),E.current&&_r(F.current)&&!H.current&&On(F.current,{cancelPrevious:!1,preventScroll:$})}},[r,b,E,g,p,h,I,d]),st(()=>{if(!(r||!L))return L.setFocusManagerState({modal:l,closeOnFocusOut:c,open:f,onOpenChange:v,refs:p}),()=>{L.setFocusManagerState(null)}},[r,L,l,f,v,p,c]),st(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!_){const $=()=>{const x=b.getAttribute("tabindex");C.current.includes("floating")||Bn(Qt(b))!==p.domReference.current&&G().length===0?x!=="0"&&b.setAttribute("tabindex","0"):x!=="-1"&&b.setAttribute("tabindex","-1")};$();const N=new MutationObserver($);return N.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}}},[r,b,p,C,G,_]);function R($){return r||!u||!l?null:k.createElement(W_,{ref:$==="start"?O:D,onClick:N=>v(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const y=!r&&w&&!W&&(M||l);return k.createElement(k.Fragment,null,y&&k.createElement(Oa,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:$=>{if(l){const x=V();On(i[0]==="reference"?x[0]:x[x.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(H.current=!1,Ui($,L.portalNode)){const x=_g()||m;x==null||x.focus()}else{var N;(N=L.beforeOutsideRef.current)==null||N.focus()}}}),!W&&R("start"),n,R("end"),y&&k.createElement(Oa,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:$=>{if(l)On(V()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(c&&(H.current=!0),Ui($,L.portalNode)){const x=Dg()||m;x==null||x.focus()}else{var N;(N=L.afterOutsideRef.current)==null||N.focus()}}}))}function Lg(e){return _r(e.target)&&e.target.tagName==="BUTTON"}function Fg(e){return ng(e)}function H_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,f=k.useRef(),p=k.useRef(!1);return k.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(eg(f.current)&&u||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}eg(f.current)&&u||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||Lg(d))&&(d.key===" "&&!Fg(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||Lg(d)||Fg(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,u,c,o,l,n,r])}const V_=k.useInsertionEffect||(e=>e());function Hn(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return V_(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const q_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},K_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},G_=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Y_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:m}=t,b=Ca(),w=Ig()!=null,C=Hn(typeof p=="function"?p:()=>!1),S=typeof p=="function"?C:p,E=k.useRef(!1),{escapeKeyBubbles:I,outsidePressBubbles:L}=G_(m),_=Hn(D=>{if(!n||!c||!f||D.key!=="Escape")return;const H=b?Fr(b.nodesRef.current,o):[];if(!I&&(D.stopPropagation(),H.length>0)){let F=!0;if(H.forEach(j=>{var M;if((M=j.context)!=null&&M.open&&!j.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,kR(D)?D.nativeEvent:D)}),O=Hn(D=>{const H=E.current;if(E.current=!1,H||typeof S=="function"&&!S(D))return;const F=tg(D),j="["+Wi("inert")+"]",M=Qt(l).querySelectorAll(j);let W=qt(F)?F:null;for(;W&&!bR(W);){const R=wR(W);if(R===Qt(l).body||!qt(R))break;W=R}if(M.length&&qt(F)&&!CR(F)&&!Pt(F,l)&&Array.from(M).every(R=>!Pt(W,R)))return;if(_r(F)&&l){const R=F.clientWidth>0&&F.scrollWidth>F.clientWidth,y=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let $=y&&D.offsetX>F.clientWidth;if(y&&xR(F).direction==="rtl"&&($=D.offsetX<=F.offsetWidth-F.clientWidth),$||R&&D.offsetY>F.clientHeight)return}const G=b&&Fr(b.nodesRef.current,o).some(R=>{var y;return gu(D,(y=R.context)==null?void 0:y.elements.floating)});if(gu(D,l)||gu(D,s)||G)return;const V=b?Fr(b.nodesRef.current,o):[];if(V.length>0){let R=!0;if(V.forEach(y=>{var $;if(($=y.context)!=null&&$.open&&!y.context.dataRef.current.__outsidePressBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Jm(D)||Qm(D)}}),r(!1,D)});return k.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=I,u.current.__outsidePressBubbles=L;function D(j){r(!1,j)}const H=Qt(l);f&&H.addEventListener("keydown",_),S&&H.addEventListener(d,O);let F=[];return g&&(qt(s)&&(F=Wn(s)),qt(l)&&(F=F.concat(Wn(l))),!qt(a)&&a&&a.contextElement&&(F=F.concat(Wn(a.contextElement)))),F=F.filter(j=>{var M;return j!==((M=H.defaultView)==null?void 0:M.visualViewport)}),F.forEach(j=>{j.addEventListener("scroll",D,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",_),S&&H.removeEventListener(d,O),F.forEach(j=>{j.removeEventListener("scroll",D)})}},[u,l,s,a,f,S,d,n,r,g,c,I,L,_,O]),k.useEffect(()=>{E.current=!1},[S,d]),k.useMemo(()=>c?{reference:{onKeyDown:_,[q_[h]]:D=>{v&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,D.nativeEvent))}},floating:{onKeyDown:_,[K_[d]]:()=>{E.current=!0}}}:{},[c,i,v,d,h,r,_])}let Mu;process.env.NODE_ENV!=="production"&&(Mu=new Set);function X_(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const I="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!qt(e.elements.reference)){var a;if(!((a=Mu)!=null&&a.has(I))){var s;(s=Mu)==null||s.add(I),console.error(I)}}}const[l,u]=k.useState(null),c=((t=e.elements)==null?void 0:t.reference)||l,f=i_(e),p=Ca(),d=Hn((I,L)=>{I&&(h.current.openEvent=L),r==null||r(I,L)}),v=k.useRef(null),h=k.useRef({}),g=k.useState(()=>I_())[0],m=Au(),b=k.useCallback(I=>{const L=qt(I)?{getBoundingClientRect:()=>I.getBoundingClientRect(),contextElement:I}:I;f.refs.setReference(L)},[f.refs]),w=k.useCallback(I=>{(qt(I)||I===null)&&(v.current=I,u(I)),(qt(f.refs.reference.current)||f.refs.reference.current===null||I!==null&&!qt(I))&&f.refs.setReference(I)},[f.refs]),C=k.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),S=k.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=k.useMemo(()=>({...f,refs:C,elements:S,dataRef:h,nodeId:i,floatingId:m,events:g,open:n,onOpenChange:d}),[f,i,m,g,n,d,C,S]);return st(()=>{const I=p==null?void 0:p.nodesRef.current.find(L=>L.id===i);I&&(I.context=E)}),k.useMemo(()=>({...f,context:E,refs:C,elements:S}),[f,C,S,E])}function ju(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[s]=l}),i),{})}}function J_(e){e===void 0&&(e=[]);const t=e,n=k.useCallback(o=>ju(o,e,"reference"),t),r=k.useCallback(o=>ju(o,e,"floating"),t),i=k.useCallback(o=>ju(o,e,"item"),e.map(o=>o==null?void 0:o.item));return k.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Bg=!1;function Ia(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zg(e,t){return Ia(t,e===Ou||e===Sa,e===Lr||e===Bi)}function Nu(e,t,n){return Ia(t,e===Sa,n?e===Lr:e===Bi)||e==="Enter"||e==" "||e===""}function Q_(e,t,n){return Ia(t,n?e===Lr:e===Bi,e===Sa)}function Wg(e,t,n){return Ia(t,n?e===Bi:e===Lr,e===Ou)}function Z_(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:v=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:I=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const _=Ig(),O=Ca(),D=Hn(u),H=k.useRef(m),F=k.useRef(f??-1),j=k.useRef(null),M=k.useRef(!0),W=k.useRef(D),G=k.useRef(!!a),V=k.useRef(!1),R=k.useRef(!1),y=Un(C),$=Un(n),N=Un(I),[x,B]=k.useState(),[Y,K]=k.useState(),X=Hn(function(J,Q,q){q===void 0&&(q=!1);const ie=J.current[Q.current];ie&&(g?(B(ie.id),O==null||O.events.emit("virtualfocus",ie),L&&(L.current=ie)):On(ie,{preventScroll:!0,sync:ER()&&Zm()?Bg||V.current:!1}),requestAnimationFrame(()=>{const le=N.current;le&&ie&&(q||!M.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le))}))});st(()=>{document.createElement("div").focus({get preventScroll(){return Bg=!0,!1}})},[]),st(()=>{c&&(n&&a?H.current&&f!=null&&(R.current=!0,D(f)):G.current&&(F.current=-1,W.current(null)))},[c,n,a,f,D]),st(()=>{if(c&&n&&a)if(l==null){if(V.current=!1,f!=null)return;if(G.current&&(F.current=-1,X(s,F)),!G.current&&H.current&&(j.current!=null||H.current===!0&&j.current==null)){let J=0;const Q=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Q),J++):(F.current=j.current==null||Nu(j.current,S,h)||v?Iu(s,y.current):Tg(s,y.current),j.current=null,D(F.current))};Q()}}else zi(s,l)||(F.current=l,X(s,F,R.current),R.current=!1)},[c,n,a,l,f,v,s,S,h,D,X,y]),st(()=>{var J,Q;if(!c||a||!O||g||!G.current)return;const q=O.nodesRef.current,ie=(J=q.find(ae=>ae.id===_))==null||(Q=J.context)==null?void 0:Q.elements.floating,le=Bn(Qt(a)),de=q.some(ae=>ae.context&&Pt(ae.context.elements.floating,le));ie&&!de&&M.current&&ie.focus({preventScroll:!0})},[c,a,O,_,g]),st(()=>{if(!c||!O||!g||_)return;function J(Q){K(Q.id),L&&(L.current=Q)}return O.events.on("virtualfocus",J),()=>{O.events.off("virtualfocus",J)}},[c,O,g,_,L]),st(()=>{W.current=D,G.current=!!a}),st(()=>{n||(j.current=null)},[n]);const Z=l!=null,ee=k.useMemo(()=>{function J(q){if(!n)return;const ie=s.current.indexOf(q);ie!==-1&&D(ie)}return{onFocus(q){let{currentTarget:ie}=q;J(ie)},onClick:q=>{let{currentTarget:ie}=q;return ie.focus({preventScroll:!0})},...b&&{onMouseMove(q){let{currentTarget:ie}=q;J(ie)},onPointerLeave(q){let{pointerType:ie}=q;!M.current||ie==="touch"||(F.current=-1,X(s,F),D(null),g||On(i.floating.current,{preventScroll:!0}))}}}},[n,i,X,b,s,D,g]);return k.useMemo(()=>{if(!c)return{};const J=y.current;function Q(ae){if(M.current=!1,V.current=!0,!$.current&&ae.currentTarget===i.floating.current)return;if(v&&Wg(ae.key,S,h)){ht(ae),r(!1,ae.nativeEvent),_r(o)&&!g&&o.focus();return}const ve=F.current,Te=Iu(s,J),Ae=Tg(s,J);if(ae.key==="Home"&&(ht(ae),F.current=Te,D(F.current)),ae.key==="End"&&(ht(ae),F.current=Ae,D(F.current)),!(E>1&&(F.current=T_(s,{event:ae,orientation:S,loop:d,cols:E,disabledIndices:J,minIndex:Te,maxIndex:Ae,prevIndex:F.current,stopEvent:!0}),D(F.current),S==="both"))&&zg(ae.key,S)){if(ht(ae),n&&!g&&Bn(ae.currentTarget.ownerDocument)===ae.currentTarget){F.current=Nu(ae.key,S,h)?Te:Ae,D(F.current);return}Nu(ae.key,S,h)?d?F.current=ve>=Ae?p&&ve!==s.current.length?-1:Te:xt(s,{startingIndex:ve,disabledIndices:J}):F.current=Math.min(Ae,xt(s,{startingIndex:ve,disabledIndices:J})):d?F.current=ve<=Te?p&&ve!==-1?s.current.length:Ae:xt(s,{startingIndex:ve,decrement:!0,disabledIndices:J}):F.current=Math.max(Te,xt(s,{startingIndex:ve,decrement:!0,disabledIndices:J})),zi(s,F.current)?D(null):D(F.current)}}function q(ae){m==="auto"&&Jm(ae.nativeEvent)&&(H.current=!0)}function ie(ae){H.current=m,m==="auto"&&Qm(ae.nativeEvent)&&(H.current=!0)}const le=g&&n&&Z&&{"aria-activedescendant":Y||x},de=s.current.find(ae=>(ae==null?void 0:ae.id)===x);return{reference:{...le,onKeyDown(ae){M.current=!1;const ve=ae.key.indexOf("Arrow")===0,Te=Q_(ae.key,S,h),Ae=Wg(ae.key,S,h),rt=zg(ae.key,S),Et=(v?Te:rt)||ae.key==="Enter"||ae.key.trim()==="";if(g&&n){const ce=O==null?void 0:O.nodesRef.current.find(z=>z.parentId==null),U=O&&ce?__(O.nodesRef.current,ce.id):null;if(ve&&U&&L){const z=new KeyboardEvent("keydown",{key:ae.key,bubbles:!0});if(Te||Ae){var kt,Ct;const ne=((kt=U.context)==null?void 0:kt.elements.domReference)===ae.currentTarget,se=Ae&&!ne?(Ct=U.context)==null?void 0:Ct.elements.domReference:Te?de:null;se&&(ht(ae),se.dispatchEvent(z),K(void 0))}if(rt&&U.context&&U.context.open&&U.parentId&&ae.currentTarget!==U.context.elements.domReference){var oe;ht(ae),(oe=U.context.elements.domReference)==null||oe.dispatchEvent(z);return}}return Q(ae)}if(!(!n&&!w&&ve)){if(Et&&(j.current=v&&rt?null:ae.key),v){Te&&(ht(ae),n?(F.current=Iu(s,J),D(F.current)):r(!0,ae.nativeEvent));return}rt&&(f!=null&&(F.current=f),ht(ae),!n&&w?r(!0,ae.nativeEvent):Q(ae),n&&D(F.current))}},onFocus(){n&&D(null)},onPointerDown:ie,onMouseDown:q,onClick:q},floating:{"aria-orientation":S==="both"?void 0:S,...le,onKeyDown:Q,onPointerMove(){M.current=!0}},item:ee}},[o,i,x,Y,y,$,s,c,S,h,g,n,Z,v,f,w,p,E,d,m,D,r,ee,O,L])}function eD(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=Au();return k.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function tD(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,v=k.useRef(),h=k.useRef(""),g=k.useRef((n=d??a)!=null?n:-1),m=k.useRef(null),b=Hn(s),w=Hn(l),C=Un(c),S=Un(p);return st(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),st(()=>{if(r&&h.current===""){var E;g.current=(E=d??a)!=null?E:-1}},[r,d,a]),k.useMemo(()=>{if(!u)return{};function E(_){_?i.current.typing||(i.current.typing=_,w(_)):i.current.typing&&(i.current.typing=_,w(_))}function I(_,O,D){const H=C.current?C.current(O,D):O.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return H?_.indexOf(H):-1}function L(_){const O=o.current;if(h.current.length>0&&h.current[0]!==" "&&(I(O,O,h.current)===-1?E(!1):_.key===" "&&ht(_)),O==null||S.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(ht(_),E(!0)),O.every(j=>{var M,W;return j?((M=j[0])==null?void 0:M.toLocaleLowerCase())!==((W=j[1])==null?void 0:W.toLocaleLowerCase()):!0})&&h.current===_.key&&(h.current="",g.current=m.current),h.current+=_.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,E(!1)},f);const H=g.current,F=I(O,[...O.slice((H||0)+1),...O.slice(0,(H||0)+1)],h.current);F!==-1?(b(F),m.current=F):_.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(_){_.key===" "&&E(!1)}}}},[u,r,i,o,f,S,C,b,w])}const nD=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var j,M,W,G,V;const i=oa(R=>R.messageContainerRef),[o,a]=k.useState(!1),[s,l]=k.useState(null),[u,c]=k.useState(null),{message:{blocks:{dropdown:f}}}=we,p=e.reduce((R,y)=>(R[y.label]=y.value,R),{}),d=p?Object.keys(p):[],v=R=>{a(u!==null&&!t?!1:R)},{refs:h,floatingStyles:g,context:m}=X_({placement:"bottom-start",open:o,onOpenChange:v,whileElementsMounted:ZR,middleware:[o_(5),a_({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),s_({apply({rects:R,elements:y,availableHeight:$}){Object.assign(y.floating.style,{maxHeight:`${$}px`,minWidth:`${R.reference.width}px`})},padding:10})]}),b=k.useRef([]),w=k.useRef(d),C=k.useRef(!1),S=H_(m,{event:"mousedown"}),E=Y_(m),I=eD(m,{role:"listbox"}),L=Z_(m,{listRef:b,activeIndex:s,selectedIndex:u,onNavigate:l,loop:!0}),_=tD(m,{listRef:w,activeIndex:s,selectedIndex:u,onMatch:o?l:c,onTypingChange(R){C.current=R}}),{getReferenceProps:O,getFloatingProps:D,getItemProps:H}=J_([E,I,L,_,S]),F=R=>{c(R),d[R]!==void 0&&(n==null||n({type:"text",text:d[R]??"",value:p[d[R]]??""})),a(!1)};return T.jsxs(T.Fragment,{children:[T.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(j=f.button)==null?void 0:j.container,...O(),children:[T.jsx("span",{...(M=f.button)==null?void 0:M.text,children:u?d[u]:"Select..."}),T.jsx(BP,{...(W=f.button)==null?void 0:W.icon})]}),o&&T.jsx(z_,{children:T.jsx(U_,{context:m,modal:!1,children:T.jsx("div",{ref:h.setFloating,className:(V=(G=f.content)==null?void 0:G.container)==null?void 0:V.className,style:{...g},...D(),children:d.map((R,y)=>{var $;return T.jsx("div",{ref:N=>{b.current[y]=N},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===u&&y===s,"data-active":y===s?"":void 0,...($=f.content)==null?void 0:$.item,...H({onClick(){F(y)},onKeyDown(N){N.key==="Enter"&&(N.preventDefault(),F(y)),N.key===" "&&!C.current&&(N.preventDefault(),F(y))}}),children:R},R)})})})})]})},Ug=A.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=we;return T.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[T.jsx("p",{...o.title,children:e||t}),T.jsx(qP,{...o.icon})]})});Ug.displayName="File";const rD=or()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(u=>u.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(u=>({components:{...u.components,[n]:l}})),l}}));globalThis.React=A;const Hg={audio:Dm,bubble:Om,button:MA,carousel:qm,column:jm,dropdown:nD,file:Ug,image:Rm,location:Mm,row:Nm,text:cA,video:_m,custom:({url:e,name:t,data:n,...r})=>{const i=rD(u=>u.getCustomComponent),[o,a]=A.useState(null),[s,l]=A.useState(null);return A.useEffect(()=>{i(e).then(a).catch(u=>{l(u.message)})},[e]),s?T.jsx("div",{style:{color:"red"},children:s}):o?T.jsx(o,{...n,...r}):null}},lr=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Hg[e.type],i={...n,...e};return T.jsx(r,{...i})};function Vg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Vg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vg(e))&&(r&&(r+=" "),r+=t);return r}const iD=({disabled:e,onFileSelected:t})=>{const n=A.useRef(null),{uploadButton:r}=we.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return T.jsxs(T.Fragment,{children:[T.jsx(nA,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),T.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},oD=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:u}=we.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(Aa(e)),f=A.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?T.jsx(Pa,{name:e,status:r,removeButton:T.jsx("div",{...o}),extension:Aa(e),children:T.jsx("div",{...a.container,children:T.jsx(Lu,{type:t,...a.icon})})}):r==="error"?T.jsx(Pa,{name:e,status:r,removeButton:T.jsx(qg,{removeFile:()=>i(e)}),extension:"Upload Error",children:T.jsxs("div",{...a.container,children:[T.jsx(UP,{...l}),T.jsx(Lu,{type:t,...a.icon})]})}):r=="uploaded"&&c?T.jsx(Pa,{name:e,status:r,removeButton:T.jsx(qg,{removeFile:()=>i(e)}),extension:Aa(e),children:T.jsx("div",{...a.container,children:T.jsx("img",{src:f,alt:e,...u})})}):T.jsx(Pa,{name:e,status:r,removeButton:T.jsx(tm,{onClick:()=>i(e),...s}),extension:Aa(e),children:T.jsx("div",{...a.container,children:T.jsx(Lu,{type:t,...a.icon})})})},Pa=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=we.composer.fileWidget;return T.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,T.jsxs("div",{...a.container,children:[T.jsx("div",{...a.name,children:e}),T.jsx("div",{...a.type,children:i})]})]})},Lu=({type:e,...t})=>e==="image"?T.jsx(YP,{...t}):e==="video"?T.jsx(aA,{...t}):e==="audio"?T.jsx(sA,{...t}):T.jsx(nm,{...t}),Aa=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},qg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=we;return T.jsx(tm,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(null,arguments)}function aD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var sD=A.useLayoutEffect,lD=function(t){var n=k.useRef(t);return sD(function(){n.current=t}),n},Kg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},uD=function(t,n){var r=A.useRef();return A.useCallback(function(i){t.current=i,r.current&&Kg(r.current,null),r.current=n,n&&Kg(n,i)},[n])},Gg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},cD=function(t){Object.keys(Gg).forEach(function(n){t.style.setProperty(n,Gg[n],"important")})},Yg=cD,$t=null,Xg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function fD(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),$t||($t=document.createElement("textarea"),$t.setAttribute("tabindex","-1"),$t.setAttribute("aria-hidden","true"),Yg($t)),$t.parentNode===null&&document.body.appendChild($t);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;$t.style[d]=a[d]}),Yg($t),$t.value=t;var l=Xg($t,e);$t.value=t,l=Xg($t,e),$t.value="x";var u=$t.scrollHeight-i,c=u*n;s==="border-box"&&(c=c+i+o),l=Math.max(c,l);var f=u*r;return s==="border-box"&&(f=f+i+o),l=Math.min(f,l),[l,u]}var Jg=function(){},dD=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},pD=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],hD=!!document.documentElement.currentStyle,vD=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=dD(pD,n),i=r.boxSizing;if(i==="")return null;hD&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},mD=vD;function Qg(e,t,n){var r=lD(n);k.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var gD=function(t){Qg(window,"resize",t)},yD=function(t){Qg(document.fonts,"loadingdone",t)},bD=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],xD=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?Jg:a,l=t.onHeightChange,u=l===void 0?Jg:l,c=aD(t,bD),f=c.value!==void 0,p=k.useRef(null),d=uD(p,n),v=k.useRef(0),h=k.useRef(),g=function(){var w=p.current,C=r&&h.current?h.current:mD(w);if(C){h.current=C;var S=fD(C,w.value||w.placeholder||"x",o,i),E=S[0],I=S[1];v.current!==E&&(v.current=E,w.style.setProperty("height",E+"px","important"),u(E,{rowHeight:I}))}},m=function(w){f||g(),s(w)};return k.useLayoutEffect(g),gD(g),yD(g),k.createElement("textarea",Fu({},c,{onChange:m,ref:d}))},wD=k.forwardRef(xD);const SD=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s})=>{const l=hm(c=>c.messageHistory),{input:u}=we.composer;return T.jsx(wD,{...u,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>o(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),o(`${r}
262
+ `)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<l.length-1&&o(l[i+1]??""),a(Math.min(i+1,l.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),o(i===0?"":l[i-1]??""),a(Math.max(i-1,-1))))}})},ED=({disabled:e,setTextInput:t})=>{const[n,r]=A.useState(!1),i=A.useRef(null),{voiceButton:o}=we.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{i.current||(i.current=new a);const l=i.current;l&&(l.continuous=!0,l.onresult=u=>{var f,p,d;const c=((d=(p=(f=u.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(c??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return T.jsx(ZP,{...o,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Zg=A.memo(A.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:o,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:u,...c},f)=>{const{composer:p}=we,d=n||r||!o,[v,h]=A.useState(""),[g,m]=A.useState(-1),b=Ri(_=>_.files),w=Ri(_=>_.setFiles),C=Ri(_=>_.deleteFile),S=Ri(_=>_.uploadFile),E=hm(_=>_.addMessageToHistory),I=!!v||b.filter(_=>_.status==="uploaded").length>0,L=()=>{const _=b.filter(H=>H.status==="uploaded");if(!_.length&&!v)return;const O=(_==null?void 0:_.map(H=>{const F=H.url,j=H.type;return{video:{type:"video",videoUrl:F},audio:{type:"audio",audioUrl:F},image:{type:"image",imageUrl:F}}[j]??{title:H.name,type:"file",fileUrl:F}}))??[];v&&O.push({type:"text",text:v});let D;O.length==1?D=O[0]:D={type:"bloc",items:O.map(F=>{const{type:j,...M}=F;return{type:j,payload:M}})},l==null||l(D),w([]),h(""),E(v),m(-1)};return r?null:T.jsxs(T.Fragment,{children:[T.jsxs("div",{"data-disabled":d,...c,className:zr(p.container.className,e),ref:f,children:[b.length>0&&T.jsx("div",{...p==null?void 0:p.fileContainer,children:b.map(_=>T.jsx(oD,{..._,removeFile:C},_.name))}),T.jsxs("div",{...p.inputContainer,children:[i&&T.jsx(iD,{disabled:d||!u,onFileSelected:_=>{u&&S(_,u)}}),T.jsx(SD,{inputRef:t,composerPlaceholder:a,composerDisabled:d,textInput:v,historyIndex:g,setTextInput:h,setHistoryIndex:m,sendComposerMessage:L}),!d&&T.jsxs(T.Fragment,{children:[T.jsx(LP,{...p.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":I,onClick:()=>L()}),T.jsx(ED,{disabled:I,setTextInput:h})]})]})]}),T.jsx(wv,{components:{a:({node:_,...O})=>T.jsx("a",{...O,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...p.footer,children:s})]})}));var Bu={exports:{}},Ra={exports:{}},_e={};/** @license React v16.13.1
248
263
  * react-is.production.min.js
249
264
  *
250
265
  * Copyright (c) Facebook, Inc. and its affiliates.
251
266
  *
252
267
  * This source code is licensed under the MIT license found in the
253
268
  * LICENSE file in the root directory of this source tree.
254
- */var Bg;function r_(){if(Bg)return De;Bg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case u:case r:case o:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case v:case d:case a:return S;default:return E}}case n:return E}}}function k(S){return x(S)===u}return De.AsyncMode=l,De.ConcurrentMode=u,De.ContextConsumer=s,De.ContextProvider=a,De.Element=t,De.ForwardRef=c,De.Fragment=r,De.Lazy=v,De.Memo=d,De.Portal=n,De.Profiler=o,De.StrictMode=i,De.Suspense=f,De.isAsyncMode=function(S){return k(S)||x(S)===l},De.isConcurrentMode=k,De.isContextConsumer=function(S){return x(S)===s},De.isContextProvider=function(S){return x(S)===a},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},De.isForwardRef=function(S){return x(S)===c},De.isFragment=function(S){return x(S)===r},De.isLazy=function(S){return x(S)===v},De.isMemo=function(S){return x(S)===d},De.isPortal=function(S){return x(S)===n},De.isProfiler=function(S){return x(S)===o},De.isStrictMode=function(S){return x(S)===i},De.isSuspense=function(S){return x(S)===f},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===o||S===i||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===v||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===c||S.$$typeof===g||S.$$typeof===m||S.$$typeof===b||S.$$typeof===h)},De.typeOf=x,De}var _e={};/** @license React v16.13.1
269
+ */var ey;function kD(){if(ey)return _e;ey=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case u:case r:case o:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case v:case d:case a:return S;default:return E}}case n:return E}}}function C(S){return w(S)===u}return _e.AsyncMode=l,_e.ConcurrentMode=u,_e.ContextConsumer=s,_e.ContextProvider=a,_e.Element=t,_e.ForwardRef=c,_e.Fragment=r,_e.Lazy=v,_e.Memo=d,_e.Portal=n,_e.Profiler=o,_e.StrictMode=i,_e.Suspense=f,_e.isAsyncMode=function(S){return C(S)||w(S)===l},_e.isConcurrentMode=C,_e.isContextConsumer=function(S){return w(S)===s},_e.isContextProvider=function(S){return w(S)===a},_e.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},_e.isForwardRef=function(S){return w(S)===c},_e.isFragment=function(S){return w(S)===r},_e.isLazy=function(S){return w(S)===v},_e.isMemo=function(S){return w(S)===d},_e.isPortal=function(S){return w(S)===n},_e.isProfiler=function(S){return w(S)===o},_e.isStrictMode=function(S){return w(S)===i},_e.isSuspense=function(S){return w(S)===f},_e.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===o||S===i||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===v||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===c||S.$$typeof===g||S.$$typeof===m||S.$$typeof===b||S.$$typeof===h)},_e.typeOf=w,_e}var De={};/** @license React v16.13.1
255
270
  * react-is.development.js
256
271
  *
257
272
  * Copyright (c) Facebook, Inc. and its affiliates.
258
273
  *
259
274
  * This source code is licensed under the MIT license found in the
260
275
  * LICENSE file in the root directory of this source tree.
261
- */var zg;function i_(){return zg||(zg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(V){return typeof V=="string"||typeof V=="function"||V===r||V===u||V===o||V===i||V===f||V===p||typeof V=="object"&&V!==null&&(V.$$typeof===v||V.$$typeof===d||V.$$typeof===a||V.$$typeof===s||V.$$typeof===c||V.$$typeof===g||V.$$typeof===m||V.$$typeof===b||V.$$typeof===h)}function k(V){if(typeof V=="object"&&V!==null){var ie=V.$$typeof;switch(ie){case t:var le=V.type;switch(le){case l:case u:case r:case o:case i:case f:return le;default:var de=le&&le.$$typeof;switch(de){case s:case c:case v:case d:case a:return de;default:return ie}}case n:return ie}}}var S=l,E=u,T=s,L=a,N=t,O=c,M=r,K=v,F=d,I=n,D=o,j=i,G=f,U=!1;function R(V){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(V)||k(V)===l}function y(V){return k(V)===u}function _(V){return k(V)===s}function z(V){return k(V)===a}function w(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function H(V){return k(V)===c}function X(V){return k(V)===r}function q(V){return k(V)===v}function Y(V){return k(V)===d}function Q(V){return k(V)===n}function ee(V){return k(V)===o}function J(V){return k(V)===i}function Z(V){return k(V)===f}_e.AsyncMode=S,_e.ConcurrentMode=E,_e.ContextConsumer=T,_e.ContextProvider=L,_e.Element=N,_e.ForwardRef=O,_e.Fragment=M,_e.Lazy=K,_e.Memo=F,_e.Portal=I,_e.Profiler=D,_e.StrictMode=j,_e.Suspense=G,_e.isAsyncMode=R,_e.isConcurrentMode=y,_e.isContextConsumer=_,_e.isContextProvider=z,_e.isElement=w,_e.isForwardRef=H,_e.isFragment=X,_e.isLazy=q,_e.isMemo=Y,_e.isPortal=Q,_e.isProfiler=ee,_e.isStrictMode=J,_e.isSuspense=Z,_e.isValidElementType=x,_e.typeOf=k}()),_e}var Wg;function Aa(){return Wg||(Wg=1,process.env.NODE_ENV==="production"?Pa.exports=r_():Pa.exports=i_()),Pa.exports}/*
276
+ */var ty;function CD(){return ty||(ty=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(q){return typeof q=="string"||typeof q=="function"||q===r||q===u||q===o||q===i||q===f||q===p||typeof q=="object"&&q!==null&&(q.$$typeof===v||q.$$typeof===d||q.$$typeof===a||q.$$typeof===s||q.$$typeof===c||q.$$typeof===g||q.$$typeof===m||q.$$typeof===b||q.$$typeof===h)}function C(q){if(typeof q=="object"&&q!==null){var ie=q.$$typeof;switch(ie){case t:var le=q.type;switch(le){case l:case u:case r:case o:case i:case f:return le;default:var de=le&&le.$$typeof;switch(de){case s:case c:case v:case d:case a:return de;default:return ie}}case n:return ie}}}var S=l,E=u,I=s,L=a,_=t,O=c,D=r,H=v,F=d,j=n,M=o,W=i,G=f,V=!1;function R(q){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(q)||C(q)===l}function y(q){return C(q)===u}function $(q){return C(q)===s}function N(q){return C(q)===a}function x(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function B(q){return C(q)===c}function Y(q){return C(q)===r}function K(q){return C(q)===v}function X(q){return C(q)===d}function Z(q){return C(q)===n}function ee(q){return C(q)===o}function J(q){return C(q)===i}function Q(q){return C(q)===f}De.AsyncMode=S,De.ConcurrentMode=E,De.ContextConsumer=I,De.ContextProvider=L,De.Element=_,De.ForwardRef=O,De.Fragment=D,De.Lazy=H,De.Memo=F,De.Portal=j,De.Profiler=M,De.StrictMode=W,De.Suspense=G,De.isAsyncMode=R,De.isConcurrentMode=y,De.isContextConsumer=$,De.isContextProvider=N,De.isElement=x,De.isForwardRef=B,De.isFragment=Y,De.isLazy=K,De.isMemo=X,De.isPortal=Z,De.isProfiler=ee,De.isStrictMode=J,De.isSuspense=Q,De.isValidElementType=w,De.typeOf=C}()),De}var ny;function _a(){return ny||(ny=1,process.env.NODE_ENV==="production"?Ra.exports=kD():Ra.exports=CD()),Ra.exports}/*
262
277
  object-assign
263
278
  (c) Sindre Sorhus
264
279
  @license MIT
265
- */var Fu,Ug;function Hg(){if(Ug)return Fu;Ug=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(c){return a[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fu=i()?Object.assign:function(o,a){for(var s,l=r(o),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var p=0;p<u.length;p++)n.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},Fu}var Bu,Vg;function zu(){if(Vg)return Bu;Vg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bu=e,Bu}var Wu,Kg;function qg(){return Kg||(Kg=1,Wu=Function.call.bind(Object.prototype.hasOwnProperty)),Wu}var Uu,Gg;function o_(){if(Gg)return Uu;Gg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zu(),n={},r=qg();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Uu=i,Uu}var Hu,Yg;function a_(){if(Yg)return Hu;Yg=1;var e=Aa(),t=Hg(),n=zu(),r=qg(),i=o_(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Hu=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(y){var _=y&&(u&&y[u]||y[c]);if(typeof _=="function")return _}var p="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:x,element:k(),elementType:S(),instanceOf:E,node:O(),objectOf:L,oneOf:T,oneOfType:N,shape:K,exact:F};function v(y,_){return y===_?y!==0||1/y===1/_:y!==y&&_!==_}function h(y,_){this.message=y,this.data=_&&typeof _=="object"?_:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var _={},z=0;function w(X,q,Y,Q,ee,J,Z){if(Q=Q||p,J=J||Y,Z!==n){if(l){var V=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw V.name="Invariant Violation",V}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=Q+":"+Y;!_[ie]&&z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),_[ie]=!0,z++)}}return q[Y]==null?X?q[Y]===null?new h("The "+ee+" `"+J+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+ee+" `"+J+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:y(q,Y,Q,ee,J)}var H=w.bind(null,!1);return H.isRequired=w.bind(null,!0),H}function m(y){function _(z,w,H,X,q,Y){var Q=z[w],ee=j(Q);if(ee!==y){var J=G(Q);return new h("Invalid "+X+" `"+q+"` of type "+("`"+J+"` supplied to `"+H+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g(_)}function b(){return g(a)}function x(y){function _(z,w,H,X,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var Y=z[w];if(!Array.isArray(Y)){var Q=j(Y);return new h("Invalid "+X+" `"+q+"` of type "+("`"+Q+"` supplied to `"+H+"`, expected an array."))}for(var ee=0;ee<Y.length;ee++){var J=y(Y,ee,H,X,q+"["+ee+"]",n);if(J instanceof Error)return J}return null}return g(_)}function k(){function y(_,z,w,H,X){var q=_[z];if(!s(q)){var Y=j(q);return new h("Invalid "+H+" `"+X+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected a single ReactElement."))}return null}return g(y)}function S(){function y(_,z,w,H,X){var q=_[z];if(!e.isValidElementType(q)){var Y=j(q);return new h("Invalid "+H+" `"+X+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected a single ReactElement type."))}return null}return g(y)}function E(y){function _(z,w,H,X,q){if(!(z[w]instanceof y)){var Y=y.name||p,Q=R(z[w]);return new h("Invalid "+X+" `"+q+"` of type "+("`"+Q+"` supplied to `"+H+"`, expected ")+("instance of `"+Y+"`."))}return null}return g(_)}function T(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function _(z,w,H,X,q){for(var Y=z[w],Q=0;Q<y.length;Q++)if(v(Y,y[Q]))return null;var ee=JSON.stringify(y,function(Z,V){var ie=G(V);return ie==="symbol"?String(V):V});return new h("Invalid "+X+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+H+"`, expected one of "+ee+"."))}return g(_)}function L(y){function _(z,w,H,X,q){if(typeof y!="function")return new h("Property `"+q+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var Y=z[w],Q=j(Y);if(Q!=="object")return new h("Invalid "+X+" `"+q+"` of type "+("`"+Q+"` supplied to `"+H+"`, expected an object."));for(var ee in Y)if(r(Y,ee)){var J=y(Y,ee,H,X,q+"."+ee,n);if(J instanceof Error)return J}return null}return g(_)}function N(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var _=0;_<y.length;_++){var z=y[_];if(typeof z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(z)+" at index "+_+"."),a}function w(H,X,q,Y,Q){for(var ee=[],J=0;J<y.length;J++){var Z=y[J],V=Z(H,X,q,Y,Q,n);if(V==null)return null;V.data&&r(V.data,"expectedType")&&ee.push(V.data.expectedType)}var ie=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new h("Invalid "+Y+" `"+Q+"` supplied to "+("`"+q+"`"+ie+"."))}return g(w)}function O(){function y(_,z,w,H,X){return I(_[z])?null:new h("Invalid "+H+" `"+X+"` supplied to "+("`"+w+"`, expected a ReactNode."))}return g(y)}function M(y,_,z,w,H){return new h((y||"React class")+": "+_+" type `"+z+"."+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function K(y){function _(z,w,H,X,q){var Y=z[w],Q=j(Y);if(Q!=="object")return new h("Invalid "+X+" `"+q+"` of type `"+Q+"` "+("supplied to `"+H+"`, expected `object`."));for(var ee in y){var J=y[ee];if(typeof J!="function")return M(H,X,q,ee,G(J));var Z=J(Y,ee,H,X,q+"."+ee,n);if(Z)return Z}return null}return g(_)}function F(y){function _(z,w,H,X,q){var Y=z[w],Q=j(Y);if(Q!=="object")return new h("Invalid "+X+" `"+q+"` of type `"+Q+"` "+("supplied to `"+H+"`, expected `object`."));var ee=t({},z[w],y);for(var J in ee){var Z=y[J];if(r(y,J)&&typeof Z!="function")return M(H,X,q,J,G(Z));if(!Z)return new h("Invalid "+X+" `"+q+"` key `"+J+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(z[w],null," ")+`
266
- Valid keys: `+JSON.stringify(Object.keys(y),null," "));var V=Z(Y,J,H,X,q+"."+J,n);if(V)return V}return null}return g(_)}function I(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(I);if(y===null||s(y))return!0;var _=f(y);if(_){var z=_.call(y),w;if(_!==y.entries){for(;!(w=z.next()).done;)if(!I(w.value))return!1}else for(;!(w=z.next()).done;){var H=w.value;if(H&&!I(H[1]))return!1}}else return!1;return!0;default:return!1}}function D(y,_){return y==="symbol"?!0:_?_["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&_ instanceof Symbol:!1}function j(y){var _=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":D(_,y)?"symbol":_}function G(y){if(typeof y>"u"||y===null)return""+y;var _=j(y);if(_==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return _}function U(y){var _=G(y);switch(_){case"array":case"object":return"an "+_;case"boolean":case"date":case"regexp":return"a "+_;default:return _}}function R(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Hu}var Vu,Xg;function s_(){if(Xg)return Vu;Xg=1;var e=zu();function t(){}function n(){}return n.resetWarningCache=t,Vu=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Vu}if(process.env.NODE_ENV!=="production"){var l_=Aa(),u_=!0;Lu.exports=a_()(l_.isElement,u_)}else Lu.exports=s_()();var c_=Lu.exports;const Fe=Se(c_);var f_=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Hi(e,t){var n=d_(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function d_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=f_.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var p_=[".DS_Store","Thumbs.db"];function h_(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return Ra(e)&&v_(e.dataTransfer)?[2,b_(e.dataTransfer,e.type)]:m_(e)?[2,g_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,y_(e)]:[2,[]]})})}function v_(e){return Ra(e)}function m_(e){return Ra(e)&&Ra(e.target)}function Ra(e){return typeof e=="object"&&e!==null}function g_(e){return Ku(e.target.files).map(function(t){return Hi(t)})}function y_(e){return Pr(this,void 0,void 0,function(){var t;return Ar(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Hi(r)})]}})})}function b_(e,t){return Pr(this,void 0,void 0,function(){var n,r;return Ar(this,function(i){switch(i.label){case 0:return e.items?(n=Ku(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(x_))]):[3,2];case 1:return r=i.sent(),[2,Jg(Zg(r))];case 2:return[2,Jg(Ku(e.files).map(function(o){return Hi(o)}))]}})})}function Jg(e){return e.filter(function(t){return p_.indexOf(t.name)===-1})}function Ku(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function x_(e){if(typeof e.webkitGetAsEntry!="function")return Qg(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ey(t):Qg(e)}function Zg(e){return e.reduce(function(t,n){return lu(lu([],gm(t),!1),gm(Array.isArray(n)?Zg(n):[n]),!1)},[])}function Qg(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Hi(t);return Promise.resolve(n)}function w_(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,e.isDirectory?ey(e):S_(e)]})})}function ey(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return Pr(a,void 0,void 0,function(){var l,u,c;return Ar(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=f.sent(),n(l),[3,4];case 3:return u=f.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(w_)),i.push(c),o(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function S_(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=Hi(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var E_=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function ty(e){return $_(e)||k_(e)||oy(e)||C_()}function C_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
267
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $_(e){if(Array.isArray(e))return qu(e)}function ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ry(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(n),!0).forEach(function(r){iy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){return I_(e)||O_(e,t)||oy(e,t)||T_()}function T_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
268
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oy(e,t){if(e){if(typeof e=="string")return qu(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 qu(e,t)}}function qu(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 O_(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function I_(e){if(Array.isArray(e))return e}var P_="file-invalid-type",A_="file-too-large",R_="file-too-small",D_="too-many-files",__=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:P_,message:"File type must be ".concat(n)}},ay=function(t){return{code:A_,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},sy=function(t){return{code:R_,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},M_={code:D_,message:"Too many files"};function ly(e,t){var n=e.type==="application/x-moz-file"||E_(e,t);return[n,n?null:__(t)]}function uy(e,t,n){if(sr(e.size))if(sr(t)&&sr(n)){if(e.size>n)return[!1,ay(n)];if(e.size<t)return[!1,sy(t)]}else{if(sr(t)&&e.size<t)return[!1,sy(t)];if(sr(n)&&e.size>n)return[!1,ay(n)]}return[!0,null]}function sr(e){return e!=null}function j_(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=ly(l,n),c=Vi(u,1),f=c[0],p=uy(l,r,i),d=Vi(p,1),v=d[0],h=s?s(l):null;return f&&v&&!h})}function Da(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function _a(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function cy(e){e.preventDefault()}function N_(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function L_(e){return e.indexOf("Edge/")!==-1}function F_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return N_(e)||L_(e)}function vn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!Da(r)&&s&&s.apply(void 0,[r].concat(o)),Da(r)})}}function B_(){return"showOpenFilePicker"in window}function z_(e){if(sr(e)){var t=Object.entries(e).filter(function(n){var r=Vi(n,2),i=r[0],o=r[1],a=!0;return fy(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(dy))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Vi(r,2),o=i[0],a=i[1];return ry(ry({},n),{},iy({},o,a))},{});return[{description:"Files",accept:t}]}return e}function W_(e){if(sr(e))return Object.entries(e).reduce(function(t,n){var r=Vi(n,2),i=r[0],o=r[1];return[].concat(ty(t),[i],ty(o))},[]).filter(function(t){return fy(t)||dy(t)}).join(",")}function U_(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function H_(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function fy(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function dy(e){return/^.*\.[\w]+$/.test(e)}var V_=["children"],K_=["open"],q_=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],G_=["refKey","onChange","onClick"];function Y_(e){return Z_(e)||J_(e)||py(e)||X_()}function X_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
269
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z_(e){if(Array.isArray(e))return Yu(e)}function Gu(e,t){return tM(e)||eM(e,t)||py(e,t)||Q_()}function Q_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
270
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function py(e,t){if(e){if(typeof e=="string")return Yu(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 Yu(e,t)}}function Yu(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 eM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function tM(e){if(Array.isArray(e))return e}function hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(r){Xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ma(e,t){if(e==null)return{};var n=nM(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ja=A.forwardRef(function(e,t){var n=e.children,r=Ma(e,V_),i=rM(r),o=i.open,a=Ma(i,K_);return A.useImperativeHandle(t,function(){return{open:o}},[o]),A.createElement(A.Fragment,null,n(Ve(Ve({},a),{},{open:o})))});ja.displayName="Dropzone";var vy={disabled:!1,getFilesFromEvent:h_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ja.defaultProps=vy,ja.propTypes={children:Fe.func,accept:Fe.objectOf(Fe.arrayOf(Fe.string)),multiple:Fe.bool,preventDropOnDocument:Fe.bool,noClick:Fe.bool,noKeyboard:Fe.bool,noDrag:Fe.bool,noDragEventsBubbling:Fe.bool,minSize:Fe.number,maxSize:Fe.number,maxFiles:Fe.number,disabled:Fe.bool,getFilesFromEvent:Fe.func,onFileDialogCancel:Fe.func,onFileDialogOpen:Fe.func,useFsAccessApi:Fe.bool,autoFocus:Fe.bool,onDragEnter:Fe.func,onDragLeave:Fe.func,onDragOver:Fe.func,onDrop:Fe.func,onDropAccepted:Fe.func,onDropRejected:Fe.func,onError:Fe.func,validator:Fe.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function rM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ve(Ve({},vy),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,k=t.noClick,S=t.noKeyboard,E=t.noDrag,T=t.noDragEventsBubbling,L=t.onError,N=t.validator,O=A.useMemo(function(){return W_(n)},[n]),M=A.useMemo(function(){return z_(n)},[n]),K=A.useMemo(function(){return typeof g=="function"?g:my},[g]),F=A.useMemo(function(){return typeof h=="function"?h:my},[h]),I=A.useRef(null),D=A.useRef(null),j=A.useReducer(iM,Ju),G=Gu(j,2),U=G[0],R=G[1],y=U.isFocused,_=U.isFileDialogActive,z=A.useRef(typeof window<"u"&&window.isSecureContext&&m&&B_()),w=function(){!z.current&&_&&setTimeout(function(){if(D.current){var ce=D.current.files;ce.length||(R({type:"closeDialog"}),F())}},300)};A.useEffect(function(){return window.addEventListener("focus",w,!1),function(){window.removeEventListener("focus",w,!1)}},[D,_,F,z]);var H=A.useRef([]),X=function(ce){I.current&&I.current.contains(ce.target)||(ce.preventDefault(),H.current=[])};A.useEffect(function(){return x&&(document.addEventListener("dragover",cy,!1),document.addEventListener("drop",X,!1)),function(){x&&(document.removeEventListener("dragover",cy),document.removeEventListener("drop",X))}},[I,x]),A.useEffect(function(){return!r&&b&&I.current&&I.current.focus(),function(){}},[I,b,r]);var q=A.useCallback(function(oe){L?L(oe):console.error(oe)},[L]),Y=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),H.current=[].concat(Y_(H.current),[oe.target]),_a(oe)&&Promise.resolve(i(oe)).then(function(ce){if(!(Da(oe)&&!T)){var W=ce.length,B=W>0&&j_({files:ce,accept:O,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:N}),ne=W>0&&!B;R({isDragAccept:B,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(oe)}}).catch(function(ce){return q(ce)})},[i,u,q,T,O,a,o,s,l,N]),Q=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var ce=_a(oe);if(ce&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return ce&&f&&f(oe),!1},[f,T]),ee=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var ce=H.current.filter(function(B){return I.current&&I.current.contains(B)}),W=ce.indexOf(oe.target);W!==-1&&ce.splice(W,1),H.current=ce,!(ce.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_a(oe)&&c&&c(oe))},[I,c,T]),J=A.useCallback(function(oe,ce){var W=[],B=[];oe.forEach(function(ne){var se=ly(ne,O),fe=Gu(se,2),ve=fe[0],Ye=fe[1],Xe=uy(ne,a,o),gt=Gu(Xe,2),it=gt[0],Re=gt[1],ot=N?N(ne):null;if(ve&&it&&!ot)W.push(ne);else{var Ze=[Ye,Re];ot&&(Ze=Ze.concat(ot)),B.push({file:ne,errors:Ze.filter(function(Gt){return Gt})})}}),(!s&&W.length>1||s&&l>=1&&W.length>l)&&(W.forEach(function(ne){B.push({file:ne,errors:[M_]})}),W.splice(0)),R({acceptedFiles:W,fileRejections:B,type:"setFiles"}),p&&p(W,B,ce),B.length>0&&v&&v(B,ce),W.length>0&&d&&d(W,ce)},[R,s,O,a,o,l,p,d,v,N]),Z=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),H.current=[],_a(oe)&&Promise.resolve(i(oe)).then(function(ce){Da(oe)&&!T||J(ce,oe)}).catch(function(ce){return q(ce)}),R({type:"reset"})},[i,J,q,T]),V=A.useCallback(function(){if(z.current){R({type:"openDialog"}),K();var oe={multiple:s,types:M};window.showOpenFilePicker(oe).then(function(ce){return i(ce)}).then(function(ce){J(ce,null),R({type:"closeDialog"})}).catch(function(ce){U_(ce)?(F(ce),R({type:"closeDialog"})):H_(ce)?(z.current=!1,D.current?(D.current.value=null,D.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):q(ce)});return}D.current&&(R({type:"openDialog"}),K(),D.current.value=null,D.current.click())},[R,K,F,m,J,q,M,s]),ie=A.useCallback(function(oe){!I.current||!I.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),V())},[I,V]),le=A.useCallback(function(){R({type:"focus"})},[]),de=A.useCallback(function(){R({type:"blur"})},[]),ae=A.useCallback(function(){k||(F_()?setTimeout(V,0):V())},[k,V]),ge=function(ce){return r?null:ce},$e=function(ce){return S?null:ge(ce)},Ae=function(ce){return E?null:ge(ce)},rt=function(ce){T&&ce.stopPropagation()},Et=A.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,W=ce===void 0?"ref":ce,B=oe.role,ne=oe.onKeyDown,se=oe.onFocus,fe=oe.onBlur,ve=oe.onClick,Ye=oe.onDragEnter,Xe=oe.onDragOver,gt=oe.onDragLeave,it=oe.onDrop,Re=Ma(oe,q_);return Ve(Ve(Xu({onKeyDown:$e(vn(ne,ie)),onFocus:$e(vn(se,le)),onBlur:$e(vn(fe,de)),onClick:ge(vn(ve,ae)),onDragEnter:Ae(vn(Ye,Y)),onDragOver:Ae(vn(Xe,Q)),onDragLeave:Ae(vn(gt,ee)),onDrop:Ae(vn(it,Z)),role:typeof B=="string"&&B!==""?B:"presentation"},W,I),!r&&!S?{tabIndex:0}:{}),Re)}},[I,ie,le,de,ae,Y,Q,ee,Z,S,E,r]),Ct=A.useCallback(function(oe){oe.stopPropagation()},[]),kt=A.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,W=ce===void 0?"ref":ce,B=oe.onChange,ne=oe.onClick,se=Ma(oe,G_),fe=Xu({accept:O,multiple:s,type:"file",style:{display:"none"},onChange:ge(vn(B,Z)),onClick:ge(vn(ne,Ct)),tabIndex:-1},W,D);return Ve(Ve({},fe),se)}},[D,n,s,Z,r]);return Ve(Ve({},U),{},{isFocused:y&&!r,getRootProps:Et,getInputProps:kt,rootRef:I,inputRef:D,open:ge(V)})}function iM(e,t){switch(t.type){case"focus":return Ve(Ve({},e),{},{isFocused:!0});case"blur":return Ve(Ve({},e),{},{isFocused:!1});case"openDialog":return Ve(Ve({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return Ve(Ve({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ve(Ve({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ve(Ve({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ve({},Ju);default:return e}}function my(){}const Zu=({children:e})=>{const[t,n]=A.useState(!1),[r,i]=A.useState(""),[o,a]=A.useState(""),[s,l]=A.useState(""),[u,c]=A.useState(()=>{}),[f,p]=A.useState(""),[d,v]=A.useState(null),h=({title:m,description:b,confirmButton:x,onConfirm:k,cancelButton:S,content:E})=>{i(m),a(b),l(x),c(()=>k),p(S),v(E),n(!0)},g=()=>{n(!1)};return $.jsxs(hm.Provider,{value:{open:t,showModal:h,hideModal:g},children:[$.jsx(hi,{open:t,onOpenChange:n,children:$.jsx(hi.Content,{title:r,description:o,confirmButton:s,onConfirm:u,cancelButton:f,hideModal:g,children:d})}),e]})},gy=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o})=>{const a=A.useMemo(()=>Np({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return $.jsx("style",{children:a})},Qu=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...o})=>{const{container:a}=Ce,s=ia(c=>c.setMessageContainerRef),l=Ai(c=>c.uploadFile),u=A.useRef(null);return A.useEffect(()=>{s(u)},[u]),i&&r?$.jsx(ja,{noClick:!0,onDrop:c=>c.forEach(f=>l(f,r)),children:({getRootProps:c,isDragActive:f})=>$.jsxs("div",{...o,className:Ui(a.className,t),ref:u,children:[$.jsxs("div",{"data-hover":f,...a.dropzone.overlay,children:["Drop files to upload",$.jsx(CP,{style:{width:"50px"}})]}),$.jsxs(Zu,{children:[$.jsx(yy,{connected:n}),$.jsx("div",{...a.dropzone.container,...c(),children:e})]})]})}):$.jsx("div",{...o,className:Ui(a.className,t),ref:u,children:$.jsxs(Zu,{children:[$.jsx(yy,{connected:n}),e]})})},yy=({connected:e})=>{const{open:t,showModal:n}=su();return e===!1&&!t&&n&&n({title:"Connection Error",description:"There was an error connecting to the server. Please check your internet connection and try again.",confirmButton:"Restart",onConfirm:()=>window.parent.location.reload(),cancelButton:"Cancel"}),$.jsx($.Fragment,{})};Qu.displayName="Container";const by=A.forwardRef(({children:e,onClick:t,imgUrl:n,...r},i)=>{const{fab:o}=Ce,{container:a,icon:s,image:l}=o??{};return n?$.jsx("img",{src:n,role:"button",tabIndex:0,alt:"Chatbot Button Image",...l,draggable:"false",onClick:t}):$.jsx("div",{...r,...a,ref:i,onClick:t,children:$.jsx("div",{...s})})});by.displayName="Fab";function In(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function oM(e,t){const n=C.createContext(t),r=o=>{const{children:a,...s}=o,l=C.useMemo(()=>s,Object.values(s));return $.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=C.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function xy(e,t=[]){let n=[];function r(o,a){const s=C.createContext(a),l=n.length;n=[...n,a];const u=f=>{var m;const{scope:p,children:d,...v}=f,h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,g=C.useMemo(()=>v,Object.values(v));return $.jsx(h.Provider,{value:g,children:d})};u.displayName=o+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,aM(i,...t)]}function aM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function wy({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=sM({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=jn(n),l=C.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,l]}function sM({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,i=C.useRef(r),o=jn(t);return C.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Sy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ey(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Sy(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Sy(e[i],null)}}}}function Vn(...e){return C.useCallback(Ey(...e),e)}var ec=C.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.Children.toArray(n),o=i.find(uM);if(o){const a=o.props.children,s=i.map(l=>l===o?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return $.jsx(tc,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return $.jsx(tc,{...r,ref:t,children:n})});ec.displayName="Slot";var tc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const i=fM(n);return C.cloneElement(n,{...cM(r,n.props),ref:t?Ey(t,i):i})}return C.Children.count(n)>1?C.Children.only(null):null});tc.displayName="SlotClone";var lM=({children:e})=>$.jsx($.Fragment,{children:e});function uM(e){return C.isValidElement(e)&&e.type===lM}function cM(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function fM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tn=dM.reduce((e,t)=>{const n=C.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?ec:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pM(e,t){e&&pp.flushSync(()=>e.dispatchEvent(t))}function hM(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Na=e=>{const{present:t,children:n}=e,r=vM(t),i=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),o=Vn(r.ref,mM(i));return typeof n=="function"||r.isPresent?C.cloneElement(i,{ref:o}):null};Na.displayName="Presence";function vM(e){const[t,n]=C.useState(),r=C.useRef({}),i=C.useRef(e),o=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=hM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const u=La(r.current);o.current=s==="mounted"?u:"none"},[s]),Sr(()=>{const u=r.current,c=i.current;if(c!==e){const p=o.current,d=La(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Sr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const h=La(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(o.current=La(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function La(e){return(e==null?void 0:e.animationName)||"none"}function mM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gM=C.useId||(()=>{}),yM=0;function Fa(e){const[t,n]=C.useState(gM());return Sr(()=>{e||n(r=>r??String(yM++))},[e]),e||(t?`radix-${t}`:"")}var nc="Collapsible",[bM,fX]=xy(nc),[xM,rc]=bM(nc),Cy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=wy({prop:r,defaultProp:i,onChange:a});return $.jsx(xM,{scope:n,disabled:o,contentId:Fa(),open:l,onOpenToggle:C.useCallback(()=>u(c=>!c),[u]),children:$.jsx(tn.div,{"data-state":oc(l),"data-disabled":o?"":void 0,...s,ref:t})})});Cy.displayName=nc;var ky="CollapsibleTrigger",$y=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=rc(ky,n);return $.jsx(tn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":oc(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:In(e.onClick,i.onOpenToggle)})});$y.displayName=ky;var ic="CollapsibleContent",Ty=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=rc(ic,e.__scopeCollapsible);return $.jsx(Na,{present:n||i.open,children:({present:o})=>$.jsx(wM,{...r,ref:t,present:o})})});Ty.displayName=ic;var wM=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=rc(ic,n),[s,l]=C.useState(r),u=C.useRef(null),c=Vn(t,u),f=C.useRef(0),p=f.current,d=C.useRef(0),v=d.current,h=a.open||s,g=C.useRef(h),m=C.useRef(void 0);return C.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),Sr(()=>{const b=u.current;if(b){m.current=m.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();f.current=x.height,d.current=x.width,g.current||(b.style.transitionDuration=m.current.transitionDuration,b.style.animationName=m.current.animationName),l(r)}},[a.open,r]),$.jsx(tn.div,{"data-state":oc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&i})});function oc(e){return e?"open":"closed"}var SM=Cy,EM=Ty;const Oy=({restartConversation:e,...t})=>{var a,s;const{header:n}=Ce,{showModal:r,hideModal:i}=su(),o=l=>{l.stopPropagation(),r&&i?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),i()},cancelButton:"Cancel"}):e()};return $.jsx(jP,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},CM=({onClick:e,...t})=>{const{header:n}=Ce,r=i=>{i.stopPropagation(),e==null||e()};return $.jsx(zP,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Ki=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,c,f,p,d,v,h,g,m;const{header:i}=Ce,o=e??kP;return t?n?$.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[$.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),$.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):$.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[$.jsx(o,{...(h=(v=i.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),$.jsx("p",{...(m=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},Iy=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var c,f,p,d,v,h,g,m,b,x,k,S,E,T,L,N,O,M,K,F,I,D;const{header:o}=Ce,[a,s]=A.useState(!!e),l=!!((c=n.email)!=null&&c.title)||!!((f=n.phone)!=null&&f.title)||!!((p=n.website)!=null&&p.title)||!!((d=n.termsOfService)!=null&&d.link)||!!((v=n.privacyPolicy)!=null&&v.link),u=l||!!n.botDescription;return $.jsxs(SM,{open:u?a:!1,onOpenChange:s,"data-disabled":u?void 0:"",...o.container,...i,children:[$.jsxs($y,{"aria-label":"Expand Header Button",...o.content.container,children:[$.jsx(jo,{...i,src:n.botAvatar,...o.content.avatar,children:n.botName||"Bot"}),$.jsx("h2",{...o.content.title,children:n.botName||"Bot"}),n.botDescription&&$.jsx("p",{...o.content.description,children:n.botDescription}),$.jsxs("div",{...o.content.actions.container,children:[r&&$.jsx(Oy,{restartConversation:r}),t&&$.jsx(CM,{onClick:t})]})]}),l&&$.jsxs(EM,{...o.expandedContent.container,children:[$.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[$.jsx(Ki,{"data-email":"",icon:AP,title:(h=n.email)==null?void 0:h.title,link:(m=(g=n.email)==null?void 0:g.link)!=null&&m.startsWith("mailto:")?(b=n.email)==null?void 0:b.link:`mailto:${(x=n.email)==null?void 0:x.link}`}),$.jsx(Ki,{"data-phone":"",icon:_P,title:(k=n.phone)==null?void 0:k.title,link:(E=(S=n.phone)==null?void 0:S.link)!=null&&E.startsWith("tel:")?(T=n.phone)==null?void 0:T.link:`tel:${(L=n.phone)==null?void 0:L.link}`}),$.jsx(Ki,{"data-website":"",link:(N=n.website)==null?void 0:N.link,icon:OP,title:(O=n.website)==null?void 0:O.title})]}),$.jsxs("div",{"data-legal":"",...(M=o.expandedContent)==null?void 0:M.group,children:[$.jsx(Ki,{"data-terms":"",link:(K=n.termsOfService)==null?void 0:K.link,icon:Hv,title:(F=n.termsOfService)==null?void 0:F.title}),$.jsx(Ki,{"data-privacy":"",link:(I=n.privacyPolicy)==null?void 0:I.link,icon:PP,title:(D=n.privacyPolicy)==null?void 0:D.title})]})]})]})},ac=A.memo(({...e})=>{const{typingIndicator:t}=Ce;return $.jsx("div",{...e,...t==null?void 0:t.container,children:$.jsx("div",{...t==null?void 0:t.loader})})});ac.displayName="TypingIndicator";const sc=A.memo(A.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,renderers:s,isReadOnly:l,feedback:u,timestamp:c,metadata:f,sendMessage:p,addMessageFeedback:d},v)=>{var S,E,T;const[h,g]=A.useState([]),{message:m}=Ce,b=Ip(a??"",15),[x,k]=A.useState("idle");return $.jsx(pm.Provider,{value:{isLoading:h,setIsLoading:g},children:$.jsxs("div",{...m==null?void 0:m.container,"data-loaded":h.length===0,"data-disable-input":!!n,"data-direction":e,ref:v,children:[$.jsxs(al,{"data-color":b,"data-loading-status":x,...(S=m==null?void 0:m.avatar)==null?void 0:S.container,children:[$.jsx(sl,{...(E=m==null?void 0:m.avatar)==null?void 0:E.image,onLoadingStatusChange:k,src:i==null?void 0:i.avatar}),$.jsxs(ll,{...(T=m==null?void 0:m.avatar)==null?void 0:T.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&$.jsx(ar,{block:{...t,isReadOnly:l,direction:e,timestamp:c,sender:i,feedback:u,messageId:o,metadata:f,sendMessage:p,addMessageFeedback:d},renderers:s}),r]})})}));function kM({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=Ce;return $.jsxs("li",{...r.container,children:[$.jsx(jo,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),$.jsxs("div",{...r.content,children:[$.jsx("h1",{...r.title,children:n||"Bot"}),$.jsx("p",{...r.description,children:t})]})]})}function $M(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function TM(){$M("react-scroll-to-bottom:version","4.2.0")}var qi=function(e){return e&&e.Math===Math&&e},lt=qi(typeof globalThis=="object"&&globalThis)||qi(typeof window=="object"&&window)||qi(typeof self=="object"&&self)||qi(typeof Xt=="object"&&Xt)||qi(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),ut=function(e){try{return!!e()}catch{return!0}},OM=ut,Ba=!OM(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),IM=Ba,Py=Function.prototype,Ay=Py.apply,Ry=Py.call,lc=typeof Reflect=="object"&&Reflect.apply||(IM?Ry.bind(Ay):function(){return Ry.apply(Ay,arguments)}),Dy=Ba,_y=Function.prototype,uc=_y.call,PM=Dy&&_y.bind.bind(uc,uc),tt=Dy?PM:function(e){return function(){return uc.apply(e,arguments)}},My=tt,AM=My({}.toString),RM=My("".slice),lr=function(e){return RM(AM(e),8,-1)},DM=lr,_M=tt,cc=function(e){if(DM(e)==="Function")return _M(e)},fc=typeof document=="object"&&document.all,wt=typeof fc>"u"&&fc!==void 0?function(e){return typeof e=="function"||e===fc}:function(e){return typeof e=="function"},Gi={},MM=ut,At=!MM(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),jM=Ba,za=Function.prototype.call,mn=jM?za.bind(za):function(){return za.apply(za,arguments)},dc={},jy={}.propertyIsEnumerable,Ny=Object.getOwnPropertyDescriptor,NM=Ny&&!jy.call({1:2},1);dc.f=NM?function(t){var n=Ny(this,t);return!!n&&n.enumerable}:jy;var Yi=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},LM=tt,FM=ut,BM=lr,pc=Object,zM=LM("".split),Ly=FM(function(){return!pc("z").propertyIsEnumerable(0)})?function(e){return BM(e)==="String"?zM(e,""):pc(e)}:pc,hc=function(e){return e==null},WM=hc,UM=TypeError,Wa=function(e){if(WM(e))throw new UM("Can't call method on "+e);return e},HM=Ly,VM=Wa,gn=function(e){return HM(VM(e))},KM=wt,nn=function(e){return typeof e=="object"?e!==null:KM(e)},vt={},vc=vt,mc=lt,qM=wt,Fy=function(e){return qM(e)?e:void 0},yn=function(e,t){return arguments.length<2?Fy(vc[e])||Fy(mc[e]):vc[e]&&vc[e][t]||mc[e]&&mc[e][t]},GM=tt,Pn=GM({}.isPrototypeOf),YM=lt,By=YM.navigator,zy=By&&By.userAgent,gc=zy?String(zy):"",Wy=lt,yc=gc,Uy=Wy.process,Hy=Wy.Deno,Vy=Uy&&Uy.versions||Hy&&Hy.version,Ky=Vy&&Vy.v8,rn,Ua;Ky&&(rn=Ky.split("."),Ua=rn[0]>0&&rn[0]<4?1:+(rn[0]+rn[1])),!Ua&&yc&&(rn=yc.match(/Edge\/(\d+)/),(!rn||rn[1]>=74)&&(rn=yc.match(/Chrome\/(\d+)/),rn&&(Ua=+rn[1])));var bc=Ua,qy=bc,XM=ut,JM=lt,ZM=JM.String,zr=!!Object.getOwnPropertySymbols&&!XM(function(){var e=Symbol("symbol detection");return!ZM(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qy&&qy<41}),QM=zr,Gy=QM&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ej=yn,tj=wt,nj=Pn,rj=Gy,ij=Object,Xi=rj?function(e){return typeof e=="symbol"}:function(e){var t=ej("Symbol");return tj(t)&&nj(t.prototype,ij(e))},oj=String,Ha=function(e){try{return oj(e)}catch{return"Object"}},aj=wt,sj=Ha,lj=TypeError,Va=function(e){if(aj(e))return e;throw new lj(sj(e)+" is not a function")},uj=Va,cj=hc,xc=function(e,t){var n=e[t];return cj(n)?void 0:uj(n)},wc=mn,Sc=wt,Ec=nn,fj=TypeError,dj=function(e,t){var n,r;if(t==="string"&&Sc(n=e.toString)&&!Ec(r=wc(n,e))||Sc(n=e.valueOf)&&!Ec(r=wc(n,e))||t!=="string"&&Sc(n=e.toString)&&!Ec(r=wc(n,e)))return r;throw new fj("Can't convert object to primitive value")},Yy={exports:{}},Xy=lt,pj=Object.defineProperty,hj=function(e,t){try{pj(Xy,e,{value:t,configurable:!0,writable:!0})}catch{Xy[e]=t}return t},vj=lt,mj=hj,Jy="__core-js_shared__",Zy=Yy.exports=vj[Jy]||mj(Jy,{});(Zy.versions||(Zy.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Cc=Yy.exports,Qy=Cc,Wr=function(e,t){return Qy[e]||(Qy[e]=t||{})},gj=Wa,yj=Object,An=function(e){return yj(gj(e))},bj=tt,xj=An,wj=bj({}.hasOwnProperty),Ft=Object.hasOwn||function(t,n){return wj(xj(t),n)},Sj=tt,Ej=0,Cj=Math.random(),kj=Sj(1 .toString),kc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+kj(++Ej+Cj,36)},$j=lt,Tj=Wr,eb=Ft,Oj=kc,Ij=zr,Pj=Gy,Ur=$j.Symbol,$c=Tj("wks"),Aj=Pj?Ur.for||Ur:Ur&&Ur.withoutSetter||Oj,ft=function(e){return eb($c,e)||($c[e]=Ij&&eb(Ur,e)?Ur[e]:Aj("Symbol."+e)),$c[e]},Rj=mn,tb=nn,nb=Xi,Dj=xc,_j=dj,Mj=ft,jj=TypeError,Nj=Mj("toPrimitive"),Lj=function(e,t){if(!tb(e)||nb(e))return e;var n=Dj(e,Nj),r;if(n){if(t===void 0&&(t="default"),r=Rj(n,e,t),!tb(r)||nb(r))return r;throw new jj("Can't convert object to primitive value")}return t===void 0&&(t="number"),_j(e,t)},Fj=Lj,Bj=Xi,Tc=function(e){var t=Fj(e,"string");return Bj(t)?t:t+""},zj=lt,rb=nn,Oc=zj.document,Wj=rb(Oc)&&rb(Oc.createElement),ib=function(e){return Wj?Oc.createElement(e):{}},Uj=At,Hj=ut,Vj=ib,ob=!Uj&&!Hj(function(){return Object.defineProperty(Vj("div"),"a",{get:function(){return 7}}).a!==7}),Kj=At,qj=mn,Gj=dc,Yj=Yi,Xj=gn,Jj=Tc,Zj=Ft,Qj=ob,ab=Object.getOwnPropertyDescriptor;Gi.f=Kj?ab:function(t,n){if(t=Xj(t),n=Jj(n),Qj)try{return ab(t,n)}catch{}if(Zj(t,n))return Yj(!qj(Gj.f,t,n),t[n])};var eN=ut,tN=wt,nN=/#|\.prototype\./,Ji=function(e,t){var n=iN[rN(e)];return n===aN?!0:n===oN?!1:tN(t)?eN(t):!!t},rN=Ji.normalize=function(e){return String(e).replace(nN,".").toLowerCase()},iN=Ji.data={},oN=Ji.NATIVE="N",aN=Ji.POLYFILL="P",sN=Ji,sb=cc,lN=Va,uN=Ba,cN=sb(sb.bind),Ic=function(e,t){return lN(e),t===void 0?e:uN?cN(e,t):function(){return e.apply(t,arguments)}},on={},fN=At,dN=ut,lb=fN&&dN(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),pN=nn,hN=String,vN=TypeError,Kn=function(e){if(pN(e))return e;throw new vN(hN(e)+" is not an object")},mN=At,gN=ob,yN=lb,Ka=Kn,ub=Tc,bN=TypeError,Pc=Object.defineProperty,xN=Object.getOwnPropertyDescriptor,Ac="enumerable",Rc="configurable",Dc="writable";on.f=mN?yN?function(t,n,r){if(Ka(t),n=ub(n),Ka(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Dc in r&&!r[Dc]){var i=xN(t,n);i&&i[Dc]&&(t[n]=r.value,r={configurable:Rc in r?r[Rc]:i[Rc],enumerable:Ac in r?r[Ac]:i[Ac],writable:!1})}return Pc(t,n,r)}:Pc:function(t,n,r){if(Ka(t),n=ub(n),Ka(r),gN)try{return Pc(t,n,r)}catch{}if("get"in r||"set"in r)throw new bN("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var wN=At,SN=on,EN=Yi,qa=wN?function(e,t,n){return SN.f(e,t,EN(1,n))}:function(e,t,n){return e[t]=n,e},Zi=lt,CN=lc,kN=cc,$N=wt,TN=Gi.f,ON=sN,Hr=vt,IN=Ic,Vr=qa,cb=Ft,PN=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return CN(e,this,arguments)};return t.prototype=e.prototype,t},Ne=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,a=r?Zi:i?Zi[n]:Zi[n]&&Zi[n].prototype,s=r?Hr:Hr[n]||Vr(Hr,n,{})[n],l=s.prototype,u,c,f,p,d,v,h,g,m;for(p in t)u=ON(r?p:n+(i?".":"#")+p,e.forced),c=!u&&a&&cb(a,p),v=s[p],c&&(e.dontCallGetSet?(m=TN(a,p),h=m&&m.value):h=a[p]),d=c&&h?h:t[p],!(!u&&!o&&typeof v==typeof d)&&(e.bind&&c?g=IN(d,Zi):e.wrap&&c?g=PN(d):o&&$N(d)?g=kN(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&Vr(g,"sham",!0),Vr(s,p,g),o&&(f=n+"Prototype",cb(Hr,f)||Vr(Hr,f,{}),Vr(Hr[f],p,d),e.real&&l&&(u||!l[p])&&Vr(l,p,d)))},AN=lr,Kr=Array.isArray||function(t){return AN(t)==="Array"},RN=Ne,DN=Kr;RN({target:"Array",stat:!0},{isArray:DN});var _N=vt,MN=_N.Array.isArray,jN=MN,fb=jN,NN=fb,LN=NN,FN=LN,BN=FN,zN=BN;const db=Se(zN);function WN(e){if(db(e))return e}var UN=Math.ceil,HN=Math.floor,VN=Math.trunc||function(t){var n=+t;return(n>0?HN:UN)(n)},KN=VN,Ga=function(e){var t=+e;return t!==t||t===0?0:KN(t)},qN=Ga,GN=Math.min,YN=function(e){var t=qN(e);return t>0?GN(t,9007199254740991):0},XN=YN,ur=function(e){return XN(e.length)},JN=TypeError,ZN=9007199254740991,_c=function(e){if(e>ZN)throw JN("Maximum allowed index exceeded");return e},QN=At,e2=on,t2=Yi,Qi=function(e,t,n){QN?e2.f(e,t,t2(0,n)):e[t]=n},n2=ft,r2=n2("toStringTag"),pb={};pb[r2]="z";var Mc=String(pb)==="[object z]",i2=Mc,o2=wt,Ya=lr,a2=ft,s2=a2("toStringTag"),l2=Object,u2=Ya(function(){return arguments}())==="Arguments",c2=function(e,t){try{return e[t]}catch{}},eo=i2?Ya:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=c2(t=l2(e),s2))=="string"?n:u2?Ya(t):(r=Ya(t))==="Object"&&o2(t.callee)?"Arguments":r},f2=tt,d2=wt,jc=Cc,p2=f2(Function.toString);d2(jc.inspectSource)||(jc.inspectSource=function(e){return p2(e)});var h2=jc.inspectSource,v2=tt,m2=ut,hb=wt,g2=eo,y2=yn,b2=h2,vb=function(){},mb=y2("Reflect","construct"),Nc=/^\s*(?:class|function)\b/,x2=v2(Nc.exec),w2=!Nc.test(vb),to=function(t){if(!hb(t))return!1;try{return mb(vb,[],t),!0}catch{return!1}},gb=function(t){if(!hb(t))return!1;switch(g2(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return w2||!!x2(Nc,b2(t))}catch{return!0}};gb.sham=!0;var Lc=!mb||m2(function(){var e;return to(to.call)||!to(Object)||!to(function(){e=!0})||e})?gb:to,yb=Kr,S2=Lc,E2=nn,C2=ft,k2=C2("species"),bb=Array,$2=function(e){var t;return yb(e)&&(t=e.constructor,S2(t)&&(t===bb||yb(t.prototype))?t=void 0:E2(t)&&(t=t[k2],t===null&&(t=void 0))),t===void 0?bb:t},T2=$2,Fc=function(e,t){return new(T2(e))(t===0?0:t)},O2=ut,I2=ft,P2=bc,A2=I2("species"),Xa=function(e){return P2>=51||!O2(function(){var t=[],n=t.constructor={};return n[A2]=function(){return{foo:1}},t[e](Boolean).foo!==1})},R2=Ne,D2=ut,_2=Kr,M2=nn,j2=An,N2=ur,xb=_c,wb=Qi,L2=Fc,F2=Xa,B2=ft,z2=bc,Sb=B2("isConcatSpreadable"),W2=z2>=51||!D2(function(){var e=[];return e[Sb]=!1,e.concat()[0]!==e}),U2=function(e){if(!M2(e))return!1;var t=e[Sb];return t!==void 0?!!t:_2(e)},H2=!W2||!F2("concat");R2({target:"Array",proto:!0,arity:1,forced:H2},{concat:function(t){var n=j2(this),r=L2(n,0),i=0,o,a,s,l,u;for(o=-1,s=arguments.length;o<s;o++)if(u=o===-1?n:arguments[o],U2(u))for(l=N2(u),xb(i+l),a=0;a<l;a++,i++)a in u&&wb(r,i,u[a]);else xb(i+1),wb(r,i++,u);return r.length=i,r}});var V2=eo,K2=String,no=function(e){if(V2(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return K2(e)},Ja={},q2=Ga,G2=Math.max,Y2=Math.min,Bc=function(e,t){var n=q2(e);return n<0?G2(n+t,0):Y2(n,t)},X2=gn,J2=Bc,Z2=ur,Eb=function(e){return function(t,n,r){var i=X2(t),o=Z2(i);if(o===0)return!e&&-1;var a=J2(r,o),s;if(e&&n!==n){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Cb={includes:Eb(!0),indexOf:Eb(!1)},Za={},Q2=tt,zc=Ft,eL=gn,tL=Cb.indexOf,nL=Za,kb=Q2([].push),$b=function(e,t){var n=eL(e),r=0,i=[],o;for(o in n)!zc(nL,o)&&zc(n,o)&&kb(i,o);for(;t.length>r;)zc(n,o=t[r++])&&(~tL(i,o)||kb(i,o));return i},Wc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rL=$b,iL=Wc,Uc=Object.keys||function(t){return rL(t,iL)},oL=At,aL=lb,sL=on,lL=Kn,uL=gn,cL=Uc;Ja.f=oL&&!aL?Object.defineProperties:function(t,n){lL(t);for(var r=uL(n),i=cL(n),o=i.length,a=0,s;o>a;)sL.f(t,s=i[a++],r[s]);return t};var fL=yn,dL=fL("document","documentElement"),pL=Wr,hL=kc,Tb=pL("keys"),Qa=function(e){return Tb[e]||(Tb[e]=hL(e))},vL=Kn,mL=Ja,Ob=Wc,gL=Za,yL=dL,bL=ib,xL=Qa,Ib=">",Pb="<",Hc="prototype",Vc="script",Ab=xL("IE_PROTO"),Kc=function(){},Rb=function(e){return Pb+Vc+Ib+e+Pb+"/"+Vc+Ib},Db=function(e){e.write(Rb("")),e.close();var t=e.parentWindow.Object;return e=null,t},wL=function(){var e=bL("iframe"),t="java"+Vc+":",n;return e.style.display="none",yL.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Rb("document.F=Object")),n.close(),n.F},es,ts=function(){try{es=new ActiveXObject("htmlfile")}catch{}ts=typeof document<"u"?document.domain&&es?Db(es):wL():Db(es);for(var e=Ob.length;e--;)delete ts[Hc][Ob[e]];return ts()};gL[Ab]=!0;var qc=Object.create||function(t,n){var r;return t!==null?(Kc[Hc]=vL(t),r=new Kc,Kc[Hc]=null,r[Ab]=t):r=ts(),n===void 0?r:mL.f(r,n)},ns={},SL=$b,EL=Wc,CL=EL.concat("length","prototype");ns.f=Object.getOwnPropertyNames||function(t){return SL(t,CL)};var _b={},kL=tt,rs=kL([].slice),$L=lr,TL=gn,Mb=ns.f,OL=rs,jb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],IL=function(e){try{return Mb(e)}catch{return OL(jb)}};_b.f=function(t){return jb&&$L(t)==="Window"?IL(t):Mb(TL(t))};var is={};is.f=Object.getOwnPropertySymbols;var PL=qa,os=function(e,t,n,r){return r&&r.enumerable?e[t]=n:PL(e,t,n),e},AL=on,RL=function(e,t,n){return AL.f(e,t,n)},ro={},DL=ft;ro.f=DL;var Nb=vt,_L=Ft,ML=ro,jL=on.f,Ke=function(e){var t=Nb.Symbol||(Nb.Symbol={});_L(t,e)||jL(t,e,{value:ML.f(e)})},NL=mn,LL=yn,FL=ft,BL=os,Lb=function(){var e=LL("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=FL("toPrimitive");t&&!t[r]&&BL(t,r,function(i){return NL(n,this)},{arity:1})},zL=Mc,WL=eo,UL=zL?{}.toString:function(){return"[object "+WL(this)+"]"},HL=Mc,VL=on.f,KL=qa,qL=Ft,GL=UL,YL=ft,Fb=YL("toStringTag"),qr=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(qL(i,Fb)||VL(i,Fb,{configurable:!0,value:t}),r&&!HL&&KL(i,"toString",GL))},XL=lt,JL=wt,Bb=XL.WeakMap,ZL=JL(Bb)&&/native code/.test(String(Bb)),QL=ZL,zb=lt,eF=nn,tF=qa,Gc=Ft,Yc=Cc,nF=Qa,rF=Za,Wb="Object already initialized",Xc=zb.TypeError,iF=zb.WeakMap,as,io,ss,oF=function(e){return ss(e)?io(e):as(e,{})},aF=function(e){return function(t){var n;if(!eF(t)||(n=io(t)).type!==e)throw new Xc("Incompatible receiver, "+e+" required");return n}};if(QL||Yc.state){var bn=Yc.state||(Yc.state=new iF);bn.get=bn.get,bn.has=bn.has,bn.set=bn.set,as=function(e,t){if(bn.has(e))throw new Xc(Wb);return t.facade=e,bn.set(e,t),t},io=function(e){return bn.get(e)||{}},ss=function(e){return bn.has(e)}}else{var Gr=nF("state");rF[Gr]=!0,as=function(e,t){if(Gc(e,Gr))throw new Xc(Wb);return t.facade=e,tF(e,Gr,t),t},io=function(e){return Gc(e,Gr)?e[Gr]:{}},ss=function(e){return Gc(e,Gr)}}var Jc={set:as,get:io,has:ss,enforce:oF,getterFor:aF},sF=Ic,lF=tt,uF=Ly,cF=An,fF=ur,dF=Fc,Ub=lF([].push),qn=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,u,c,f){for(var p=cF(l),d=uF(p),v=fF(d),h=sF(u,c),g=0,m=f||dF,b=t?m(l,v):n||a?m(l,0):void 0,x,k;v>g;g++)if((s||g in d)&&(x=d[g],k=h(x,g,p),e))if(t)b[g]=k;else if(k)switch(e){case 3:return!0;case 5:return x;case 6:return g;case 2:Ub(b,x)}else switch(e){case 4:return!1;case 7:Ub(b,x)}return o?-1:r||i?i:b}},Zc={forEach:qn(0),map:qn(1),filter:qn(2),some:qn(3),every:qn(4),find:qn(5),findIndex:qn(6),filterReject:qn(7)},ls=Ne,oo=lt,Qc=mn,pF=tt,Yr=At,Xr=zr,hF=ut,dt=Ft,vF=Pn,ef=Kn,us=gn,tf=Tc,mF=no,nf=Yi,Jr=qc,Hb=Uc,gF=ns,Vb=_b,yF=is,Kb=Gi,qb=on,bF=Ja,Gb=dc,Yb=os,xF=RL,rf=Wr,wF=Qa,Xb=Za,Jb=kc,SF=ft,EF=ro,CF=Ke,kF=Lb,$F=qr,Zb=Jc,cs=Zc.forEach,Rt=wF("hidden"),fs="Symbol",ao="prototype",TF=Zb.set,Qb=Zb.getterFor(fs),an=Object[ao],cr=oo.Symbol,so=cr&&cr[ao],OF=oo.RangeError,IF=oo.TypeError,of=oo.QObject,ex=Kb.f,fr=qb.f,tx=Vb.f,PF=Gb.f,nx=pF([].push),Rn=rf("symbols"),lo=rf("op-symbols"),AF=rf("wks"),af=!of||!of[ao]||!of[ao].findChild,rx=function(e,t,n){var r=ex(an,t);r&&delete an[t],fr(e,t,n),r&&e!==an&&fr(an,t,r)},sf=Yr&&hF(function(){return Jr(fr({},"a",{get:function(){return fr(this,"a",{value:7}).a}})).a!==7})?rx:fr,lf=function(e,t){var n=Rn[e]=Jr(so);return TF(n,{type:fs,tag:e,description:t}),Yr||(n.description=t),n},ds=function(t,n,r){t===an&&ds(lo,n,r),ef(t);var i=tf(n);return ef(r),dt(Rn,i)?(r.enumerable?(dt(t,Rt)&&t[Rt][i]&&(t[Rt][i]=!1),r=Jr(r,{enumerable:nf(0,!1)})):(dt(t,Rt)||fr(t,Rt,nf(1,Jr(null))),t[Rt][i]=!0),sf(t,i,r)):fr(t,i,r)},uf=function(t,n){ef(t);var r=us(n),i=Hb(r).concat(sx(r));return cs(i,function(o){(!Yr||Qc(ix,r,o))&&ds(t,o,r[o])}),t},RF=function(t,n){return n===void 0?Jr(t):uf(Jr(t),n)},ix=function(t){var n=tf(t),r=Qc(PF,this,n);return this===an&&dt(Rn,n)&&!dt(lo,n)?!1:r||!dt(this,n)||!dt(Rn,n)||dt(this,Rt)&&this[Rt][n]?r:!0},ox=function(t,n){var r=us(t),i=tf(n);if(!(r===an&&dt(Rn,i)&&!dt(lo,i))){var o=ex(r,i);return o&&dt(Rn,i)&&!(dt(r,Rt)&&r[Rt][i])&&(o.enumerable=!0),o}},ax=function(t){var n=tx(us(t)),r=[];return cs(n,function(i){!dt(Rn,i)&&!dt(Xb,i)&&nx(r,i)}),r},sx=function(e){var t=e===an,n=tx(t?lo:us(e)),r=[];return cs(n,function(i){dt(Rn,i)&&(!t||dt(an,i))&&nx(r,Rn[i])}),r};Xr||(cr=function(){if(vF(so,this))throw new IF("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:mF(arguments[0]),n=Jb(t),r=function(i){var o=this===void 0?oo:this;o===an&&Qc(r,lo,i),dt(o,Rt)&&dt(o[Rt],n)&&(o[Rt][n]=!1);var a=nf(1,i);try{sf(o,n,a)}catch(s){if(!(s instanceof OF))throw s;rx(o,n,a)}};return Yr&&af&&sf(an,n,{configurable:!0,set:r}),lf(n,t)},so=cr[ao],Yb(so,"toString",function(){return Qb(this).tag}),Yb(cr,"withoutSetter",function(e){return lf(Jb(e),e)}),Gb.f=ix,qb.f=ds,bF.f=uf,Kb.f=ox,gF.f=Vb.f=ax,yF.f=sx,EF.f=function(e){return lf(SF(e),e)},Yr&&xF(so,"description",{configurable:!0,get:function(){return Qb(this).description}})),ls({global:!0,constructor:!0,wrap:!0,forced:!Xr,sham:!Xr},{Symbol:cr}),cs(Hb(AF),function(e){CF(e)}),ls({target:fs,stat:!0,forced:!Xr},{useSetter:function(){af=!0},useSimple:function(){af=!1}}),ls({target:"Object",stat:!0,forced:!Xr,sham:!Yr},{create:RF,defineProperty:ds,defineProperties:uf,getOwnPropertyDescriptor:ox}),ls({target:"Object",stat:!0,forced:!Xr},{getOwnPropertyNames:ax}),kF(),$F(cr,fs),Xb[Rt]=!0;var DF=zr,lx=DF&&!!Symbol.for&&!!Symbol.keyFor,_F=Ne,MF=yn,jF=Ft,NF=no,ux=Wr,LF=lx,cf=ux("string-to-symbol-registry"),FF=ux("symbol-to-string-registry");_F({target:"Symbol",stat:!0,forced:!LF},{for:function(e){var t=NF(e);if(jF(cf,t))return cf[t];var n=MF("Symbol")(t);return cf[t]=n,FF[n]=t,n}});var BF=Ne,zF=Ft,WF=Xi,UF=Ha,HF=Wr,VF=lx,cx=HF("symbol-to-string-registry");BF({target:"Symbol",stat:!0,forced:!VF},{keyFor:function(t){if(!WF(t))throw new TypeError(UF(t)+" is not a symbol");if(zF(cx,t))return cx[t]}});var KF=tt,fx=Kr,qF=wt,dx=lr,GF=no,px=KF([].push),YF=function(e){if(qF(e))return e;if(fx(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?px(n,i):(typeof i=="number"||dx(i)==="Number"||dx(i)==="String")&&px(n,GF(i))}var o=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(fx(this))return l;for(var u=0;u<o;u++)if(n[u]===s)return l}}},XF=Ne,hx=yn,vx=lc,JF=mn,uo=tt,mx=ut,gx=wt,yx=Xi,bx=rs,ZF=YF,QF=zr,eB=String,Gn=hx("JSON","stringify"),ps=uo(/./.exec),xx=uo("".charAt),tB=uo("".charCodeAt),nB=uo("".replace),rB=uo(1 .toString),iB=/[\uD800-\uDFFF]/g,wx=/^[\uD800-\uDBFF]$/,Sx=/^[\uDC00-\uDFFF]$/,Ex=!QF||mx(function(){var e=hx("Symbol")("stringify detection");return Gn([e])!=="[null]"||Gn({a:e})!=="{}"||Gn(Object(e))!=="{}"}),Cx=mx(function(){return Gn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Gn("\uDEAD")!=='"\\udead"'}),oB=function(e,t){var n=bx(arguments),r=ZF(t);if(!(!gx(r)&&(e===void 0||yx(e))))return n[1]=function(i,o){if(gx(r)&&(o=JF(r,this,eB(i),o)),!yx(o))return o},vx(Gn,null,n)},aB=function(e,t,n){var r=xx(n,t-1),i=xx(n,t+1);return ps(wx,e)&&!ps(Sx,i)||ps(Sx,e)&&!ps(wx,r)?"\\u"+rB(tB(e,0),16):e};Gn&&XF({target:"JSON",stat:!0,arity:3,forced:Ex||Cx},{stringify:function(t,n,r){var i=bx(arguments),o=vx(Ex?oB:Gn,null,i);return Cx&&typeof o=="string"?nB(o,iB,aB):o}});var sB=Ne,lB=zr,uB=ut,kx=is,cB=An,fB=!lB||uB(function(){kx.f(1)});sB({target:"Object",stat:!0,forced:fB},{getOwnPropertySymbols:function(t){var n=kx.f;return n?n(cB(t)):[]}});var dB=Ke;dB("asyncIterator");var pB=Ke;pB("hasInstance");var hB=Ke;hB("isConcatSpreadable");var vB=Ke;vB("iterator");var mB=Ke;mB("match");var gB=Ke;gB("matchAll");var yB=Ke;yB("replace");var bB=Ke;bB("search");var xB=Ke;xB("species");var wB=Ke;wB("split");var SB=Ke,EB=Lb;SB("toPrimitive"),EB();var CB=yn,kB=Ke,$B=qr;kB("toStringTag"),$B(CB("Symbol"),"Symbol");var TB=Ke;TB("unscopables");var OB=lt,IB=qr;IB(OB.JSON,"JSON",!0);var PB=vt,AB=PB.Symbol,Zr={},ff=At,RB=Ft,$x=Function.prototype,DB=ff&&Object.getOwnPropertyDescriptor,df=RB($x,"name"),_B=df&&(function(){}).name==="something",MB=df&&(!ff||ff&&DB($x,"name").configurable),jB={EXISTS:df,PROPER:_B,CONFIGURABLE:MB},NB=ut,LB=!NB(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),FB=Ft,BB=wt,zB=An,WB=Qa,UB=LB,Tx=WB("IE_PROTO"),pf=Object,HB=pf.prototype,Ox=UB?pf.getPrototypeOf:function(e){var t=zB(e);if(FB(t,Tx))return t[Tx];var n=t.constructor;return BB(n)&&t instanceof n?n.prototype:t instanceof pf?HB:null},VB=ut,KB=wt,qB=nn,GB=qc,Ix=Ox,YB=os,XB=ft,hf=XB("iterator"),Px=!1,Dn,vf,mf;[].keys&&(mf=[].keys(),"next"in mf?(vf=Ix(Ix(mf)),vf!==Object.prototype&&(Dn=vf)):Px=!0);var JB=!qB(Dn)||VB(function(){var e={};return Dn[hf].call(e)!==e});JB?Dn={}:Dn=GB(Dn),KB(Dn[hf])||YB(Dn,hf,function(){return this});var Ax={IteratorPrototype:Dn,BUGGY_SAFARI_ITERATORS:Px},ZB=Ax.IteratorPrototype,QB=qc,e3=Yi,t3=qr,n3=Zr,r3=function(){return this},i3=function(e,t,n,r){var i=t+" Iterator";return e.prototype=QB(ZB,{next:e3(+!r,n)}),t3(e,i,!1,!0),n3[i]=r3,e},o3=tt,a3=Va,s3=function(e,t,n){try{return o3(a3(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},l3=nn,u3=function(e){return l3(e)||e===null},c3=u3,f3=String,d3=TypeError,p3=function(e){if(c3(e))return e;throw new d3("Can't set "+f3(e)+" as a prototype")},h3=s3,v3=nn,m3=Wa,g3=p3;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=h3(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,o){return m3(i),g3(o),v3(i)&&(e?n(i,o):i.__proto__=o),i}}();var y3=Ne,b3=mn,Rx=jB,x3=i3,w3=Ox,S3=qr,Dx=os,E3=ft,_x=Zr,Mx=Ax,C3=Rx.PROPER;Rx.CONFIGURABLE,Mx.IteratorPrototype;var hs=Mx.BUGGY_SAFARI_ITERATORS,gf=E3("iterator"),jx="keys",vs="values",Nx="entries",k3=function(){return this},Lx=function(e,t,n,r,i,o,a){x3(n,t,r);var s=function(m){if(m===i&&p)return p;if(!hs&&m&&m in c)return c[m];switch(m){case jx:return function(){return new n(this,m)};case vs:return function(){return new n(this,m)};case Nx:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",u=!1,c=e.prototype,f=c[gf]||c["@@iterator"]||i&&c[i],p=!hs&&f||s(i),d=t==="Array"&&c.entries||f,v,h,g;if(d&&(v=w3(d.call(new e)),v!==Object.prototype&&v.next&&(S3(v,l,!0,!0),_x[l]=k3)),C3&&i===vs&&f&&f.name!==vs&&(u=!0,p=function(){return b3(f,this)}),i)if(h={values:s(vs),keys:o?p:s(jx),entries:s(Nx)},a)for(g in h)(hs||u||!(g in c))&&Dx(c,g,h[g]);else y3({target:t,proto:!0,forced:hs||u},h);return a&&c[gf]!==p&&Dx(c,gf,p,{name:i}),_x[t]=p,h},Fx=function(e,t){return{value:e,done:t}},$3=gn,Bx=Zr,zx=Jc;on.f;var T3=Lx,ms=Fx,Wx="Array Iterator",O3=zx.set,I3=zx.getterFor(Wx);T3(Array,"Array",function(e,t){O3(this,{type:Wx,target:$3(e),index:0,kind:t})},function(){var e=I3(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,ms(void 0,!0);switch(e.kind){case"keys":return ms(n,!1);case"values":return ms(t[n],!1)}return ms([n,t[n]],!1)},"values"),Bx.Arguments=Bx.Array;var P3={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},A3=P3,R3=lt,D3=qr,Ux=Zr;for(var yf in A3)D3(R3[yf],yf),Ux[yf]=Ux.Array;var _3=AB,M3=_3,j3=ft,N3=on.f,Hx=j3("metadata"),Vx=Function.prototype;Vx[Hx]===void 0&&N3(Vx,Hx,{value:null});var L3=Ke;L3("asyncDispose");var F3=Ke;F3("dispose");var B3=Ke;B3("metadata");var z3=M3,W3=z3,U3=yn,H3=tt,bf=U3("Symbol"),V3=bf.keyFor,K3=H3(bf.prototype.valueOf),Kx=bf.isRegisteredSymbol||function(t){try{return V3(K3(t))!==void 0}catch{return!1}},q3=Ne,G3=Kx;q3({target:"Symbol",stat:!0},{isRegisteredSymbol:G3});for(var Y3=Wr,qx=yn,X3=tt,J3=Xi,Z3=ft,gs=qx("Symbol"),Gx=gs.isWellKnownSymbol,Yx=qx("Object","getOwnPropertyNames"),Q3=X3(gs.prototype.valueOf),Xx=Y3("wks"),xf=0,Jx=Yx(gs),e4=Jx.length;xf<e4;xf++)try{var Zx=Jx[xf];J3(gs[Zx])&&Z3(Zx)}catch{}var Qx=function(t){if(Gx&&Gx(t))return!0;try{for(var n=Q3(t),r=0,i=Yx(Xx),o=i.length;r<o;r++)if(Xx[i[r]]==n)return!0}catch{}return!1},t4=Ne,n4=Qx;t4({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n4});var r4=Ke;r4("customMatcher");var i4=Ke;i4("observable");var o4=Ne,a4=Kx;o4({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:a4});var s4=Ne,l4=Qx;s4({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:l4});var u4=Ke;u4("matcher");var c4=Ke;c4("metadataKey");var f4=Ke;f4("patternMatch");var d4=Ke;d4("replaceAll");var p4=W3,h4=p4,v4=h4;const Qr=Se(v4);var wf=tt,m4=Ga,g4=no,y4=Wa,b4=wf("".charAt),ew=wf("".charCodeAt),x4=wf("".slice),tw=function(e){return function(t,n){var r=g4(y4(t)),i=m4(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=ew(r,i),a<55296||a>56319||i+1===o||(s=ew(r,i+1))<56320||s>57343?e?b4(r,i):a:e?x4(r,i,i+2):(a-55296<<10)+(s-56320)+65536)}},w4={codeAt:tw(!1),charAt:tw(!0)},S4=w4.charAt,E4=no,nw=Jc,C4=Lx,rw=Fx,iw="String Iterator",k4=nw.set,$4=nw.getterFor(iw);C4(String,"String",function(e){k4(this,{type:iw,string:E4(e),index:0})},function(){var t=$4(this),n=t.string,r=t.index,i;return r>=n.length?rw(void 0,!0):(i=S4(n,r),t.index+=i.length,rw(i,!1))});var T4=eo,ow=xc,O4=hc,I4=Zr,P4=ft,A4=P4("iterator"),Sf=function(e){if(!O4(e))return ow(e,A4)||ow(e,"@@iterator")||I4[T4(e)]},R4=Sf,D4=R4,_4=D4,M4=_4,j4=M4,N4=j4,L4=N4,F4=L4,B4=F4;const aw=Se(B4);var z4=At,W4=Kr,U4=TypeError,H4=Object.getOwnPropertyDescriptor,V4=z4&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),sw=V4?function(e,t){if(W4(e)&&!H4(e,"length").writable)throw new U4("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},K4=Ne,q4=An,G4=ur,Y4=sw,X4=_c,J4=ut,Z4=J4(function(){return[].push.call({length:4294967296},1)!==4294967297}),Q4=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},ez=Z4||!Q4();K4({target:"Array",proto:!0,arity:1,forced:ez},{push:function(t){var n=q4(this),r=G4(n),i=arguments.length;X4(r+i);for(var o=0;o<i;o++)n[r]=arguments[o],r++;return Y4(n,r),r}});var tz=lt,nz=vt,dr=function(e,t){var n=nz[e+"Prototype"],r=n&&n[t];if(r)return r;var i=tz[e],o=i&&i.prototype;return o&&o[t]},rz=dr,iz=rz("Array","push"),oz=Pn,az=iz,Ef=Array.prototype,sz=function(e){var t=e.push;return e===Ef||oz(Ef,e)&&t===Ef.push?az:t},lz=sz,uz=lz,cz=uz,fz=cz,dz=fz,pz=dz,hz=pz;const vz=Se(hz);function mz(e,t){var n=e==null?null:typeof Qr<"u"&&aw(e)||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(vz(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}var gz=Ne,lw=Kr,yz=Lc,bz=nn,uw=Bc,xz=ur,wz=gn,Sz=Qi,Ez=ft,Cz=Xa,kz=rs,$z=Cz("slice"),Tz=Ez("species"),Cf=Array,Oz=Math.max;gz({target:"Array",proto:!0,forced:!$z},{slice:function(t,n){var r=wz(this),i=xz(r),o=uw(t,i),a=uw(n===void 0?i:n,i),s,l,u;if(lw(r)&&(s=r.constructor,yz(s)&&(s===Cf||lw(s.prototype))?s=void 0:bz(s)&&(s=s[Tz],s===null&&(s=void 0)),s===Cf||s===void 0))return kz(r,o,a);for(l=new(s===void 0?Cf:s)(Oz(a-o,0)),u=0;o<a;o++,u++)o in r&&Sz(l,u,r[o]);return l.length=u,l}});var Iz=dr,Pz=Iz("Array","slice"),Az=Pn,Rz=Pz,kf=Array.prototype,Dz=function(e){var t=e.slice;return e===kf||Az(kf,e)&&t===kf.slice?Rz:t},_z=Dz,Mz=_z,jz=Mz,Nz=jz,Lz=Nz,Fz=Lz,Bz=Fz;const zz=Se(Bz);var Wz=mn,cw=Kn,Uz=xc,Hz=function(e,t,n){var r,i;cw(e);try{if(r=Uz(e,"return"),!r){if(t==="throw")throw n;return n}r=Wz(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return cw(r),n},Vz=Kn,Kz=Hz,qz=function(e,t,n,r){try{return r?t(Vz(n)[0],n[1]):t(n)}catch(i){Kz(e,"throw",i)}},Gz=ft,Yz=Zr,Xz=Gz("iterator"),Jz=Array.prototype,Zz=function(e){return e!==void 0&&(Yz.Array===e||Jz[Xz]===e)},Qz=mn,e5=Va,t5=Kn,n5=Ha,r5=Sf,i5=TypeError,o5=function(e,t){var n=arguments.length<2?r5(e):t;if(e5(n))return t5(Qz(n,e));throw new i5(n5(e)+" is not iterable")},a5=Ic,s5=mn,l5=An,u5=qz,c5=Zz,f5=Lc,d5=ur,fw=Qi,p5=o5,h5=Sf,dw=Array,v5=function(t){var n=l5(t),r=f5(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=a5(o,i>2?arguments[2]:void 0));var s=h5(n),l=0,u,c,f,p,d,v;if(s&&!(this===dw&&c5(s)))for(c=r?new this:[],p=p5(n,s),d=p.next;!(f=s5(d,p)).done;l++)v=a?u5(p,o,[f.value,l],!0):f.value,fw(c,l,v);else for(u=d5(n),c=r?new this(u):dw(u);u>l;l++)v=a?o(n[l],l):n[l],fw(c,l,v);return c.length=l,c},m5=ft,pw=m5("iterator"),hw=!1;try{var g5=0,vw={next:function(){return{done:!!g5++}},return:function(){hw=!0}};vw[pw]=function(){return this},Array.from(vw,function(){throw 2})}catch{}var y5=function(e,t){try{if(!t&&!hw)return!1}catch{return!1}var n=!1;try{var r={};r[pw]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},b5=Ne,x5=v5,w5=y5,S5=!w5(function(e){Array.from(e)});b5({target:"Array",stat:!0,forced:S5},{from:x5});var E5=vt,C5=E5.Array.from,k5=C5,$5=k5,T5=$5,O5=T5,I5=O5,P5=I5,A5=P5;const mw=Se(A5);function $f(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gw(e,t){if(e){var n;if(typeof e=="string")return $f(e,t);var r=zz(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?mw(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$f(e,t):void 0}}function R5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
271
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xn(e,t){return WN(e)||mz(e,t)||gw(e,t)||R5()}var yw={exports:{}};/*!
280
+ */var zu,ry;function iy(){if(ry)return zu;ry=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(c){return a[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zu=i()?Object.assign:function(o,a){for(var s,l=r(o),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var p=0;p<u.length;p++)n.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},zu}var Wu,oy;function Uu(){if(oy)return Wu;oy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wu=e,Wu}var Hu,ay;function sy(){return ay||(ay=1,Hu=Function.call.bind(Object.prototype.hasOwnProperty)),Hu}var Vu,ly;function TD(){if(ly)return Vu;ly=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uu(),n={},r=sy();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Vu=i,Vu}var qu,uy;function $D(){if(uy)return qu;uy=1;var e=_a(),t=iy(),n=Uu(),r=sy(),i=TD(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return qu=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(y){var $=y&&(u&&y[u]||y[c]);if(typeof $=="function")return $}var p="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:C(),elementType:S(),instanceOf:E,node:O(),objectOf:L,oneOf:I,oneOfType:_,shape:H,exact:F};function v(y,$){return y===$?y!==0||1/y===1/$:y!==y&&$!==$}function h(y,$){this.message=y,this.data=$&&typeof $=="object"?$:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var $={},N=0;function x(Y,K,X,Z,ee,J,Q){if(Z=Z||p,J=J||X,Q!==n){if(l){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=Z+":"+X;!$[ie]&&N<3&&(o("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),$[ie]=!0,N++)}}return K[X]==null?Y?K[X]===null?new h("The "+ee+" `"+J+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new h("The "+ee+" `"+J+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:y(K,X,Z,ee,J)}var B=x.bind(null,!1);return B.isRequired=x.bind(null,!0),B}function m(y){function $(N,x,B,Y,K,X){var Z=N[x],ee=W(Z);if(ee!==y){var J=G(Z);return new h("Invalid "+Y+" `"+K+"` of type "+("`"+J+"` supplied to `"+B+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g($)}function b(){return g(a)}function w(y){function $(N,x,B,Y,K){if(typeof y!="function")return new h("Property `"+K+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var X=N[x];if(!Array.isArray(X)){var Z=W(X);return new h("Invalid "+Y+" `"+K+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an array."))}for(var ee=0;ee<X.length;ee++){var J=y(X,ee,B,Y,K+"["+ee+"]",n);if(J instanceof Error)return J}return null}return g($)}function C(){function y($,N,x,B,Y){var K=$[N];if(!s(K)){var X=W(K);return new h("Invalid "+B+" `"+Y+"` of type "+("`"+X+"` supplied to `"+x+"`, expected a single ReactElement."))}return null}return g(y)}function S(){function y($,N,x,B,Y){var K=$[N];if(!e.isValidElementType(K)){var X=W(K);return new h("Invalid "+B+" `"+Y+"` of type "+("`"+X+"` supplied to `"+x+"`, expected a single ReactElement type."))}return null}return g(y)}function E(y){function $(N,x,B,Y,K){if(!(N[x]instanceof y)){var X=y.name||p,Z=R(N[x]);return new h("Invalid "+Y+" `"+K+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected ")+("instance of `"+X+"`."))}return null}return g($)}function I(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function $(N,x,B,Y,K){for(var X=N[x],Z=0;Z<y.length;Z++)if(v(X,y[Z]))return null;var ee=JSON.stringify(y,function(Q,q){var ie=G(q);return ie==="symbol"?String(q):q});return new h("Invalid "+Y+" `"+K+"` of value `"+String(X)+"` "+("supplied to `"+B+"`, expected one of "+ee+"."))}return g($)}function L(y){function $(N,x,B,Y,K){if(typeof y!="function")return new h("Property `"+K+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var X=N[x],Z=W(X);if(Z!=="object")return new h("Invalid "+Y+" `"+K+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an object."));for(var ee in X)if(r(X,ee)){var J=y(X,ee,B,Y,K+"."+ee,n);if(J instanceof Error)return J}return null}return g($)}function _(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<y.length;$++){var N=y[$];if(typeof N!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(N)+" at index "+$+"."),a}function x(B,Y,K,X,Z){for(var ee=[],J=0;J<y.length;J++){var Q=y[J],q=Q(B,Y,K,X,Z,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&ee.push(q.data.expectedType)}var ie=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new h("Invalid "+X+" `"+Z+"` supplied to "+("`"+K+"`"+ie+"."))}return g(x)}function O(){function y($,N,x,B,Y){return j($[N])?null:new h("Invalid "+B+" `"+Y+"` supplied to "+("`"+x+"`, expected a ReactNode."))}return g(y)}function D(y,$,N,x,B){return new h((y||"React class")+": "+$+" type `"+N+"."+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function H(y){function $(N,x,B,Y,K){var X=N[x],Z=W(X);if(Z!=="object")return new h("Invalid "+Y+" `"+K+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));for(var ee in y){var J=y[ee];if(typeof J!="function")return D(B,Y,K,ee,G(J));var Q=J(X,ee,B,Y,K+"."+ee,n);if(Q)return Q}return null}return g($)}function F(y){function $(N,x,B,Y,K){var X=N[x],Z=W(X);if(Z!=="object")return new h("Invalid "+Y+" `"+K+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));var ee=t({},N[x],y);for(var J in ee){var Q=y[J];if(r(y,J)&&typeof Q!="function")return D(B,Y,K,J,G(Q));if(!Q)return new h("Invalid "+Y+" `"+K+"` key `"+J+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(N[x],null," ")+`
281
+ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var q=Q(X,J,B,Y,K+"."+J,n);if(q)return q}return null}return g($)}function j(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(j);if(y===null||s(y))return!0;var $=f(y);if($){var N=$.call(y),x;if($!==y.entries){for(;!(x=N.next()).done;)if(!j(x.value))return!1}else for(;!(x=N.next()).done;){var B=x.value;if(B&&!j(B[1]))return!1}}else return!1;return!0;default:return!1}}function M(y,$){return y==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function W(y){var $=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":M($,y)?"symbol":$}function G(y){if(typeof y>"u"||y===null)return""+y;var $=W(y);if($==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return $}function V(y){var $=G(y);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function R(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},qu}var Ku,cy;function OD(){if(cy)return Ku;cy=1;var e=Uu();function t(){}function n(){}return n.resetWarningCache=t,Ku=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Ku}if(process.env.NODE_ENV!=="production"){var ID=_a(),PD=!0;Bu.exports=$D()(ID.isElement,PD)}else Bu.exports=OD()();var AD=Bu.exports;const ze=Ee(AD);var RD=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Hi(e,t){var n=_D(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function _D(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=RD.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var DD=[".DS_Store","Thumbs.db"];function MD(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return Da(e)&&jD(e.dataTransfer)?[2,BD(e.dataTransfer,e.type)]:ND(e)?[2,LD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,FD(e)]:[2,[]]})})}function jD(e){return Da(e)}function ND(e){return Da(e)&&Da(e.target)}function Da(e){return typeof e=="object"&&e!==null}function LD(e){return Gu(e.target.files).map(function(t){return Hi(t)})}function FD(e){return Pr(this,void 0,void 0,function(){var t;return Ar(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Hi(r)})]}})})}function BD(e,t){return Pr(this,void 0,void 0,function(){var n,r;return Ar(this,function(i){switch(i.label){case 0:return e.items?(n=Gu(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(zD))]):[3,2];case 1:return r=i.sent(),[2,fy(dy(r))];case 2:return[2,fy(Gu(e.files).map(function(o){return Hi(o)}))]}})})}function fy(e){return e.filter(function(t){return DD.indexOf(t.name)===-1})}function Gu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function zD(e){if(typeof e.webkitGetAsEntry!="function")return py(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?hy(t):py(e)}function dy(e){return e.reduce(function(t,n){return cu(cu([],Pm(t),!1),Pm(Array.isArray(n)?dy(n):[n]),!1)},[])}function py(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Hi(t);return Promise.resolve(n)}function WD(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,e.isDirectory?hy(e):UD(e)]})})}function hy(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return Pr(a,void 0,void 0,function(){var l,u,c;return Ar(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=f.sent(),n(l),[3,4];case 3:return u=f.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(WD)),i.push(c),o(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function UD(e){return Pr(this,void 0,void 0,function(){return Ar(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=Hi(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var HD=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function vy(e){return KD(e)||qD(e)||by(e)||VD()}function VD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
282
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KD(e){if(Array.isArray(e))return Yu(e)}function my(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?my(Object(n),!0).forEach(function(r){yy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):my(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vi(e,t){return XD(e)||YD(e,t)||by(e,t)||GD()}function GD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
283
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function by(e,t){if(e){if(typeof e=="string")return Yu(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 Yu(e,t)}}function Yu(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 YD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function XD(e){if(Array.isArray(e))return e}var JD="file-invalid-type",QD="file-too-large",ZD="file-too-small",eM="too-many-files",tM=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:JD,message:"File type must be ".concat(n)}},xy=function(t){return{code:QD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},wy=function(t){return{code:ZD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nM={code:eM,message:"Too many files"};function Sy(e,t){var n=e.type==="application/x-moz-file"||HD(e,t);return[n,n?null:tM(t)]}function Ey(e,t,n){if(ur(e.size))if(ur(t)&&ur(n)){if(e.size>n)return[!1,xy(n)];if(e.size<t)return[!1,wy(t)]}else{if(ur(t)&&e.size<t)return[!1,wy(t)];if(ur(n)&&e.size>n)return[!1,xy(n)]}return[!0,null]}function ur(e){return e!=null}function rM(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=Sy(l,n),c=Vi(u,1),f=c[0],p=Ey(l,r,i),d=Vi(p,1),v=d[0],h=s?s(l):null;return f&&v&&!h})}function Ma(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ja(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function ky(e){e.preventDefault()}function iM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function oM(e){return e.indexOf("Edge/")!==-1}function aM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return iM(e)||oM(e)}function vn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!Ma(r)&&s&&s.apply(void 0,[r].concat(o)),Ma(r)})}}function sM(){return"showOpenFilePicker"in window}function lM(e){if(ur(e)){var t=Object.entries(e).filter(function(n){var r=Vi(n,2),i=r[0],o=r[1],a=!0;return Cy(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(Ty))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Vi(r,2),o=i[0],a=i[1];return gy(gy({},n),{},yy({},o,a))},{});return[{description:"Files",accept:t}]}return e}function uM(e){if(ur(e))return Object.entries(e).reduce(function(t,n){var r=Vi(n,2),i=r[0],o=r[1];return[].concat(vy(t),[i],vy(o))},[]).filter(function(t){return Cy(t)||Ty(t)}).join(",")}function cM(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function fM(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Cy(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Ty(e){return/^.*\.[\w]+$/.test(e)}var dM=["children"],pM=["open"],hM=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],vM=["refKey","onChange","onClick"];function mM(e){return bM(e)||yM(e)||$y(e)||gM()}function gM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
284
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bM(e){if(Array.isArray(e))return Ju(e)}function Xu(e,t){return SM(e)||wM(e,t)||$y(e,t)||xM()}function xM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
285
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $y(e,t){if(e){if(typeof e=="string")return Ju(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 Ju(e,t)}}function Ju(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 wM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function SM(e){if(Array.isArray(e))return e}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(n),!0).forEach(function(r){Qu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Na(e,t){if(e==null)return{};var n=EM(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var La=A.forwardRef(function(e,t){var n=e.children,r=Na(e,dM),i=kM(r),o=i.open,a=Na(i,pM);return A.useImperativeHandle(t,function(){return{open:o}},[o]),A.createElement(A.Fragment,null,n(Ve(Ve({},a),{},{open:o})))});La.displayName="Dropzone";var Iy={disabled:!1,getFilesFromEvent:MD,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};La.defaultProps=Iy,La.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var Zu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function kM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ve(Ve({},Iy),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,L=t.onError,_=t.validator,O=A.useMemo(function(){return uM(n)},[n]),D=A.useMemo(function(){return lM(n)},[n]),H=A.useMemo(function(){return typeof g=="function"?g:Py},[g]),F=A.useMemo(function(){return typeof h=="function"?h:Py},[h]),j=A.useRef(null),M=A.useRef(null),W=A.useReducer(CM,Zu),G=Xu(W,2),V=G[0],R=G[1],y=V.isFocused,$=V.isFileDialogActive,N=A.useRef(typeof window<"u"&&window.isSecureContext&&m&&sM()),x=function(){!N.current&&$&&setTimeout(function(){if(M.current){var ce=M.current.files;ce.length||(R({type:"closeDialog"}),F())}},300)};A.useEffect(function(){return window.addEventListener("focus",x,!1),function(){window.removeEventListener("focus",x,!1)}},[M,$,F,N]);var B=A.useRef([]),Y=function(ce){j.current&&j.current.contains(ce.target)||(ce.preventDefault(),B.current=[])};A.useEffect(function(){return w&&(document.addEventListener("dragover",ky,!1),document.addEventListener("drop",Y,!1)),function(){w&&(document.removeEventListener("dragover",ky),document.removeEventListener("drop",Y))}},[j,w]),A.useEffect(function(){return!r&&b&&j.current&&j.current.focus(),function(){}},[j,b,r]);var K=A.useCallback(function(oe){L?L(oe):console.error(oe)},[L]),X=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),B.current=[].concat(mM(B.current),[oe.target]),ja(oe)&&Promise.resolve(i(oe)).then(function(ce){if(!(Ma(oe)&&!I)){var U=ce.length,z=U>0&&rM({files:ce,accept:O,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:_}),ne=U>0&&!z;R({isDragAccept:z,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(oe)}}).catch(function(ce){return K(ce)})},[i,u,K,I,O,a,o,s,l,_]),Z=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var ce=ja(oe);if(ce&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return ce&&f&&f(oe),!1},[f,I]),ee=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe);var ce=B.current.filter(function(z){return j.current&&j.current.contains(z)}),U=ce.indexOf(oe.target);U!==-1&&ce.splice(U,1),B.current=ce,!(ce.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ja(oe)&&c&&c(oe))},[j,c,I]),J=A.useCallback(function(oe,ce){var U=[],z=[];oe.forEach(function(ne){var se=Sy(ne,O),fe=Xu(se,2),ge=fe[0],Ye=fe[1],Xe=Ey(ne,a,o),gt=Xu(Xe,2),it=gt[0],Re=gt[1],ot=_?_(ne):null;if(ge&&it&&!ot)U.push(ne);else{var Qe=[Ye,Re];ot&&(Qe=Qe.concat(ot)),z.push({file:ne,errors:Qe.filter(function(Gt){return Gt})})}}),(!s&&U.length>1||s&&l>=1&&U.length>l)&&(U.forEach(function(ne){z.push({file:ne,errors:[nM]})}),U.splice(0)),R({acceptedFiles:U,fileRejections:z,type:"setFiles"}),p&&p(U,z,ce),z.length>0&&v&&v(z,ce),U.length>0&&d&&d(U,ce)},[R,s,O,a,o,l,p,d,v,_]),Q=A.useCallback(function(oe){oe.preventDefault(),oe.persist(),rt(oe),B.current=[],ja(oe)&&Promise.resolve(i(oe)).then(function(ce){Ma(oe)&&!I||J(ce,oe)}).catch(function(ce){return K(ce)}),R({type:"reset"})},[i,J,K,I]),q=A.useCallback(function(){if(N.current){R({type:"openDialog"}),H();var oe={multiple:s,types:D};window.showOpenFilePicker(oe).then(function(ce){return i(ce)}).then(function(ce){J(ce,null),R({type:"closeDialog"})}).catch(function(ce){cM(ce)?(F(ce),R({type:"closeDialog"})):fM(ce)?(N.current=!1,M.current?(M.current.value=null,M.current.click()):K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):K(ce)});return}M.current&&(R({type:"openDialog"}),H(),M.current.value=null,M.current.click())},[R,H,F,m,J,K,D,s]),ie=A.useCallback(function(oe){!j.current||!j.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),q())},[j,q]),le=A.useCallback(function(){R({type:"focus"})},[]),de=A.useCallback(function(){R({type:"blur"})},[]),ae=A.useCallback(function(){C||(aM()?setTimeout(q,0):q())},[C,q]),ve=function(ce){return r?null:ce},Te=function(ce){return S?null:ve(ce)},Ae=function(ce){return E?null:ve(ce)},rt=function(ce){I&&ce.stopPropagation()},Et=A.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,U=ce===void 0?"ref":ce,z=oe.role,ne=oe.onKeyDown,se=oe.onFocus,fe=oe.onBlur,ge=oe.onClick,Ye=oe.onDragEnter,Xe=oe.onDragOver,gt=oe.onDragLeave,it=oe.onDrop,Re=Na(oe,hM);return Ve(Ve(Qu({onKeyDown:Te(vn(ne,ie)),onFocus:Te(vn(se,le)),onBlur:Te(vn(fe,de)),onClick:ve(vn(ge,ae)),onDragEnter:Ae(vn(Ye,X)),onDragOver:Ae(vn(Xe,Z)),onDragLeave:Ae(vn(gt,ee)),onDrop:Ae(vn(it,Q)),role:typeof z=="string"&&z!==""?z:"presentation"},U,j),!r&&!S?{tabIndex:0}:{}),Re)}},[j,ie,le,de,ae,X,Z,ee,Q,S,E,r]),kt=A.useCallback(function(oe){oe.stopPropagation()},[]),Ct=A.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=oe.refKey,U=ce===void 0?"ref":ce,z=oe.onChange,ne=oe.onClick,se=Na(oe,vM),fe=Qu({accept:O,multiple:s,type:"file",style:{display:"none"},onChange:ve(vn(z,Q)),onClick:ve(vn(ne,kt)),tabIndex:-1},U,M);return Ve(Ve({},fe),se)}},[M,n,s,Q,r]);return Ve(Ve({},V),{},{isFocused:y&&!r,getRootProps:Et,getInputProps:Ct,rootRef:j,inputRef:M,open:ve(q)})}function CM(e,t){switch(t.type){case"focus":return Ve(Ve({},e),{},{isFocused:!0});case"blur":return Ve(Ve({},e),{},{isFocused:!1});case"openDialog":return Ve(Ve({},Zu),{},{isFileDialogActive:!0});case"closeDialog":return Ve(Ve({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ve(Ve({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ve(Ve({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ve({},Zu);default:return e}}function Py(){}const ec=({children:e})=>{const[t,n]=A.useState(!1),[r,i]=A.useState(""),[o,a]=A.useState(""),[s,l]=A.useState(""),[u,c]=A.useState(()=>{}),[f,p]=A.useState(""),[d,v]=A.useState(null),h=({title:m,description:b,confirmButton:w,onConfirm:C,cancelButton:S,content:E})=>{i(m),a(b),l(w),c(()=>C),p(S),v(E),n(!0)},g=()=>{n(!1)};return T.jsxs($m.Provider,{value:{open:t,showModal:h,hideModal:g},children:[T.jsx(vi,{open:t,onOpenChange:n,children:T.jsx(vi.Content,{title:r,description:o,confirmButton:s,onConfirm:u,cancelButton:f,hideModal:g,children:d})}),e]})},Ay=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o})=>{const a=A.useMemo(()=>Lp({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return T.jsx("style",{children:a})},tc=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...o})=>{const{container:a}=we,s=oa(c=>c.setMessageContainerRef),l=Ri(c=>c.uploadFile),u=A.useRef(null);return A.useEffect(()=>{s(u)},[u]),i&&r?T.jsx(La,{noClick:!0,onDrop:c=>c.forEach(f=>l(f,r)),children:({getRootProps:c,isDragActive:f})=>T.jsxs("div",{...o,className:zr(a.className,t),ref:u,children:[T.jsxs("div",{"data-hover":f,...a.dropzone.overlay,children:["Drop files to upload",T.jsx(HP,{style:{width:"50px"}})]}),T.jsxs(ec,{children:[T.jsx(Ry,{connected:n}),T.jsx("div",{...a.dropzone.container,...c(),children:e})]})]})}):T.jsx("div",{...o,className:zr(a.className,t),ref:u,children:T.jsxs(ec,{children:[T.jsx(Ry,{connected:n}),e]})})},Ry=({connected:e})=>{const{open:t,showModal:n}=uu();return e===!1&&!t&&n&&n({title:"Connection Error",description:"There was an error connecting to the server. Please check your internet connection and try again.",confirmButton:"Restart",onConfirm:()=>window.parent.location.reload(),cancelButton:"Cancel"}),T.jsx(T.Fragment,{})};tc.displayName="Container";const _y=A.forwardRef(({children:e,onClick:t,imgUrl:n,...r},i)=>{const{fab:o}=we,{container:a,icon:s,image:l}=o??{};return n?T.jsx("img",{src:n,role:"button",tabIndex:0,alt:"Chatbot Button Image",...l,draggable:"false",onClick:t}):T.jsx("div",{...r,...a,ref:i,onClick:t,children:T.jsx("div",{...s})})});_y.displayName="Fab";function In(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function TM(e,t){const n=k.createContext(t),r=o=>{const{children:a,...s}=o,l=k.useMemo(()=>s,Object.values(s));return T.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=k.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Dy(e,t=[]){let n=[];function r(o,a){const s=k.createContext(a),l=n.length;n=[...n,a];const u=f=>{var m;const{scope:p,children:d,...v}=f,h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,g=k.useMemo(()=>v,Object.values(v));return T.jsx(h.Provider,{value:g,children:d})};u.displayName=o+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,v=k.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[u,c]}const i=()=>{const o=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,$M(i,...t)]}function $M(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function My({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=OM({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=jn(n),l=k.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[o,e,i,s]);return[a,l]}function OM({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,i=k.useRef(r),o=jn(t);return k.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function jy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ny(...e){return t=>{let n=!1;const r=e.map(i=>{const o=jy(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():jy(e[i],null)}}}}function Vn(...e){return k.useCallback(Ny(...e),e)}var nc=k.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.Children.toArray(n),o=i.find(PM);if(o){const a=o.props.children,s=i.map(l=>l===o?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return T.jsx(rc,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return T.jsx(rc,{...r,ref:t,children:n})});nc.displayName="Slot";var rc=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const i=RM(n);return k.cloneElement(n,{...AM(r,n.props),ref:t?Ny(t,i):i})}return k.Children.count(n)>1?k.Children.only(null):null});rc.displayName="SlotClone";var IM=({children:e})=>T.jsx(T.Fragment,{children:e});function PM(e){return k.isValidElement(e)&&e.type===IM}function AM(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function RM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _M=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tn=_M.reduce((e,t)=>{const n=k.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?nc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function DM(e,t){e&&hp.flushSync(()=>e.dispatchEvent(t))}function MM(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Fa=e=>{const{present:t,children:n}=e,r=jM(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),o=Vn(r.ref,NM(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:o}):null};Fa.displayName="Presence";function jM(e){const[t,n]=k.useState(),r=k.useRef({}),i=k.useRef(e),o=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=MM(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const u=Ba(r.current);o.current=s==="mounted"?u:"none"},[s]),kr(()=>{const u=r.current,c=i.current;if(c!==e){const p=o.current,d=Ba(u);e?l("MOUNT"):d==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),kr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=d=>{const h=Ba(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(o.current=Ba(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ba(e){return(e==null?void 0:e.animationName)||"none"}function NM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var LM=k.useId||(()=>{}),FM=0;function za(e){const[t,n]=k.useState(LM());return kr(()=>{e||n(r=>r??String(FM++))},[e]),e||(t?`radix-${t}`:"")}var ic="Collapsible",[BM,RX]=Dy(ic),[zM,oc]=BM(ic),Ly=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=My({prop:r,defaultProp:i,onChange:a});return T.jsx(zM,{scope:n,disabled:o,contentId:za(),open:l,onOpenToggle:k.useCallback(()=>u(c=>!c),[u]),children:T.jsx(tn.div,{"data-state":sc(l),"data-disabled":o?"":void 0,...s,ref:t})})});Ly.displayName=ic;var Fy="CollapsibleTrigger",By=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=oc(Fy,n);return T.jsx(tn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":sc(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:In(e.onClick,i.onOpenToggle)})});By.displayName=Fy;var ac="CollapsibleContent",zy=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=oc(ac,e.__scopeCollapsible);return T.jsx(Fa,{present:n||i.open,children:({present:o})=>T.jsx(WM,{...r,ref:t,present:o})})});zy.displayName=ac;var WM=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=oc(ac,n),[s,l]=k.useState(r),u=k.useRef(null),c=Vn(t,u),f=k.useRef(0),p=f.current,d=k.useRef(0),v=d.current,h=a.open||s,g=k.useRef(h),m=k.useRef(void 0);return k.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),kr(()=>{const b=u.current;if(b){m.current=m.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,d.current=w.width,g.current||(b.style.transitionDuration=m.current.transitionDuration,b.style.animationName=m.current.animationName),l(r)}},[a.open,r]),T.jsx(tn.div,{"data-state":sc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&i})});function sc(e){return e?"open":"closed"}var UM=Ly,HM=zy;const Wy=({restartConversation:e,...t})=>{var a,s;const{header:n}=we,{showModal:r,hideModal:i}=uu(),o=l=>{l.stopPropagation(),r&&i?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),i()},cancelButton:"Cancel"}):e()};return T.jsx(rA,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},VM=({onClick:e,...t})=>{const{header:n}=we,r=i=>{i.stopPropagation(),e==null||e()};return T.jsx(uA,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},qi=({icon:e,title:t,link:n,...r})=>{var a,s,l,u,c,f,p,d,v,h,g,m;const{header:i}=we,o=e??VP;return t?n?T.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[T.jsx(o,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),T.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):T.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[T.jsx(o,{...(h=(v=i.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),T.jsx("p",{...(m=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},Uy=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var c,f,p,d,v,h,g,m,b,w,C,S,E,I,L,_,O,D,H,F,j,M;const{header:o}=we,[a,s]=A.useState(!!e),l=!!((c=n.email)!=null&&c.title)||!!((f=n.phone)!=null&&f.title)||!!((p=n.website)!=null&&p.title)||!!((d=n.termsOfService)!=null&&d.link)||!!((v=n.privacyPolicy)!=null&&v.link),u=l||!!n.botDescription;return T.jsxs(UM,{open:u?a:!1,onOpenChange:s,"data-disabled":u?void 0:"",...o.container,...i,children:[T.jsxs(By,{"aria-label":"Expand Header Button",...o.content.container,children:[T.jsx(No,{...i,src:n.botAvatar,...o.content.avatar,children:n.botName||"Bot"}),T.jsx("h2",{...o.content.title,children:n.botName||"Bot"}),n.botDescription&&T.jsx("p",{...o.content.description,children:n.botDescription}),T.jsxs("div",{...o.content.actions.container,children:[r&&T.jsx(Wy,{restartConversation:r}),t&&T.jsx(VM,{onClick:t})]})]}),l&&T.jsxs(HM,{...o.expandedContent.container,children:[T.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[T.jsx(qi,{"data-email":"",icon:JP,title:(h=n.email)==null?void 0:h.title,link:(m=(g=n.email)==null?void 0:g.link)!=null&&m.startsWith("mailto:")?(b=n.email)==null?void 0:b.link:`mailto:${(w=n.email)==null?void 0:w.link}`}),T.jsx(qi,{"data-phone":"",icon:tA,title:(C=n.phone)==null?void 0:C.title,link:(E=(S=n.phone)==null?void 0:S.link)!=null&&E.startsWith("tel:")?(I=n.phone)==null?void 0:I.link:`tel:${(L=n.phone)==null?void 0:L.link}`}),T.jsx(qi,{"data-website":"",link:(_=n.website)==null?void 0:_.link,icon:GP,title:(O=n.website)==null?void 0:O.title})]}),T.jsxs("div",{"data-legal":"",...(D=o.expandedContent)==null?void 0:D.group,children:[T.jsx(qi,{"data-terms":"",link:(H=n.termsOfService)==null?void 0:H.link,icon:nm,title:(F=n.termsOfService)==null?void 0:F.title}),T.jsx(qi,{"data-privacy":"",link:(j=n.privacyPolicy)==null?void 0:j.link,icon:XP,title:(M=n.privacyPolicy)==null?void 0:M.title})]})]})]})},lc=A.memo(({...e})=>{const{typingIndicator:t}=we;return T.jsx("div",{...e,...t==null?void 0:t.container,children:T.jsx("div",{...t==null?void 0:t.loader})})});lc.displayName="TypingIndicator";const uc=A.memo(A.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,status:s,renderers:l,isReadOnly:u,isLastDeliveredMessage:c,feedback:f,timestamp:p,metadata:d,sendMessage:v,addMessageFeedback:h},g)=>{const[m,b]=A.useState([]),{message:{container:w,avatar:C,deliveryStatus:S}}=we,E=Ip(a??"",15),[I,L]=A.useState("idle");return T.jsx(Tm.Provider,{value:{isLoading:m,setIsLoading:b},children:T.jsxs("div",{...w,className:zr(w==null?void 0:w.className,c&&(S==null?void 0:S.className)),"data-loaded":m.length===0,"data-disable-input":!!n,"data-direction":e,ref:g,children:[T.jsxs(ll,{"data-color":E,"data-loading-status":I,...C==null?void 0:C.container,children:[T.jsx(ul,{...C==null?void 0:C.image,onLoadingStatusChange:L,src:i==null?void 0:i.avatar}),T.jsxs(cl,{...C==null?void 0:C.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&T.jsx(lr,{block:{...t,isReadOnly:u,direction:e,timestamp:p,sender:i,feedback:f,messageId:o,status:s,metadata:d,sendMessage:v,addMessageFeedback:h},renderers:l}),r]})})}));function qM({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=we;return T.jsxs("li",{...r.container,children:[T.jsx(No,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),T.jsxs("div",{...r.content,children:[T.jsx("h1",{...r.title,children:n||"Bot"}),T.jsx("p",{...r.description,children:t})]})]})}function KM(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function GM(){KM("react-scroll-to-bottom:version","4.2.0")}var Ki=function(e){return e&&e.Math===Math&&e},lt=Ki(typeof globalThis=="object"&&globalThis)||Ki(typeof window=="object"&&window)||Ki(typeof self=="object"&&self)||Ki(typeof Xt=="object"&&Xt)||Ki(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),ut=function(e){try{return!!e()}catch{return!0}},YM=ut,Wa=!YM(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),XM=Wa,Hy=Function.prototype,Vy=Hy.apply,qy=Hy.call,cc=typeof Reflect=="object"&&Reflect.apply||(XM?qy.bind(Vy):function(){return qy.apply(Vy,arguments)}),Ky=Wa,Gy=Function.prototype,fc=Gy.call,JM=Ky&&Gy.bind.bind(fc,fc),tt=Ky?JM:function(e){return function(){return fc.apply(e,arguments)}},Yy=tt,QM=Yy({}.toString),ZM=Yy("".slice),cr=function(e){return ZM(QM(e),8,-1)},ej=cr,tj=tt,dc=function(e){if(ej(e)==="Function")return tj(e)},pc=typeof document=="object"&&document.all,wt=typeof pc>"u"&&pc!==void 0?function(e){return typeof e=="function"||e===pc}:function(e){return typeof e=="function"},Gi={},nj=ut,At=!nj(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rj=Wa,Ua=Function.prototype.call,mn=rj?Ua.bind(Ua):function(){return Ua.apply(Ua,arguments)},hc={},Xy={}.propertyIsEnumerable,Jy=Object.getOwnPropertyDescriptor,ij=Jy&&!Xy.call({1:2},1);hc.f=ij?function(t){var n=Jy(this,t);return!!n&&n.enumerable}:Xy;var Yi=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},oj=tt,aj=ut,sj=cr,vc=Object,lj=oj("".split),Qy=aj(function(){return!vc("z").propertyIsEnumerable(0)})?function(e){return sj(e)==="String"?lj(e,""):vc(e)}:vc,mc=function(e){return e==null},uj=mc,cj=TypeError,Ha=function(e){if(uj(e))throw new cj("Can't call method on "+e);return e},fj=Qy,dj=Ha,gn=function(e){return fj(dj(e))},pj=wt,nn=function(e){return typeof e=="object"?e!==null:pj(e)},vt={},gc=vt,yc=lt,hj=wt,Zy=function(e){return hj(e)?e:void 0},yn=function(e,t){return arguments.length<2?Zy(gc[e])||Zy(yc[e]):gc[e]&&gc[e][t]||yc[e]&&yc[e][t]},vj=tt,Pn=vj({}.isPrototypeOf),mj=lt,eb=mj.navigator,tb=eb&&eb.userAgent,bc=tb?String(tb):"",nb=lt,xc=bc,rb=nb.process,ib=nb.Deno,ob=rb&&rb.versions||ib&&ib.version,ab=ob&&ob.v8,rn,Va;ab&&(rn=ab.split("."),Va=rn[0]>0&&rn[0]<4?1:+(rn[0]+rn[1])),!Va&&xc&&(rn=xc.match(/Edge\/(\d+)/),(!rn||rn[1]>=74)&&(rn=xc.match(/Chrome\/(\d+)/),rn&&(Va=+rn[1])));var wc=Va,sb=wc,gj=ut,yj=lt,bj=yj.String,Wr=!!Object.getOwnPropertySymbols&&!gj(function(){var e=Symbol("symbol detection");return!bj(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&sb&&sb<41}),xj=Wr,lb=xj&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wj=yn,Sj=wt,Ej=Pn,kj=lb,Cj=Object,Xi=kj?function(e){return typeof e=="symbol"}:function(e){var t=wj("Symbol");return Sj(t)&&Ej(t.prototype,Cj(e))},Tj=String,qa=function(e){try{return Tj(e)}catch{return"Object"}},$j=wt,Oj=qa,Ij=TypeError,Ka=function(e){if($j(e))return e;throw new Ij(Oj(e)+" is not a function")},Pj=Ka,Aj=mc,Sc=function(e,t){var n=e[t];return Aj(n)?void 0:Pj(n)},Ec=mn,kc=wt,Cc=nn,Rj=TypeError,_j=function(e,t){var n,r;if(t==="string"&&kc(n=e.toString)&&!Cc(r=Ec(n,e))||kc(n=e.valueOf)&&!Cc(r=Ec(n,e))||t!=="string"&&kc(n=e.toString)&&!Cc(r=Ec(n,e)))return r;throw new Rj("Can't convert object to primitive value")},ub={exports:{}},cb=lt,Dj=Object.defineProperty,Mj=function(e,t){try{Dj(cb,e,{value:t,configurable:!0,writable:!0})}catch{cb[e]=t}return t},jj=lt,Nj=Mj,fb="__core-js_shared__",db=ub.exports=jj[fb]||Nj(fb,{});(db.versions||(db.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Tc=ub.exports,pb=Tc,Ur=function(e,t){return pb[e]||(pb[e]=t||{})},Lj=Ha,Fj=Object,An=function(e){return Fj(Lj(e))},Bj=tt,zj=An,Wj=Bj({}.hasOwnProperty),Ft=Object.hasOwn||function(t,n){return Wj(zj(t),n)},Uj=tt,Hj=0,Vj=Math.random(),qj=Uj(1 .toString),$c=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qj(++Hj+Vj,36)},Kj=lt,Gj=Ur,hb=Ft,Yj=$c,Xj=Wr,Jj=lb,Hr=Kj.Symbol,Oc=Gj("wks"),Qj=Jj?Hr.for||Hr:Hr&&Hr.withoutSetter||Yj,ft=function(e){return hb(Oc,e)||(Oc[e]=Xj&&hb(Hr,e)?Hr[e]:Qj("Symbol."+e)),Oc[e]},Zj=mn,vb=nn,mb=Xi,e2=Sc,t2=_j,n2=ft,r2=TypeError,i2=n2("toPrimitive"),o2=function(e,t){if(!vb(e)||mb(e))return e;var n=e2(e,i2),r;if(n){if(t===void 0&&(t="default"),r=Zj(n,e,t),!vb(r)||mb(r))return r;throw new r2("Can't convert object to primitive value")}return t===void 0&&(t="number"),t2(e,t)},a2=o2,s2=Xi,Ic=function(e){var t=a2(e,"string");return s2(t)?t:t+""},l2=lt,gb=nn,Pc=l2.document,u2=gb(Pc)&&gb(Pc.createElement),yb=function(e){return u2?Pc.createElement(e):{}},c2=At,f2=ut,d2=yb,bb=!c2&&!f2(function(){return Object.defineProperty(d2("div"),"a",{get:function(){return 7}}).a!==7}),p2=At,h2=mn,v2=hc,m2=Yi,g2=gn,y2=Ic,b2=Ft,x2=bb,xb=Object.getOwnPropertyDescriptor;Gi.f=p2?xb:function(t,n){if(t=g2(t),n=y2(n),x2)try{return xb(t,n)}catch{}if(b2(t,n))return m2(!h2(v2.f,t,n),t[n])};var w2=ut,S2=wt,E2=/#|\.prototype\./,Ji=function(e,t){var n=C2[k2(e)];return n===$2?!0:n===T2?!1:S2(t)?w2(t):!!t},k2=Ji.normalize=function(e){return String(e).replace(E2,".").toLowerCase()},C2=Ji.data={},T2=Ji.NATIVE="N",$2=Ji.POLYFILL="P",O2=Ji,wb=dc,I2=Ka,P2=Wa,A2=wb(wb.bind),Ac=function(e,t){return I2(e),t===void 0?e:P2?A2(e,t):function(){return e.apply(t,arguments)}},on={},R2=At,_2=ut,Sb=R2&&_2(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),D2=nn,M2=String,j2=TypeError,qn=function(e){if(D2(e))return e;throw new j2(M2(e)+" is not an object")},N2=At,L2=bb,F2=Sb,Ga=qn,Eb=Ic,B2=TypeError,Rc=Object.defineProperty,z2=Object.getOwnPropertyDescriptor,_c="enumerable",Dc="configurable",Mc="writable";on.f=N2?F2?function(t,n,r){if(Ga(t),n=Eb(n),Ga(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Mc in r&&!r[Mc]){var i=z2(t,n);i&&i[Mc]&&(t[n]=r.value,r={configurable:Dc in r?r[Dc]:i[Dc],enumerable:_c in r?r[_c]:i[_c],writable:!1})}return Rc(t,n,r)}:Rc:function(t,n,r){if(Ga(t),n=Eb(n),Ga(r),L2)try{return Rc(t,n,r)}catch{}if("get"in r||"set"in r)throw new B2("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var W2=At,U2=on,H2=Yi,Ya=W2?function(e,t,n){return U2.f(e,t,H2(1,n))}:function(e,t,n){return e[t]=n,e},Qi=lt,V2=cc,q2=dc,K2=wt,G2=Gi.f,Y2=O2,Vr=vt,X2=Ac,qr=Ya,kb=Ft,J2=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return V2(e,this,arguments)};return t.prototype=e.prototype,t},Le=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,a=r?Qi:i?Qi[n]:Qi[n]&&Qi[n].prototype,s=r?Vr:Vr[n]||qr(Vr,n,{})[n],l=s.prototype,u,c,f,p,d,v,h,g,m;for(p in t)u=Y2(r?p:n+(i?".":"#")+p,e.forced),c=!u&&a&&kb(a,p),v=s[p],c&&(e.dontCallGetSet?(m=G2(a,p),h=m&&m.value):h=a[p]),d=c&&h?h:t[p],!(!u&&!o&&typeof v==typeof d)&&(e.bind&&c?g=X2(d,Qi):e.wrap&&c?g=J2(d):o&&K2(d)?g=q2(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&qr(g,"sham",!0),qr(s,p,g),o&&(f=n+"Prototype",kb(Vr,f)||qr(Vr,f,{}),qr(Vr[f],p,d),e.real&&l&&(u||!l[p])&&qr(l,p,d)))},Q2=cr,Kr=Array.isArray||function(t){return Q2(t)==="Array"},Z2=Le,eN=Kr;Z2({target:"Array",stat:!0},{isArray:eN});var tN=vt,nN=tN.Array.isArray,rN=nN,Cb=rN,iN=Cb,oN=iN,aN=oN,sN=aN,lN=sN;const Tb=Ee(lN);function uN(e){if(Tb(e))return e}var cN=Math.ceil,fN=Math.floor,dN=Math.trunc||function(t){var n=+t;return(n>0?fN:cN)(n)},pN=dN,Xa=function(e){var t=+e;return t!==t||t===0?0:pN(t)},hN=Xa,vN=Math.min,mN=function(e){var t=hN(e);return t>0?vN(t,9007199254740991):0},gN=mN,fr=function(e){return gN(e.length)},yN=TypeError,bN=9007199254740991,jc=function(e){if(e>bN)throw yN("Maximum allowed index exceeded");return e},xN=At,wN=on,SN=Yi,Zi=function(e,t,n){xN?wN.f(e,t,SN(0,n)):e[t]=n},EN=ft,kN=EN("toStringTag"),$b={};$b[kN]="z";var Nc=String($b)==="[object z]",CN=Nc,TN=wt,Ja=cr,$N=ft,ON=$N("toStringTag"),IN=Object,PN=Ja(function(){return arguments}())==="Arguments",AN=function(e,t){try{return e[t]}catch{}},eo=CN?Ja:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=AN(t=IN(e),ON))=="string"?n:PN?Ja(t):(r=Ja(t))==="Object"&&TN(t.callee)?"Arguments":r},RN=tt,_N=wt,Lc=Tc,DN=RN(Function.toString);_N(Lc.inspectSource)||(Lc.inspectSource=function(e){return DN(e)});var MN=Lc.inspectSource,jN=tt,NN=ut,Ob=wt,LN=eo,FN=yn,BN=MN,Ib=function(){},Pb=FN("Reflect","construct"),Fc=/^\s*(?:class|function)\b/,zN=jN(Fc.exec),WN=!Fc.test(Ib),to=function(t){if(!Ob(t))return!1;try{return Pb(Ib,[],t),!0}catch{return!1}},Ab=function(t){if(!Ob(t))return!1;switch(LN(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return WN||!!zN(Fc,BN(t))}catch{return!0}};Ab.sham=!0;var Bc=!Pb||NN(function(){var e;return to(to.call)||!to(Object)||!to(function(){e=!0})||e})?Ab:to,Rb=Kr,UN=Bc,HN=nn,VN=ft,qN=VN("species"),_b=Array,KN=function(e){var t;return Rb(e)&&(t=e.constructor,UN(t)&&(t===_b||Rb(t.prototype))?t=void 0:HN(t)&&(t=t[qN],t===null&&(t=void 0))),t===void 0?_b:t},GN=KN,zc=function(e,t){return new(GN(e))(t===0?0:t)},YN=ut,XN=ft,JN=wc,QN=XN("species"),Qa=function(e){return JN>=51||!YN(function(){var t=[],n=t.constructor={};return n[QN]=function(){return{foo:1}},t[e](Boolean).foo!==1})},ZN=Le,eL=ut,tL=Kr,nL=nn,rL=An,iL=fr,Db=jc,Mb=Zi,oL=zc,aL=Qa,sL=ft,lL=wc,jb=sL("isConcatSpreadable"),uL=lL>=51||!eL(function(){var e=[];return e[jb]=!1,e.concat()[0]!==e}),cL=function(e){if(!nL(e))return!1;var t=e[jb];return t!==void 0?!!t:tL(e)},fL=!uL||!aL("concat");ZN({target:"Array",proto:!0,arity:1,forced:fL},{concat:function(t){var n=rL(this),r=oL(n,0),i=0,o,a,s,l,u;for(o=-1,s=arguments.length;o<s;o++)if(u=o===-1?n:arguments[o],cL(u))for(l=iL(u),Db(i+l),a=0;a<l;a++,i++)a in u&&Mb(r,i,u[a]);else Db(i+1),Mb(r,i++,u);return r.length=i,r}});var dL=eo,pL=String,no=function(e){if(dL(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return pL(e)},Za={},hL=Xa,vL=Math.max,mL=Math.min,Wc=function(e,t){var n=hL(e);return n<0?vL(n+t,0):mL(n,t)},gL=gn,yL=Wc,bL=fr,Nb=function(e){return function(t,n,r){var i=gL(t),o=bL(i);if(o===0)return!e&&-1;var a=yL(r,o),s;if(e&&n!==n){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Lb={includes:Nb(!0),indexOf:Nb(!1)},es={},xL=tt,Uc=Ft,wL=gn,SL=Lb.indexOf,EL=es,Fb=xL([].push),Bb=function(e,t){var n=wL(e),r=0,i=[],o;for(o in n)!Uc(EL,o)&&Uc(n,o)&&Fb(i,o);for(;t.length>r;)Uc(n,o=t[r++])&&(~SL(i,o)||Fb(i,o));return i},Hc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kL=Bb,CL=Hc,Vc=Object.keys||function(t){return kL(t,CL)},TL=At,$L=Sb,OL=on,IL=qn,PL=gn,AL=Vc;Za.f=TL&&!$L?Object.defineProperties:function(t,n){IL(t);for(var r=PL(n),i=AL(n),o=i.length,a=0,s;o>a;)OL.f(t,s=i[a++],r[s]);return t};var RL=yn,_L=RL("document","documentElement"),DL=Ur,ML=$c,zb=DL("keys"),ts=function(e){return zb[e]||(zb[e]=ML(e))},jL=qn,NL=Za,Wb=Hc,LL=es,FL=_L,BL=yb,zL=ts,Ub=">",Hb="<",qc="prototype",Kc="script",Vb=zL("IE_PROTO"),Gc=function(){},qb=function(e){return Hb+Kc+Ub+e+Hb+"/"+Kc+Ub},Kb=function(e){e.write(qb("")),e.close();var t=e.parentWindow.Object;return e=null,t},WL=function(){var e=BL("iframe"),t="java"+Kc+":",n;return e.style.display="none",FL.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(qb("document.F=Object")),n.close(),n.F},ns,rs=function(){try{ns=new ActiveXObject("htmlfile")}catch{}rs=typeof document<"u"?document.domain&&ns?Kb(ns):WL():Kb(ns);for(var e=Wb.length;e--;)delete rs[qc][Wb[e]];return rs()};LL[Vb]=!0;var Yc=Object.create||function(t,n){var r;return t!==null?(Gc[qc]=jL(t),r=new Gc,Gc[qc]=null,r[Vb]=t):r=rs(),n===void 0?r:NL.f(r,n)},is={},UL=Bb,HL=Hc,VL=HL.concat("length","prototype");is.f=Object.getOwnPropertyNames||function(t){return UL(t,VL)};var Gb={},qL=tt,os=qL([].slice),KL=cr,GL=gn,Yb=is.f,YL=os,Xb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],XL=function(e){try{return Yb(e)}catch{return YL(Xb)}};Gb.f=function(t){return Xb&&KL(t)==="Window"?XL(t):Yb(GL(t))};var as={};as.f=Object.getOwnPropertySymbols;var JL=Ya,ss=function(e,t,n,r){return r&&r.enumerable?e[t]=n:JL(e,t,n),e},QL=on,ZL=function(e,t,n){return QL.f(e,t,n)},ro={},eF=ft;ro.f=eF;var Jb=vt,tF=Ft,nF=ro,rF=on.f,qe=function(e){var t=Jb.Symbol||(Jb.Symbol={});tF(t,e)||rF(t,e,{value:nF.f(e)})},iF=mn,oF=yn,aF=ft,sF=ss,Qb=function(){var e=oF("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=aF("toPrimitive");t&&!t[r]&&sF(t,r,function(i){return iF(n,this)},{arity:1})},lF=Nc,uF=eo,cF=lF?{}.toString:function(){return"[object "+uF(this)+"]"},fF=Nc,dF=on.f,pF=Ya,hF=Ft,vF=cF,mF=ft,Zb=mF("toStringTag"),Gr=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(hF(i,Zb)||dF(i,Zb,{configurable:!0,value:t}),r&&!fF&&pF(i,"toString",vF))},gF=lt,yF=wt,ex=gF.WeakMap,bF=yF(ex)&&/native code/.test(String(ex)),xF=bF,tx=lt,wF=nn,SF=Ya,Xc=Ft,Jc=Tc,EF=ts,kF=es,nx="Object already initialized",Qc=tx.TypeError,CF=tx.WeakMap,ls,io,us,TF=function(e){return us(e)?io(e):ls(e,{})},$F=function(e){return function(t){var n;if(!wF(t)||(n=io(t)).type!==e)throw new Qc("Incompatible receiver, "+e+" required");return n}};if(xF||Jc.state){var bn=Jc.state||(Jc.state=new CF);bn.get=bn.get,bn.has=bn.has,bn.set=bn.set,ls=function(e,t){if(bn.has(e))throw new Qc(nx);return t.facade=e,bn.set(e,t),t},io=function(e){return bn.get(e)||{}},us=function(e){return bn.has(e)}}else{var Yr=EF("state");kF[Yr]=!0,ls=function(e,t){if(Xc(e,Yr))throw new Qc(nx);return t.facade=e,SF(e,Yr,t),t},io=function(e){return Xc(e,Yr)?e[Yr]:{}},us=function(e){return Xc(e,Yr)}}var Zc={set:ls,get:io,has:us,enforce:TF,getterFor:$F},OF=Ac,IF=tt,PF=Qy,AF=An,RF=fr,_F=zc,rx=IF([].push),Kn=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,u,c,f){for(var p=AF(l),d=PF(p),v=RF(d),h=OF(u,c),g=0,m=f||_F,b=t?m(l,v):n||a?m(l,0):void 0,w,C;v>g;g++)if((s||g in d)&&(w=d[g],C=h(w,g,p),e))if(t)b[g]=C;else if(C)switch(e){case 3:return!0;case 5:return w;case 6:return g;case 2:rx(b,w)}else switch(e){case 4:return!1;case 7:rx(b,w)}return o?-1:r||i?i:b}},ef={forEach:Kn(0),map:Kn(1),filter:Kn(2),some:Kn(3),every:Kn(4),find:Kn(5),findIndex:Kn(6),filterReject:Kn(7)},cs=Le,oo=lt,tf=mn,DF=tt,Xr=At,Jr=Wr,MF=ut,dt=Ft,jF=Pn,nf=qn,fs=gn,rf=Ic,NF=no,of=Yi,Qr=Yc,ix=Vc,LF=is,ox=Gb,FF=as,ax=Gi,sx=on,BF=Za,lx=hc,ux=ss,zF=ZL,af=Ur,WF=ts,cx=es,fx=$c,UF=ft,HF=ro,VF=qe,qF=Qb,KF=Gr,dx=Zc,ds=ef.forEach,Rt=WF("hidden"),ps="Symbol",ao="prototype",GF=dx.set,px=dx.getterFor(ps),an=Object[ao],dr=oo.Symbol,so=dr&&dr[ao],YF=oo.RangeError,XF=oo.TypeError,sf=oo.QObject,hx=ax.f,pr=sx.f,vx=ox.f,JF=lx.f,mx=DF([].push),Rn=af("symbols"),lo=af("op-symbols"),QF=af("wks"),lf=!sf||!sf[ao]||!sf[ao].findChild,gx=function(e,t,n){var r=hx(an,t);r&&delete an[t],pr(e,t,n),r&&e!==an&&pr(an,t,r)},uf=Xr&&MF(function(){return Qr(pr({},"a",{get:function(){return pr(this,"a",{value:7}).a}})).a!==7})?gx:pr,cf=function(e,t){var n=Rn[e]=Qr(so);return GF(n,{type:ps,tag:e,description:t}),Xr||(n.description=t),n},hs=function(t,n,r){t===an&&hs(lo,n,r),nf(t);var i=rf(n);return nf(r),dt(Rn,i)?(r.enumerable?(dt(t,Rt)&&t[Rt][i]&&(t[Rt][i]=!1),r=Qr(r,{enumerable:of(0,!1)})):(dt(t,Rt)||pr(t,Rt,of(1,Qr(null))),t[Rt][i]=!0),uf(t,i,r)):pr(t,i,r)},ff=function(t,n){nf(t);var r=fs(n),i=ix(r).concat(wx(r));return ds(i,function(o){(!Xr||tf(yx,r,o))&&hs(t,o,r[o])}),t},ZF=function(t,n){return n===void 0?Qr(t):ff(Qr(t),n)},yx=function(t){var n=rf(t),r=tf(JF,this,n);return this===an&&dt(Rn,n)&&!dt(lo,n)?!1:r||!dt(this,n)||!dt(Rn,n)||dt(this,Rt)&&this[Rt][n]?r:!0},bx=function(t,n){var r=fs(t),i=rf(n);if(!(r===an&&dt(Rn,i)&&!dt(lo,i))){var o=hx(r,i);return o&&dt(Rn,i)&&!(dt(r,Rt)&&r[Rt][i])&&(o.enumerable=!0),o}},xx=function(t){var n=vx(fs(t)),r=[];return ds(n,function(i){!dt(Rn,i)&&!dt(cx,i)&&mx(r,i)}),r},wx=function(e){var t=e===an,n=vx(t?lo:fs(e)),r=[];return ds(n,function(i){dt(Rn,i)&&(!t||dt(an,i))&&mx(r,Rn[i])}),r};Jr||(dr=function(){if(jF(so,this))throw new XF("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:NF(arguments[0]),n=fx(t),r=function(i){var o=this===void 0?oo:this;o===an&&tf(r,lo,i),dt(o,Rt)&&dt(o[Rt],n)&&(o[Rt][n]=!1);var a=of(1,i);try{uf(o,n,a)}catch(s){if(!(s instanceof YF))throw s;gx(o,n,a)}};return Xr&&lf&&uf(an,n,{configurable:!0,set:r}),cf(n,t)},so=dr[ao],ux(so,"toString",function(){return px(this).tag}),ux(dr,"withoutSetter",function(e){return cf(fx(e),e)}),lx.f=yx,sx.f=hs,BF.f=ff,ax.f=bx,LF.f=ox.f=xx,FF.f=wx,HF.f=function(e){return cf(UF(e),e)},Xr&&zF(so,"description",{configurable:!0,get:function(){return px(this).description}})),cs({global:!0,constructor:!0,wrap:!0,forced:!Jr,sham:!Jr},{Symbol:dr}),ds(ix(QF),function(e){VF(e)}),cs({target:ps,stat:!0,forced:!Jr},{useSetter:function(){lf=!0},useSimple:function(){lf=!1}}),cs({target:"Object",stat:!0,forced:!Jr,sham:!Xr},{create:ZF,defineProperty:hs,defineProperties:ff,getOwnPropertyDescriptor:bx}),cs({target:"Object",stat:!0,forced:!Jr},{getOwnPropertyNames:xx}),qF(),KF(dr,ps),cx[Rt]=!0;var eB=Wr,Sx=eB&&!!Symbol.for&&!!Symbol.keyFor,tB=Le,nB=yn,rB=Ft,iB=no,Ex=Ur,oB=Sx,df=Ex("string-to-symbol-registry"),aB=Ex("symbol-to-string-registry");tB({target:"Symbol",stat:!0,forced:!oB},{for:function(e){var t=iB(e);if(rB(df,t))return df[t];var n=nB("Symbol")(t);return df[t]=n,aB[n]=t,n}});var sB=Le,lB=Ft,uB=Xi,cB=qa,fB=Ur,dB=Sx,kx=fB("symbol-to-string-registry");sB({target:"Symbol",stat:!0,forced:!dB},{keyFor:function(t){if(!uB(t))throw new TypeError(cB(t)+" is not a symbol");if(lB(kx,t))return kx[t]}});var pB=tt,Cx=Kr,hB=wt,Tx=cr,vB=no,$x=pB([].push),mB=function(e){if(hB(e))return e;if(Cx(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?$x(n,i):(typeof i=="number"||Tx(i)==="Number"||Tx(i)==="String")&&$x(n,vB(i))}var o=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(Cx(this))return l;for(var u=0;u<o;u++)if(n[u]===s)return l}}},gB=Le,Ox=yn,Ix=cc,yB=mn,uo=tt,Px=ut,Ax=wt,Rx=Xi,_x=os,bB=mB,xB=Wr,wB=String,Gn=Ox("JSON","stringify"),vs=uo(/./.exec),Dx=uo("".charAt),SB=uo("".charCodeAt),EB=uo("".replace),kB=uo(1 .toString),CB=/[\uD800-\uDFFF]/g,Mx=/^[\uD800-\uDBFF]$/,jx=/^[\uDC00-\uDFFF]$/,Nx=!xB||Px(function(){var e=Ox("Symbol")("stringify detection");return Gn([e])!=="[null]"||Gn({a:e})!=="{}"||Gn(Object(e))!=="{}"}),Lx=Px(function(){return Gn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Gn("\uDEAD")!=='"\\udead"'}),TB=function(e,t){var n=_x(arguments),r=bB(t);if(!(!Ax(r)&&(e===void 0||Rx(e))))return n[1]=function(i,o){if(Ax(r)&&(o=yB(r,this,wB(i),o)),!Rx(o))return o},Ix(Gn,null,n)},$B=function(e,t,n){var r=Dx(n,t-1),i=Dx(n,t+1);return vs(Mx,e)&&!vs(jx,i)||vs(jx,e)&&!vs(Mx,r)?"\\u"+kB(SB(e,0),16):e};Gn&&gB({target:"JSON",stat:!0,arity:3,forced:Nx||Lx},{stringify:function(t,n,r){var i=_x(arguments),o=Ix(Nx?TB:Gn,null,i);return Lx&&typeof o=="string"?EB(o,CB,$B):o}});var OB=Le,IB=Wr,PB=ut,Fx=as,AB=An,RB=!IB||PB(function(){Fx.f(1)});OB({target:"Object",stat:!0,forced:RB},{getOwnPropertySymbols:function(t){var n=Fx.f;return n?n(AB(t)):[]}});var _B=qe;_B("asyncIterator");var DB=qe;DB("hasInstance");var MB=qe;MB("isConcatSpreadable");var jB=qe;jB("iterator");var NB=qe;NB("match");var LB=qe;LB("matchAll");var FB=qe;FB("replace");var BB=qe;BB("search");var zB=qe;zB("species");var WB=qe;WB("split");var UB=qe,HB=Qb;UB("toPrimitive"),HB();var VB=yn,qB=qe,KB=Gr;qB("toStringTag"),KB(VB("Symbol"),"Symbol");var GB=qe;GB("unscopables");var YB=lt,XB=Gr;XB(YB.JSON,"JSON",!0);var JB=vt,QB=JB.Symbol,Zr={},pf=At,ZB=Ft,Bx=Function.prototype,e4=pf&&Object.getOwnPropertyDescriptor,hf=ZB(Bx,"name"),t4=hf&&(function(){}).name==="something",n4=hf&&(!pf||pf&&e4(Bx,"name").configurable),r4={EXISTS:hf,PROPER:t4,CONFIGURABLE:n4},i4=ut,o4=!i4(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),a4=Ft,s4=wt,l4=An,u4=ts,c4=o4,zx=u4("IE_PROTO"),vf=Object,f4=vf.prototype,Wx=c4?vf.getPrototypeOf:function(e){var t=l4(e);if(a4(t,zx))return t[zx];var n=t.constructor;return s4(n)&&t instanceof n?n.prototype:t instanceof vf?f4:null},d4=ut,p4=wt,h4=nn,v4=Yc,Ux=Wx,m4=ss,g4=ft,mf=g4("iterator"),Hx=!1,_n,gf,yf;[].keys&&(yf=[].keys(),"next"in yf?(gf=Ux(Ux(yf)),gf!==Object.prototype&&(_n=gf)):Hx=!0);var y4=!h4(_n)||d4(function(){var e={};return _n[mf].call(e)!==e});y4?_n={}:_n=v4(_n),p4(_n[mf])||m4(_n,mf,function(){return this});var Vx={IteratorPrototype:_n,BUGGY_SAFARI_ITERATORS:Hx},b4=Vx.IteratorPrototype,x4=Yc,w4=Yi,S4=Gr,E4=Zr,k4=function(){return this},C4=function(e,t,n,r){var i=t+" Iterator";return e.prototype=x4(b4,{next:w4(+!r,n)}),S4(e,i,!1,!0),E4[i]=k4,e},T4=tt,$4=Ka,O4=function(e,t,n){try{return T4($4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},I4=nn,P4=function(e){return I4(e)||e===null},A4=P4,R4=String,_4=TypeError,D4=function(e){if(A4(e))return e;throw new _4("Can't set "+R4(e)+" as a prototype")},M4=O4,j4=nn,N4=Ha,L4=D4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=M4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,o){return N4(i),L4(o),j4(i)&&(e?n(i,o):i.__proto__=o),i}}();var F4=Le,B4=mn,qx=r4,z4=C4,W4=Wx,U4=Gr,Kx=ss,H4=ft,Gx=Zr,Yx=Vx,V4=qx.PROPER;qx.CONFIGURABLE,Yx.IteratorPrototype;var ms=Yx.BUGGY_SAFARI_ITERATORS,bf=H4("iterator"),Xx="keys",gs="values",Jx="entries",q4=function(){return this},Qx=function(e,t,n,r,i,o,a){z4(n,t,r);var s=function(m){if(m===i&&p)return p;if(!ms&&m&&m in c)return c[m];switch(m){case Xx:return function(){return new n(this,m)};case gs:return function(){return new n(this,m)};case Jx:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",u=!1,c=e.prototype,f=c[bf]||c["@@iterator"]||i&&c[i],p=!ms&&f||s(i),d=t==="Array"&&c.entries||f,v,h,g;if(d&&(v=W4(d.call(new e)),v!==Object.prototype&&v.next&&(U4(v,l,!0,!0),Gx[l]=q4)),V4&&i===gs&&f&&f.name!==gs&&(u=!0,p=function(){return B4(f,this)}),i)if(h={values:s(gs),keys:o?p:s(Xx),entries:s(Jx)},a)for(g in h)(ms||u||!(g in c))&&Kx(c,g,h[g]);else F4({target:t,proto:!0,forced:ms||u},h);return a&&c[bf]!==p&&Kx(c,bf,p,{name:i}),Gx[t]=p,h},Zx=function(e,t){return{value:e,done:t}},K4=gn,ew=Zr,tw=Zc;on.f;var G4=Qx,ys=Zx,nw="Array Iterator",Y4=tw.set,X4=tw.getterFor(nw);G4(Array,"Array",function(e,t){Y4(this,{type:nw,target:K4(e),index:0,kind:t})},function(){var e=X4(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,ys(void 0,!0);switch(e.kind){case"keys":return ys(n,!1);case"values":return ys(t[n],!1)}return ys([n,t[n]],!1)},"values"),ew.Arguments=ew.Array;var J4={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Q4=J4,Z4=lt,e3=Gr,rw=Zr;for(var xf in Q4)e3(Z4[xf],xf),rw[xf]=rw.Array;var t3=QB,n3=t3,r3=ft,i3=on.f,iw=r3("metadata"),ow=Function.prototype;ow[iw]===void 0&&i3(ow,iw,{value:null});var o3=qe;o3("asyncDispose");var a3=qe;a3("dispose");var s3=qe;s3("metadata");var l3=n3,u3=l3,c3=yn,f3=tt,wf=c3("Symbol"),d3=wf.keyFor,p3=f3(wf.prototype.valueOf),aw=wf.isRegisteredSymbol||function(t){try{return d3(p3(t))!==void 0}catch{return!1}},h3=Le,v3=aw;h3({target:"Symbol",stat:!0},{isRegisteredSymbol:v3});for(var m3=Ur,sw=yn,g3=tt,y3=Xi,b3=ft,bs=sw("Symbol"),lw=bs.isWellKnownSymbol,uw=sw("Object","getOwnPropertyNames"),x3=g3(bs.prototype.valueOf),cw=m3("wks"),Sf=0,fw=uw(bs),w3=fw.length;Sf<w3;Sf++)try{var dw=fw[Sf];y3(bs[dw])&&b3(dw)}catch{}var pw=function(t){if(lw&&lw(t))return!0;try{for(var n=x3(t),r=0,i=uw(cw),o=i.length;r<o;r++)if(cw[i[r]]==n)return!0}catch{}return!1},S3=Le,E3=pw;S3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:E3});var k3=qe;k3("customMatcher");var C3=qe;C3("observable");var T3=Le,$3=aw;T3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:$3});var O3=Le,I3=pw;O3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:I3});var P3=qe;P3("matcher");var A3=qe;A3("metadataKey");var R3=qe;R3("patternMatch");var _3=qe;_3("replaceAll");var D3=u3,M3=D3,j3=M3;const ei=Ee(j3);var Ef=tt,N3=Xa,L3=no,F3=Ha,B3=Ef("".charAt),hw=Ef("".charCodeAt),z3=Ef("".slice),vw=function(e){return function(t,n){var r=L3(F3(t)),i=N3(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=hw(r,i),a<55296||a>56319||i+1===o||(s=hw(r,i+1))<56320||s>57343?e?B3(r,i):a:e?z3(r,i,i+2):(a-55296<<10)+(s-56320)+65536)}},W3={codeAt:vw(!1),charAt:vw(!0)},U3=W3.charAt,H3=no,mw=Zc,V3=Qx,gw=Zx,yw="String Iterator",q3=mw.set,K3=mw.getterFor(yw);V3(String,"String",function(e){q3(this,{type:yw,string:H3(e),index:0})},function(){var t=K3(this),n=t.string,r=t.index,i;return r>=n.length?gw(void 0,!0):(i=U3(n,r),t.index+=i.length,gw(i,!1))});var G3=eo,bw=Sc,Y3=mc,X3=Zr,J3=ft,Q3=J3("iterator"),kf=function(e){if(!Y3(e))return bw(e,Q3)||bw(e,"@@iterator")||X3[G3(e)]},Z3=kf,ez=Z3,tz=ez,nz=tz,rz=nz,iz=rz,oz=iz,az=oz,sz=az;const xw=Ee(sz);var lz=At,uz=Kr,cz=TypeError,fz=Object.getOwnPropertyDescriptor,dz=lz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),ww=dz?function(e,t){if(uz(e)&&!fz(e,"length").writable)throw new cz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},pz=Le,hz=An,vz=fr,mz=ww,gz=jc,yz=ut,bz=yz(function(){return[].push.call({length:4294967296},1)!==4294967297}),xz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},wz=bz||!xz();pz({target:"Array",proto:!0,arity:1,forced:wz},{push:function(t){var n=hz(this),r=vz(n),i=arguments.length;gz(r+i);for(var o=0;o<i;o++)n[r]=arguments[o],r++;return mz(n,r),r}});var Sz=lt,Ez=vt,hr=function(e,t){var n=Ez[e+"Prototype"],r=n&&n[t];if(r)return r;var i=Sz[e],o=i&&i.prototype;return o&&o[t]},kz=hr,Cz=kz("Array","push"),Tz=Pn,$z=Cz,Cf=Array.prototype,Oz=function(e){var t=e.push;return e===Cf||Tz(Cf,e)&&t===Cf.push?$z:t},Iz=Oz,Pz=Iz,Az=Pz,Rz=Az,_z=Rz,Dz=_z,Mz=Dz;const jz=Ee(Mz);function Nz(e,t){var n=e==null?null:typeof ei<"u"&&xw(e)||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(jz(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}var Lz=Le,Sw=Kr,Fz=Bc,Bz=nn,Ew=Wc,zz=fr,Wz=gn,Uz=Zi,Hz=ft,Vz=Qa,qz=os,Kz=Vz("slice"),Gz=Hz("species"),Tf=Array,Yz=Math.max;Lz({target:"Array",proto:!0,forced:!Kz},{slice:function(t,n){var r=Wz(this),i=zz(r),o=Ew(t,i),a=Ew(n===void 0?i:n,i),s,l,u;if(Sw(r)&&(s=r.constructor,Fz(s)&&(s===Tf||Sw(s.prototype))?s=void 0:Bz(s)&&(s=s[Gz],s===null&&(s=void 0)),s===Tf||s===void 0))return qz(r,o,a);for(l=new(s===void 0?Tf:s)(Yz(a-o,0)),u=0;o<a;o++,u++)o in r&&Uz(l,u,r[o]);return l.length=u,l}});var Xz=hr,Jz=Xz("Array","slice"),Qz=Pn,Zz=Jz,$f=Array.prototype,e5=function(e){var t=e.slice;return e===$f||Qz($f,e)&&t===$f.slice?Zz:t},t5=e5,n5=t5,r5=n5,i5=r5,o5=i5,a5=o5,s5=a5;const l5=Ee(s5);var u5=mn,kw=qn,c5=Sc,f5=function(e,t,n){var r,i;kw(e);try{if(r=c5(e,"return"),!r){if(t==="throw")throw n;return n}r=u5(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return kw(r),n},d5=qn,p5=f5,h5=function(e,t,n,r){try{return r?t(d5(n)[0],n[1]):t(n)}catch(i){p5(e,"throw",i)}},v5=ft,m5=Zr,g5=v5("iterator"),y5=Array.prototype,b5=function(e){return e!==void 0&&(m5.Array===e||y5[g5]===e)},x5=mn,w5=Ka,S5=qn,E5=qa,k5=kf,C5=TypeError,T5=function(e,t){var n=arguments.length<2?k5(e):t;if(w5(n))return S5(x5(n,e));throw new C5(E5(e)+" is not iterable")},$5=Ac,O5=mn,I5=An,P5=h5,A5=b5,R5=Bc,_5=fr,Cw=Zi,D5=T5,M5=kf,Tw=Array,j5=function(t){var n=I5(t),r=R5(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=$5(o,i>2?arguments[2]:void 0));var s=M5(n),l=0,u,c,f,p,d,v;if(s&&!(this===Tw&&A5(s)))for(c=r?new this:[],p=D5(n,s),d=p.next;!(f=O5(d,p)).done;l++)v=a?P5(p,o,[f.value,l],!0):f.value,Cw(c,l,v);else for(u=_5(n),c=r?new this(u):Tw(u);u>l;l++)v=a?o(n[l],l):n[l],Cw(c,l,v);return c.length=l,c},N5=ft,$w=N5("iterator"),Ow=!1;try{var L5=0,Iw={next:function(){return{done:!!L5++}},return:function(){Ow=!0}};Iw[$w]=function(){return this},Array.from(Iw,function(){throw 2})}catch{}var F5=function(e,t){try{if(!t&&!Ow)return!1}catch{return!1}var n=!1;try{var r={};r[$w]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},B5=Le,z5=j5,W5=F5,U5=!W5(function(e){Array.from(e)});B5({target:"Array",stat:!0,forced:U5},{from:z5});var H5=vt,V5=H5.Array.from,q5=V5,K5=q5,G5=K5,Y5=G5,X5=Y5,J5=X5,Q5=J5;const Pw=Ee(Q5);function Of(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Aw(e,t){if(e){var n;if(typeof e=="string")return Of(e,t);var r=l5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Pw(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Of(e,t):void 0}}function Z5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
286
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xn(e,t){return uN(e)||Nz(e,t)||Aw(e,t)||Z5()}var Rw={exports:{}};/*!
272
287
  Copyright (c) 2018 Jed Watson.
273
288
  Licensed under the MIT License (MIT), see
274
289
  http://jedwatson.github.io/classnames
275
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&r.push(l);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(yw);var D5=yw.exports;const Tf=Se(D5);var Of={exports:{}},If,bw;function Pf(){if(bw)return If;bw=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return If=e,If}var Af,xw;function _5(){if(xw)return Af;xw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Pf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Af=i,Af}var Rf,ww;function M5(){if(ww)return Rf;ww=1;var e=Aa(),t=Hg(),n=Pf(),r=_5(),i=Function.call.bind(Object.prototype.hasOwnProperty),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Rf=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(R){var y=R&&(u&&R[u]||R[c]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:x,element:k(),elementType:S(),instanceOf:E,node:O(),objectOf:L,oneOf:T,oneOfType:N,shape:M,exact:K};function v(R,y){return R===y?R!==0||1/R===1/y:R!==R&&y!==y}function h(R){this.message=R,this.stack=""}h.prototype=Error.prototype;function g(R){if(process.env.NODE_ENV!=="production")var y={},_=0;function z(H,X,q,Y,Q,ee,J){if(Y=Y||p,ee=ee||q,J!==n){if(l){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var V=Y+":"+q;!y[V]&&_<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[V]=!0,_++)}}return X[q]==null?H?X[q]===null?new h("The "+Q+" `"+ee+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new h("The "+Q+" `"+ee+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:R(X,q,Y,Q,ee)}var w=z.bind(null,!1);return w.isRequired=z.bind(null,!0),w}function m(R){function y(_,z,w,H,X,q){var Y=_[z],Q=D(Y);if(Q!==R){var ee=j(Y);return new h("Invalid "+H+" `"+X+"` of type "+("`"+ee+"` supplied to `"+w+"`, expected ")+("`"+R+"`."))}return null}return g(y)}function b(){return g(a)}function x(R){function y(_,z,w,H,X){if(typeof R!="function")return new h("Property `"+X+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var q=_[z];if(!Array.isArray(q)){var Y=D(q);return new h("Invalid "+H+" `"+X+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var ee=R(q,Q,w,H,X+"["+Q+"]",n);if(ee instanceof Error)return ee}return null}return g(y)}function k(){function R(y,_,z,w,H){var X=y[_];if(!s(X)){var q=D(X);return new h("Invalid "+w+" `"+H+"` of type "+("`"+q+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return g(R)}function S(){function R(y,_,z,w,H){var X=y[_];if(!e.isValidElementType(X)){var q=D(X);return new h("Invalid "+w+" `"+H+"` of type "+("`"+q+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return g(R)}function E(R){function y(_,z,w,H,X){if(!(_[z]instanceof R)){var q=R.name||p,Y=U(_[z]);return new h("Invalid "+H+" `"+X+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected ")+("instance of `"+q+"`."))}return null}return g(y)}function T(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function y(_,z,w,H,X){for(var q=_[z],Y=0;Y<R.length;Y++)if(v(q,R[Y]))return null;var Q=JSON.stringify(R,function(J,Z){var V=j(Z);return V==="symbol"?String(Z):Z});return new h("Invalid "+H+" `"+X+"` of value `"+String(q)+"` "+("supplied to `"+w+"`, expected one of "+Q+"."))}return g(y)}function L(R){function y(_,z,w,H,X){if(typeof R!="function")return new h("Property `"+X+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var q=_[z],Y=D(q);if(Y!=="object")return new h("Invalid "+H+" `"+X+"` of type "+("`"+Y+"` supplied to `"+w+"`, expected an object."));for(var Q in q)if(i(q,Q)){var ee=R(q,Q,w,H,X+"."+Q,n);if(ee instanceof Error)return ee}return null}return g(y)}function N(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<R.length;y++){var _=R[y];if(typeof _!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(_)+" at index "+y+"."),a}function z(w,H,X,q,Y){for(var Q=0;Q<R.length;Q++){var ee=R[Q];if(ee(w,H,X,q,Y,n)==null)return null}return new h("Invalid "+q+" `"+Y+"` supplied to "+("`"+X+"`."))}return g(z)}function O(){function R(y,_,z,w,H){return F(y[_])?null:new h("Invalid "+w+" `"+H+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return g(R)}function M(R){function y(_,z,w,H,X){var q=_[z],Y=D(q);if(Y!=="object")return new h("Invalid "+H+" `"+X+"` of type `"+Y+"` "+("supplied to `"+w+"`, expected `object`."));for(var Q in R){var ee=R[Q];if(ee){var J=ee(q,Q,w,H,X+"."+Q,n);if(J)return J}}return null}return g(y)}function K(R){function y(_,z,w,H,X){var q=_[z],Y=D(q);if(Y!=="object")return new h("Invalid "+H+" `"+X+"` of type `"+Y+"` "+("supplied to `"+w+"`, expected `object`."));var Q=t({},_[z],R);for(var ee in Q){var J=R[ee];if(!J)return new h("Invalid "+H+" `"+X+"` key `"+ee+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(_[z],null," ")+`
276
- Valid keys: `+JSON.stringify(Object.keys(R),null," "));var Z=J(q,ee,w,H,X+"."+ee,n);if(Z)return Z}return null}return g(y)}function F(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(F);if(R===null||s(R))return!0;var y=f(R);if(y){var _=y.call(R),z;if(y!==R.entries){for(;!(z=_.next()).done;)if(!F(z.value))return!1}else for(;!(z=_.next()).done;){var w=z.value;if(w&&!F(w[1]))return!1}}else return!1;return!0;default:return!1}}function I(R,y){return R==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function D(R){var y=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":I(y,R)?"symbol":y}function j(R){if(typeof R>"u"||R===null)return""+R;var y=D(R);if(y==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return y}function G(R){var y=j(R);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function U(R){return!R.constructor||!R.constructor.name?p:R.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Rf}var Df,Sw;function j5(){if(Sw)return Df;Sw=1;var e=Pf();function t(){}function n(){}return n.resetWarningCache=t,Df=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Df}if(process.env.NODE_ENV!=="production"){var N5=Aa(),L5=!0;Of.exports=M5()(N5.isElement,L5)}else Of.exports=j5()();var F5=Of.exports;const Oe=Se(F5);var _f=A.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});_f.displayName="ScrollToBottomFunctionContext";function B5(){return A.useContext(_f)}function z5(){var e=B5(),t=e.scrollToEnd;return t}var Mf=A.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Mf.displayName="ScrollToBottomState1Context";var jf=A.createContext({animating:!1,animatingToEnd:!1,sticky:!0});jf.displayName="ScrollToBottomState2Context";var Nf=A.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Nf.displayName="ScrollToBottomStateContext";var Ew=[Nf,Mf,jf];function W5(e){return A.useContext(Ew[e]||Ew[0])}function U5(){var e=W5(2),t=e.sticky;return[t]}var ys=A.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});ys.displayName="ScrollToBottomInternalContext";function H5(){return A.useContext(ys)}function Lf(){var e=H5(),t=e.styleToClassName;return t}var V5={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},Ff=function(t){var n=t.children,r=t.className,i=U5(),o=xn(i,1),a=o[0],s=Lf()(V5),l=z5();return!a&&A.createElement("button",{className:Tf(s,(r||"")+""),onClick:l,type:"button"},n)};Ff.defaultProps={children:void 0,className:""},Ff.propTypes={children:Oe.any,className:Oe.string};var Cw={exports:{}},K5=Ne,q5=At,kw=on.f;K5({target:"Object",stat:!0,forced:Object.defineProperty!==kw,sham:!q5},{defineProperty:kw});var G5=vt,$w=G5.Object,Y5=Cw.exports=function(t,n,r){return $w.defineProperty(t,n,r)};$w.defineProperty.sham&&(Y5.sham=!0);var X5=Cw.exports,J5=X5,Tw=J5,Z5=Tw,Q5=Z5,eW=Q5,tW=eW,nW=tW;const rW=Se(nW);var iW=ro,oW=iW.f("iterator"),aW=oW,sW=aW,lW=sW,uW=lW,cW=uW,fW=cW,dW=fW;const pW=Se(dW);function co(e){"@babel/helpers - typeof";return co=typeof Qr=="function"&&typeof pW=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Qr=="function"&&t.constructor===Qr&&t!==Qr.prototype?"symbol":typeof t},co(e)}var hW=ro,vW=hW.f("toPrimitive"),mW=vW,gW=mW,yW=gW,bW=yW,xW=bW,wW=xW,SW=wW;const EW=Se(SW);function CW(e,t){if(co(e)!="object"||!e)return e;var n=e[EW];if(n!==void 0){var r=n.call(e,t||"default");if(co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kW(e){var t=CW(e,"string");return co(t)=="symbol"?t:t+""}function $W(e,t,n){return(t=kW(t))in e?rW(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TW(e){if(db(e))return $f(e)}function OW(e){if(typeof Qr<"u"&&aw(e)!=null||e["@@iterator"]!=null)return mw(e)}function IW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
277
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(e){return TW(e)||OW(e)||gw(e)||IW()}var bs=function(e){return e&&e.Math==Math&&e},Bt=bs(typeof globalThis=="object"&&globalThis)||bs(typeof window=="object"&&window)||bs(typeof self=="object"&&self)||bs(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),Bf={},sn=function(e){try{return!!e()}catch{return!0}},PW=sn,pr=!PW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Ow={},Iw={}.propertyIsEnumerable,Pw=Object.getOwnPropertyDescriptor,AW=Pw&&!Iw.call({1:2},1);Ow.f=AW?function(t){var n=Pw(this,t);return!!n&&n.enumerable}:Iw;var Aw=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},RW={}.toString,zf=function(e){return RW.call(e).slice(8,-1)},DW=sn,_W=zf,MW="".split,jW=DW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return _W(e)=="String"?MW.call(e,""):Object(e)}:Object,xs=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},NW=jW,LW=xs,Wf=function(e){return NW(LW(e))},qt=function(e){return typeof e=="function"},FW=qt,fo=function(e){return typeof e=="object"?e!==null:FW(e)},Uf=Bt,BW=qt,zW=function(e){return BW(e)?e:void 0},ws=function(e,t){return arguments.length<2?zW(Uf[e]):Uf[e]&&Uf[e][t]},WW=ws,UW=WW("navigator","userAgent")||"",Rw=Bt,Hf=UW,Dw=Rw.process,_w=Rw.Deno,Mw=Dw&&Dw.versions||_w&&_w.version,jw=Mw&&Mw.v8,wn,Ss;jw?(wn=jw.split("."),Ss=wn[0]<4?1:wn[0]+wn[1]):Hf&&(wn=Hf.match(/Edge\/(\d+)/),(!wn||wn[1]>=74)&&(wn=Hf.match(/Chrome\/(\d+)/),wn&&(Ss=wn[1])));var HW=Ss&&+Ss,Nw=HW,VW=sn,Lw=!!Object.getOwnPropertySymbols&&!VW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Nw&&Nw<41}),KW=Lw,Fw=KW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",qW=qt,GW=ws,YW=Fw,Bw=YW?function(e){return typeof e=="symbol"}:function(e){var t=GW("Symbol");return qW(t)&&Object(e)instanceof t},XW=function(e){try{return String(e)}catch{return"Object"}},JW=qt,ZW=XW,QW=function(e){if(JW(e))return e;throw TypeError(ZW(e)+" is not a function")},e6=QW,zw=function(e,t){var n=e[t];return n==null?void 0:e6(n)},Vf=qt,Kf=fo,t6=function(e,t){var n,r;if(t==="string"&&Vf(n=e.toString)&&!Kf(r=n.call(e))||Vf(n=e.valueOf)&&!Kf(r=n.call(e))||t!=="string"&&Vf(n=e.toString)&&!Kf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Ww={exports:{}},Uw=Bt,qf=function(e,t){try{Object.defineProperty(Uw,e,{value:t,configurable:!0,writable:!0})}catch{Uw[e]=t}return t},n6=Bt,r6=qf,Hw="__core-js_shared__",i6=n6[Hw]||r6(Hw,{}),Gf=i6,Vw=Gf;(Ww.exports=function(e,t){return Vw[e]||(Vw[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Yf=Ww.exports,o6=xs,Kw=function(e){return Object(o6(e))},a6=Kw,s6={}.hasOwnProperty,hr=Object.hasOwn||function(t,n){return s6.call(a6(t),n)},l6=0,u6=Math.random(),qw=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++l6+u6).toString(36)},c6=Bt,f6=Yf,Gw=hr,d6=qw,Yw=Lw,p6=Fw,po=f6("wks"),ho=c6.Symbol,h6=p6?ho:ho&&ho.withoutSetter||d6,vo=function(e){return(!Gw(po,e)||!(Yw||typeof po[e]=="string"))&&(Yw&&Gw(ho,e)?po[e]=ho[e]:po[e]=h6("Symbol."+e)),po[e]},Xw=fo,Jw=Bw,v6=zw,m6=t6,g6=vo,y6=g6("toPrimitive"),b6=function(e,t){if(!Xw(e)||Jw(e))return e;var n=v6(e,y6),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Xw(r)||Jw(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),m6(e,t)},x6=b6,w6=Bw,Zw=function(e){var t=x6(e,"string");return w6(t)?t:String(t)},S6=Bt,Qw=fo,Xf=S6.document,E6=Qw(Xf)&&Qw(Xf.createElement),eS=function(e){return E6?Xf.createElement(e):{}},C6=pr,k6=sn,$6=eS,tS=!C6&&!k6(function(){return Object.defineProperty($6("div"),"a",{get:function(){return 7}}).a!=7}),T6=pr,O6=Ow,I6=Aw,P6=Wf,A6=Zw,R6=hr,D6=tS,nS=Object.getOwnPropertyDescriptor;Bf.f=T6?nS:function(t,n){if(t=P6(t),n=A6(n),D6)try{return nS(t,n)}catch{}if(R6(t,n))return I6(!O6.f.call(t,n),t[n])};var mo={},_6=fo,Yn=function(e){if(_6(e))return e;throw TypeError(String(e)+" is not an object")},M6=pr,j6=tS,rS=Yn,N6=Zw,iS=Object.defineProperty;mo.f=M6?iS:function(t,n,r){if(rS(t),n=N6(n),rS(r),j6)try{return iS(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var L6=pr,F6=mo,B6=Aw,Es=L6?function(e,t,n){return F6.f(e,t,B6(1,n))}:function(e,t,n){return e[t]=n,e},oS={exports:{}},z6=qt,Jf=Gf,W6=Function.toString;z6(Jf.inspectSource)||(Jf.inspectSource=function(e){return W6.call(e)});var aS=Jf.inspectSource,U6=Bt,H6=qt,V6=aS,sS=U6.WeakMap,K6=H6(sS)&&/native code/.test(V6(sS)),q6=Yf,G6=qw,lS=q6("keys"),uS=function(e){return lS[e]||(lS[e]=G6(e))},Zf={},Y6=K6,X6=Bt,J6=fo,Z6=Es,Qf=hr,ed=Gf,Q6=uS,eU=Zf,cS="Object already initialized",tU=X6.WeakMap,Cs,go,ks,nU=function(e){return ks(e)?go(e):Cs(e,{})},rU=function(e){return function(t){var n;if(!J6(t)||(n=go(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(Y6||ed.state){var vr=ed.state||(ed.state=new tU),iU=vr.get,fS=vr.has,oU=vr.set;Cs=function(e,t){if(fS.call(vr,e))throw new TypeError(cS);return t.facade=e,oU.call(vr,e,t),t},go=function(e){return iU.call(vr,e)||{}},ks=function(e){return fS.call(vr,e)}}else{var ei=Q6("state");eU[ei]=!0,Cs=function(e,t){if(Qf(e,ei))throw new TypeError(cS);return t.facade=e,Z6(e,ei,t),t},go=function(e){return Qf(e,ei)?e[ei]:{}},ks=function(e){return Qf(e,ei)}}var dS={set:Cs,get:go,has:ks,enforce:nU,getterFor:rU},td=pr,aU=hr,pS=Function.prototype,sU=td&&Object.getOwnPropertyDescriptor,nd=aU(pS,"name"),lU=nd&&(function(){}).name==="something",uU=nd&&(!td||td&&sU(pS,"name").configurable),rd={EXISTS:nd,PROPER:lU,CONFIGURABLE:uU},cU=Bt,hS=qt,fU=hr,vS=Es,dU=qf,pU=aS,mS=dS,hU=rd.CONFIGURABLE,vU=mS.get,mU=mS.enforce,gU=String(String).split("String");(oS.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(hS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!fU(n,"name")||hU&&n.name!==s)&&vS(n,"name",s),l=mU(n),l.source||(l.source=gU.join(typeof s=="string"?s:""))),e===cU){o?e[t]=n:dU(t,n);return}else i?!a&&e[t]&&(o=!0):delete e[t];o?e[t]=n:vS(e,t,n)})(Function.prototype,"toString",function(){return hS(this)&&vU(this).source||pU(this)});var yo=oS.exports,gS={},yU=Math.ceil,bU=Math.floor,$s=function(e){var t=+e;return t!==t||t===0?0:(t>0?bU:yU)(t)},xU=$s,wU=Math.max,SU=Math.min,EU=function(e,t){var n=xU(e);return n<0?wU(n+t,0):SU(n,t)},CU=$s,kU=Math.min,yS=function(e){return e>0?kU(CU(e),9007199254740991):0},$U=yS,TU=function(e){return $U(e.length)},OU=Wf,IU=EU,PU=TU,bS=function(e){return function(t,n,r){var i=OU(t),o=PU(i),a=IU(r,o),s;if(e&&n!=n){for(;o>a;)if(s=i[a++],s!=s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},AU={includes:bS(!0),indexOf:bS(!1)},id=hr,RU=Wf,DU=AU.indexOf,_U=Zf,xS=function(e,t){var n=RU(e),r=0,i=[],o;for(o in n)!id(_U,o)&&id(n,o)&&i.push(o);for(;t.length>r;)id(n,o=t[r++])&&(~DU(i,o)||i.push(o));return i},od=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],MU=xS,jU=od,NU=jU.concat("length","prototype");gS.f=Object.getOwnPropertyNames||function(t){return MU(t,NU)};var wS={};wS.f=Object.getOwnPropertySymbols;var LU=ws,FU=gS,BU=wS,zU=Yn,WU=LU("Reflect","ownKeys")||function(t){var n=FU.f(zU(t)),r=BU.f;return r?n.concat(r(t)):n},UU=hr,HU=WU,VU=Bf,KU=mo,qU=function(e,t){for(var n=HU(t),r=KU.f,i=VU.f,o=0;o<n.length;o++){var a=n[o];UU(e,a)||r(e,a,i(t,a))}},GU=sn,YU=qt,XU=/#|\.prototype\./,bo=function(e,t){var n=ZU[JU(e)];return n==eH?!0:n==QU?!1:YU(t)?GU(t):!!t},JU=bo.normalize=function(e){return String(e).replace(XU,".").toLowerCase()},ZU=bo.data={},QU=bo.NATIVE="N",eH=bo.POLYFILL="P",tH=bo,ad=Bt,nH=Bf.f,rH=Es,iH=yo,oH=qf,aH=qU,sH=tH,lH=function(e,t){var n=e.target,r=e.global,i=e.stat,o,a,s,l,u,c;if(r?a=ad:i?a=ad[n]||oH(n,{}):a=(ad[n]||{}).prototype,a)for(s in t){if(u=t[s],e.noTargetGet?(c=nH(a,s),l=c&&c.value):l=a[s],o=sH(r?s:n+(i?".":"#")+s,e.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;aH(u,l)}(e.sham||l&&l.sham)&&rH(u,"sham",!0),iH(a,s,u,e)}},uH=vo,cH=uH("toStringTag"),SS={};SS[cH]="z";var sd=String(SS)==="[object z]",fH=sd,dH=qt,Ts=zf,pH=vo,hH=pH("toStringTag"),vH=Ts(function(){return arguments}())=="Arguments",mH=function(e,t){try{return e[t]}catch{}},ES=fH?Ts:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=mH(t=Object(e),hH))=="string"?n:vH?Ts(t):(r=Ts(t))=="Object"&&dH(t.callee)?"Arguments":r},gH=ES,Os=function(e){if(gH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},yH=Yn,CS=function(){var e=yH(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ld={},kS=sn,bH=Bt,$S=bH.RegExp;ld.UNSUPPORTED_Y=kS(function(){var e=$S("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),ld.BROKEN_CARET=kS(function(){var e=$S("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var xH=xS,wH=od,SH=Object.keys||function(t){return xH(t,wH)},EH=pr,CH=mo,kH=Yn,$H=SH,TH=EH?Object.defineProperties:function(t,n){kH(t);for(var r=$H(n),i=r.length,o=0,a;i>o;)CH.f(t,a=r[o++],n[a]);return t},OH=ws,IH=OH("document","documentElement"),PH=Yn,AH=TH,TS=od,RH=Zf,DH=IH,_H=eS,MH=uS,OS=">",IS="<",ud="prototype",cd="script",PS=MH("IE_PROTO"),fd=function(){},AS=function(e){return IS+cd+OS+e+IS+"/"+cd+OS},RS=function(e){e.write(AS("")),e.close();var t=e.parentWindow.Object;return e=null,t},jH=function(){var e=_H("iframe"),t="java"+cd+":",n;return e.style.display="none",DH.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(AS("document.F=Object")),n.close(),n.F},Is,Ps=function(){try{Is=new ActiveXObject("htmlfile")}catch{}Ps=typeof document<"u"?document.domain&&Is?RS(Is):jH():RS(Is);for(var e=TS.length;e--;)delete Ps[ud][TS[e]];return Ps()};RH[PS]=!0;var NH=Object.create||function(t,n){var r;return t!==null?(fd[ud]=PH(t),r=new fd,fd[ud]=null,r[PS]=t):r=Ps(),n===void 0?r:AH(r,n)},LH=sn,FH=Bt,BH=FH.RegExp,zH=LH(function(){var e=BH(".","s");return!(e.dotAll&&e.exec(`
278
- `)&&e.flags==="s")}),WH=sn,UH=Bt,HH=UH.RegExp,VH=WH(function(){var e=HH("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),KH=Os,qH=CS,DS=ld,GH=Yf,YH=NH,XH=dS.get,JH=zH,ZH=VH,As=RegExp.prototype.exec,QH=GH("native-string-replace",String.prototype.replace),dd=As,pd=function(){var e=/a/,t=/b*/g;return As.call(e,"a"),As.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),_S=DS.UNSUPPORTED_Y||DS.BROKEN_CARET,hd=/()??/.exec("")[1]!==void 0,e9=pd||hd||_S||JH||ZH;e9&&(dd=function(t){var n=this,r=XH(n),i=KH(t),o=r.raw,a,s,l,u,c,f,p;if(o)return o.lastIndex=n.lastIndex,a=dd.call(o,i),n.lastIndex=o.lastIndex,a;var d=r.groups,v=_S&&n.sticky,h=qH.call(n),g=n.source,m=0,b=i;if(v&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
279
- `)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),hd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),pd&&(l=n.lastIndex),u=As.call(v?s:n,b),v?u?(u.input=u.input.slice(m),u[0]=u[0].slice(m),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:pd&&u&&(n.lastIndex=n.global?u.index+u[0].length:l),hd&&u&&u.length>1&&QH.call(u[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(u[c]=void 0)}),u&&d)for(u.groups=f=YH(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=u[p[1]];return u});var vd=dd,t9=lH,MS=vd;t9({target:"RegExp",proto:!0,forced:/./.exec!==MS},{exec:MS});var jS=yo,n9=vd,NS=sn,LS=vo,r9=Es,i9=LS("species"),md=RegExp.prototype,o9=function(e,t,n,r){var i=LS(e),o=!NS(function(){var u={};return u[i]=function(){return 7},""[e](u)!=7}),a=o&&!NS(function(){var u=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[i9]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return u=!0,null},c[i](""),!u});if(!o||!a||n){var s=/./[i],l=t(i,""[e],function(u,c,f,p,d){var v=c.exec;return v===n9||v===md.exec?o&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:u.call(f,c,p)}:{done:!1}});jS(String.prototype,e,l[0]),jS(md,i,l[1])}r&&r9(md[i],"sham",!0)},a9=$s,s9=Os,l9=xs,FS=function(e){return function(t,n){var r=s9(l9(t)),i=a9(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=r.charCodeAt(i),a<55296||a>56319||i+1===o||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):a:e?r.slice(i,i+2):(a-55296<<10)+(s-56320)+65536)}},u9={codeAt:FS(!1),charAt:FS(!0)},c9=u9.charAt,f9=function(e,t,n){return t+(n?c9(e,t).length:1)},d9=Kw,p9=Math.floor,h9="".replace,v9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,m9=/\$([$&'`]|\d{1,2})/g,g9=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=m9;return i!==void 0&&(i=d9(i),l=v9),h9.call(o,l,function(u,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return u;if(p>s){var d=p9(p/10);return d===0?u:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):u}f=r[p-1]}return f===void 0?"":f})},y9=Yn,b9=qt,x9=zf,w9=vd,S9=function(e,t){var n=e.exec;if(b9(n)){var r=n.call(e,t);return r!==null&&y9(r),r}if(x9(e)==="RegExp")return w9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},E9=o9,C9=sn,k9=Yn,$9=qt,T9=$s,O9=yS,ti=Os,I9=xs,P9=f9,A9=zw,R9=g9,D9=S9,_9=vo,gd=_9("replace"),M9=Math.max,j9=Math.min,N9=function(e){return e===void 0?e:String(e)},L9=function(){return"a".replace(/./,"$0")==="$0"}(),BS=function(){return/./[gd]?/./[gd]("a","$0")==="":!1}(),F9=!C9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});E9("replace",function(e,t,n){var r=BS?"$":"$0";return[function(o,a){var s=I9(this),l=o==null?void 0:A9(o,gd);return l?l.call(o,s,a):t.call(ti(s),o,a)},function(i,o){var a=k9(this),s=ti(i);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var l=n(t,a,s,o);if(l.done)return l.value}var u=$9(o);u||(o=ti(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=D9(a,s);if(d===null||(p.push(d),!c))break;var v=ti(d[0]);v===""&&(a.lastIndex=P9(s,O9(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=ti(d[0]),x=M9(j9(T9(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(N9(d[S]));var E=d.groups;if(u){var T=[b].concat(k,x,s);E!==void 0&&T.push(E);var L=ti(o.apply(void 0,T))}else L=R9(b,s,x,k,E,o);x>=g&&(h+=s.slice(g,x)+L,g=x+b.length)}return h+s.slice(g)}]},!F9||!L9||BS);var xo=lt,B9=gc,z9=lr,Rs=function(e){return B9.slice(0,e.length)===e},W9=function(){return Rs("Bun/")?"BUN":Rs("Cloudflare-Workers")?"CLOUDFLARE":Rs("Deno/")?"DENO":Rs("Node.js/")?"NODE":xo.Bun&&typeof Bun.version=="string"?"BUN":xo.Deno&&typeof Deno.version=="object"?"DENO":z9(xo.process)==="process"?"NODE":xo.window&&xo.document?"BROWSER":"REST"}(),U9=TypeError,H9=function(e,t){if(e<t)throw new U9("Not enough arguments");return e},zS=lt,V9=lc,K9=wt,q9=W9,G9=gc,Y9=rs,X9=H9,J9=zS.Function,Z9=/MSIE .\./.test(G9)||q9==="BUN"&&function(){var e=zS.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),WS=function(e,t){var n=t?2:1;return Z9?function(r,i){var o=X9(arguments.length,1)>n,a=K9(r)?r:J9(r),s=o?Y9(arguments,n):[],l=o?function(){V9(a,this,s)}:a;return t?e(l,i):e(l)}:e},Q9=Ne,US=lt,eV=WS,HS=eV(US.setInterval,!0);Q9({global:!0,bind:!0,forced:US.setInterval!==HS},{setInterval:HS});var tV=Ne,VS=lt,nV=WS,KS=nV(VS.setTimeout,!0);tV({global:!0,bind:!0,forced:VS.setTimeout!==KS},{setTimeout:KS});var rV=vt,iV=rV.setInterval,oV=iV;const aV=Se(oV);var sV=ut,qS=function(e,t){var n=[][e];return!!n&&sV(function(){n.call(null,t||function(){return 1},1)})},lV=Ne,uV=cc,cV=Cb.indexOf,fV=qS,yd=uV([].indexOf),GS=!!yd&&1/yd([1],1,-0)<0,dV=GS||!fV("indexOf");lV({target:"Array",proto:!0,forced:dV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return GS?yd(this,t,n)||0:cV(this,t,n)}});var pV=dr,hV=pV("Array","indexOf"),vV=Pn,mV=hV,bd=Array.prototype,gV=function(e){var t=e.indexOf;return e===bd||vV(bd,e)&&t===bd.indexOf?mV:t},yV=gV,bV=yV,xV=bV;const wV=Se(xV);var YS=Ha,SV=TypeError,EV=function(e,t){if(!delete e[t])throw new SV("Cannot delete property "+YS(t)+" of "+YS(e))},CV=Ne,kV=An,$V=Bc,TV=Ga,OV=ur,IV=sw,PV=_c,AV=Fc,RV=Qi,xd=EV,DV=Xa,_V=DV("splice"),MV=Math.max,jV=Math.min;CV({target:"Array",proto:!0,forced:!_V},{splice:function(t,n){var r=kV(this),i=OV(r),o=$V(t,i),a=arguments.length,s,l,u,c,f,p;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=jV(MV(TV(n),0),i-o)),PV(i+s-l),u=AV(r,l),c=0;c<l;c++)f=o+c,f in r&&RV(u,c,r[f]);if(u.length=l,s<l){for(c=o;c<i-l;c++)f=c+l,p=c+s,f in r?r[p]=r[f]:xd(r,p);for(c=i;c>i-l+s;c--)xd(r,c-1)}else if(s>l)for(c=i-l;c>o;c--)f=c+l-1,p=c+s-1,f in r?r[p]=r[f]:xd(r,p);for(c=0;c<s;c++)r[c+o]=arguments[c+2];return IV(r,i-l+s),u}});var NV=dr,LV=NV("Array","splice"),FV=Pn,BV=LV,wd=Array.prototype,zV=function(e){var t=e.splice;return e===wd||FV(wd,e)&&t===wd.splice?BV:t},WV=zV,UV=WV,HV=UV;const VV=Se(HV);var KV=dr,qV=KV("Array","concat"),GV=Pn,YV=qV,Sd=Array.prototype,XV=function(e){var t=e.concat;return e===Sd||GV(Sd,e)&&t===Sd.concat?YV:t},JV=XV,ZV=JV,QV=ZV;const qe=Se(QV);var e7=Ne,t7=tt,XS=Date,n7=t7(XS.prototype.getTime);e7({target:"Date",stat:!0},{now:function(){return n7(new XS)}});var r7=vt,i7=r7.Date.now,o7=i7,a7=o7,s7=a7;const Xn=Se(s7);var l7=Zc.forEach,u7=qS,c7=u7("forEach"),f7=c7?[].forEach:function(t){return l7(this,t,arguments.length>1?arguments[1]:void 0)},d7=Ne,JS=f7;d7({target:"Array",proto:!0,forced:[].forEach!==JS},{forEach:JS});var p7=dr,h7=p7("Array","forEach"),v7=h7,m7=v7,g7=eo,y7=Ft,b7=Pn,x7=m7,Ed=Array.prototype,w7={DOMTokenList:!0,NodeList:!0},S7=function(e){var t=e.forEach;return e===Ed||b7(Ed,e)&&t===Ed.forEach||y7(w7,g7(e))?x7:t},E7=S7;const Ds=Se(E7);var C7=Ne,k7=An,ZS=Uc,$7=ut,T7=$7(function(){ZS(1)});C7({target:"Object",stat:!0,forced:T7},{keys:function(t){return ZS(k7(t))}});var O7=vt,I7=O7.Object.keys,P7=I7,A7=P7,R7=A7;const D7=Se(R7);var _7=vt,M7=_7.Object.getOwnPropertySymbols,j7=M7,N7=j7,L7=N7;const QS=Se(L7);var F7=Ne,B7=Zc.filter,z7=Xa,W7=z7("filter");F7({target:"Array",proto:!0,forced:!W7},{filter:function(t){return B7(this,t,arguments.length>1?arguments[1]:void 0)}});var U7=dr,H7=U7("Array","filter"),V7=Pn,K7=H7,Cd=Array.prototype,q7=function(e){var t=e.filter;return e===Cd||V7(Cd,e)&&t===Cd.filter?K7:t},G7=q7,Y7=G7,X7=Y7;const J7=Se(X7);var e1={exports:{}},Z7=Ne,Q7=ut,eK=gn,t1=Gi.f,n1=At,tK=!n1||Q7(function(){t1(1)});Z7({target:"Object",stat:!0,forced:tK,sham:!n1},{getOwnPropertyDescriptor:function(t,n){return t1(eK(t),n)}});var nK=vt,r1=nK.Object,rK=e1.exports=function(t,n){return r1.getOwnPropertyDescriptor(t,n)};r1.getOwnPropertyDescriptor.sham&&(rK.sham=!0);var iK=e1.exports,oK=iK,aK=oK,sK=aK;const i1=Se(sK);var lK=yn,uK=tt,cK=ns,fK=is,dK=Kn,pK=uK([].concat),hK=lK("Reflect","ownKeys")||function(t){var n=cK.f(dK(t)),r=fK.f;return r?pK(n,r(t)):n},vK=Ne,mK=At,gK=hK,yK=gn,bK=Gi,xK=Qi;vK({target:"Object",stat:!0,sham:!mK},{getOwnPropertyDescriptors:function(t){for(var n=yK(t),r=bK.f,i=gK(n),o={},a=0,s,l;i.length>a;)l=r(n,s=i[a++]),l!==void 0&&xK(o,s,l);return o}});var wK=vt,SK=wK.Object.getOwnPropertyDescriptors,EK=SK,CK=EK,kK=CK;const o1=Se(kK);var a1={exports:{}},$K=Ne,TK=At,s1=Ja.f;$K({target:"Object",stat:!0,forced:Object.defineProperties!==s1,sham:!TK},{defineProperties:s1});var OK=vt,l1=OK.Object,IK=a1.exports=function(t,n){return l1.defineProperties(t,n)};l1.defineProperties.sham&&(IK.sham=!0);var PK=a1.exports,AK=PK,RK=AK,DK=RK;const _K=Se(DK);var MK=Tw;const jK=Se(MK);var NK=!1;function LK(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function FK(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var BK=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!NK:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(FK(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=LK(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),St="-ms-",_s="-moz-",Ie="-webkit-",u1="comm",kd="rule",$d="decl",zK="@import",c1="@keyframes",WK="@layer",UK=Math.abs,Ms=String.fromCharCode,HK=Object.assign;function VK(e,t){return mt(e,0)^45?(((t<<2^mt(e,0))<<2^mt(e,1))<<2^mt(e,2))<<2^mt(e,3):0}function f1(e){return e.trim()}function KK(e,t){return(e=t.exec(e))?e[0]:e}function Pe(e,t,n){return e.replace(t,n)}function Td(e,t){return e.indexOf(t)}function mt(e,t){return e.charCodeAt(t)|0}function wo(e,t,n){return e.slice(t,n)}function Sn(e){return e.length}function Od(e){return e.length}function js(e,t){return t.push(e),e}function qK(e,t){return e.map(t).join("")}var Ns=1,ni=1,d1=0,Dt=0,nt=0,ri="";function Ls(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Ns,column:ni,length:a,return:""}}function So(e,t){return HK(Ls("",null,null,"",null,null,0),e,{length:-e.length},t)}function GK(){return nt}function YK(){return nt=Dt>0?mt(ri,--Dt):0,ni--,nt===10&&(ni=1,Ns--),nt}function zt(){return nt=Dt<d1?mt(ri,Dt++):0,ni++,nt===10&&(ni=1,Ns++),nt}function En(){return mt(ri,Dt)}function Fs(){return Dt}function Eo(e,t){return wo(ri,e,t)}function Co(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function p1(e){return Ns=ni=1,d1=Sn(ri=e),Dt=0,[]}function h1(e){return ri="",e}function Bs(e){return f1(Eo(Dt-1,Id(e===91?e+2:e===40?e+1:e)))}function XK(e){for(;(nt=En())&&nt<33;)zt();return Co(e)>2||Co(nt)>3?"":" "}function JK(e,t){for(;--t&&zt()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return Eo(e,Fs()+(t<6&&En()==32&&zt()==32))}function Id(e){for(;zt();)switch(nt){case e:return Dt;case 34:case 39:e!==34&&e!==39&&Id(nt);break;case 40:e===41&&Id(e);break;case 92:zt();break}return Dt}function ZK(e,t){for(;zt()&&e+nt!==57;)if(e+nt===84&&En()===47)break;return"/*"+Eo(t,Dt-1)+"*"+Ms(e===47?e:zt())}function QK(e){for(;!Co(En());)zt();return Eo(e,Dt)}function eq(e){return h1(zs("",null,null,null,[""],e=p1(e),0,[0],e))}function zs(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,p=0,d=0,v=0,h=1,g=1,m=1,b=0,x="",k=i,S=o,E=r,T=x;g;)switch(v=b,b=zt()){case 40:if(v!=108&&mt(T,f-1)==58){Td(T+=Pe(Bs(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=Bs(b);break;case 9:case 10:case 13:case 32:T+=XK(v);break;case 92:T+=JK(Fs()-1,7);continue;case 47:switch(En()){case 42:case 47:js(tq(ZK(zt(),Fs()),t,n),l);break;default:T+="/"}break;case 123*h:s[u++]=Sn(T)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:m==-1&&(T=Pe(T,/\f/g,"")),d>0&&Sn(T)-f&&js(d>32?m1(T+";",r,n,f-1):m1(Pe(T," ","")+";",r,n,f-2),l);break;case 59:T+=";";default:if(js(E=v1(T,t,n,u,c,i,s,x,k=[],S=[],f),o),b===123)if(c===0)zs(T,t,E,E,k,o,f,s,S);else switch(p===99&&mt(T,3)===110?100:p){case 100:case 108:case 109:case 115:zs(e,E,E,r&&js(v1(e,E,E,0,0,i,s,x,i,k=[],f),S),i,S,f,s,r?k:S);break;default:zs(T,E,E,E,[""],S,0,s,S)}}u=c=d=0,h=m=1,x=T="",f=a;break;case 58:f=1+Sn(T),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&YK()==125)continue}switch(T+=Ms(b),b*h){case 38:m=c>0?1:(T+="\f",-1);break;case 44:s[u++]=(Sn(T)-1)*m,m=1;break;case 64:En()===45&&(T+=Bs(zt())),p=En(),c=f=Sn(x=T+=QK(Fs())),b++;break;case 45:v===45&&Sn(T)==2&&(h=0)}}return o}function v1(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,p=i===0?o:[""],d=Od(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=wo(e,f+1,f=UK(h=a[v])),x=e;m<d;++m)(x=f1(h>0?p[m]+" "+b:Pe(b,/&\f/g,p[m])))&&(l[g++]=x);return Ls(e,t,n,i===0?kd:s,l,u,c)}function tq(e,t,n){return Ls(e,t,n,u1,Ms(GK()),wo(e,2,-2),0)}function m1(e,t,n,r){return Ls(e,t,n,$d,wo(e,0,r),wo(e,r+1,-1),r)}function ii(e,t){for(var n="",r=Od(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function nq(e,t,n,r){switch(e.type){case WK:if(e.children.length)break;case zK:case $d:return e.return=e.return||e.value;case u1:return"";case c1:return e.return=e.value+"{"+ii(e.children,r)+"}";case kd:e.value=e.props.join(",")}return Sn(n=ii(e.children,r))?e.return=e.value+"{"+n+"}":""}function rq(e){var t=Od(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function iq(e){return function(t){t.root||(t=t.return)&&e(t)}}function oq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var aq=function(t,n,r){for(var i=0,o=0;i=o,o=En(),i===38&&o===12&&(n[r]=1),!Co(o);)zt();return Eo(t,Dt)},sq=function(t,n){var r=-1,i=44;do switch(Co(i)){case 0:i===38&&En()===12&&(n[r]=1),t[r]+=aq(Dt-1,n,r);break;case 2:t[r]+=Bs(i);break;case 4:if(i===44){t[++r]=En()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ms(i)}while(i=zt());return t},lq=function(t,n){return h1(sq(p1(t),n))},g1=new WeakMap,uq=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!g1.get(r))&&!i){g1.set(t,!0);for(var o=[],a=lq(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},cq=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function y1(e,t){switch(VK(e,t)){case 5103:return Ie+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ie+e+_s+e+St+e+e;case 6828:case 4268:return Ie+e+St+e+e;case 6165:return Ie+e+St+"flex-"+e+e;case 5187:return Ie+e+Pe(e,/(\w+).+(:[^]+)/,Ie+"box-$1$2"+St+"flex-$1$2")+e;case 5443:return Ie+e+St+"flex-item-"+Pe(e,/flex-|-self/,"")+e;case 4675:return Ie+e+St+"flex-line-pack"+Pe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ie+e+St+Pe(e,"shrink","negative")+e;case 5292:return Ie+e+St+Pe(e,"basis","preferred-size")+e;case 6060:return Ie+"box-"+Pe(e,"-grow","")+Ie+e+St+Pe(e,"grow","positive")+e;case 4554:return Ie+Pe(e,/([^-])(transform)/g,"$1"+Ie+"$2")+e;case 6187:return Pe(Pe(Pe(e,/(zoom-|grab)/,Ie+"$1"),/(image-set)/,Ie+"$1"),e,"")+e;case 5495:case 3959:return Pe(e,/(image-set\([^]*)/,Ie+"$1$`$1");case 4968:return Pe(Pe(e,/(.+:)(flex-)?(.*)/,Ie+"box-pack:$3"+St+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ie+e+e;case 4095:case 3583:case 4068:case 2532:return Pe(e,/(.+)-inline(.+)/,Ie+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Sn(e)-1-t>6)switch(mt(e,t+1)){case 109:if(mt(e,t+4)!==45)break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+_s+(mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Td(e,"stretch")?y1(Pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(mt(e,t+1)!==115)break;case 6444:switch(mt(e,Sn(e)-3-(~Td(e,"!important")&&10))){case 107:return Pe(e,":",":"+Ie)+e;case 101:return Pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(mt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+St+"$2box$3")+e}break;case 5936:switch(mt(e,t+11)){case 114:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+St+e+e}return e}var fq=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case $d:t.return=y1(t.value,t.length);break;case c1:return ii([So(t,{value:Pe(t.value,"@","@"+Ie)})],i);case kd:if(t.length)return qK(t.props,function(o){switch(KK(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ii([So(t,{props:[Pe(o,/:(read-\w+)/,":"+_s+"$1")]})],i);case"::placeholder":return ii([So(t,{props:[Pe(o,/:(plac\w+)/,":"+Ie+"input-$1")]}),So(t,{props:[Pe(o,/:(plac\w+)/,":"+_s+"$1")]}),So(t,{props:[Pe(o,/:(plac\w+)/,St+"input-$1")]})],i)}return""})}},dq=[fq],pq=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||dq,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),m=1;m<g.length;m++)o[g[m]]=!0;s.push(h)});var l,u=[uq,cq];{var c,f=[nq,iq(function(h){c.insert(h)})],p=rq(u.concat(i,f)),d=function(g){return ii(eq(g),p)};l=function(g,m,b,x){c=b,d(g?g+"{"+m.styles+"}":m.styles),x&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new BK({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return v.sheet.hydrate(s),v};function hq(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vq={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},mq=!1,gq=/[A-Z]|^ms/g,yq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,b1=function(t){return t.charCodeAt(1)===45},x1=function(t){return t!=null&&typeof t!="boolean"},Pd=oq(function(e){return b1(e)?e:e.replace(gq,"-$&").toLowerCase()}),w1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(yq,function(r,i,o){return Jn={name:i,styles:o,next:Jn},i})}return vq[t]!==1&&!b1(t)&&typeof n=="number"&&n!==0?n+"px":n},bq="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ws(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Jn={name:i.name,styles:i.styles,next:Jn},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Jn={name:a.name,styles:a.styles,next:Jn},a=a.next;var s=o.styles+";";return s}return xq(e,t,n)}}var l=n;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function xq(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ws(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":x1(s)&&(r+=Pd(o)+":"+w1(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&mq)throw new Error(bq);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)x1(a[l])&&(r+=Pd(o)+":"+w1(o,a[l])+";");else{var u=Ws(e,t,a);switch(o){case"animation":case"animationName":{r+=Pd(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var S1=/label:\s*([^\s;{]+)\s*(;|$)/g,Jn;function Ad(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Jn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Ws(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Ws(n,t,e[s]),r){var l=o;i+=l[s]}S1.lastIndex=0;for(var u="",c;(c=S1.exec(i))!==null;)u+="-"+c[1];var f=hq(i)+u;return{name:f,styles:i,next:Jn}}function E1(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var wq=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Sq=function(t,n,r){wq(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function C1(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function k1(e,t,n){var r=[],i=E1(e,r,n);return r.length<2?n:i+t(r)}var Eq=function(t){var n=pq(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=Ad(u,n.registered,void 0);return Sq(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=Ad(u,n.registered),p="animation-"+f.name;return C1(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=Ad(u,n.registered);C1(n,f)},a=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return k1(n.registered,r,Cq(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:E1.bind(null,n.registered),merge:k1.bind(null,n.registered,r)}},Cq=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},kq=yo,Rd=Date.prototype,$1="Invalid Date",T1="toString",$q=Rd[T1],Tq=Rd.getTime;String(new Date(NaN))!=$1&&kq(Rd,T1,function(){var t=Tq.call(this);return t===t?$q.call(this):$1});var Oq=sd,Iq=ES,Pq=Oq?{}.toString:function(){return"[object "+Iq(this)+"]"},Aq=sd,Rq=yo,Dq=Pq;Aq||Rq(Object.prototype,"toString",Dq,{unsafe:!0});var _q=rd.PROPER,Mq=yo,jq=Yn,O1=Os,Nq=sn,Lq=CS,Dd="toString",I1=RegExp.prototype,P1=I1[Dd],Fq=Nq(function(){return P1.call({source:"a",flags:"b"})!="/a/b"}),Bq=_q&&P1.name!=Dd;(Fq||Bq)&&Mq(RegExp.prototype,Dd,function(){var t=jq(this),n=O1(t.source),r=t.flags,i=O1(r===void 0&&t instanceof RegExp&&!("flags"in I1)?Lq.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var A1=typeof window<"u"?window:self,zq=A1.crypto||A1.msCrypto,Wq=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(zq);const Uq=Se(Wq);function Hq(){return Uq().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Vq=fb;const R1=Se(Vq);function je(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function D1(e,t){for(var n,r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];return qe(n=[qe(r="%c".concat(e,"%c ")).call(r,t)]).call(n,ke(je("green","white")),o)}function Kq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(o.length){var s=o,l=xn(s,1),u=l[0];typeof u=="function"&&(o=u());var c=R1(o[0])?o:[o],f=c.length===1;Ds(c).call(c,function(p,d){if(f){var v,h;(v=console).log.apply(v,ke(D1.apply(void 0,qe(h=[e]).call(h,ke(p)))))}else if(d){var g;(g=console).log.apply(g,ke(R1(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,ke(D1.apply(void 0,qe(b=[e]).call(b,ke(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var qq=pr,Gq=rd.EXISTS,Yq=mo.f,_1=Function.prototype,Xq=_1.toString,Jq=/^\s*function ([^ (]*)/,Zq="name";qq&&!Gq&&Yq(_1,Zq,{configurable:!0,get:function(){try{return Xq.call(this).match(Jq)[1]}catch{return""}}});var Qq=vt,e8=Qq.setTimeout,t8=e8;const n8=Se(t8);function r8(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Xn();s-n>t?(e.apply(void 0,o),n=s):(clearTimeout(r),r=n8(function(){e.apply(void 0,o),n=Xn()},Math.max(0,t-s+n)))}}var M1=function(t){var n=t.debounce,r=t.name,i=t.onEvent,o=t.target,a=A.useRef();a.current=i;var s=A.useMemo(function(){return r8(function(u){var c=a.current;c&&c(u)},n)},[n,a]),l=A.useCallback(function(u){u.timeStampLow=Xn(),s(u)},[s]);return A.useLayoutEffect(function(){return o.addEventListener(r,l,{passive:!0}),l({target:o,type:r}),function(){return o.removeEventListener(r,l)}},[r,l,o]),!1};M1.defaultProps={debounce:200};var i8=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},o8=Ne,a8=i8;o8({target:"Math",stat:!0},{sign:a8});var s8=vt,l8=s8.Math.sign,u8=l8,c8=u8,f8=c8;const d8=Se(f8);function p8(e,t){var n=d8(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function h8(e,t,n,r){for(var i=e,o=0;o<r;o++)i=n(i,t);return i}var j1=function(t){var n=t.name,r=t.onEnd,i=t.target,o=t.value,a=A.useRef(),s=A.useCallback(function(u,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Xn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(i){var v=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=h8(c,v,p8,(Xn()-d)/5);Math.abs(v-h)<1.5&&(h=v),i[u]=h,v===h?r&&r(!0):s(u,c,f,p+1,d)}}))},[a,r,i]),l=A.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return A.useLayoutEffect(function(){return s(n,i[n],o,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,i,o]),!1};j1.propTypes={name:Oe.string.isRequired,onEnd:Oe.func,target:Oe.any.isRequired,value:Oe.oneOfType([Oe.number,Oe.oneOf(["100%"])]).isRequired};function _d(e){var t=A.useState(e),n=xn(t,2),r=n[0],i=n[1],o=A.useRef(),a=A.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),o.current=s,s}):(o.current=s,a(s))},[o]);return o.current=r,[r,i,o]}function N1(e,t){var n=D7(e);if(QS){var r=QS(e);t&&(r=J7(r).call(r,function(i){return i1(e,i).enumerable})),n.push.apply(n,r)}return n}function L1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ds(r=N1(Object(n),!0)).call(r,function(o){$W(e,o,n[o])})}else if(o1)_K(e,o1(n));else{var i;Ds(i=N1(Object(n))).call(i,function(o){jK(e,o,i1(n,o))})}}return e}var v8=function(){return 1/0},F1=17,m8="bottom",ln="top",B1=1,g8=34,z1={};function y8(e,t){return e(),aV(e,t)}function W1(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,o=n.scrollTop,a=i-o-r<B1,s=o<B1,l=t===ln?s:a,u=t!==ln?s:a;return{atBottom:a,atEnd:l,atStart:u,atTop:s}}function ko(e,t){return e===(t===ln?0:"100%")}var Md=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,o=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,c=A.useMemo(function(){return Kq("<ScrollToBottom>",{force:o})},[o]);s=s===ln?ln:m8;var f=A.useRef(0),p=A.useRef(a),d=_d(s===ln?0:"100%"),v=xn(d,3),h=v[0],g=v[1],m=v[2],b=_d(null),x=xn(b,3),k=x[0],S=x[1],E=x[2],T=A.useRef(0),L=A.useRef(0),N=A.useRef(0),O=A.useState(!0),M=xn(O,2),K=M[0],F=M[1],I=A.useState(!0),D=xn(I,2),j=D[0],G=D[1],U=A.useState(!0),R=xn(U,2),y=R[0],_=R[1],z=A.useState(!1),w=xn(z,2),H=w[0],X=w[1],q=_d(!0),Y=xn(q,3),Q=Y[0],ee=Y[1],J=Y[2],Z=A.useRef([]),V=A.useCallback(function(B){var ne=E.current;return Z.current.push(B),ne&&B({scrollTop:ne.scrollTop}),function(){var se=Z.current,fe=wV(se).call(se,B);~fe&&VV(se).call(se,fe,1)}},[Z,E]),ie=A.useCallback(function(){var B=m.current;c(function(){var ne;return qe(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,ke(je("magenta")),ke(je("orange")),[{animateTo:B}])}),f.current=Xn(),ko(B,s)||ee(!1),g(null)},[m,c,f,s,g,ee]),le=A.useCallback(function(B){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=ne.behavior,fe=E.current;if(typeof B!="number"&&B!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var ve;return[qe(ve=["%cscrollTo%c: Will scroll to %c".concat(typeof B=="number"?B+"px":B.replace(/%/g,"%%"),"%c")]).call(ve,ke(je("lime","")),ke(je("purple"))),{behavior:se,nextAnimateTo:B,target:fe}]}),se==="auto"?(ie(),fe&&(fe.scrollTop=B==="100%"?fe.scrollHeight-fe.offsetHeight:B)):(se!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),g(B)),ko(B,s)&&(c(function(){var ve;return[qe(ve=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ve,ke(je("lime","")),ke(je("purple"))),[{mode:s,nextAnimateTo:B}]]}),ee(!0))},[c,ie,s,g,ee,E]),de=A.useCallback(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=B.behavior;c(function(){var se;return qe(se=["%cscrollToBottom%c: Called"]).call(se,ke(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le("100%",{behavior:ne||"smooth"})},[c,le]),ae=A.useCallback(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=B.behavior;c(function(){var se;return qe(se=["%cscrollToTop%c: Called"]).call(se,ke(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le(0,{behavior:ne||"smooth"})},[c,le]),ge=A.useCallback(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=B.behavior;c(function(){var fe;return qe(fe=["%cscrollToEnd%c: Called"]).call(fe,ke(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===ln?ae(se):de(se)},[c,s,de,ae]),$e=A.useCallback(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=B.behavior;c(function(){var fe;return qe(fe=["%cscrollToStart%c: Called"]).call(fe,ke(je("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===ln?de(se):ae(se)},[c,s,de,ae]),Ae=A.useCallback(function(){var B=E.current;if(B){if(p.current==="auto"){c(function(){var ot;return qe(ot=["%ctarget changed%c: Initial scroll"]).call(ot,ke(je("blue")))}),B.scrollTop=s===ln?0:B.scrollHeight-B.offsetHeight,p.current=!1;return}var ne=T.current,se=B.offsetHeight,fe=B.scrollHeight,ve=B.scrollTop,Ye=s===ln?0:Math.max(0,fe-se-ve),Xe=Math.max(0,ne-ve),gt=u({maxValue:Ye,minValue:Xe,offsetHeight:se,scrollHeight:fe,scrollTop:ve}),it=Math.max(0,Math.min(Ye,gt)),Re;s===ln||it!==Ye?Re=ve+it:Re="100%",c(function(){var ot,Ze,Gt;return[qe(ot=[qe(Ze=qe(Gt="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(Gt,typeof Re=="number"?Re+"px":Re.replace(/%/g,"%%"),"%c (%c")).call(Ze,(Re==="100%"?Ye:Re)+ne,"px%c)")]).call(ot,ke(je("orange")),ke(je("purple")),ke(je("purple")),ke(je("purple"))),{animateFrom:ne,maxValue:Ye,minValue:Xe,nextAnimateTo:Re,nextValue:it,offsetHeight:se,rawNextValue:gt,scrollHeight:fe,scrollTop:ve}]}),le(Re,{behavior:"smooth"})}},[T,c,s,u,le,E]),rt=A.useCallback(function(B){var ne,se=B.timeStampLow,fe=m.current,ve=E.current,Ye=fe!==null;if(!(se<=f.current||!ve)){var Xe=W1({mode:s,target:ve}),gt=Xe.atBottom,it=Xe.atEnd,Re=Xe.atStart,ot=Xe.atTop;F(gt),G(it),X(Re),_(ot);var Ze=ve.offsetHeight,Gt=ve.scrollHeight,Po=L.current,Mn=N.current,yr=Ze!==Po,br=Gt!==Mn;if(yr&&(L.current=Ze),br&&(N.current=Gt),!yr&&!br){var xr=Ye&&ko(fe,s)||it;J.current!==xr&&(c(function(){var kn,tl,Ao,Ro;return[qe(kn=["%conScroll%c: %csetSticky%c(%c".concat(xr,"%c)")]).call(kn,ke(je("red")),ke(je("red")),ke(je("purple"))),qe(tl=[qe(Ao=qe(Ro="(animating = %c".concat(Ye,"%c && isEnd = %c")).call(Ro,ko(fe,s),"%c) || atEnd = %c")).call(Ao,it,"%c")]).call(tl,ke(je("purple")),ke(je("purple")),ke(je("purple")),[{animating:Ye,animateTo:fe,atEnd:it,mode:s,offsetHeight:ve.offsetHeight,scrollHeight:ve.scrollHeight,sticky:J.current,nextSticky:xr}])]}),ee(xr))}else J.current&&(c(function(){var kn;return[qe(kn=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(kn,ke(je("red")),ke(je("orange")),[{offsetHeightChanged:yr,scrollHeightChanged:br}]),{nextOffsetHeight:Ze,prevOffsetHeight:Po,nextScrollHeight:Gt,prevScrollHeight:Mn}]}),Ae());var up=ve.scrollTop;Ds(ne=Z.current).call(ne,function(kn){return kn({scrollTop:up})})}},[m,c,f,s,L,N,Z,Ae,F,G,X,_,ee,J,E]);A.useEffect(function(){if(k){var B=!1,ne=y8(function(){var se=E.current,fe=m.current!==null;J.current?W1({mode:s,target:se}).atEnd?B=!1:B?Xn()-B>g8&&(fe||(T.current=se.scrollTop,c(function(){var ve;return qe(ve=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ve,ke(je("navy")),ke(je("orange")))}),Ae()),B=!1):B=Xn():se.scrollHeight<=se.offsetHeight&&!J.current&&(c(function(){var ve;return[qe(ve=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ve,ke(je("navy")),ke(je("purple"))),[{offsetHeight:se.offsetHeight,scrollHeight:se.scrollHeight,sticky:J.current}]]}),ee(!0))},Math.max(F1,n)||F1);return function(){return clearInterval(ne)}}},[m,n,c,s,Ae,ee,J,k,E]);var Et=A.useMemo(function(){var B=z1[l]||(z1[l]=Eq({key:"react-scroll-to-bottom--css-"+Hq(),nonce:l}));return function(ne){return B.css(ne)+""}},[l]),Ct=A.useMemo(function(){return{observeScrollPosition:V,setTarget:S,styleToClassName:Et}},[V,S,Et]),kt=A.useMemo(function(){return{atBottom:K,atEnd:j,atStart:H,atTop:y,mode:s}},[K,j,H,y,s]),oe=A.useMemo(function(){var B=h!==null;return{animating:B,animatingToEnd:B&&ko(h,s),sticky:Q}},[h,s,Q]),ce=A.useMemo(function(){return L1(L1({},kt),oe)},[kt,oe]),W=A.useMemo(function(){return{scrollTo:le,scrollToBottom:de,scrollToEnd:ge,scrollToStart:$e,scrollToTop:ae}},[le,de,ge,$e,ae]);return A.useEffect(function(){if(k){var B=function(){N.current=k.scrollHeight};return k.addEventListener("focus",B,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",B)}}},[k]),c(function(){var B;return[qe(B=["%cRender%c: Render"]).call(B,ke(je("cyan",""))),{animateTo:h,animating:h!==null,sticky:Q,target:k}]}),A.createElement(ys.Provider,{value:Ct},A.createElement(_f.Provider,{value:W},A.createElement(Nf.Provider,{value:ce},A.createElement(Mf.Provider,{value:kt},A.createElement(jf.Provider,{value:oe},r,k&&A.createElement(M1,{debounce:i,name:"scroll",onEvent:rt,target:k}),k&&h!==null&&A.createElement(j1,{name:"scrollTop",onEnd:ie,target:k,value:h}))))))};Md.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:v8},Md.propTypes={checkInterval:Oe.number,children:Oe.any,debounce:Oe.number,debug:Oe.bool,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func};var b8={height:"100%",overflowY:"auto",width:"100%"},jd=function(t){var n=t.children,r=t.className,i=A.useContext(ys),o=i.setTarget,a=Lf()(b8);return A.createElement("div",{className:Tf(a,(r||"")+""),ref:o},n)};jd.defaultProps={children:void 0,className:void 0},jd.propTypes={children:Oe.any,className:Oe.string};var x8={position:"relative"},Nd=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,o=t.scrollViewClassName,a=Lf()(x8);return A.createElement("div",{className:Tf(a,(r||"")+"")},A.createElement(jd,{className:(o||"")+""},n),A.createElement(Ff,{className:(i||"")+""}))};Nd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Nd.propTypes={children:Oe.any,className:Oe.string,followButtonClassName:Oe.string,scrollViewClassName:Oe.string};var Ld=function(t){var n=t.checkInterval,r=t.children,i=t.className,o=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,c=t.nonce,f=t.scroller,p=t.scrollViewClassName;return A.createElement(Md,{checkInterval:n,debounce:o,debug:a,initialScrollBehavior:l,mode:u,nonce:c,scroller:f},A.createElement(Nd,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};Ld.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Ld.propTypes={checkInterval:Oe.number,children:Oe.any,className:Oe.string,debounce:Oe.number,debug:Oe.bool,followButtonClassName:Oe.string,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func,scrollViewClassName:Oe.string},TM();let U1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Fd=A.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:c=!0,...f})=>{const{messageList:p}=Ce,d=A.useMemo(()=>NE(t),[t]);return $.jsxs(Ld,{...f,className:Ui(p.container.className,e),followButtonClassName:p.scrollDownButton.className,scrollViewClassName:p.viewPort.className,children:[r&&$.jsx("span",{...p.headerMessage,children:r}),c&&$.jsx(kM,{botAvatar:o,botDescription:a,botName:s}),d.map(v=>{var h;return $.jsx(sc,{renderers:i,sendMessage:l,addMessageFeedback:u,...v},((h=v.metadata)==null?void 0:h.clientMessageId)||v.id)}),n&&$.jsx(sc,{id:U1(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s||"Bot",avatar:o},children:$.jsx(ac,{})})]})});Fd.displayName="MessageList";const w8=({className:e,...t})=>{const{className:n}=Ce.loader;return $.jsx("div",{...t,className:Ui(e,n)})},H1=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:o,sendMessage:a,uploadFile:s,addMessageFeedback:l,isLoading:u,renderers:c,isReadOnly:f,disableComposer:p,restartConversation:d,allowFileUpload:v,...h})=>{const{color:g,fontFamily:m,radius:b,themeMode:x,variant:k,headerVariant:S,botAvatar:E,botDescription:T,botName:L,composerPlaceholder:N,footer:O,feedbackEnabled:M}=t,K={color:g,fontFamily:m,radius:b,themeMode:x,variant:k,headerVariant:S},F=A.useMemo(()=>i.map(I=>{const{authorId:D}=I,j=D===(o==null?void 0:o.id)?"outgoing":"incoming";return{...I,direction:j,sender:j==="outgoing"?{name:"You"}:{name:L||"Bot",avatar:E}}}),[E,L,i,o==null?void 0:o.id]);return M||(l=void 0),$.jsxs($.Fragment,{children:[$.jsx(gy,{...K}),$.jsxs(Qu,{connected:e,allowFileUpload:v,uploadFile:s,...h,children:[$.jsx(Iy,{closeWindow:n,configuration:t,restartConversation:d}),u?$.jsx(w8,{}):$.jsx(Fd,{botAvatar:E,botDescription:T,botName:L,renderers:c,isTyping:r,sendMessage:a,addMessageFeedback:l,messages:F}),$.jsx(Fg,{sendMessage:a,uploadFile:s,connected:e,isReadOnly:f,disableComposer:p,footer:O,composerPlaceholder:N,allowFileUpload:v})]})]})};function S8(){const[e,t]=A.useState(!1),n=A.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var E8=Object.defineProperty,C8=(e,t,n)=>t in e?E8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k8=(e,t,n)=>C8(e,t+"",n),$8=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},T8={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},O8=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},I8=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},P8=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},V1=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(I8(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=O8(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Us({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Us=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},K1=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,c])=>{s=[...s,u,e?c:encodeURIComponent(c)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=P8(r),a=Object.entries(i).map(([s,l])=>Us({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},A8=/\{[^{}]+\}/g,R8=({path:e,url:t})=>{let n=t,r=t.match(A8);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,V1({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,K1({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Us({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},q1=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,V1({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,K1({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Us({allowReserved:e,name:o,value:a})]}}return i.join("&")},D8=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},_8=async({security:e,...t})=>{for(let n of e){let r=await $8(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},G1=e=>M8({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:q1(e.querySerializer),url:e.url}),M8=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=R8({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},Y1=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=X1(e.headers,t.headers),r},X1=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},Bd=class{constructor(){k8(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},j8=()=>({error:new Bd,request:new Bd,response:new Bd}),N8=q1({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),L8={"Content-Type":"application/json"},J1=(e={})=>({...T8,headers:L8,parseAs:"auto",querySerializer:N8,...e}),F8=(e={})=>{let t=Y1(J1(),e),n=()=>({...t}),r=a=>(t=Y1(t,a),n()),i=j8(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:X1(t.headers,a.headers)};s.security&&await _8({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=G1(s),u={redirect:"follow",...s},c=new Request(l,u);for(let g of i.request._fns)c=await g(c,s);let f=s.fetch,p=await f(c);for(let g of i.response._fns)p=await g(p,c,s);let d={request:c,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?D8(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let m=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),{data:m,...d}}let v=await p.text();try{v=JSON.parse(v)}catch{}let h=v;for(let g of i.error._fns)h=await g(v,p,c,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:G1,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},B8=F8,z8=J1;const Ue=B8((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(z8({baseUrl:"https://webchat.botpress.cloud/"}))),W8=e=>(e.client??Ue).delete({url:"/conversations/{id}",...e}),U8=e=>(e.client??Ue).get({url:"/conversations/{id}",...e}),H8=e=>(e.client??Ue).get({url:"/conversations",...e}),V8=e=>(e.client??Ue).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),K8=e=>(e.client??Ue).get({url:"/conversations/{id}/messages",...e}),q8=e=>(e.client??Ue).get({url:"/conversations/{id}/participants",...e}),G8=e=>(e.client??Ue).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),Y8=e=>(e.client??Ue).delete({url:"/conversations/{id}/participants/{userId}",...e}),X8=e=>(e.client??Ue).get({url:"/conversations/{id}/participants/{userId}",...e}),J8=e=>(e.client??Ue).delete({url:"/messages/{id}",...e}),Z8=e=>(e.client??Ue).get({url:"/messages/{id}",...e}),Q8=e=>(e.client??Ue).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),eG=e=>(e.client??Ue).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),tG=e=>(e.client??Ue).delete({url:"/messages/{id}/feedback",...e}),nG=e=>(e.client??Ue).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),rG=e=>(e.client??Ue).delete({url:"/users/me",...e}),iG=e=>(e.client??Ue).get({url:"/users/me",...e}),oG=e=>(e.client??Ue).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),Z1=e=>((e==null?void 0:e.client)??Ue).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),aG=e=>(e.client??Ue).get({url:"/events/{id}",...e}),sG=e=>(e.client??Ue).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),lG=e=>(e.client??Ue).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let Q1=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function zd(e){}function uG(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=zd,onError:n=zd,onRetry:r=zd,onComment:i}=e;let o="",a=!0,s,l="",u="";function c(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=cG(`${o}${g}`);for(const x of m)f(x);o=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const m=h.slice(0,g),b=h[g+1]===" "?2:1,x=h.slice(g+b);p(m,x,h);return}p(h,"",h)}function p(h,g,m){switch(h){case"event":u=g;break;case"data":l=`${l}${g}
280
- `;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new Q1(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:m}));break;default:n(new Q1(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:m}));break}}function d(){l.length>0&&t({id:s,event:u||void 0,data:l.endsWith(`
281
- `)?l.slice(0,-1):l}),s=void 0,l="",u=""}function v(h={}){o&&h.consume&&f(o),a=!0,s=void 0,l="",u="",o=""}return{feed:c,reset:v}}function cG(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
290
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&r.push(l);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Rw);var eW=Rw.exports;const If=Ee(eW);var Pf={exports:{}},Af,_w;function Rf(){if(_w)return Af;_w=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Af=e,Af}var _f,Dw;function tW(){if(Dw)return _f;Dw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var f;try{if(typeof o[c]!="function"){var p=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.");throw p.name="Invariant Violation",p}f=o[c](a,c,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},_f=i,_f}var Df,Mw;function nW(){if(Mw)return Df;Mw=1;var e=_a(),t=iy(),n=Rf(),r=tW(),i=Function.call.bind(Object.prototype.hasOwnProperty),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Df=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(R){var y=R&&(u&&R[u]||R[c]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:C(),elementType:S(),instanceOf:E,node:O(),objectOf:L,oneOf:I,oneOfType:_,shape:D,exact:H};function v(R,y){return R===y?R!==0||1/R===1/y:R!==R&&y!==y}function h(R){this.message=R,this.stack=""}h.prototype=Error.prototype;function g(R){if(process.env.NODE_ENV!=="production")var y={},$=0;function N(B,Y,K,X,Z,ee,J){if(X=X||p,ee=ee||K,J!==n){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=X+":"+K;!y[q]&&$<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[q]=!0,$++)}}return Y[K]==null?B?Y[K]===null?new h("The "+Z+" `"+ee+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+Z+" `"+ee+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:R(Y,K,X,Z,ee)}var x=N.bind(null,!1);return x.isRequired=N.bind(null,!0),x}function m(R){function y($,N,x,B,Y,K){var X=$[N],Z=M(X);if(Z!==R){var ee=W(X);return new h("Invalid "+B+" `"+Y+"` of type "+("`"+ee+"` supplied to `"+x+"`, expected ")+("`"+R+"`."))}return null}return g(y)}function b(){return g(a)}function w(R){function y($,N,x,B,Y){if(typeof R!="function")return new h("Property `"+Y+"` of component `"+x+"` has invalid PropType notation inside arrayOf.");var K=$[N];if(!Array.isArray(K)){var X=M(K);return new h("Invalid "+B+" `"+Y+"` of type "+("`"+X+"` supplied to `"+x+"`, expected an array."))}for(var Z=0;Z<K.length;Z++){var ee=R(K,Z,x,B,Y+"["+Z+"]",n);if(ee instanceof Error)return ee}return null}return g(y)}function C(){function R(y,$,N,x,B){var Y=y[$];if(!s(Y)){var K=M(Y);return new h("Invalid "+x+" `"+B+"` of type "+("`"+K+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return g(R)}function S(){function R(y,$,N,x,B){var Y=y[$];if(!e.isValidElementType(Y)){var K=M(Y);return new h("Invalid "+x+" `"+B+"` of type "+("`"+K+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return g(R)}function E(R){function y($,N,x,B,Y){if(!($[N]instanceof R)){var K=R.name||p,X=V($[N]);return new h("Invalid "+B+" `"+Y+"` of type "+("`"+X+"` supplied to `"+x+"`, expected ")+("instance of `"+K+"`."))}return null}return g(y)}function I(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function y($,N,x,B,Y){for(var K=$[N],X=0;X<R.length;X++)if(v(K,R[X]))return null;var Z=JSON.stringify(R,function(J,Q){var q=W(Q);return q==="symbol"?String(Q):Q});return new h("Invalid "+B+" `"+Y+"` of value `"+String(K)+"` "+("supplied to `"+x+"`, expected one of "+Z+"."))}return g(y)}function L(R){function y($,N,x,B,Y){if(typeof R!="function")return new h("Property `"+Y+"` of component `"+x+"` has invalid PropType notation inside objectOf.");var K=$[N],X=M(K);if(X!=="object")return new h("Invalid "+B+" `"+Y+"` of type "+("`"+X+"` supplied to `"+x+"`, expected an object."));for(var Z in K)if(i(K,Z)){var ee=R(K,Z,x,B,Y+"."+Z,n);if(ee instanceof Error)return ee}return null}return g(y)}function _(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<R.length;y++){var $=R[y];if(typeof $!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G($)+" at index "+y+"."),a}function N(x,B,Y,K,X){for(var Z=0;Z<R.length;Z++){var ee=R[Z];if(ee(x,B,Y,K,X,n)==null)return null}return new h("Invalid "+K+" `"+X+"` supplied to "+("`"+Y+"`."))}return g(N)}function O(){function R(y,$,N,x,B){return F(y[$])?null:new h("Invalid "+x+" `"+B+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return g(R)}function D(R){function y($,N,x,B,Y){var K=$[N],X=M(K);if(X!=="object")return new h("Invalid "+B+" `"+Y+"` of type `"+X+"` "+("supplied to `"+x+"`, expected `object`."));for(var Z in R){var ee=R[Z];if(ee){var J=ee(K,Z,x,B,Y+"."+Z,n);if(J)return J}}return null}return g(y)}function H(R){function y($,N,x,B,Y){var K=$[N],X=M(K);if(X!=="object")return new h("Invalid "+B+" `"+Y+"` of type `"+X+"` "+("supplied to `"+x+"`, expected `object`."));var Z=t({},$[N],R);for(var ee in Z){var J=R[ee];if(!J)return new h("Invalid "+B+" `"+Y+"` key `"+ee+"` supplied to `"+x+"`.\nBad object: "+JSON.stringify($[N],null," ")+`
291
+ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var Q=J(K,ee,x,B,Y+"."+ee,n);if(Q)return Q}return null}return g(y)}function F(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(F);if(R===null||s(R))return!0;var y=f(R);if(y){var $=y.call(R),N;if(y!==R.entries){for(;!(N=$.next()).done;)if(!F(N.value))return!1}else for(;!(N=$.next()).done;){var x=N.value;if(x&&!F(x[1]))return!1}}else return!1;return!0;default:return!1}}function j(R,y){return R==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function M(R){var y=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":j(y,R)?"symbol":y}function W(R){if(typeof R>"u"||R===null)return""+R;var y=M(R);if(y==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return y}function G(R){var y=W(R);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function V(R){return!R.constructor||!R.constructor.name?p:R.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Df}var Mf,jw;function rW(){if(jw)return Mf;jw=1;var e=Rf();function t(){}function n(){}return n.resetWarningCache=t,Mf=function(){function r(a,s,l,u,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Mf}if(process.env.NODE_ENV!=="production"){var iW=_a(),oW=!0;Pf.exports=nW()(iW.isElement,oW)}else Pf.exports=rW()();var aW=Pf.exports;const Oe=Ee(aW);var jf=A.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});jf.displayName="ScrollToBottomFunctionContext";function sW(){return A.useContext(jf)}function lW(){var e=sW(),t=e.scrollToEnd;return t}var Nf=A.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Nf.displayName="ScrollToBottomState1Context";var Lf=A.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Lf.displayName="ScrollToBottomState2Context";var Ff=A.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Ff.displayName="ScrollToBottomStateContext";var Nw=[Ff,Nf,Lf];function uW(e){return A.useContext(Nw[e]||Nw[0])}function cW(){var e=uW(2),t=e.sticky;return[t]}var xs=A.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});xs.displayName="ScrollToBottomInternalContext";function fW(){return A.useContext(xs)}function Bf(){var e=fW(),t=e.styleToClassName;return t}var dW={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},zf=function(t){var n=t.children,r=t.className,i=cW(),o=xn(i,1),a=o[0],s=Bf()(dW),l=lW();return!a&&A.createElement("button",{className:If(s,(r||"")+""),onClick:l,type:"button"},n)};zf.defaultProps={children:void 0,className:""},zf.propTypes={children:Oe.any,className:Oe.string};var Lw={exports:{}},pW=Le,hW=At,Fw=on.f;pW({target:"Object",stat:!0,forced:Object.defineProperty!==Fw,sham:!hW},{defineProperty:Fw});var vW=vt,Bw=vW.Object,mW=Lw.exports=function(t,n,r){return Bw.defineProperty(t,n,r)};Bw.defineProperty.sham&&(mW.sham=!0);var gW=Lw.exports,yW=gW,zw=yW,bW=zw,xW=bW,wW=xW,SW=wW,EW=SW;const kW=Ee(EW);var CW=ro,TW=CW.f("iterator"),$W=TW,OW=$W,IW=OW,PW=IW,AW=PW,RW=AW,_W=RW;const DW=Ee(_W);function co(e){"@babel/helpers - typeof";return co=typeof ei=="function"&&typeof DW=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ei=="function"&&t.constructor===ei&&t!==ei.prototype?"symbol":typeof t},co(e)}var MW=ro,jW=MW.f("toPrimitive"),NW=jW,LW=NW,FW=LW,BW=FW,zW=BW,WW=zW,UW=WW;const HW=Ee(UW);function VW(e,t){if(co(e)!="object"||!e)return e;var n=e[HW];if(n!==void 0){var r=n.call(e,t||"default");if(co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qW(e){var t=VW(e,"string");return co(t)=="symbol"?t:t+""}function KW(e,t,n){return(t=qW(t))in e?kW(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GW(e){if(Tb(e))return Of(e)}function YW(e){if(typeof ei<"u"&&xw(e)!=null||e["@@iterator"]!=null)return Pw(e)}function XW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
292
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(e){return GW(e)||YW(e)||Aw(e)||XW()}var ws=function(e){return e&&e.Math==Math&&e},Bt=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof Xt=="object"&&Xt)||function(){return this}()||Function("return this")(),Wf={},sn=function(e){try{return!!e()}catch{return!0}},JW=sn,vr=!JW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Ww={},Uw={}.propertyIsEnumerable,Hw=Object.getOwnPropertyDescriptor,QW=Hw&&!Uw.call({1:2},1);Ww.f=QW?function(t){var n=Hw(this,t);return!!n&&n.enumerable}:Uw;var Vw=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ZW={}.toString,Uf=function(e){return ZW.call(e).slice(8,-1)},eU=sn,tU=Uf,nU="".split,rU=eU(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return tU(e)=="String"?nU.call(e,""):Object(e)}:Object,Ss=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},iU=rU,oU=Ss,Hf=function(e){return iU(oU(e))},Kt=function(e){return typeof e=="function"},aU=Kt,fo=function(e){return typeof e=="object"?e!==null:aU(e)},Vf=Bt,sU=Kt,lU=function(e){return sU(e)?e:void 0},Es=function(e,t){return arguments.length<2?lU(Vf[e]):Vf[e]&&Vf[e][t]},uU=Es,cU=uU("navigator","userAgent")||"",qw=Bt,qf=cU,Kw=qw.process,Gw=qw.Deno,Yw=Kw&&Kw.versions||Gw&&Gw.version,Xw=Yw&&Yw.v8,wn,ks;Xw?(wn=Xw.split("."),ks=wn[0]<4?1:wn[0]+wn[1]):qf&&(wn=qf.match(/Edge\/(\d+)/),(!wn||wn[1]>=74)&&(wn=qf.match(/Chrome\/(\d+)/),wn&&(ks=wn[1])));var fU=ks&&+ks,Jw=fU,dU=sn,Qw=!!Object.getOwnPropertySymbols&&!dU(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Jw&&Jw<41}),pU=Qw,Zw=pU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",hU=Kt,vU=Es,mU=Zw,eS=mU?function(e){return typeof e=="symbol"}:function(e){var t=vU("Symbol");return hU(t)&&Object(e)instanceof t},gU=function(e){try{return String(e)}catch{return"Object"}},yU=Kt,bU=gU,xU=function(e){if(yU(e))return e;throw TypeError(bU(e)+" is not a function")},wU=xU,tS=function(e,t){var n=e[t];return n==null?void 0:wU(n)},Kf=Kt,Gf=fo,SU=function(e,t){var n,r;if(t==="string"&&Kf(n=e.toString)&&!Gf(r=n.call(e))||Kf(n=e.valueOf)&&!Gf(r=n.call(e))||t!=="string"&&Kf(n=e.toString)&&!Gf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},nS={exports:{}},rS=Bt,Yf=function(e,t){try{Object.defineProperty(rS,e,{value:t,configurable:!0,writable:!0})}catch{rS[e]=t}return t},EU=Bt,kU=Yf,iS="__core-js_shared__",CU=EU[iS]||kU(iS,{}),Xf=CU,oS=Xf;(nS.exports=function(e,t){return oS[e]||(oS[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Jf=nS.exports,TU=Ss,aS=function(e){return Object(TU(e))},$U=aS,OU={}.hasOwnProperty,mr=Object.hasOwn||function(t,n){return OU.call($U(t),n)},IU=0,PU=Math.random(),sS=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++IU+PU).toString(36)},AU=Bt,RU=Jf,lS=mr,_U=sS,uS=Qw,DU=Zw,po=RU("wks"),ho=AU.Symbol,MU=DU?ho:ho&&ho.withoutSetter||_U,vo=function(e){return(!lS(po,e)||!(uS||typeof po[e]=="string"))&&(uS&&lS(ho,e)?po[e]=ho[e]:po[e]=MU("Symbol."+e)),po[e]},cS=fo,fS=eS,jU=tS,NU=SU,LU=vo,FU=LU("toPrimitive"),BU=function(e,t){if(!cS(e)||fS(e))return e;var n=jU(e,FU),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!cS(r)||fS(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),NU(e,t)},zU=BU,WU=eS,dS=function(e){var t=zU(e,"string");return WU(t)?t:String(t)},UU=Bt,pS=fo,Qf=UU.document,HU=pS(Qf)&&pS(Qf.createElement),hS=function(e){return HU?Qf.createElement(e):{}},VU=vr,qU=sn,KU=hS,vS=!VU&&!qU(function(){return Object.defineProperty(KU("div"),"a",{get:function(){return 7}}).a!=7}),GU=vr,YU=Ww,XU=Vw,JU=Hf,QU=dS,ZU=mr,e6=vS,mS=Object.getOwnPropertyDescriptor;Wf.f=GU?mS:function(t,n){if(t=JU(t),n=QU(n),e6)try{return mS(t,n)}catch{}if(ZU(t,n))return XU(!YU.f.call(t,n),t[n])};var mo={},t6=fo,Yn=function(e){if(t6(e))return e;throw TypeError(String(e)+" is not an object")},n6=vr,r6=vS,gS=Yn,i6=dS,yS=Object.defineProperty;mo.f=n6?yS:function(t,n,r){if(gS(t),n=i6(n),gS(r),r6)try{return yS(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var o6=vr,a6=mo,s6=Vw,Cs=o6?function(e,t,n){return a6.f(e,t,s6(1,n))}:function(e,t,n){return e[t]=n,e},bS={exports:{}},l6=Kt,Zf=Xf,u6=Function.toString;l6(Zf.inspectSource)||(Zf.inspectSource=function(e){return u6.call(e)});var xS=Zf.inspectSource,c6=Bt,f6=Kt,d6=xS,wS=c6.WeakMap,p6=f6(wS)&&/native code/.test(d6(wS)),h6=Jf,v6=sS,SS=h6("keys"),ES=function(e){return SS[e]||(SS[e]=v6(e))},ed={},m6=p6,g6=Bt,y6=fo,b6=Cs,td=mr,nd=Xf,x6=ES,w6=ed,kS="Object already initialized",S6=g6.WeakMap,Ts,go,$s,E6=function(e){return $s(e)?go(e):Ts(e,{})},k6=function(e){return function(t){var n;if(!y6(t)||(n=go(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(m6||nd.state){var gr=nd.state||(nd.state=new S6),C6=gr.get,CS=gr.has,T6=gr.set;Ts=function(e,t){if(CS.call(gr,e))throw new TypeError(kS);return t.facade=e,T6.call(gr,e,t),t},go=function(e){return C6.call(gr,e)||{}},$s=function(e){return CS.call(gr,e)}}else{var ti=x6("state");w6[ti]=!0,Ts=function(e,t){if(td(e,ti))throw new TypeError(kS);return t.facade=e,b6(e,ti,t),t},go=function(e){return td(e,ti)?e[ti]:{}},$s=function(e){return td(e,ti)}}var TS={set:Ts,get:go,has:$s,enforce:E6,getterFor:k6},rd=vr,$6=mr,$S=Function.prototype,O6=rd&&Object.getOwnPropertyDescriptor,id=$6($S,"name"),I6=id&&(function(){}).name==="something",P6=id&&(!rd||rd&&O6($S,"name").configurable),od={EXISTS:id,PROPER:I6,CONFIGURABLE:P6},A6=Bt,OS=Kt,R6=mr,IS=Cs,_6=Yf,D6=xS,PS=TS,M6=od.CONFIGURABLE,j6=PS.get,N6=PS.enforce,L6=String(String).split("String");(bS.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(OS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!R6(n,"name")||M6&&n.name!==s)&&IS(n,"name",s),l=N6(n),l.source||(l.source=L6.join(typeof s=="string"?s:""))),e===A6){o?e[t]=n:_6(t,n);return}else i?!a&&e[t]&&(o=!0):delete e[t];o?e[t]=n:IS(e,t,n)})(Function.prototype,"toString",function(){return OS(this)&&j6(this).source||D6(this)});var yo=bS.exports,AS={},F6=Math.ceil,B6=Math.floor,Os=function(e){var t=+e;return t!==t||t===0?0:(t>0?B6:F6)(t)},z6=Os,W6=Math.max,U6=Math.min,H6=function(e,t){var n=z6(e);return n<0?W6(n+t,0):U6(n,t)},V6=Os,q6=Math.min,RS=function(e){return e>0?q6(V6(e),9007199254740991):0},K6=RS,G6=function(e){return K6(e.length)},Y6=Hf,X6=H6,J6=G6,_S=function(e){return function(t,n,r){var i=Y6(t),o=J6(i),a=X6(r,o),s;if(e&&n!=n){for(;o>a;)if(s=i[a++],s!=s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Q6={includes:_S(!0),indexOf:_S(!1)},ad=mr,Z6=Hf,eH=Q6.indexOf,tH=ed,DS=function(e,t){var n=Z6(e),r=0,i=[],o;for(o in n)!ad(tH,o)&&ad(n,o)&&i.push(o);for(;t.length>r;)ad(n,o=t[r++])&&(~eH(i,o)||i.push(o));return i},sd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],nH=DS,rH=sd,iH=rH.concat("length","prototype");AS.f=Object.getOwnPropertyNames||function(t){return nH(t,iH)};var MS={};MS.f=Object.getOwnPropertySymbols;var oH=Es,aH=AS,sH=MS,lH=Yn,uH=oH("Reflect","ownKeys")||function(t){var n=aH.f(lH(t)),r=sH.f;return r?n.concat(r(t)):n},cH=mr,fH=uH,dH=Wf,pH=mo,hH=function(e,t){for(var n=fH(t),r=pH.f,i=dH.f,o=0;o<n.length;o++){var a=n[o];cH(e,a)||r(e,a,i(t,a))}},vH=sn,mH=Kt,gH=/#|\.prototype\./,bo=function(e,t){var n=bH[yH(e)];return n==wH?!0:n==xH?!1:mH(t)?vH(t):!!t},yH=bo.normalize=function(e){return String(e).replace(gH,".").toLowerCase()},bH=bo.data={},xH=bo.NATIVE="N",wH=bo.POLYFILL="P",SH=bo,ld=Bt,EH=Wf.f,kH=Cs,CH=yo,TH=Yf,$H=hH,OH=SH,IH=function(e,t){var n=e.target,r=e.global,i=e.stat,o,a,s,l,u,c;if(r?a=ld:i?a=ld[n]||TH(n,{}):a=(ld[n]||{}).prototype,a)for(s in t){if(u=t[s],e.noTargetGet?(c=EH(a,s),l=c&&c.value):l=a[s],o=OH(r?s:n+(i?".":"#")+s,e.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;$H(u,l)}(e.sham||l&&l.sham)&&kH(u,"sham",!0),CH(a,s,u,e)}},PH=vo,AH=PH("toStringTag"),jS={};jS[AH]="z";var ud=String(jS)==="[object z]",RH=ud,_H=Kt,Is=Uf,DH=vo,MH=DH("toStringTag"),jH=Is(function(){return arguments}())=="Arguments",NH=function(e,t){try{return e[t]}catch{}},NS=RH?Is:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=NH(t=Object(e),MH))=="string"?n:jH?Is(t):(r=Is(t))=="Object"&&_H(t.callee)?"Arguments":r},LH=NS,Ps=function(e){if(LH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},FH=Yn,LS=function(){var e=FH(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},cd={},FS=sn,BH=Bt,BS=BH.RegExp;cd.UNSUPPORTED_Y=FS(function(){var e=BS("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),cd.BROKEN_CARET=FS(function(){var e=BS("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var zH=DS,WH=sd,UH=Object.keys||function(t){return zH(t,WH)},HH=vr,VH=mo,qH=Yn,KH=UH,GH=HH?Object.defineProperties:function(t,n){qH(t);for(var r=KH(n),i=r.length,o=0,a;i>o;)VH.f(t,a=r[o++],n[a]);return t},YH=Es,XH=YH("document","documentElement"),JH=Yn,QH=GH,zS=sd,ZH=ed,e9=XH,t9=hS,n9=ES,WS=">",US="<",fd="prototype",dd="script",HS=n9("IE_PROTO"),pd=function(){},VS=function(e){return US+dd+WS+e+US+"/"+dd+WS},qS=function(e){e.write(VS("")),e.close();var t=e.parentWindow.Object;return e=null,t},r9=function(){var e=t9("iframe"),t="java"+dd+":",n;return e.style.display="none",e9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(VS("document.F=Object")),n.close(),n.F},As,Rs=function(){try{As=new ActiveXObject("htmlfile")}catch{}Rs=typeof document<"u"?document.domain&&As?qS(As):r9():qS(As);for(var e=zS.length;e--;)delete Rs[fd][zS[e]];return Rs()};ZH[HS]=!0;var i9=Object.create||function(t,n){var r;return t!==null?(pd[fd]=JH(t),r=new pd,pd[fd]=null,r[HS]=t):r=Rs(),n===void 0?r:QH(r,n)},o9=sn,a9=Bt,s9=a9.RegExp,l9=o9(function(){var e=s9(".","s");return!(e.dotAll&&e.exec(`
293
+ `)&&e.flags==="s")}),u9=sn,c9=Bt,f9=c9.RegExp,d9=u9(function(){var e=f9("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),p9=Ps,h9=LS,KS=cd,v9=Jf,m9=i9,g9=TS.get,y9=l9,b9=d9,_s=RegExp.prototype.exec,x9=v9("native-string-replace",String.prototype.replace),hd=_s,vd=function(){var e=/a/,t=/b*/g;return _s.call(e,"a"),_s.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),GS=KS.UNSUPPORTED_Y||KS.BROKEN_CARET,md=/()??/.exec("")[1]!==void 0,w9=vd||md||GS||y9||b9;w9&&(hd=function(t){var n=this,r=g9(n),i=p9(t),o=r.raw,a,s,l,u,c,f,p;if(o)return o.lastIndex=n.lastIndex,a=hd.call(o,i),n.lastIndex=o.lastIndex,a;var d=r.groups,v=GS&&n.sticky,h=h9.call(n),g=n.source,m=0,b=i;if(v&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
294
+ `)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),md&&(s=new RegExp("^"+g+"$(?!\\s)",h)),vd&&(l=n.lastIndex),u=_s.call(v?s:n,b),v?u?(u.input=u.input.slice(m),u[0]=u[0].slice(m),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:vd&&u&&(n.lastIndex=n.global?u.index+u[0].length:l),md&&u&&u.length>1&&x9.call(u[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(u[c]=void 0)}),u&&d)for(u.groups=f=m9(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=u[p[1]];return u});var gd=hd,S9=IH,YS=gd;S9({target:"RegExp",proto:!0,forced:/./.exec!==YS},{exec:YS});var XS=yo,E9=gd,JS=sn,QS=vo,k9=Cs,C9=QS("species"),yd=RegExp.prototype,T9=function(e,t,n,r){var i=QS(e),o=!JS(function(){var u={};return u[i]=function(){return 7},""[e](u)!=7}),a=o&&!JS(function(){var u=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[C9]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return u=!0,null},c[i](""),!u});if(!o||!a||n){var s=/./[i],l=t(i,""[e],function(u,c,f,p,d){var v=c.exec;return v===E9||v===yd.exec?o&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:u.call(f,c,p)}:{done:!1}});XS(String.prototype,e,l[0]),XS(yd,i,l[1])}r&&k9(yd[i],"sham",!0)},$9=Os,O9=Ps,I9=Ss,ZS=function(e){return function(t,n){var r=O9(I9(t)),i=$9(n),o=r.length,a,s;return i<0||i>=o?e?"":void 0:(a=r.charCodeAt(i),a<55296||a>56319||i+1===o||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):a:e?r.slice(i,i+2):(a-55296<<10)+(s-56320)+65536)}},P9={codeAt:ZS(!1),charAt:ZS(!0)},A9=P9.charAt,R9=function(e,t,n){return t+(n?A9(e,t).length:1)},_9=aS,D9=Math.floor,M9="".replace,j9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,N9=/\$([$&'`]|\d{1,2})/g,L9=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=N9;return i!==void 0&&(i=_9(i),l=j9),M9.call(o,l,function(u,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return u;if(p>s){var d=D9(p/10);return d===0?u:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):u}f=r[p-1]}return f===void 0?"":f})},F9=Yn,B9=Kt,z9=Uf,W9=gd,U9=function(e,t){var n=e.exec;if(B9(n)){var r=n.call(e,t);return r!==null&&F9(r),r}if(z9(e)==="RegExp")return W9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},H9=T9,V9=sn,q9=Yn,K9=Kt,G9=Os,Y9=RS,ni=Ps,X9=Ss,J9=R9,Q9=tS,Z9=L9,eV=U9,tV=vo,bd=tV("replace"),nV=Math.max,rV=Math.min,iV=function(e){return e===void 0?e:String(e)},oV=function(){return"a".replace(/./,"$0")==="$0"}(),e1=function(){return/./[bd]?/./[bd]("a","$0")==="":!1}(),aV=!V9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});H9("replace",function(e,t,n){var r=e1?"$":"$0";return[function(o,a){var s=X9(this),l=o==null?void 0:Q9(o,bd);return l?l.call(o,s,a):t.call(ni(s),o,a)},function(i,o){var a=q9(this),s=ni(i);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var l=n(t,a,s,o);if(l.done)return l.value}var u=K9(o);u||(o=ni(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=eV(a,s);if(d===null||(p.push(d),!c))break;var v=ni(d[0]);v===""&&(a.lastIndex=J9(s,Y9(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=ni(d[0]),w=nV(rV(G9(d.index),s.length),0),C=[],S=1;S<d.length;S++)C.push(iV(d[S]));var E=d.groups;if(u){var I=[b].concat(C,w,s);E!==void 0&&I.push(E);var L=ni(o.apply(void 0,I))}else L=Z9(b,s,w,C,E,o);w>=g&&(h+=s.slice(g,w)+L,g=w+b.length)}return h+s.slice(g)}]},!aV||!oV||e1);var xo=lt,sV=bc,lV=cr,Ds=function(e){return sV.slice(0,e.length)===e},uV=function(){return Ds("Bun/")?"BUN":Ds("Cloudflare-Workers")?"CLOUDFLARE":Ds("Deno/")?"DENO":Ds("Node.js/")?"NODE":xo.Bun&&typeof Bun.version=="string"?"BUN":xo.Deno&&typeof Deno.version=="object"?"DENO":lV(xo.process)==="process"?"NODE":xo.window&&xo.document?"BROWSER":"REST"}(),cV=TypeError,fV=function(e,t){if(e<t)throw new cV("Not enough arguments");return e},t1=lt,dV=cc,pV=wt,hV=uV,vV=bc,mV=os,gV=fV,yV=t1.Function,bV=/MSIE .\./.test(vV)||hV==="BUN"&&function(){var e=t1.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),n1=function(e,t){var n=t?2:1;return bV?function(r,i){var o=gV(arguments.length,1)>n,a=pV(r)?r:yV(r),s=o?mV(arguments,n):[],l=o?function(){dV(a,this,s)}:a;return t?e(l,i):e(l)}:e},xV=Le,r1=lt,wV=n1,i1=wV(r1.setInterval,!0);xV({global:!0,bind:!0,forced:r1.setInterval!==i1},{setInterval:i1});var SV=Le,o1=lt,EV=n1,a1=EV(o1.setTimeout,!0);SV({global:!0,bind:!0,forced:o1.setTimeout!==a1},{setTimeout:a1});var kV=vt,CV=kV.setInterval,TV=CV;const $V=Ee(TV);var OV=ut,s1=function(e,t){var n=[][e];return!!n&&OV(function(){n.call(null,t||function(){return 1},1)})},IV=Le,PV=dc,AV=Lb.indexOf,RV=s1,xd=PV([].indexOf),l1=!!xd&&1/xd([1],1,-0)<0,_V=l1||!RV("indexOf");IV({target:"Array",proto:!0,forced:_V},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return l1?xd(this,t,n)||0:AV(this,t,n)}});var DV=hr,MV=DV("Array","indexOf"),jV=Pn,NV=MV,wd=Array.prototype,LV=function(e){var t=e.indexOf;return e===wd||jV(wd,e)&&t===wd.indexOf?NV:t},FV=LV,BV=FV,zV=BV;const WV=Ee(zV);var u1=qa,UV=TypeError,HV=function(e,t){if(!delete e[t])throw new UV("Cannot delete property "+u1(t)+" of "+u1(e))},VV=Le,qV=An,KV=Wc,GV=Xa,YV=fr,XV=ww,JV=jc,QV=zc,ZV=Zi,Sd=HV,e7=Qa,t7=e7("splice"),n7=Math.max,r7=Math.min;VV({target:"Array",proto:!0,forced:!t7},{splice:function(t,n){var r=qV(this),i=YV(r),o=KV(t,i),a=arguments.length,s,l,u,c,f,p;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=r7(n7(GV(n),0),i-o)),JV(i+s-l),u=QV(r,l),c=0;c<l;c++)f=o+c,f in r&&ZV(u,c,r[f]);if(u.length=l,s<l){for(c=o;c<i-l;c++)f=c+l,p=c+s,f in r?r[p]=r[f]:Sd(r,p);for(c=i;c>i-l+s;c--)Sd(r,c-1)}else if(s>l)for(c=i-l;c>o;c--)f=c+l-1,p=c+s-1,f in r?r[p]=r[f]:Sd(r,p);for(c=0;c<s;c++)r[c+o]=arguments[c+2];return XV(r,i-l+s),u}});var i7=hr,o7=i7("Array","splice"),a7=Pn,s7=o7,Ed=Array.prototype,l7=function(e){var t=e.splice;return e===Ed||a7(Ed,e)&&t===Ed.splice?s7:t},u7=l7,c7=u7,f7=c7;const d7=Ee(f7);var p7=hr,h7=p7("Array","concat"),v7=Pn,m7=h7,kd=Array.prototype,g7=function(e){var t=e.concat;return e===kd||v7(kd,e)&&t===kd.concat?m7:t},y7=g7,b7=y7,x7=b7;const Ke=Ee(x7);var w7=Le,S7=tt,c1=Date,E7=S7(c1.prototype.getTime);w7({target:"Date",stat:!0},{now:function(){return E7(new c1)}});var k7=vt,C7=k7.Date.now,T7=C7,$7=T7,O7=$7;const Xn=Ee(O7);var I7=ef.forEach,P7=s1,A7=P7("forEach"),R7=A7?[].forEach:function(t){return I7(this,t,arguments.length>1?arguments[1]:void 0)},_7=Le,f1=R7;_7({target:"Array",proto:!0,forced:[].forEach!==f1},{forEach:f1});var D7=hr,M7=D7("Array","forEach"),j7=M7,N7=j7,L7=eo,F7=Ft,B7=Pn,z7=N7,Cd=Array.prototype,W7={DOMTokenList:!0,NodeList:!0},U7=function(e){var t=e.forEach;return e===Cd||B7(Cd,e)&&t===Cd.forEach||F7(W7,L7(e))?z7:t},H7=U7;const Ms=Ee(H7);var V7=Le,q7=An,d1=Vc,K7=ut,G7=K7(function(){d1(1)});V7({target:"Object",stat:!0,forced:G7},{keys:function(t){return d1(q7(t))}});var Y7=vt,X7=Y7.Object.keys,J7=X7,Q7=J7,Z7=Q7;const e8=Ee(Z7);var t8=vt,n8=t8.Object.getOwnPropertySymbols,r8=n8,i8=r8,o8=i8;const p1=Ee(o8);var a8=Le,s8=ef.filter,l8=Qa,u8=l8("filter");a8({target:"Array",proto:!0,forced:!u8},{filter:function(t){return s8(this,t,arguments.length>1?arguments[1]:void 0)}});var c8=hr,f8=c8("Array","filter"),d8=Pn,p8=f8,Td=Array.prototype,h8=function(e){var t=e.filter;return e===Td||d8(Td,e)&&t===Td.filter?p8:t},v8=h8,m8=v8,g8=m8;const y8=Ee(g8);var h1={exports:{}},b8=Le,x8=ut,w8=gn,v1=Gi.f,m1=At,S8=!m1||x8(function(){v1(1)});b8({target:"Object",stat:!0,forced:S8,sham:!m1},{getOwnPropertyDescriptor:function(t,n){return v1(w8(t),n)}});var E8=vt,g1=E8.Object,k8=h1.exports=function(t,n){return g1.getOwnPropertyDescriptor(t,n)};g1.getOwnPropertyDescriptor.sham&&(k8.sham=!0);var C8=h1.exports,T8=C8,$8=T8,O8=$8;const y1=Ee(O8);var I8=yn,P8=tt,A8=is,R8=as,_8=qn,D8=P8([].concat),M8=I8("Reflect","ownKeys")||function(t){var n=A8.f(_8(t)),r=R8.f;return r?D8(n,r(t)):n},j8=Le,N8=At,L8=M8,F8=gn,B8=Gi,z8=Zi;j8({target:"Object",stat:!0,sham:!N8},{getOwnPropertyDescriptors:function(t){for(var n=F8(t),r=B8.f,i=L8(n),o={},a=0,s,l;i.length>a;)l=r(n,s=i[a++]),l!==void 0&&z8(o,s,l);return o}});var W8=vt,U8=W8.Object.getOwnPropertyDescriptors,H8=U8,V8=H8,q8=V8;const b1=Ee(q8);var x1={exports:{}},K8=Le,G8=At,w1=Za.f;K8({target:"Object",stat:!0,forced:Object.defineProperties!==w1,sham:!G8},{defineProperties:w1});var Y8=vt,S1=Y8.Object,X8=x1.exports=function(t,n){return S1.defineProperties(t,n)};S1.defineProperties.sham&&(X8.sham=!0);var J8=x1.exports,Q8=J8,Z8=Q8,eq=Z8;const tq=Ee(eq);var nq=zw;const rq=Ee(nq);var iq=!1;function oq(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function aq(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var sq=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!iq:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(aq(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=oq(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),St="-ms-",js="-moz-",Ie="-webkit-",E1="comm",$d="rule",Od="decl",lq="@import",k1="@keyframes",uq="@layer",cq=Math.abs,Ns=String.fromCharCode,fq=Object.assign;function dq(e,t){return mt(e,0)^45?(((t<<2^mt(e,0))<<2^mt(e,1))<<2^mt(e,2))<<2^mt(e,3):0}function C1(e){return e.trim()}function pq(e,t){return(e=t.exec(e))?e[0]:e}function Pe(e,t,n){return e.replace(t,n)}function Id(e,t){return e.indexOf(t)}function mt(e,t){return e.charCodeAt(t)|0}function wo(e,t,n){return e.slice(t,n)}function Sn(e){return e.length}function Pd(e){return e.length}function Ls(e,t){return t.push(e),e}function hq(e,t){return e.map(t).join("")}var Fs=1,ri=1,T1=0,_t=0,nt=0,ii="";function Bs(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Fs,column:ri,length:a,return:""}}function So(e,t){return fq(Bs("",null,null,"",null,null,0),e,{length:-e.length},t)}function vq(){return nt}function mq(){return nt=_t>0?mt(ii,--_t):0,ri--,nt===10&&(ri=1,Fs--),nt}function zt(){return nt=_t<T1?mt(ii,_t++):0,ri++,nt===10&&(ri=1,Fs++),nt}function En(){return mt(ii,_t)}function zs(){return _t}function Eo(e,t){return wo(ii,e,t)}function ko(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $1(e){return Fs=ri=1,T1=Sn(ii=e),_t=0,[]}function O1(e){return ii="",e}function Ws(e){return C1(Eo(_t-1,Ad(e===91?e+2:e===40?e+1:e)))}function gq(e){for(;(nt=En())&&nt<33;)zt();return ko(e)>2||ko(nt)>3?"":" "}function yq(e,t){for(;--t&&zt()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return Eo(e,zs()+(t<6&&En()==32&&zt()==32))}function Ad(e){for(;zt();)switch(nt){case e:return _t;case 34:case 39:e!==34&&e!==39&&Ad(nt);break;case 40:e===41&&Ad(e);break;case 92:zt();break}return _t}function bq(e,t){for(;zt()&&e+nt!==57;)if(e+nt===84&&En()===47)break;return"/*"+Eo(t,_t-1)+"*"+Ns(e===47?e:zt())}function xq(e){for(;!ko(En());)zt();return Eo(e,_t)}function wq(e){return O1(Us("",null,null,null,[""],e=$1(e),0,[0],e))}function Us(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,p=0,d=0,v=0,h=1,g=1,m=1,b=0,w="",C=i,S=o,E=r,I=w;g;)switch(v=b,b=zt()){case 40:if(v!=108&&mt(I,f-1)==58){Id(I+=Pe(Ws(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:I+=Ws(b);break;case 9:case 10:case 13:case 32:I+=gq(v);break;case 92:I+=yq(zs()-1,7);continue;case 47:switch(En()){case 42:case 47:Ls(Sq(bq(zt(),zs()),t,n),l);break;default:I+="/"}break;case 123*h:s[u++]=Sn(I)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:m==-1&&(I=Pe(I,/\f/g,"")),d>0&&Sn(I)-f&&Ls(d>32?P1(I+";",r,n,f-1):P1(Pe(I," ","")+";",r,n,f-2),l);break;case 59:I+=";";default:if(Ls(E=I1(I,t,n,u,c,i,s,w,C=[],S=[],f),o),b===123)if(c===0)Us(I,t,E,E,C,o,f,s,S);else switch(p===99&&mt(I,3)===110?100:p){case 100:case 108:case 109:case 115:Us(e,E,E,r&&Ls(I1(e,E,E,0,0,i,s,w,i,C=[],f),S),i,S,f,s,r?C:S);break;default:Us(I,E,E,E,[""],S,0,s,S)}}u=c=d=0,h=m=1,w=I="",f=a;break;case 58:f=1+Sn(I),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&mq()==125)continue}switch(I+=Ns(b),b*h){case 38:m=c>0?1:(I+="\f",-1);break;case 44:s[u++]=(Sn(I)-1)*m,m=1;break;case 64:En()===45&&(I+=Ws(zt())),p=En(),c=f=Sn(w=I+=xq(zs())),b++;break;case 45:v===45&&Sn(I)==2&&(h=0)}}return o}function I1(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,p=i===0?o:[""],d=Pd(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=wo(e,f+1,f=cq(h=a[v])),w=e;m<d;++m)(w=C1(h>0?p[m]+" "+b:Pe(b,/&\f/g,p[m])))&&(l[g++]=w);return Bs(e,t,n,i===0?$d:s,l,u,c)}function Sq(e,t,n){return Bs(e,t,n,E1,Ns(vq()),wo(e,2,-2),0)}function P1(e,t,n,r){return Bs(e,t,n,Od,wo(e,0,r),wo(e,r+1,-1),r)}function oi(e,t){for(var n="",r=Pd(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Eq(e,t,n,r){switch(e.type){case uq:if(e.children.length)break;case lq:case Od:return e.return=e.return||e.value;case E1:return"";case k1:return e.return=e.value+"{"+oi(e.children,r)+"}";case $d:e.value=e.props.join(",")}return Sn(n=oi(e.children,r))?e.return=e.value+"{"+n+"}":""}function kq(e){var t=Pd(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function Cq(e){return function(t){t.root||(t=t.return)&&e(t)}}function Tq(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $q=function(t,n,r){for(var i=0,o=0;i=o,o=En(),i===38&&o===12&&(n[r]=1),!ko(o);)zt();return Eo(t,_t)},Oq=function(t,n){var r=-1,i=44;do switch(ko(i)){case 0:i===38&&En()===12&&(n[r]=1),t[r]+=$q(_t-1,n,r);break;case 2:t[r]+=Ws(i);break;case 4:if(i===44){t[++r]=En()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ns(i)}while(i=zt());return t},Iq=function(t,n){return O1(Oq($1(t),n))},A1=new WeakMap,Pq=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!A1.get(r))&&!i){A1.set(t,!0);for(var o=[],a=Iq(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},Aq=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function R1(e,t){switch(dq(e,t)){case 5103:return Ie+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ie+e+js+e+St+e+e;case 6828:case 4268:return Ie+e+St+e+e;case 6165:return Ie+e+St+"flex-"+e+e;case 5187:return Ie+e+Pe(e,/(\w+).+(:[^]+)/,Ie+"box-$1$2"+St+"flex-$1$2")+e;case 5443:return Ie+e+St+"flex-item-"+Pe(e,/flex-|-self/,"")+e;case 4675:return Ie+e+St+"flex-line-pack"+Pe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ie+e+St+Pe(e,"shrink","negative")+e;case 5292:return Ie+e+St+Pe(e,"basis","preferred-size")+e;case 6060:return Ie+"box-"+Pe(e,"-grow","")+Ie+e+St+Pe(e,"grow","positive")+e;case 4554:return Ie+Pe(e,/([^-])(transform)/g,"$1"+Ie+"$2")+e;case 6187:return Pe(Pe(Pe(e,/(zoom-|grab)/,Ie+"$1"),/(image-set)/,Ie+"$1"),e,"")+e;case 5495:case 3959:return Pe(e,/(image-set\([^]*)/,Ie+"$1$`$1");case 4968:return Pe(Pe(e,/(.+:)(flex-)?(.*)/,Ie+"box-pack:$3"+St+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ie+e+e;case 4095:case 3583:case 4068:case 2532:return Pe(e,/(.+)-inline(.+)/,Ie+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Sn(e)-1-t>6)switch(mt(e,t+1)){case 109:if(mt(e,t+4)!==45)break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+js+(mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Id(e,"stretch")?R1(Pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(mt(e,t+1)!==115)break;case 6444:switch(mt(e,Sn(e)-3-(~Id(e,"!important")&&10))){case 107:return Pe(e,":",":"+Ie)+e;case 101:return Pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(mt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+St+"$2box$3")+e}break;case 5936:switch(mt(e,t+11)){case 114:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+St+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+St+e+e}return e}var Rq=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Od:t.return=R1(t.value,t.length);break;case k1:return oi([So(t,{value:Pe(t.value,"@","@"+Ie)})],i);case $d:if(t.length)return hq(t.props,function(o){switch(pq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oi([So(t,{props:[Pe(o,/:(read-\w+)/,":"+js+"$1")]})],i);case"::placeholder":return oi([So(t,{props:[Pe(o,/:(plac\w+)/,":"+Ie+"input-$1")]}),So(t,{props:[Pe(o,/:(plac\w+)/,":"+js+"$1")]}),So(t,{props:[Pe(o,/:(plac\w+)/,St+"input-$1")]})],i)}return""})}},_q=[Rq],Dq=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||_q,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),m=1;m<g.length;m++)o[g[m]]=!0;s.push(h)});var l,u=[Pq,Aq];{var c,f=[Eq,Cq(function(h){c.insert(h)})],p=kq(u.concat(i,f)),d=function(g){return oi(wq(g),p)};l=function(g,m,b,w){c=b,d(g?g+"{"+m.styles+"}":m.styles),w&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new sq({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return v.sheet.hydrate(s),v};function Mq(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jq={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Nq=!1,Lq=/[A-Z]|^ms/g,Fq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_1=function(t){return t.charCodeAt(1)===45},D1=function(t){return t!=null&&typeof t!="boolean"},Rd=Tq(function(e){return _1(e)?e:e.replace(Lq,"-$&").toLowerCase()}),M1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Fq,function(r,i,o){return Jn={name:i,styles:o,next:Jn},i})}return jq[t]!==1&&!_1(t)&&typeof n=="number"&&n!==0?n+"px":n},Bq="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Hs(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Jn={name:i.name,styles:i.styles,next:Jn},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Jn={name:a.name,styles:a.styles,next:Jn},a=a.next;var s=o.styles+";";return s}return zq(e,t,n)}}var l=n;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function zq(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Hs(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":D1(s)&&(r+=Rd(o)+":"+M1(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&Nq)throw new Error(Bq);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)D1(a[l])&&(r+=Rd(o)+":"+M1(o,a[l])+";");else{var u=Hs(e,t,a);switch(o){case"animation":case"animationName":{r+=Rd(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var j1=/label:\s*([^\s;{]+)\s*(;|$)/g,Jn;function _d(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Jn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Hs(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Hs(n,t,e[s]),r){var l=o;i+=l[s]}j1.lastIndex=0;for(var u="",c;(c=j1.exec(i))!==null;)u+="-"+c[1];var f=Mq(i)+u;return{name:f,styles:i,next:Jn}}function N1(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Wq=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Uq=function(t,n,r){Wq(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function L1(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function F1(e,t,n){var r=[],i=N1(e,r,n);return r.length<2?n:i+t(r)}var Hq=function(t){var n=Dq(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=_d(u,n.registered,void 0);return Uq(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=_d(u,n.registered),p="animation-"+f.name;return L1(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=_d(u,n.registered);L1(n,f)},a=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return F1(n.registered,r,Vq(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:N1.bind(null,n.registered),merge:F1.bind(null,n.registered,r)}},Vq=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},qq=yo,Dd=Date.prototype,B1="Invalid Date",z1="toString",Kq=Dd[z1],Gq=Dd.getTime;String(new Date(NaN))!=B1&&qq(Dd,z1,function(){var t=Gq.call(this);return t===t?Kq.call(this):B1});var Yq=ud,Xq=NS,Jq=Yq?{}.toString:function(){return"[object "+Xq(this)+"]"},Qq=ud,Zq=yo,eK=Jq;Qq||Zq(Object.prototype,"toString",eK,{unsafe:!0});var tK=od.PROPER,nK=yo,rK=Yn,W1=Ps,iK=sn,oK=LS,Md="toString",U1=RegExp.prototype,H1=U1[Md],aK=iK(function(){return H1.call({source:"a",flags:"b"})!="/a/b"}),sK=tK&&H1.name!=Md;(aK||sK)&&nK(RegExp.prototype,Md,function(){var t=rK(this),n=W1(t.source),r=t.flags,i=W1(r===void 0&&t instanceof RegExp&&!("flags"in U1)?oK.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var V1=typeof window<"u"?window:self,lK=V1.crypto||V1.msCrypto,uK=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(lK);const cK=Ee(uK);function fK(){return cK().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var dK=Cb;const q1=Ee(dK);function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function K1(e,t){for(var n,r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];return Ke(n=[Ke(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Ce(Ne("green","white")),o)}function pK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(o.length){var s=o,l=xn(s,1),u=l[0];typeof u=="function"&&(o=u());var c=q1(o[0])?o:[o],f=c.length===1;Ms(c).call(c,function(p,d){if(f){var v,h;(v=console).log.apply(v,Ce(K1.apply(void 0,Ke(h=[e]).call(h,Ce(p)))))}else if(d){var g;(g=console).log.apply(g,Ce(q1(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,Ce(K1.apply(void 0,Ke(b=[e]).call(b,Ce(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var hK=vr,vK=od.EXISTS,mK=mo.f,G1=Function.prototype,gK=G1.toString,yK=/^\s*function ([^ (]*)/,bK="name";hK&&!vK&&mK(G1,bK,{configurable:!0,get:function(){try{return gK.call(this).match(yK)[1]}catch{return""}}});var xK=vt,wK=xK.setTimeout,SK=wK;const EK=Ee(SK);function kK(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Xn();s-n>t?(e.apply(void 0,o),n=s):(clearTimeout(r),r=EK(function(){e.apply(void 0,o),n=Xn()},Math.max(0,t-s+n)))}}var Y1=function(t){var n=t.debounce,r=t.name,i=t.onEvent,o=t.target,a=A.useRef();a.current=i;var s=A.useMemo(function(){return kK(function(u){var c=a.current;c&&c(u)},n)},[n,a]),l=A.useCallback(function(u){u.timeStampLow=Xn(),s(u)},[s]);return A.useLayoutEffect(function(){return o.addEventListener(r,l,{passive:!0}),l({target:o,type:r}),function(){return o.removeEventListener(r,l)}},[r,l,o]),!1};Y1.defaultProps={debounce:200};var CK=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},TK=Le,$K=CK;TK({target:"Math",stat:!0},{sign:$K});var OK=vt,IK=OK.Math.sign,PK=IK,AK=PK,RK=AK;const _K=Ee(RK);function DK(e,t){var n=_K(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function MK(e,t,n,r){for(var i=e,o=0;o<r;o++)i=n(i,t);return i}var X1=function(t){var n=t.name,r=t.onEnd,i=t.target,o=t.value,a=A.useRef(),s=A.useCallback(function(u,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Xn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(i){var v=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=MK(c,v,DK,(Xn()-d)/5);Math.abs(v-h)<1.5&&(h=v),i[u]=h,v===h?r&&r(!0):s(u,c,f,p+1,d)}}))},[a,r,i]),l=A.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return A.useLayoutEffect(function(){return s(n,i[n],o,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,i,o]),!1};X1.propTypes={name:Oe.string.isRequired,onEnd:Oe.func,target:Oe.any.isRequired,value:Oe.oneOfType([Oe.number,Oe.oneOf(["100%"])]).isRequired};function jd(e){var t=A.useState(e),n=xn(t,2),r=n[0],i=n[1],o=A.useRef(),a=A.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),o.current=s,s}):(o.current=s,a(s))},[o]);return o.current=r,[r,i,o]}function J1(e,t){var n=e8(e);if(p1){var r=p1(e);t&&(r=y8(r).call(r,function(i){return y1(e,i).enumerable})),n.push.apply(n,r)}return n}function Q1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ms(r=J1(Object(n),!0)).call(r,function(o){KW(e,o,n[o])})}else if(b1)tq(e,b1(n));else{var i;Ms(i=J1(Object(n))).call(i,function(o){rq(e,o,y1(n,o))})}}return e}var jK=function(){return 1/0},Z1=17,NK="bottom",ln="top",e0=1,LK=34,t0={};function FK(e,t){return e(),$V(e,t)}function n0(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,o=n.scrollTop,a=i-o-r<e0,s=o<e0,l=t===ln?s:a,u=t!==ln?s:a;return{atBottom:a,atEnd:l,atStart:u,atTop:s}}function Co(e,t){return e===(t===ln?0:"100%")}var Nd=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,o=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,c=A.useMemo(function(){return pK("<ScrollToBottom>",{force:o})},[o]);s=s===ln?ln:NK;var f=A.useRef(0),p=A.useRef(a),d=jd(s===ln?0:"100%"),v=xn(d,3),h=v[0],g=v[1],m=v[2],b=jd(null),w=xn(b,3),C=w[0],S=w[1],E=w[2],I=A.useRef(0),L=A.useRef(0),_=A.useRef(0),O=A.useState(!0),D=xn(O,2),H=D[0],F=D[1],j=A.useState(!0),M=xn(j,2),W=M[0],G=M[1],V=A.useState(!0),R=xn(V,2),y=R[0],$=R[1],N=A.useState(!1),x=xn(N,2),B=x[0],Y=x[1],K=jd(!0),X=xn(K,3),Z=X[0],ee=X[1],J=X[2],Q=A.useRef([]),q=A.useCallback(function(z){var ne=E.current;return Q.current.push(z),ne&&z({scrollTop:ne.scrollTop}),function(){var se=Q.current,fe=WV(se).call(se,z);~fe&&d7(se).call(se,fe,1)}},[Q,E]),ie=A.useCallback(function(){var z=m.current;c(function(){var ne;return Ke(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,Ce(Ne("magenta")),Ce(Ne("orange")),[{animateTo:z}])}),f.current=Xn(),Co(z,s)||ee(!1),g(null)},[m,c,f,s,g,ee]),le=A.useCallback(function(z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=ne.behavior,fe=E.current;if(typeof z!="number"&&z!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var ge;return[Ke(ge=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(ge,Ce(Ne("lime","")),Ce(Ne("purple"))),{behavior:se,nextAnimateTo:z,target:fe}]}),se==="auto"?(ie(),fe&&(fe.scrollTop=z==="100%"?fe.scrollHeight-fe.offsetHeight:z)):(se!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),g(z)),Co(z,s)&&(c(function(){var ge;return[Ke(ge=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ge,Ce(Ne("lime","")),Ce(Ne("purple"))),[{mode:s,nextAnimateTo:z}]]}),ee(!0))},[c,ie,s,g,ee,E]),de=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var se;return Ke(se=["%cscrollToBottom%c: Called"]).call(se,Ce(Ne("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le("100%",{behavior:ne||"smooth"})},[c,le]),ae=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var se;return Ke(se=["%cscrollToTop%c: Called"]).call(se,Ce(Ne("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),le(0,{behavior:ne||"smooth"})},[c,le]),ve=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var fe;return Ke(fe=["%cscrollToEnd%c: Called"]).call(fe,Ce(Ne("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===ln?ae(se):de(se)},[c,s,de,ae]),Te=A.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=z.behavior;c(function(){var fe;return Ke(fe=["%cscrollToStart%c: Called"]).call(fe,Ce(Ne("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:ne||"smooth"};s===ln?de(se):ae(se)},[c,s,de,ae]),Ae=A.useCallback(function(){var z=E.current;if(z){if(p.current==="auto"){c(function(){var ot;return Ke(ot=["%ctarget changed%c: Initial scroll"]).call(ot,Ce(Ne("blue")))}),z.scrollTop=s===ln?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var ne=I.current,se=z.offsetHeight,fe=z.scrollHeight,ge=z.scrollTop,Ye=s===ln?0:Math.max(0,fe-se-ge),Xe=Math.max(0,ne-ge),gt=u({maxValue:Ye,minValue:Xe,offsetHeight:se,scrollHeight:fe,scrollTop:ge}),it=Math.max(0,Math.min(Ye,gt)),Re;s===ln||it!==Ye?Re=ge+it:Re="100%",c(function(){var ot,Qe,Gt;return[Ke(ot=[Ke(Qe=Ke(Gt="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(Gt,typeof Re=="number"?Re+"px":Re.replace(/%/g,"%%"),"%c (%c")).call(Qe,(Re==="100%"?Ye:Re)+ne,"px%c)")]).call(ot,Ce(Ne("orange")),Ce(Ne("purple")),Ce(Ne("purple")),Ce(Ne("purple"))),{animateFrom:ne,maxValue:Ye,minValue:Xe,nextAnimateTo:Re,nextValue:it,offsetHeight:se,rawNextValue:gt,scrollHeight:fe,scrollTop:ge}]}),le(Re,{behavior:"smooth"})}},[I,c,s,u,le,E]),rt=A.useCallback(function(z){var ne,se=z.timeStampLow,fe=m.current,ge=E.current,Ye=fe!==null;if(!(se<=f.current||!ge)){var Xe=n0({mode:s,target:ge}),gt=Xe.atBottom,it=Xe.atEnd,Re=Xe.atStart,ot=Xe.atTop;F(gt),G(it),Y(Re),$(ot);var Qe=ge.offsetHeight,Gt=ge.scrollHeight,Po=L.current,Mn=_.current,xr=Qe!==Po,wr=Gt!==Mn;if(xr&&(L.current=Qe),wr&&(_.current=Gt),!xr&&!wr){var Sr=Ye&&Co(fe,s)||it;J.current!==Sr&&(c(function(){var Cn,rl,Ao,Ro;return[Ke(Cn=["%conScroll%c: %csetSticky%c(%c".concat(Sr,"%c)")]).call(Cn,Ce(Ne("red")),Ce(Ne("red")),Ce(Ne("purple"))),Ke(rl=[Ke(Ao=Ke(Ro="(animating = %c".concat(Ye,"%c && isEnd = %c")).call(Ro,Co(fe,s),"%c) || atEnd = %c")).call(Ao,it,"%c")]).call(rl,Ce(Ne("purple")),Ce(Ne("purple")),Ce(Ne("purple")),[{animating:Ye,animateTo:fe,atEnd:it,mode:s,offsetHeight:ge.offsetHeight,scrollHeight:ge.scrollHeight,sticky:J.current,nextSticky:Sr}])]}),ee(Sr))}else J.current&&(c(function(){var Cn;return[Ke(Cn=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(Cn,Ce(Ne("red")),Ce(Ne("orange")),[{offsetHeightChanged:xr,scrollHeightChanged:wr}]),{nextOffsetHeight:Qe,prevOffsetHeight:Po,nextScrollHeight:Gt,prevScrollHeight:Mn}]}),Ae());var fp=ge.scrollTop;Ms(ne=Q.current).call(ne,function(Cn){return Cn({scrollTop:fp})})}},[m,c,f,s,L,_,Q,Ae,F,G,Y,$,ee,J,E]);A.useEffect(function(){if(C){var z=!1,ne=FK(function(){var se=E.current,fe=m.current!==null;J.current?n0({mode:s,target:se}).atEnd?z=!1:z?Xn()-z>LK&&(fe||(I.current=se.scrollTop,c(function(){var ge;return Ke(ge=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ge,Ce(Ne("navy")),Ce(Ne("orange")))}),Ae()),z=!1):z=Xn():se.scrollHeight<=se.offsetHeight&&!J.current&&(c(function(){var ge;return[Ke(ge=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ge,Ce(Ne("navy")),Ce(Ne("purple"))),[{offsetHeight:se.offsetHeight,scrollHeight:se.scrollHeight,sticky:J.current}]]}),ee(!0))},Math.max(Z1,n)||Z1);return function(){return clearInterval(ne)}}},[m,n,c,s,Ae,ee,J,C,E]);var Et=A.useMemo(function(){var z=t0[l]||(t0[l]=Hq({key:"react-scroll-to-bottom--css-"+fK(),nonce:l}));return function(ne){return z.css(ne)+""}},[l]),kt=A.useMemo(function(){return{observeScrollPosition:q,setTarget:S,styleToClassName:Et}},[q,S,Et]),Ct=A.useMemo(function(){return{atBottom:H,atEnd:W,atStart:B,atTop:y,mode:s}},[H,W,B,y,s]),oe=A.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&Co(h,s),sticky:Z}},[h,s,Z]),ce=A.useMemo(function(){return Q1(Q1({},Ct),oe)},[Ct,oe]),U=A.useMemo(function(){return{scrollTo:le,scrollToBottom:de,scrollToEnd:ve,scrollToStart:Te,scrollToTop:ae}},[le,de,ve,Te,ae]);return A.useEffect(function(){if(C){var z=function(){_.current=C.scrollHeight};return C.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return C.removeEventListener("focus",z)}}},[C]),c(function(){var z;return[Ke(z=["%cRender%c: Render"]).call(z,Ce(Ne("cyan",""))),{animateTo:h,animating:h!==null,sticky:Z,target:C}]}),A.createElement(xs.Provider,{value:kt},A.createElement(jf.Provider,{value:U},A.createElement(Ff.Provider,{value:ce},A.createElement(Nf.Provider,{value:Ct},A.createElement(Lf.Provider,{value:oe},r,C&&A.createElement(Y1,{debounce:i,name:"scroll",onEvent:rt,target:C}),C&&h!==null&&A.createElement(X1,{name:"scrollTop",onEnd:ie,target:C,value:h}))))))};Nd.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:jK},Nd.propTypes={checkInterval:Oe.number,children:Oe.any,debounce:Oe.number,debug:Oe.bool,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func};var BK={height:"100%",overflowY:"auto",width:"100%"},Ld=function(t){var n=t.children,r=t.className,i=A.useContext(xs),o=i.setTarget,a=Bf()(BK);return A.createElement("div",{className:If(a,(r||"")+""),ref:o},n)};Ld.defaultProps={children:void 0,className:void 0},Ld.propTypes={children:Oe.any,className:Oe.string};var zK={position:"relative"},Fd=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,o=t.scrollViewClassName,a=Bf()(zK);return A.createElement("div",{className:If(a,(r||"")+"")},A.createElement(Ld,{className:(o||"")+""},n),A.createElement(zf,{className:(i||"")+""}))};Fd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Fd.propTypes={children:Oe.any,className:Oe.string,followButtonClassName:Oe.string,scrollViewClassName:Oe.string};var Bd=function(t){var n=t.checkInterval,r=t.children,i=t.className,o=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,c=t.nonce,f=t.scroller,p=t.scrollViewClassName;return A.createElement(Nd,{checkInterval:n,debounce:o,debug:a,initialScrollBehavior:l,mode:u,nonce:c,scroller:f},A.createElement(Fd,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};Bd.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Bd.propTypes={checkInterval:Oe.number,children:Oe.any,className:Oe.string,debounce:Oe.number,debug:Oe.bool,followButtonClassName:Oe.string,initialScrollBehavior:Oe.oneOf(["auto","smooth"]),mode:Oe.oneOf(["bottom","top"]),nonce:Oe.string,scroller:Oe.func,scrollViewClassName:Oe.string},GM();let r0=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const zd=A.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:u,showMarquee:c=!0,...f})=>{var h;const{messageList:p}=we,d=A.useMemo(()=>JE(t),[t]),v=A.useMemo(()=>{var m;const g=d.filter(b=>b.direction==="outgoing"&&b.status!=="pending");return(m=g[g.length-1])==null?void 0:m.id},[d]);return T.jsxs(Bd,{...f,className:zr(p.container.className,e),followButtonClassName:p.scrollDownButton.className,scrollViewClassName:p.viewPort.className,children:[r&&T.jsx("span",{...p.headerMessage,children:r}),c&&T.jsx(qM,{botAvatar:o,botDescription:a,botName:s}),d.map(g=>{var m;return T.jsx(uc,{renderers:i,sendMessage:l,addMessageFeedback:u,isLastDeliveredMessage:g.id===v,...g},((m=g.metadata)==null?void 0:m.clientMessageId)||g.id)}),n&&T.jsx(uc,{id:r0(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,block:void 0,sender:((h=t.filter(g=>g.direction==="incoming").at(-1))==null?void 0:h.sender)??{name:s||"Bot",avatar:o},children:T.jsx(lc,{})})]})});zd.displayName="MessageList";const WK=({className:e,...t})=>{const{className:n}=we.loader;return T.jsx("div",{...t,className:zr(e,n)})};function i0({error:e}){let t,n;const{error:r}=we;return e.type==="configuration"?(t="Configuration error",n=T.jsx(eA,{...r.icon})):e.type==="bot"?(t="Bot error",n=T.jsx(em,{...r.icon})):e.type==="network"?(t="Network error",n=T.jsx(lA,{...r.icon})):(t="Unexpected error",n=T.jsx(em,{...r.icon})),T.jsx(UK,{error:e,title:t,icon:n})}function UK({error:e,title:t,icon:n}){const{error:r}=we;return T.jsxs("div",{...r.container,children:[T.jsx("div",{...r.header,children:`Webchat ${e.type} error`}),T.jsxs("div",{...r.content,children:[n,T.jsx("div",{...r.errorTitle,children:t}),T.jsx("div",{...r.errorMessage,children:e.message})]})]})}const o0=({connected:e,configuration:t,isTyping:n,messages:r,user:i,isLoading:o,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:u,error:c,participants:f,closeWindow:p,sendMessage:d,uploadFile:v,addMessageFeedback:h,restartConversation:g,...m})=>{const{color:b,fontFamily:w,radius:C,themeMode:S,variant:E,headerVariant:I,botAvatar:L,botDescription:_,botName:O,composerPlaceholder:D,footer:H,feedbackEnabled:F}=t,j={color:b,fontFamily:w,radius:C,themeMode:S,variant:E,headerVariant:I};F||(h=void 0);const M=A.useMemo(()=>i?Mp(r,f,i.id,O,L):[],[L,O,r,i,f]);return T.jsxs(T.Fragment,{children:[T.jsx(Ay,{...j}),T.jsx(tc,{connected:e,allowFileUpload:u,uploadFile:v,...m,children:c?T.jsx(i0,{error:c}):T.jsxs(T.Fragment,{children:[T.jsx(Uy,{closeWindow:p,configuration:t,restartConversation:g}),o?T.jsx(WK,{}):T.jsx(zd,{botAvatar:L,botDescription:_,botName:O,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:M}),T.jsx(Zg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:H,composerPlaceholder:D,allowFileUpload:u})]})})]})};function HK(){const[e,t]=A.useState(!1),n=A.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}var VK=Object.defineProperty,qK=(e,t,n)=>t in e?VK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KK=(e,t,n)=>qK(e,t+"",n),GK=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},YK={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},XK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},JK=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},QK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},a0=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(JK(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=XK(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Vs({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},Vs=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},s0=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([u,c])=>{s=[...s,u,e?c:encodeURIComponent(c)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=QK(r),a=Object.entries(i).map(([s,l])=>Vs({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},ZK=/\{[^{}]+\}/g,eG=({path:e,url:t})=>{let n=t,r=t.match(ZK);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,a0({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,s0({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${Vs({name:a,value:l})}`);continue}let u=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,u)}return n},l0=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,a0({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,s0({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,Vs({allowReserved:e,name:o,value:a})]}}return i.join("&")},tG=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},nG=async({security:e,...t})=>{for(let n of e){let r=await GK(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},u0=e=>rG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:l0(e.querySerializer),url:e.url}),rG=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=eG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},c0=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=f0(e.headers,t.headers),r},f0=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},Wd=class{constructor(){KK(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},iG=()=>({error:new Wd,request:new Wd,response:new Wd}),oG=l0({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),aG={"Content-Type":"application/json"},d0=(e={})=>({...YK,headers:aG,parseAs:"auto",querySerializer:oG,...e}),sG=(e={})=>{let t=c0(d0(),e),n=()=>({...t}),r=a=>(t=c0(t,a),n()),i=iG(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:f0(t.headers,a.headers)};s.security&&await nG({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=u0(s),u={redirect:"follow",...s},c=new Request(l,u);for(let g of i.request._fns)c=await g(c,s);let f=s.fetch,p=await f(c);for(let g of i.response._fns)p=await g(p,c,s);let d={request:c,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?tG(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let m=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),{data:m,...d}}let v=await p.text();try{v=JSON.parse(v)}catch{}let h=v;for(let g of i.error._fns)h=await g(v,p,c,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:u0,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},lG=sG,uG=d0;const Fe=lG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(uG({baseUrl:"https://webchat.botpress.cloud/"}))),cG=e=>(e.client??Fe).delete({url:"/conversations/{id}",...e}),fG=e=>(e.client??Fe).get({url:"/conversations/{id}",...e}),dG=e=>(e.client??Fe).get({url:"/conversations",...e}),pG=e=>(e.client??Fe).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hG=e=>(e.client??Fe).get({url:"/conversations/{id}/messages",...e}),vG=e=>(e.client??Fe).get({url:"/conversations/{id}/participants",...e}),mG=e=>(e.client??Fe).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),gG=e=>(e.client??Fe).delete({url:"/conversations/{id}/participants/{userId}",...e}),yG=e=>(e.client??Fe).get({url:"/conversations/{id}/participants/{userId}",...e}),bG=e=>(e.client??Fe).delete({url:"/messages/{id}",...e}),xG=e=>(e.client??Fe).get({url:"/messages/{id}",...e}),wG=e=>(e.client??Fe).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),SG=e=>(e.client??Fe).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),EG=e=>(e.client??Fe).delete({url:"/messages/{id}/feedback",...e}),kG=e=>(e.client??Fe).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),CG=e=>(e.client??Fe).delete({url:"/users/me",...e}),TG=e=>(e.client??Fe).get({url:"/users/me",...e}),$G=e=>(e.client??Fe).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),p0=e=>((e==null?void 0:e.client)??Fe).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),OG=e=>(e.client??Fe).get({url:"/events/{id}",...e}),IG=e=>(e.client??Fe).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),PG=e=>(e.client??Fe).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let h0=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function Ud(e){}function AG(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Ud,onError:n=Ud,onRetry:r=Ud,onComment:i}=e;let o="",a=!0,s,l="",u="";function c(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=RG(`${o}${g}`);for(const w of m)f(w);o=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const m=h.slice(0,g),b=h[g+1]===" "?2:1,w=h.slice(g+b);p(m,w,h);return}p(h,"",h)}function p(h,g,m){switch(h){case"event":u=g;break;case"data":l=`${l}${g}
295
+ `;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new h0(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:m}));break;default:n(new h0(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:m}));break}}function d(){l.length>0&&t({id:s,event:u||void 0,data:l.endsWith(`
296
+ `)?l.slice(0,-1):l}),s=void 0,l="",u=""}function v(h={}){o&&h.consume&&f(o),a=!0,s=void 0,l="",u="",o=""}return{feed:c,reset:v}}function RG(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
282
297
  `,r);let a=-1;if(i!==-1&&o!==-1?a=Math.min(i,o):i!==-1?a=i:o!==-1&&(a=o),a===-1){n=e.slice(r);break}else{const s=e.slice(r,a);t.push(s),r=a+1,e[r-1]==="\r"&&e[r]===`
283
- `&&r++}}return[t,n]}class e0 extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(t0(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(t0(this),n)}}function fG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Wd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Wd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Wd(e.cause)}`:e.message:`${e}`}function t0(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var n0=e=>{throw TypeError(e)},Ud=(e,t,n)=>t.has(e)||n0("Cannot "+n),xe=(e,t,n)=>(Ud(e,t,"read from private field"),n?n.call(e):t.get(e)),ct=(e,t,n)=>t.has(e)?n0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,r)=>(Ud(e,t,"write to private field"),t.set(e,n),n),_n=(e,t,n)=>(Ud(e,t,"access private method"),n),_t,mr,oi,Hs,Vs,$o,ai,To,Zn,si,li,ui,Oo,un,Hd,Vd,Kd,r0,qd,Gd,Io,Yd,Xd;class Ks extends EventTarget{constructor(t,n){var r,i;super(),ct(this,un),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ct(this,_t),ct(this,mr),ct(this,oi),ct(this,Hs),ct(this,Vs),ct(this,$o),ct(this,ai),ct(this,To,null),ct(this,Zn),ct(this,si),ct(this,li,null),ct(this,ui,null),ct(this,Oo,null),ct(this,Vd,async o=>{var a;xe(this,si).reset();const{body:s,redirected:l,status:u,headers:c}=o;if(u===204){_n(this,un,Io).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?He(this,oi,new URL(o.url)):He(this,oi,void 0),u!==200){_n(this,un,Io).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){_n(this,un,Io).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(xe(this,_t)===this.CLOSED)return;He(this,_t,this.OPEN);const f=new Event("open");if((a=xe(this,Oo))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){_n(this,un,Io).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let v=!0;do{const{done:h,value:g}=await d.read();g&&xe(this,si).feed(p.decode(g,{stream:!h})),h&&(v=!1,xe(this,si).reset(),_n(this,un,Yd).call(this))}while(v)}),ct(this,Kd,o=>{He(this,Zn,void 0),!(o.name==="AbortError"||o.type==="aborted")&&_n(this,un,Yd).call(this,Wd(o))}),ct(this,qd,o=>{typeof o.id=="string"&&He(this,To,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:xe(this,oi)?xe(this,oi).origin:xe(this,mr).origin,lastEventId:o.id||""});xe(this,ui)&&(!o.event||o.event==="message")&&xe(this,ui).call(this,a),this.dispatchEvent(a)}),ct(this,Gd,o=>{He(this,$o,o)}),ct(this,Xd,()=>{He(this,ai,void 0),xe(this,_t)===this.CONNECTING&&_n(this,un,Hd).call(this)});try{if(t instanceof URL)He(this,mr,t);else if(typeof t=="string")He(this,mr,new URL(t,dG()));else throw new Error("Invalid URL")}catch{throw fG("An invalid or illegal string was specified")}He(this,si,uG({onEvent:xe(this,qd),onRetry:xe(this,Gd)})),He(this,_t,this.CONNECTING),He(this,$o,3e3),He(this,Vs,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),He(this,Hs,(i=n==null?void 0:n.withCredentials)!=null?i:!1),_n(this,un,Hd).call(this)}get readyState(){return xe(this,_t)}get url(){return xe(this,mr).href}get withCredentials(){return xe(this,Hs)}get onerror(){return xe(this,li)}set onerror(t){He(this,li,t)}get onmessage(){return xe(this,ui)}set onmessage(t){He(this,ui,t)}get onopen(){return xe(this,Oo)}set onopen(t){He(this,Oo,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){xe(this,ai)&&clearTimeout(xe(this,ai)),xe(this,_t)!==this.CLOSED&&(xe(this,Zn)&&xe(this,Zn).abort(),He(this,_t,this.CLOSED),He(this,Zn,void 0))}}_t=new WeakMap,mr=new WeakMap,oi=new WeakMap,Hs=new WeakMap,Vs=new WeakMap,$o=new WeakMap,ai=new WeakMap,To=new WeakMap,Zn=new WeakMap,si=new WeakMap,li=new WeakMap,ui=new WeakMap,Oo=new WeakMap,un=new WeakSet,Hd=function(){He(this,_t,this.CONNECTING),He(this,Zn,new AbortController),xe(this,Vs)(xe(this,mr),_n(this,un,r0).call(this)).then(xe(this,Vd)).catch(xe(this,Kd))},Vd=new WeakMap,Kd=new WeakMap,r0=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...xe(this,To)?{"Last-Event-ID":xe(this,To)}:void 0},cache:"no-store",signal:(e=xe(this,Zn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},qd=new WeakMap,Gd=new WeakMap,Io=function(e,t){var n;xe(this,_t)!==this.CLOSED&&He(this,_t,this.CLOSED);const r=new e0("error",{code:t,message:e});(n=xe(this,li))==null||n.call(this,r),this.dispatchEvent(r)},Yd=function(e,t){var n;if(xe(this,_t)===this.CLOSED)return;He(this,_t,this.CONNECTING);const r=new e0("error",{code:t,message:e});(n=xe(this,li))==null||n.call(this,r),this.dispatchEvent(r),He(this,ai,setTimeout(xe(this,Xd),xe(this,$o)))},Xd=new WeakMap,Ks.CONNECTING=0,Ks.OPEN=1,Ks.CLOSED=2;function dG(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class pG{constructor(){this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(o=>{o(n)}),(i=this.eventMap["*"])==null||i.forEach(o=>{o({type:t,payload:n})})}}const Ge=e=>e.data,i0={throwOnError:!0},hG=({clientId:e,apiUrl:t})=>{const n=`${t||Ue.getConfig().baseUrl}/${e}`,r={...i0,baseUrl:n};return Z1({...r,body:{}}).then(Ge)},vG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Ue.getConfig().baseUrl}/${t}`,o={...i0,baseUrl:i};return{createConversation:()=>V8({...o,headers:r,body:{}}).then(Ge),getConversation:({conversationId:a})=>U8({...o,headers:r,path:{id:a}}).then(Ge),deleteConversation:({conversationId:a})=>W8({...o,headers:r,path:{id:a}}).then(Ge),listConversations:({nextToken:a})=>H8({...o,headers:r,query:{nextToken:a}}).then(Ge),listConversationMessages:({conversationId:a,nextToken:s})=>K8({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),addParticipant:({conversationId:a,userId:s})=>G8({...o,headers:r,path:{id:a},body:{userId:s}}).then(Ge),removeParticipant:({conversationId:a,userId:s})=>Y8({...o,headers:r,path:{id:a,userId:s}}).then(Ge),getParticipant:({conversationId:a,userId:s})=>X8({...o,headers:r,path:{id:a,userId:s}}).then(Ge),listParticipants:({conversationId:a,nextToken:s})=>q8({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),createMessage:a=>eG({...o,headers:r,body:a}).then(Ge),updateMessage:({messageId:a,...s})=>Q8({...o,headers:r,path:{id:a},body:s}).then(Ge),getMessage:({messageId:a})=>Z8({...o,headers:r,path:{id:a}}).then(Ge),deleteMessage:({messageId:a})=>J8({...o,headers:r,path:{id:a}}).then(Ge),createFile:a=>lG({...o,headers:r,body:a}).then(Ge),createUser:a=>Z1({...o,headers:r,body:a}).then(Ge),getUser:()=>iG({...o,headers:r}).then(Ge),updateUser:a=>oG({...o,headers:r,body:a}).then(Ge),deleteUser:()=>rG({...o,headers:r}).then(Ge),createEvent:a=>sG({...o,headers:r,body:a}).then(Ge),getEvent:({eventId:a})=>aG({...o,headers:r,path:{id:a}}).then(Ge),addMessageFeedback:({messageId:a,...s})=>nG({...o,headers:r,path:{id:a},body:s}).then(Ge),removeMessageFeedback:({messageId:a})=>tG({...o,headers:r,path:{id:a}}).then(Ge),listenConversation:({conversationId:a})=>{let s=0,l=null;const u=new pG,c=()=>{l&&l.close();const f=`${i}/conversations/${a}/listen`;l=new Ks(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>u.emit("open"),l.onerror=p=>{u.emit("error",p),s<10&&(s++,setTimeout(()=>c(),3e3))},l.onmessage=p=>{const d=mG(p.data);u.emit(d.type,d.data)}};return c(),u.on.bind(u)}}},mG=e=>{try{return JSON.parse(e)}catch{return e}},o0=["audio","file","image","video"],a0=e=>o0.includes(e);async function gG({conversationId:e,userCredentials:t,clientId:n,apiUrl:r}){let i=t,o=e;if(!i){const{key:s,user:l}=await hG({clientId:n,apiUrl:r});i={userId:l.id,userToken:s}}const a=vG({userKey:i.userToken,clientId:n,apiUrl:r});return(!o||!t)&&(o=await l0(a)),{client:a,conversationId:o,userCredentials:i}}function s0({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const o=dm(n,r),a=o(I=>I.conversationId),s=o(I=>I.user),l=o(I=>I.setConversationId),u=o(I=>I.setUser),c=Ir(I=>I.messages),f=Ir(I=>I.saveMessage),p=Ir(I=>I.updateMessage),d=Ir(I=>I.fetchMessages),v=Ir(I=>I.setMessages),h=Ir(I=>I.isFetching),[g,m]=A.useState("connecting"),{isTyping:b,setIsTyping:x}=S8(),k=A.useMemo(()=>new Tp,[]),[S,E]=A.useState(!!i.conversationId||!!a),[T,L]=A.useState(i.conversationId),[N,O]=A.useState(i.user),[M,K]=A.useState(void 0);if(A.useEffect(()=>{async function I(){try{const D=i.conversationId||a;D&&E(!0);const{client:j,conversationId:G,userCredentials:U}=await gG({clientId:t,apiUrl:e,userCredentials:i.user||s,conversationId:D});K(j),L(G),l(G),O(U),u(U),m("connected")}catch(D){console.error("Failed to initialize webchat:",D),m("error")}}I()},[i.user,i.conversationId]),A.useEffect(()=>{async function I(){if(S&&M&&T){const D=await d({client:M,conversationId:T});v(D),E(!1)}}I()},[S,M,T]),A.useEffect(()=>{if(!M||!T)return;const I=M.listenConversation({conversationId:T}),D=[I("open",()=>m("connected")),I("error",j=>{k.emit("error",new Error(`Connection to conversation lost: ${j.message}`)),m("error")}),I("message_created",j=>{const G=ra(j);f(G),k.emit("message",G),(N==null?void 0:N.userId)!==G.authorId?x(!1):setTimeout(()=>x(!0,5e3),500)}),I("webchat_visibility",j=>k.emit("webchatVisibility",j.visibility)),I("webchat_config",j=>k.emit("webchatConfig",j.config)),I("typing_started",j=>{const G=j.timeout??5e3;x(!0,G),k.emit("isTyping",{isTyping:!0,timeout:G})}),I("typing_stopped",()=>{x(!1),k.emit("isTyping",{isTyping:!1,timeout:0})}),I("custom",j=>k.emit("customEvent",j.event))];return()=>{D.forEach(j=>j())}},[T,M]),g==="connecting"||!N||!T||!M)return{clientState:"connecting",on:k.on.bind(k),client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:h};const F={sendMessage:async I=>{const D=U1(),j={id:D,createdAt:new Date().toISOString(),userId:N.userId,conversationId:T,payload:I,metadata:{clientMessageId:D,delivered:!1}},G=ra(j);f(G),await M.createMessage({conversationId:T,payload:I,metadata:{clientMessageId:D}}).catch(U=>k.emit("error",U))},sendEvent:async I=>{await M.createEvent({conversationId:T,payload:{type:"custom",data:I}})},uploadFile:async I=>{const{size:D,name:j}=I,U=await(X=>new Promise((q,Y)=>{const Q=new FileReader;Q.onload=ee=>{var J;return q((J=ee.target)==null?void 0:J.result)},Q.onerror=ee=>{var J;return Y((J=ee.target)==null?void 0:J.error)},Q.readAsArrayBuffer(X)}))(I),R=new Date;R.setDate(R.getDate()+30);const{file:{uploadUrl:y,contentType:_,url:z}}=await M.createFile({size:D,key:j,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:R.toISOString()});await fetch(y,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:U});const w=_.split("/").shift()??"",H=a0(w)?w:"file";return{fileUrl:z,name:j,type:H}},addMessageFeedback:async(I,D)=>{p(I,{feedback:D.value}),await M.addMessageFeedback({messageId:I,...D})},getUser:async()=>{const{user:I}=await M.getUser();return I},updateUser:async I=>{const{user:D}=await M.updateUser({name:I.name,pictureUrl:I.pictureUrl,userData:I.data});return D}};return{clientState:g,on:k.on.bind(k),client:F,messages:c,conversationId:T,newConversation:async()=>{v([]);const I=await l0(M);L(I),l(I)},user:s,isTyping:b,isFetchingMessages:h}}const l0=async e=>{const{conversation:t}=await e.createConversation();return await e.createEvent({conversationId:t.id,payload:{type:"conversation_started",data:{}}}),t.id},yG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:v,user:h}=s0({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:g,uploadFile:m,addMessageFeedback:b}=c??{};return $.jsx(H1,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:f||u==="connecting",isTyping:p,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:v,sendMessage:g,uploadFile:m,addMessageFeedback:b,allowFileUpload:r,restartConversation:d,...s})};function bG(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e);C.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var xG="DismissableLayer",Jd="dismissableLayer.update",wG="dismissableLayer.pointerDownOutside",SG="dismissableLayer.focusOutside",u0,c0=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f0=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=C.useContext(c0),[c,f]=C.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),v=Vn(t,T=>f(T)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g),b=c?h.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=b>=m,S=kG(T=>{const L=T.target,N=[...u.branches].some(O=>O.contains(L));!k||N||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())},p),E=$G(T=>{const L=T.target;[...u.branches].some(O=>O.contains(L))||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},p);return bG(T=>{b===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},p),C.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(u0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),d0(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=u0)}},[c,p,n,u]),C.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),d0())},[c,u]),C.useEffect(()=>{const T=()=>d({});return document.addEventListener(Jd,T),()=>document.removeEventListener(Jd,T)},[]),$.jsx(tn.div,{...l,ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:In(e.onFocusCapture,E.onFocusCapture),onBlurCapture:In(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:In(e.onPointerDownCapture,S.onPointerDownCapture)})});f0.displayName=xG;var EG="DismissableLayerBranch",CG=C.forwardRef((e,t)=>{const n=C.useContext(c0),r=C.useRef(null),i=Vn(t,r);return C.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),$.jsx(tn.div,{...e,ref:i})});CG.displayName=EG;function kG(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){p0(wG,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $G(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=C.useRef(!1);return C.useEffect(()=>{const i=o=>{o.target&&!r.current&&p0(SG,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function d0(){const e=new CustomEvent(Jd);document.dispatchEvent(e)}function p0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?pM(i,o):i.dispatchEvent(o)}var Zd="focusScope.autoFocusOnMount",Qd="focusScope.autoFocusOnUnmount",h0={bubbles:!1,cancelable:!0},TG="FocusScope",v0=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.useState(null),u=jn(i),c=jn(o),f=C.useRef(null),p=Vn(t,h=>l(h)),d=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let h=function(x){if(d.paused||!s)return;const k=x.target;s.contains(k)?f.current=k:Qn(f.current,{select:!0})},g=function(x){if(d.paused||!s)return;const k=x.relatedTarget;k!==null&&(s.contains(k)||Qn(f.current,{select:!0}))},m=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Qn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),C.useEffect(()=>{if(s){y0.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Zd,h0);s.addEventListener(Zd,u),s.dispatchEvent(m),m.defaultPrevented||(OG(DG(m0(s)),{select:!0}),document.activeElement===h&&Qn(s))}return()=>{s.removeEventListener(Zd,u),setTimeout(()=>{const m=new CustomEvent(Qd,h0);s.addEventListener(Qd,c),s.dispatchEvent(m),m.defaultPrevented||Qn(h??document.body,{select:!0}),s.removeEventListener(Qd,c),y0.remove(d)},0)}}},[s,u,c,d]);const v=C.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(g&&m){const b=h.currentTarget,[x,k]=IG(b);x&&k?!h.shiftKey&&m===k?(h.preventDefault(),n&&Qn(x,{select:!0})):h.shiftKey&&m===x&&(h.preventDefault(),n&&Qn(k,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return $.jsx(tn.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});v0.displayName=TG;function OG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qn(r,{select:t}),document.activeElement!==n)return}function IG(e){const t=m0(e),n=g0(t,e),r=g0(t.reverse(),e);return[n,r]}function m0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g0(e,t){for(const n of e)if(!PG(n,{upTo:t}))return n}function PG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function AG(e){return e instanceof HTMLInputElement&&"select"in e}function Qn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AG(e)&&t&&e.select()}}var y0=RG();function RG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=b0(e,t),e.unshift(t)},remove(t){var n;e=b0(e,t),(n=e[0])==null||n.resume()}}}function b0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function DG(e){return e.filter(t=>t.tagName!=="A")}var ep=0;function _G(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??x0()),document.body.insertAdjacentElement("beforeend",e[1]??x0()),ep++,()=>{ep===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ep--}},[])}function x0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qs="right-scroll-bar-position",Gs="width-before-scroll-bar",MG="with-scroll-bars-hidden",jG="--removed-body-scroll-bar-size";function tp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function NG(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var LG=typeof window<"u"?C.useLayoutEffect:C.useEffect,w0=new WeakMap;function FG(e,t){var n=NG(null,function(r){return e.forEach(function(i){return tp(i,r)})});return LG(function(){var r=w0.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||tp(s,null)}),o.forEach(function(s){i.has(s)||tp(s,a)})}w0.set(n,e)},[e]),n}function BG(e){return e}function zG(e,t){t===void 0&&(t=BG);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function WG(e){e===void 0&&(e={});var t=zG(null);return t.options=Vt({async:!0,ssr:!1},e),t}var S0=function(e){var t=e.sideCar,n=mm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,Vt({},n))};S0.isSideCarExport=!0;function UG(e,t){return e.useMedium(t),S0}var E0=WG(),np=function(){},Ys=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:np,onWheelCapture:np,onTouchMoveCapture:np}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,v=e.inert,h=e.allowPinchZoom,g=e.as,m=g===void 0?"div":g,b=e.gapMode,x=mm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,S=FG([n,t]),E=Vt(Vt({},x),i);return C.createElement(C.Fragment,null,c&&C.createElement(k,{sideCar:E0,removeScrollBar:u,shards:f,noIsolation:d,inert:v,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?C.cloneElement(C.Children.only(s),Vt(Vt({},E),{ref:S})):C.createElement(m,Vt({},E,{className:l,ref:S}),s))});Ys.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ys.classNames={fullWidth:Gs,zeroRight:qs};var HG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=HG();return t&&e.setAttribute("nonce",t),e}function KG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=VG())&&(KG(t,n),qG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},YG=function(){var e=GG();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},C0=function(){var e=YG(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},XG={left:0,top:0,right:0,gap:0},rp=function(e){return parseInt(e||"",10)||0},JG=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[rp(n),rp(r),rp(i)]},ZG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return XG;var t=JG(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},QG=C0(),ci="data-scroll-locked",eY=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
284
- .`.concat(MG,` {
298
+ `&&r++}}return[t,n]}class v0 extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(m0(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(m0(this),n)}}function _G(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Hd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Hd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Hd(e.cause)}`:e.message:`${e}`}function m0(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var g0=e=>{throw TypeError(e)},Vd=(e,t,n)=>t.has(e)||g0("Cannot "+n),xe=(e,t,n)=>(Vd(e,t,"read from private field"),n?n.call(e):t.get(e)),ct=(e,t,n)=>t.has(e)?g0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,r)=>(Vd(e,t,"write to private field"),t.set(e,n),n),Dn=(e,t,n)=>(Vd(e,t,"access private method"),n),Dt,yr,ai,qs,Ks,To,si,$o,Qn,li,ui,ci,Oo,un,qd,Kd,Gd,y0,Yd,Xd,Io,Jd,Qd;class Gs extends EventTarget{constructor(t,n){var r,i;super(),ct(this,un),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ct(this,Dt),ct(this,yr),ct(this,ai),ct(this,qs),ct(this,Ks),ct(this,To),ct(this,si),ct(this,$o,null),ct(this,Qn),ct(this,li),ct(this,ui,null),ct(this,ci,null),ct(this,Oo,null),ct(this,Kd,async o=>{var a;xe(this,li).reset();const{body:s,redirected:l,status:u,headers:c}=o;if(u===204){Dn(this,un,Io).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?He(this,ai,new URL(o.url)):He(this,ai,void 0),u!==200){Dn(this,un,Io).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){Dn(this,un,Io).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(xe(this,Dt)===this.CLOSED)return;He(this,Dt,this.OPEN);const f=new Event("open");if((a=xe(this,Oo))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){Dn(this,un,Io).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const p=new TextDecoder,d=s.getReader();let v=!0;do{const{done:h,value:g}=await d.read();g&&xe(this,li).feed(p.decode(g,{stream:!h})),h&&(v=!1,xe(this,li).reset(),Dn(this,un,Jd).call(this))}while(v)}),ct(this,Gd,o=>{He(this,Qn,void 0),!(o.name==="AbortError"||o.type==="aborted")&&Dn(this,un,Jd).call(this,Hd(o))}),ct(this,Yd,o=>{typeof o.id=="string"&&He(this,$o,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:xe(this,ai)?xe(this,ai).origin:xe(this,yr).origin,lastEventId:o.id||""});xe(this,ci)&&(!o.event||o.event==="message")&&xe(this,ci).call(this,a),this.dispatchEvent(a)}),ct(this,Xd,o=>{He(this,To,o)}),ct(this,Qd,()=>{He(this,si,void 0),xe(this,Dt)===this.CONNECTING&&Dn(this,un,qd).call(this)});try{if(t instanceof URL)He(this,yr,t);else if(typeof t=="string")He(this,yr,new URL(t,DG()));else throw new Error("Invalid URL")}catch{throw _G("An invalid or illegal string was specified")}He(this,li,AG({onEvent:xe(this,Yd),onRetry:xe(this,Xd)})),He(this,Dt,this.CONNECTING),He(this,To,3e3),He(this,Ks,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),He(this,qs,(i=n==null?void 0:n.withCredentials)!=null?i:!1),Dn(this,un,qd).call(this)}get readyState(){return xe(this,Dt)}get url(){return xe(this,yr).href}get withCredentials(){return xe(this,qs)}get onerror(){return xe(this,ui)}set onerror(t){He(this,ui,t)}get onmessage(){return xe(this,ci)}set onmessage(t){He(this,ci,t)}get onopen(){return xe(this,Oo)}set onopen(t){He(this,Oo,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){xe(this,si)&&clearTimeout(xe(this,si)),xe(this,Dt)!==this.CLOSED&&(xe(this,Qn)&&xe(this,Qn).abort(),He(this,Dt,this.CLOSED),He(this,Qn,void 0))}}Dt=new WeakMap,yr=new WeakMap,ai=new WeakMap,qs=new WeakMap,Ks=new WeakMap,To=new WeakMap,si=new WeakMap,$o=new WeakMap,Qn=new WeakMap,li=new WeakMap,ui=new WeakMap,ci=new WeakMap,Oo=new WeakMap,un=new WeakSet,qd=function(){He(this,Dt,this.CONNECTING),He(this,Qn,new AbortController),xe(this,Ks)(xe(this,yr),Dn(this,un,y0).call(this)).then(xe(this,Kd)).catch(xe(this,Gd))},Kd=new WeakMap,Gd=new WeakMap,y0=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...xe(this,$o)?{"Last-Event-ID":xe(this,$o)}:void 0},cache:"no-store",signal:(e=xe(this,Qn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Yd=new WeakMap,Xd=new WeakMap,Io=function(e,t){var n;xe(this,Dt)!==this.CLOSED&&He(this,Dt,this.CLOSED);const r=new v0("error",{code:t,message:e});(n=xe(this,ui))==null||n.call(this,r),this.dispatchEvent(r)},Jd=function(e,t){var n;if(xe(this,Dt)===this.CLOSED)return;He(this,Dt,this.CONNECTING);const r=new v0("error",{code:t,message:e});(n=xe(this,ui))==null||n.call(this,r),this.dispatchEvent(r),He(this,si,setTimeout(xe(this,Qd),xe(this,To)))},Qd=new WeakMap,Gs.CONNECTING=0,Gs.OPEN=1,Gs.CLOSED=2;function DG(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function b0(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const MG=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Ge=e=>e.data,x0={throwOnError:!0},jG=({clientId:e,apiUrl:t})=>{const n=`${t||Fe.getConfig().baseUrl}/${e}`;Fe.interceptors.response._fns.length===0&&Fe.interceptors.response.use(b0);const r={...x0,baseUrl:n};return p0({...r,body:{}}).then(Ge)},NG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Fe.getConfig().baseUrl}/${t}`,o={...x0,baseUrl:i};return Fe.interceptors.response._fns.length===0&&Fe.interceptors.response.use(b0),{createConversation:()=>pG({...o,headers:r,body:{}}).then(Ge),getConversation:({conversationId:a})=>fG({...o,headers:r,path:{id:a}}).then(Ge),deleteConversation:({conversationId:a})=>cG({...o,headers:r,path:{id:a}}).then(Ge),listConversations:({nextToken:a})=>dG({...o,headers:r,query:{nextToken:a}}).then(Ge),listConversationMessages:({conversationId:a,nextToken:s})=>hG({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),addParticipant:({conversationId:a,userId:s})=>mG({...o,headers:r,path:{id:a},body:{userId:s}}).then(Ge),removeParticipant:({conversationId:a,userId:s})=>gG({...o,headers:r,path:{id:a,userId:s}}).then(Ge),getParticipant:({conversationId:a,userId:s})=>yG({...o,headers:r,path:{id:a,userId:s}}).then(Ge),listParticipants:({conversationId:a,nextToken:s})=>vG({...o,headers:r,path:{id:a},query:{nextToken:s}}).then(Ge),createMessage:a=>SG({...o,headers:r,body:a}).then(Ge),updateMessage:({messageId:a,...s})=>wG({...o,headers:r,path:{id:a},body:s}).then(Ge),getMessage:({messageId:a})=>xG({...o,headers:r,path:{id:a}}).then(Ge),deleteMessage:({messageId:a})=>bG({...o,headers:r,path:{id:a}}).then(Ge),createFile:a=>PG({...o,headers:r,body:a}).then(Ge),createUser:a=>p0({...o,headers:r,body:a}).then(Ge),getUser:()=>TG({...o,headers:r}).then(Ge),updateUser:a=>$G({...o,headers:r,body:a}).then(Ge),deleteUser:()=>CG({...o,headers:r}).then(Ge),createEvent:a=>IG({...o,headers:r,body:a}).then(Ge),getEvent:({eventId:a})=>OG({...o,headers:r,path:{id:a}}).then(Ge),addMessageFeedback:({messageId:a,...s})=>kG({...o,headers:r,path:{id:a},body:s}).then(Ge),removeMessageFeedback:({messageId:a})=>EG({...o,headers:r,path:{id:a}}).then(Ge),listenConversation:({conversationId:a})=>{let s=0,l=null;const u=MG(),c=()=>{l&&l.close();const f=`${i}/conversations/${a}/listen`;l=new Gs(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>u.emit("open"),l.onerror=p=>{u.emit("error",p),s<10&&(s++,setTimeout(()=>c(),3e3))},l.onmessage=p=>{const d=LG(p.data);u.emit(d.type,d.data)}};return c(),u.on}}},LG=e=>{try{return JSON.parse(e)}catch{return e}};function w0({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const o=km(n,r),a=o($=>$.conversationId),s=o($=>$.user),l=o($=>$.setConversationId),u=o($=>$.setUser),c=ar($=>$.messages),f=ar($=>$.saveMessage),p=ar($=>$.updateMessage),d=ar($=>$.fetchMessages),v=ar($=>$.setMessages),h=ar($=>$.clearMessages),g=ar($=>$.isFetching),m=aa($=>$.participants),b=aa($=>$.setParticipants),w=aa($=>$.addParticipant),C=aa($=>$.removeParticipant),[S,E]=A.useState("connecting"),{isTyping:I,setIsTyping:L}=HK(),_=A.useMemo(()=>Cm(),[]),[O,D]=A.useState(i.conversationId),[H,F]=A.useState(i.user),[j,M]=A.useState(void 0),[W,G]=A.useState(!1),[V,R]=A.useState(void 0);if(A.useEffect(()=>{R(void 0)},[i.conversationId,i.user,t,e]),Am(async()=>{if(!t){R({type:"configuration",message:zp});return}if(!e||!e.startsWith("https://")){R({type:"configuration",message:Wp});return}async function $(){const N=i.user||s;let x=N,B=i.conversationId||a;const Y=!!B;if(!x){const{key:Z,user:ee}=await jG({clientId:t,apiUrl:e});x={userId:ee.id,userToken:Z}}const K=NG({userKey:x.userToken,clientId:t,apiUrl:e});if((!B||!N)&&(B=await S0(K),G(!0)),Y){const Z=await d({client:K,conversationId:B});v(Z)}const{participants:X}=await K.listParticipants({conversationId:B});b(X),M(K),D(B),l(B),F(x),u(x),E("connected")}try{await $()}catch(N){h(),R(jo(N)),E("error")}},[i.user,i.conversationId]),A.useEffect(()=>{if(!j||!O)return;const $=j.listenConversation({conversationId:O}),N=[$("open",()=>{E("connected"),W&&(j.createEvent({conversationId:O,payload:{type:"conversation_started",data:{}}}),_.emit("conversation"),G(!1))}),$("error",x=>{R(B=>B||jo(x)),_.emit("error",new Error(`Connection to conversation lost: ${x.message}`)),E("error")}),$("message_created",x=>{const B=ia(x);(H==null?void 0:H.userId)!==B.authorId&&(L(!1),_.emit("isTyping",{isTyping:!1,timeout:0})),f(B),_.emit("message",B)}),$("message_status_changed",x=>{x.newStatus==="processing"&&(L(!0),_.emit("isTyping",{isTyping:!0,timeout:5e3}),p(x.message.metadata.clientMessageId,{status:x.newStatus}))}),$("participant_added",x=>{w(x.participant),_.emit("participantAdded",x.participant)}),$("participant_removed",x=>{C(x.participantId),_.emit("participantRemoved",x.participantId)}),$("webchat_visibility",x=>_.emit("webchatVisibility",x.visibility)),$("webchat_config",x=>_.emit("webchatConfig",x.config)),$("custom",x=>_.emit("customEvent",x.event))];return()=>{N.forEach(x=>x())}},[O,j]),V)return{clientState:"error",on:_.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:g,participants:[],error:V};if(S==="connecting"||!H||!O||!j)return{clientState:"connecting",on:_.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:g,participants:[]};const y={sendMessage:async $=>{const N=r0(),x={id:N,createdAt:new Date().toISOString(),userId:H.userId,conversationId:O,payload:$,metadata:{clientMessageId:N,delivered:!1}},B=ia(x);B.status="pending",f(B),await j.createMessage({conversationId:O,payload:$,metadata:{clientMessageId:N}}).catch(Y=>_.emit("error",Y))},sendEvent:async $=>{await j.createEvent({conversationId:O,payload:{type:"custom",data:$}})},uploadFile:async $=>{const{size:N,name:x}=$,Y=await(q=>new Promise((ie,le)=>{const de=new FileReader;de.onload=ae=>{var ve;return ie((ve=ae.target)==null?void 0:ve.result)},de.onerror=ae=>{var ve;return le((ve=ae.target)==null?void 0:ve.error)},de.readAsArrayBuffer(q)}))($),K=new Date;K.setDate(K.getDate()+30);const{file:{uploadUrl:X,contentType:Z,url:ee}}=await j.createFile({size:N,key:x,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:K.toISOString()});await fetch(X,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:Y});const J=Z.split("/").shift()??"",Q=Bp(J)?J:"file";return{fileUrl:ee,name:x,type:Q}},addMessageFeedback:async($,N)=>{p($,{feedback:N.value}),await j.addMessageFeedback({messageId:$,...N})},getUser:async()=>{const{user:$}=await j.getUser();return $},updateUser:async $=>{const{user:N}=await j.updateUser({name:$.name,pictureUrl:$.pictureUrl,userData:$.data});return N}};return{clientState:S,on:_.on,client:y,messages:c,conversationId:O,newConversation:async()=>{try{h();const $=await S0(j);G(!0),D($),l($)}catch($){R(jo($))}},user:s,isTyping:I,isFetchingMessages:g,participants:m,error:V}}const S0=async e=>{const{conversation:t}=await e.createConversation();return t.id},FG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:u,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:v,participants:h,user:g,error:m}=w0({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:b,uploadFile:w,addMessageFeedback:C}=c??{};return T.jsx(o0,{configuration:n??{},user:g!=null&&g.userId?{id:g==null?void 0:g.userId}:void 0,isLoading:f||u==="connecting",isTyping:p,connected:u==="connected"?!0:u==="disconnected"?!1:void 0,messages:v,sendMessage:b,uploadFile:w,addMessageFeedback:C,allowFileUpload:r,restartConversation:d,participants:h,error:m,...s})};function BG(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zG="DismissableLayer",Zd="dismissableLayer.update",WG="dismissableLayer.pointerDownOutside",UG="dismissableLayer.focusOutside",E0,k0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,u=k.useContext(k0),[c,f]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=k.useState({}),v=Vn(t,I=>f(I)),h=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g),b=c?h.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=b>=m,S=qG(I=>{const L=I.target,_=[...u.branches].some(O=>O.contains(L));!C||_||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},p),E=KG(I=>{const L=I.target;[...u.branches].some(O=>O.contains(L))||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},p);return BG(I=>{b===u.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},p),k.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(E0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),T0(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=E0)}},[c,p,n,u]),k.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),T0())},[c,u]),k.useEffect(()=>{const I=()=>d({});return document.addEventListener(Zd,I),()=>document.removeEventListener(Zd,I)},[]),T.jsx(tn.div,{...l,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:In(e.onFocusCapture,E.onFocusCapture),onBlurCapture:In(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:In(e.onPointerDownCapture,S.onPointerDownCapture)})});C0.displayName=zG;var HG="DismissableLayerBranch",VG=k.forwardRef((e,t)=>{const n=k.useContext(k0),r=k.useRef(null),i=Vn(t,r);return k.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(tn.div,{...e,ref:i})});VG.displayName=HG;function qG(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){$0(WG,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function KG(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=k.useRef(!1);return k.useEffect(()=>{const i=o=>{o.target&&!r.current&&$0(UG,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function T0(){const e=new CustomEvent(Zd);document.dispatchEvent(e)}function $0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?DM(i,o):i.dispatchEvent(o)}var ep="focusScope.autoFocusOnMount",tp="focusScope.autoFocusOnUnmount",O0={bubbles:!1,cancelable:!0},GG="FocusScope",I0=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=k.useState(null),u=jn(i),c=jn(o),f=k.useRef(null),p=Vn(t,h=>l(h)),d=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:Zn(f.current,{select:!0})},g=function(w){if(d.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||Zn(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Zn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),k.useEffect(()=>{if(s){R0.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(ep,O0);s.addEventListener(ep,u),s.dispatchEvent(m),m.defaultPrevented||(YG(eY(P0(s)),{select:!0}),document.activeElement===h&&Zn(s))}return()=>{s.removeEventListener(ep,u),setTimeout(()=>{const m=new CustomEvent(tp,O0);s.addEventListener(tp,c),s.dispatchEvent(m),m.defaultPrevented||Zn(h??document.body,{select:!0}),s.removeEventListener(tp,c),R0.remove(d)},0)}}},[s,u,c,d]);const v=k.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(g&&m){const b=h.currentTarget,[w,C]=XG(b);w&&C?!h.shiftKey&&m===C?(h.preventDefault(),n&&Zn(w,{select:!0})):h.shiftKey&&m===w&&(h.preventDefault(),n&&Zn(C,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return T.jsx(tn.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});I0.displayName=GG;function YG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Zn(r,{select:t}),document.activeElement!==n)return}function XG(e){const t=P0(e),n=A0(t,e),r=A0(t.reverse(),e);return[n,r]}function P0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function A0(e,t){for(const n of e)if(!JG(n,{upTo:t}))return n}function JG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function QG(e){return e instanceof HTMLInputElement&&"select"in e}function Zn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&QG(e)&&t&&e.select()}}var R0=ZG();function ZG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_0(e,t),e.unshift(t)},remove(t){var n;e=_0(e,t),(n=e[0])==null||n.resume()}}}function _0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function eY(e){return e.filter(t=>t.tagName!=="A")}var np=0;function tY(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??D0()),document.body.insertAdjacentElement("beforeend",e[1]??D0()),np++,()=>{np===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),np--}},[])}function D0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ys="right-scroll-bar-position",Xs="width-before-scroll-bar",nY="with-scroll-bars-hidden",rY="--removed-body-scroll-bar-size";function rp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function iY(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var oY=typeof window<"u"?k.useLayoutEffect:k.useEffect,M0=new WeakMap;function aY(e,t){var n=iY(null,function(r){return e.forEach(function(i){return rp(i,r)})});return oY(function(){var r=M0.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||rp(s,null)}),o.forEach(function(s){i.has(s)||rp(s,a)})}M0.set(n,e)},[e]),n}function sY(e){return e}function lY(e,t){t===void 0&&(t=sY);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return i}function uY(e){e===void 0&&(e={});var t=lY(null);return t.options=Vt({async:!0,ssr:!1},e),t}var j0=function(e){var t=e.sideCar,n=Im(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Vt({},n))};j0.isSideCarExport=!0;function cY(e,t){return e.useMedium(t),j0}var N0=uY(),ip=function(){},Js=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:ip,onWheelCapture:ip,onTouchMoveCapture:ip}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,v=e.inert,h=e.allowPinchZoom,g=e.as,m=g===void 0?"div":g,b=e.gapMode,w=Im(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,S=aY([n,t]),E=Vt(Vt({},w),i);return k.createElement(k.Fragment,null,c&&k.createElement(C,{sideCar:N0,removeScrollBar:u,shards:f,noIsolation:d,inert:v,setCallbacks:o,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?k.cloneElement(k.Children.only(s),Vt(Vt({},E),{ref:S})):k.createElement(m,Vt({},E,{className:l,ref:S}),s))});Js.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Js.classNames={fullWidth:Xs,zeroRight:Ys};var fY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fY();return t&&e.setAttribute("nonce",t),e}function pY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dY())&&(pY(t,n),hY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mY=function(){var e=vY();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},L0=function(){var e=mY(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},gY={left:0,top:0,right:0,gap:0},op=function(e){return parseInt(e||"",10)||0},yY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[op(n),op(r),op(i)]},bY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gY;var t=yY(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xY=L0(),fi="data-scroll-locked",wY=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
299
+ .`.concat(nY,` {
285
300
  overflow: hidden `).concat(r,`;
286
301
  padding-right: `).concat(s,"px ").concat(r,`;
287
302
  }
288
- body[`).concat(ci,`] {
303
+ body[`).concat(fi,`] {
289
304
  overflow: hidden `).concat(r,`;
290
305
  overscroll-behavior: contain;
291
306
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -298,30 +313,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
298
313
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
299
314
  }
300
315
 
301
- .`).concat(qs,` {
316
+ .`).concat(Ys,` {
302
317
  right: `).concat(s,"px ").concat(r,`;
303
318
  }
304
319
 
305
- .`).concat(Gs,` {
320
+ .`).concat(Xs,` {
306
321
  margin-right: `).concat(s,"px ").concat(r,`;
307
322
  }
308
323
 
309
- .`).concat(qs," .").concat(qs,` {
324
+ .`).concat(Ys," .").concat(Ys,` {
310
325
  right: 0 `).concat(r,`;
311
326
  }
312
327
 
313
- .`).concat(Gs," .").concat(Gs,` {
328
+ .`).concat(Xs," .").concat(Xs,` {
314
329
  margin-right: 0 `).concat(r,`;
315
330
  }
316
331
 
317
- body[`).concat(ci,`] {
318
- `).concat(jG,": ").concat(s,`px;
332
+ body[`).concat(fi,`] {
333
+ `).concat(rY,": ").concat(s,`px;
319
334
  }
320
- `)},k0=function(){var e=parseInt(document.body.getAttribute(ci)||"0",10);return isFinite(e)?e:0},tY=function(){C.useEffect(function(){return document.body.setAttribute(ci,(k0()+1).toString()),function(){var e=k0()-1;e<=0?document.body.removeAttribute(ci):document.body.setAttribute(ci,e.toString())}},[])},nY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;tY();var o=C.useMemo(function(){return ZG(i)},[i]);return C.createElement(QG,{styles:eY(o,!t,i,n?"":"!important")})},ip=!1;if(typeof window<"u")try{var Xs=Object.defineProperty({},"passive",{get:function(){return ip=!0,!0}});window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{ip=!1}var fi=ip?{passive:!1}:!1,rY=function(e){return e.tagName==="TEXTAREA"},$0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!rY(e)&&n[t]==="visible")},iY=function(e){return $0(e,"overflowY")},oY=function(e){return $0(e,"overflowX")},T0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=O0(e,r);if(i){var o=I0(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},aY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},sY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},O0=function(e,t){return e==="v"?iY(t):oY(t)},I0=function(e,t){return e==="v"?aY(t):sY(t)},lY=function(e,t){return e==="h"&&t==="rtl"?-1:1},uY=function(e,t,n,r,i){var o=lY(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,c=a>0,f=0,p=0;do{var d=I0(e,s),v=d[0],h=d[1],g=d[2],m=h-g-o*v;(v||m)&&O0(e,s)&&(f+=m,p+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(u=!0),u},Js=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},P0=function(e){return[e.deltaX,e.deltaY]},A0=function(e){return e&&"current"in e?e.current:e},cY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fY=function(e){return`
335
+ `)},F0=function(){var e=parseInt(document.body.getAttribute(fi)||"0",10);return isFinite(e)?e:0},SY=function(){k.useEffect(function(){return document.body.setAttribute(fi,(F0()+1).toString()),function(){var e=F0()-1;e<=0?document.body.removeAttribute(fi):document.body.setAttribute(fi,e.toString())}},[])},EY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;SY();var o=k.useMemo(function(){return bY(i)},[i]);return k.createElement(xY,{styles:wY(o,!t,i,n?"":"!important")})},ap=!1;if(typeof window<"u")try{var Qs=Object.defineProperty({},"passive",{get:function(){return ap=!0,!0}});window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{ap=!1}var di=ap?{passive:!1}:!1,kY=function(e){return e.tagName==="TEXTAREA"},B0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!kY(e)&&n[t]==="visible")},CY=function(e){return B0(e,"overflowY")},TY=function(e){return B0(e,"overflowX")},z0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=W0(e,r);if(i){var o=U0(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$Y=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},OY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},W0=function(e,t){return e==="v"?CY(t):TY(t)},U0=function(e,t){return e==="v"?$Y(t):OY(t)},IY=function(e,t){return e==="h"&&t==="rtl"?-1:1},PY=function(e,t,n,r,i){var o=IY(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,c=a>0,f=0,p=0;do{var d=U0(e,s),v=d[0],h=d[1],g=d[2],m=h-g-o*v;(v||m)&&W0(e,s)&&(f+=m,p+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(u=!0),u},Zs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H0=function(e){return[e.deltaX,e.deltaY]},V0=function(e){return e&&"current"in e?e.current:e},AY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},RY=function(e){return`
321
336
  .block-interactivity-`.concat(e,` {pointer-events: none;}
322
337
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
323
- `)},dY=0,di=[];function pY(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(dY++)[0],o=C.useState(C0)[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=lu([e.lockRef.current],(e.shards||[]).map(A0),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var m=Js(h),b=n.current,x="deltaX"in h?h.deltaX:b[0]-m[0],k="deltaY"in h?h.deltaY:b[1]-m[1],S,E=h.target,T=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in h&&T==="h"&&E.type==="range")return!1;var L=T0(T,E);if(!L)return!0;if(L?S=T:(S=T==="v"?"h":"v",L=T0(T,E)),!L)return!1;if(!r.current&&"changedTouches"in h&&(x||k)&&(r.current=S),!S)return!0;var N=r.current||S;return uY(N,g,h,N==="h"?x:k,!0)},[]),l=C.useCallback(function(h){var g=h;if(!(!di.length||di[di.length-1]!==o)){var m="deltaY"in g?P0(g):Js(g),b=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&cY(S.delta,m)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(a.current.shards||[]).map(A0).filter(Boolean).filter(function(S){return S.contains(g.target)}),k=x.length>0?s(g,x[0]):!a.current.noIsolation;k&&g.cancelable&&g.preventDefault()}}},[]),u=C.useCallback(function(h,g,m,b){var x={name:h,delta:g,target:m,should:b,shadowParent:hY(m)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),c=C.useCallback(function(h){n.current=Js(h),r.current=void 0},[]),f=C.useCallback(function(h){u(h.type,P0(h),h.target,s(h,e.lockRef.current))},[]),p=C.useCallback(function(h){u(h.type,Js(h),h.target,s(h,e.lockRef.current))},[]);C.useEffect(function(){return di.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fi),document.addEventListener("touchmove",l,fi),document.addEventListener("touchstart",c,fi),function(){di=di.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,fi),document.removeEventListener("touchmove",l,fi),document.removeEventListener("touchstart",c,fi)}},[]);var d=e.removeScrollBar,v=e.inert;return C.createElement(C.Fragment,null,v?C.createElement(o,{styles:fY(i)}):null,d?C.createElement(nY,{gapMode:e.gapMode}):null)}function hY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vY=UG(E0,pY);var R0=C.forwardRef(function(e,t){return C.createElement(Ys,Vt({},e,{ref:t,sideCar:vY}))});R0.classNames=Ys.classNames;var mY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pi=new WeakMap,Zs=new WeakMap,Qs={},op=0,D0=function(e){return e&&(e.host||D0(e.parentNode))},gY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=D0(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},yY=function(e,t,n,r){var i=gY(t,Array.isArray(e)?e:[e]);Qs[n]||(Qs[n]=new WeakMap);var o=Qs[n],a=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),v=d!==null&&d!=="false",h=(pi.get(p)||0)+1,g=(o.get(p)||0)+1;pi.set(p,h),o.set(p,g),a.push(p),h===1&&v&&Zs.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return c(t),s.clear(),op++,function(){a.forEach(function(f){var p=pi.get(f)-1,d=o.get(f)-1;pi.set(f,p),o.set(f,d),p||(Zs.has(f)||f.removeAttribute(r),Zs.delete(f)),d||f.removeAttribute(n)}),op--,op||(pi=new WeakMap,pi=new WeakMap,Zs=new WeakMap,Qs={})}},bY=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=mY(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),yY(r,i,n,"aria-hidden")):function(){return null}},ap="Dialog",[_0,pX]=xy(ap),[xY,Cn]=_0(ap),M0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=C.useRef(null),l=C.useRef(null),[u=!1,c]=wy({prop:r,defaultProp:i,onChange:o});return $.jsx(xY,{scope:t,triggerRef:s,contentRef:l,contentId:Fa(),titleId:Fa(),descriptionId:Fa(),open:u,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};M0.displayName=ap;var j0="DialogTrigger",N0=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Cn(j0,n),o=Vn(t,i.triggerRef);return $.jsx(tn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lp(i.open),...r,ref:o,onClick:In(e.onClick,i.onOpenToggle)})});N0.displayName=j0;var wY="DialogPortal",[hX,L0]=_0(wY,{forceMount:void 0}),el="DialogOverlay",F0=C.forwardRef((e,t)=>{const n=L0(el,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Cn(el,e.__scopeDialog);return o.modal?$.jsx(Na,{present:r||o.open,children:$.jsx(SY,{...i,ref:t})}):null});F0.displayName=el;var SY=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Cn(el,n);return $.jsx(R0,{as:ec,allowPinchZoom:!0,shards:[i.contentRef],children:$.jsx(tn.div,{"data-state":lp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gr="DialogContent",B0=C.forwardRef((e,t)=>{const n=L0(gr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Cn(gr,e.__scopeDialog);return $.jsx(Na,{present:r||o.open,children:o.modal?$.jsx(EY,{...i,ref:t}):$.jsx(CY,{...i,ref:t})})});B0.displayName=gr;var EY=C.forwardRef((e,t)=>{const n=Cn(gr,e.__scopeDialog),r=C.useRef(null),i=Vn(t,n.contentRef,r);return C.useEffect(()=>{const o=r.current;if(o)return bY(o)},[]),$.jsx(z0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:In(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:In(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:In(e.onFocusOutside,o=>o.preventDefault())})}),CY=C.forwardRef((e,t)=>{const n=Cn(gr,e.__scopeDialog),r=C.useRef(!1),i=C.useRef(!1);return $.jsx(z0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),z0=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Cn(gr,n),l=C.useRef(null),u=Vn(t,l);return _G(),$.jsxs($.Fragment,{children:[$.jsx(v0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:$.jsx(f0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lp(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),$.jsxs($.Fragment,{children:[$.jsx(kY,{titleId:s.titleId}),$.jsx(TY,{contentRef:l,descriptionId:s.descriptionId})]})]})}),sp="DialogTitle",W0=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Cn(sp,n);return $.jsx(tn.h2,{id:i.titleId,...r,ref:t})});W0.displayName=sp;var U0="DialogDescription",H0=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Cn(U0,n);return $.jsx(tn.p,{id:i.descriptionId,...r,ref:t})});H0.displayName=U0;var V0="DialogClose",K0=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Cn(V0,n);return $.jsx(tn.button,{type:"button",...r,ref:t,onClick:In(e.onClick,()=>i.onOpenChange(!1))})});K0.displayName=V0;function lp(e){return e?"open":"closed"}var q0="DialogTitleWarning",[vX,G0]=oM(q0,{contentName:gr,titleName:sp,docsSlug:"dialog"}),kY=({titleId:e})=>{const t=G0(q0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
338
+ `)},_Y=0,pi=[];function DY(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),i=k.useState(_Y++)[0],o=k.useState(L0)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=cu([e.lockRef.current],(e.shards||[]).map(V0),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var m=Zs(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-m[0],C="deltaY"in h?h.deltaY:b[1]-m[1],S,E=h.target,I=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in h&&I==="h"&&E.type==="range")return!1;var L=z0(I,E);if(!L)return!0;if(L?S=I:(S=I==="v"?"h":"v",L=z0(I,E)),!L)return!1;if(!r.current&&"changedTouches"in h&&(w||C)&&(r.current=S),!S)return!0;var _=r.current||S;return PY(_,g,h,_==="h"?w:C,!0)},[]),l=k.useCallback(function(h){var g=h;if(!(!pi.length||pi[pi.length-1]!==o)){var m="deltaY"in g?H0(g):Zs(g),b=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&AY(S.delta,m)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(V0).filter(Boolean).filter(function(S){return S.contains(g.target)}),C=w.length>0?s(g,w[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),u=k.useCallback(function(h,g,m,b){var w={name:h,delta:g,target:m,should:b,shadowParent:MY(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),c=k.useCallback(function(h){n.current=Zs(h),r.current=void 0},[]),f=k.useCallback(function(h){u(h.type,H0(h),h.target,s(h,e.lockRef.current))},[]),p=k.useCallback(function(h){u(h.type,Zs(h),h.target,s(h,e.lockRef.current))},[]);k.useEffect(function(){return pi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,di),document.addEventListener("touchmove",l,di),document.addEventListener("touchstart",c,di),function(){pi=pi.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,di),document.removeEventListener("touchmove",l,di),document.removeEventListener("touchstart",c,di)}},[]);var d=e.removeScrollBar,v=e.inert;return k.createElement(k.Fragment,null,v?k.createElement(o,{styles:RY(i)}):null,d?k.createElement(EY,{gapMode:e.gapMode}):null)}function MY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jY=cY(N0,DY);var q0=k.forwardRef(function(e,t){return k.createElement(Js,Vt({},e,{ref:t,sideCar:jY}))});q0.classNames=Js.classNames;var NY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hi=new WeakMap,el=new WeakMap,tl={},sp=0,K0=function(e){return e&&(e.host||K0(e.parentNode))},LY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=K0(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FY=function(e,t,n,r){var i=LY(t,Array.isArray(e)?e:[e]);tl[n]||(tl[n]=new WeakMap);var o=tl[n],a=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),v=d!==null&&d!=="false",h=(hi.get(p)||0)+1,g=(o.get(p)||0)+1;hi.set(p,h),o.set(p,g),a.push(p),h===1&&v&&el.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return c(t),s.clear(),sp++,function(){a.forEach(function(f){var p=hi.get(f)-1,d=o.get(f)-1;hi.set(f,p),o.set(f,d),p||(el.has(f)||f.removeAttribute(r),el.delete(f)),d||f.removeAttribute(n)}),sp--,sp||(hi=new WeakMap,hi=new WeakMap,el=new WeakMap,tl={})}},BY=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=NY(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),FY(r,i,n,"aria-hidden")):function(){return null}},lp="Dialog",[G0,DX]=Dy(lp),[zY,kn]=G0(lp),Y0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=k.useRef(null),l=k.useRef(null),[u=!1,c]=My({prop:r,defaultProp:i,onChange:o});return T.jsx(zY,{scope:t,triggerRef:s,contentRef:l,contentId:za(),titleId:za(),descriptionId:za(),open:u,onOpenChange:c,onOpenToggle:k.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};Y0.displayName=lp;var X0="DialogTrigger",J0=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=kn(X0,n),o=Vn(t,i.triggerRef);return T.jsx(tn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cp(i.open),...r,ref:o,onClick:In(e.onClick,i.onOpenToggle)})});J0.displayName=X0;var WY="DialogPortal",[MX,Q0]=G0(WY,{forceMount:void 0}),nl="DialogOverlay",Z0=k.forwardRef((e,t)=>{const n=Q0(nl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=kn(nl,e.__scopeDialog);return o.modal?T.jsx(Fa,{present:r||o.open,children:T.jsx(UY,{...i,ref:t})}):null});Z0.displayName=nl;var UY=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=kn(nl,n);return T.jsx(q0,{as:nc,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(tn.div,{"data-state":cp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),br="DialogContent",eE=k.forwardRef((e,t)=>{const n=Q0(br,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=kn(br,e.__scopeDialog);return T.jsx(Fa,{present:r||o.open,children:o.modal?T.jsx(HY,{...i,ref:t}):T.jsx(VY,{...i,ref:t})})});eE.displayName=br;var HY=k.forwardRef((e,t)=>{const n=kn(br,e.__scopeDialog),r=k.useRef(null),i=Vn(t,n.contentRef,r);return k.useEffect(()=>{const o=r.current;if(o)return BY(o)},[]),T.jsx(tE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:In(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:In(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:In(e.onFocusOutside,o=>o.preventDefault())})}),VY=k.forwardRef((e,t)=>{const n=kn(br,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return T.jsx(tE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),tE=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=kn(br,n),l=k.useRef(null),u=Vn(t,l);return tY(),T.jsxs(T.Fragment,{children:[T.jsx(I0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:T.jsx(C0,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cp(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(qY,{titleId:s.titleId}),T.jsx(GY,{contentRef:l,descriptionId:s.descriptionId})]})]})}),up="DialogTitle",nE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=kn(up,n);return T.jsx(tn.h2,{id:i.titleId,...r,ref:t})});nE.displayName=up;var rE="DialogDescription",iE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=kn(rE,n);return T.jsx(tn.p,{id:i.descriptionId,...r,ref:t})});iE.displayName=rE;var oE="DialogClose",aE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=kn(oE,n);return T.jsx(tn.button,{type:"button",...r,ref:t,onClick:In(e.onClick,()=>i.onOpenChange(!1))})});aE.displayName=oE;function cp(e){return e?"open":"closed"}var sE="DialogTitleWarning",[jX,lE]=TM(sE,{contentName:br,titleName:up,docsSlug:"dialog"}),qY=({titleId:e})=>{const t=lE(sE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
324
339
 
325
340
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
326
341
 
327
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$Y="DialogDescriptionWarning",TY=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G0($Y).contentName}}.`;return C.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},OY=M0,IY=N0,PY=F0,AY=B0,RY=W0,DY=H0,_Y=K0;function hi({open:e,onOpenChange:t,children:n}){const{modal:r}=Ce;return $.jsxs(OY,{open:e,onOpenChange:t,children:[$.jsx(PY,{...r==null?void 0:r.overlay}),n]})}function MY({children:e,title:t,description:n,confirmButton:r,onConfirm:i,cancelButton:o,hideModal:a}){const{modal:s}=Ce;return $.jsx($.Fragment,{children:$.jsxs(AY,{...s.dialog.container,children:[$.jsx(RY,{...s.dialog.title,children:t}),$.jsx(DY,{...s.dialog.description,children:n}),$.jsx("div",{...s.dialog.content.container,children:e}),$.jsxs("div",{...s.dialog.button.container,children:[$.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:i,children:r}),$.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:a,children:o})]})]})})}hi.Button=IY,hi.Close=_Y,hi.Content=MY,ye.Avatar=jo,ye.Block=ar,ye.Chat=H1,ye.Composer=Fg,ye.Container=Qu,ye.Fab=by,ye.Header=Iy,ye.Message=sc,ye.MessageList=Fd,ye.Modal=hi,ye.ModalProvider=Zu,ye.RestartConversationButton=Oy,ye.StylesheetProvider=gy,ye.TypingIndicator=ac,ye.Webchat=yG,ye.fileTypes=o0,ye.generateThemeStylesheet=Np,ye.getUseWebchatClientStore=dm,ye.integrationMessagePayloadToBlockPayload=rm,ye.integrationMessageToBlockMessage=ra,ye.isFileType=a0,ye.renderers=Pg,ye.useWebchat=s0,ye.useWebchatStore=ia,ye.webchatClasses=Ce,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
342
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},KY="DialogDescriptionWarning",GY=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lE(KY).contentName}}.`;return k.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},YY=Y0,XY=J0,JY=Z0,QY=eE,ZY=nE,eX=iE,tX=aE;function vi({open:e,onOpenChange:t,children:n}){const{modal:r}=we;return T.jsxs(YY,{open:e,onOpenChange:t,children:[T.jsx(JY,{...r==null?void 0:r.overlay}),n]})}function nX({children:e,title:t,description:n,confirmButton:r,onConfirm:i,cancelButton:o,hideModal:a}){const{modal:s}=we;return T.jsx(T.Fragment,{children:T.jsxs(QY,{...s.dialog.container,children:[T.jsx(ZY,{...s.dialog.title,children:t}),T.jsx(eX,{...s.dialog.description,children:n}),T.jsx("div",{...s.dialog.content.container,children:e}),T.jsxs("div",{...s.dialog.button.container,children:[T.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:i,children:r}),T.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:a,children:o})]})]})})}vi.Button=XY,vi.Close=tX,vi.Content=nX,pe.Avatar=No,pe.BOT_IS_BLOCKED=Vp,pe.Block=lr,pe.CONFIG_ACCESS_DENIED=ck,pe.Chat=o0,pe.Composer=Zg,pe.Container=tc,pe.ErrorState=i0,pe.Fab=_y,pe.Header=Uy,pe.INVALID_API_URL=Wp,pe.INVALID_BOTPRESS_URL=Hp,pe.INVALID_CLIENT_ID=Up,pe.INVALID_CONFIGURATION=uk,pe.INVALID_CONFIG_URL=lk,pe.MISSING_API_URL=ok,pe.MISSING_BOT_ID=ak,pe.MISSING_CLIENT_ID=zp,pe.MISSING_CONFIG_URL=sk,pe.Message=uc,pe.MessageList=zd,pe.Modal=vi,pe.ModalProvider=ec,pe.NETWORK_ERROR=Gp,pe.NOT_A_PARTICIPANT=Kp,pe.QUOTA_EXCEEDED=qp,pe.RestartConversationButton=Wy,pe.StylesheetProvider=Ay,pe.TypingIndicator=lc,pe.Webchat=FG,pe.enrichMessage=Mp,pe.fileTypes=Fp,pe.generateThemeStylesheet=Lp,pe.getUseWebchatClientStore=km,pe.handleIntegrationError=jo,pe.integrationMessagePayloadToBlockPayload=vm,pe.integrationMessageToBlockMessage=ia,pe.isFileType=Bp,pe.renderers=Hg,pe.useWebchat=w0,pe.useWebchatStore=oa,pe.webchatClasses=we,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})});