@botpress/webchat 2.6.2-beta.0 → 3.0.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.
- package/.turbo/turbo-build.log +8 -9
- package/check-bundle-size.js +68 -0
- package/dist/index.d.ts +123 -13360
- package/dist/index.js +21298 -32502
- package/dist/index.umd.cjs +224 -85
- package/dist/style.css +1 -1
- package/package.json +10 -14
- package/tailwind.config.js +0 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
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={};/**
|
|
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
|
|
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={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,47 +14,197 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+Qe
|
|
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`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+P+"`."}return""}}function
|
|
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=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
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:
|
|
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} />`,bg,ca,rfe,ca),Vn[ca+bg]=!0}}return P===r?Jt(qt):on(qt),qt}}function Di(P,le,be){return Hn(P,le,be,!0)}function efe(P,le,be){return Hn(P,le,be,!1)}var tfe=efe,nfe=Di;$o.Fragment=r,$o.jsx=tfe,$o.jsxs=nfe}()),$o}process.env.NODE_ENV==="production"?Wf.exports=RI():Wf.exports=AI();var O=Wf.exports;function PI(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),c=n.length;n=[...n,o];function l(f){const{scope:d,children:p,...m}=f,h=(d==null?void 0:d[e][c])||s,y=x.useMemo(()=>m,Object.values(m));return O.jsx(h.Provider,{value:y,children:p})}function u(f,d){const p=(d==null?void 0:d[e][c])||s,m=x.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,DI(i,...t)]}function DI(...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(a){const o=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ri(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ua=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function jI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function NI(...e){return t=>e.forEach(n=>jI(n,t))}var $g=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(FI);if(a){const o=a.props.children,s=i.map(c=>c===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return O.jsx(Vf,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return O.jsx(Vf,{...r,ref:t,children:n})});$g.displayName="Slot";var Vf=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=BI(n);return x.cloneElement(n,{...LI(r,n.props),ref:t?NI(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});Vf.displayName="SlotClone";var MI=({children:e})=>O.jsx(O.Fragment,{children:e});function FI(e){return x.isValidElement(e)&&e.type===MI}function LI(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function BI(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 UI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Hf=UI.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?$g:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Zf="Avatar",[zI,sfe]=PI(Zf),[qI,Ig]=zI(Zf),Kf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=x.useState("idle");return O.jsx(qI,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:O.jsx(Hf.span,{...r,ref:t})})});Kf.displayName=Zf;var Rg="AvatarImage",Gf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Ig(Rg,n),s=WI(r),c=ri(l=>{i(l),o.onImageLoadingStatusChange(l)});return ua(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?O.jsx(Hf.img,{...a,ref:t,src:r}):null});Gf.displayName=Rg;var Ag="AvatarFallback",Yf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Ig(Ag,n),[o,s]=x.useState(r===void 0);return x.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&a.imageLoadingStatus!=="loaded"?O.jsx(Hf.span,{...i,ref:t}):null});Yf.displayName=Ag;function WI(e){const[t,n]=x.useState("idle");return ua(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function Jf(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(c=>c+c).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function VI(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const HI=(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 Pg(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const ZI=2.4,KI=.2126729,GI=.7151522,YI=.072175,JI=.56,XI=.57,QI=.62,eR=.65,Rl=.022,Dg=1.414,tR=1.14,nR=1.14,rR=.035991,iR=.035991,aR=27.7847239587675,oR=27.7847239587675,jg=.027,Ng=.027,Mg=.001,sR=5e-4;function Fg(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**ZI;return KI*i(t)+GI*i(n)+YI*i(r)}function Lg(e,t){if(!e||!t)return 0;let n=Fg(Jf(e)),r=Fg(Jf(t)),i=0,a=0;return n=n>Rl?n:n+(Rl-n)**Dg,r=r>Rl?r:r+(Rl-r)**Dg,Math.abs(r-n)<sR?0:(r>n?(i=(r**JI-n**XI)*tR,a=i<Mg?0:i<rR?i-i*aR*jg:i-jg):(i=(r**eR-n**QI)*nR,a=i>-Mg?0:i>-iR?i-i*oR*Ng:i+Ng),Math.abs(a*100))}let Al=class{constructor(){_e(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(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const lR=new Al;function Bg(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Ug(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 zg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",c="hour",l="day",u="week",f="month",d="quarter",p="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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 A=["th","st","nd","rd"],L=I%100;return"["+I+(A[(L-20)%10]||A[L]||A[0])+"]"}},w=function(I,A,L){var Z=String(I);return!Z||Z.length>=A?I:""+Array(A+1-Z.length).join(L)+I},T={s:w,z:function(I){var A=-I.utcOffset(),L=Math.abs(A),Z=Math.floor(L/60),H=L%60;return(A<=0?"+":"-")+w(Z,2,"0")+":"+w(H,2,"0")},m:function I(A,L){if(A.date()<L.date())return-I(L,A);var Z=12*(L.year()-A.year())+(L.month()-A.month()),H=A.clone().add(Z,f),R=L-H<0,g=A.clone().add(Z+(R?-1:1),f);return+(-(Z+(L-H)/(R?H-g:g-H))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:p,w:u,d:l,D:m,h:c,m:s,s:o,ms:a,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},E="en",_={};_[E]=b;var $="$isDayjsObject",U=function(I){return I instanceof W||!(!I||!I[$])},z=function I(A,L,Z){var H;if(!A)return E;if(typeof A=="string"){var R=A.toLowerCase();_[R]&&(H=R),L&&(_[R]=L,H=R);var g=A.split("-");if(!H&&g.length>1)return I(g[0])}else{var N=A.name;_[N]=A,H=N}return!Z&&H&&(E=H),H||!Z&&E},k=function(I,A){if(U(I))return I.clone();var L=typeof A=="object"?A:{};return L.date=I,L.args=arguments,new W(L)},j=T;j.l=z,j.i=U,j.w=function(I,A){return k(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var W=function(){function I(L){this.$L=z(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[$]=!0}var A=I.prototype;return A.parse=function(L){this.$d=function(Z){var H=Z.date,R=Z.utc;if(H===null)return new Date(NaN);if(j.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var g=H.match(y);if(g){var N=g[2]-1||0,V=(g[7]||"0").substring(0,3);return R?new Date(Date.UTC(g[1],N,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)):new Date(g[1],N,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)}}return new Date(H)}(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return j},A.isValid=function(){return this.$d.toString()!==h},A.isSame=function(L,Z){var H=k(L);return this.startOf(Z)<=H&&H<=this.endOf(Z)},A.isAfter=function(L,Z){return k(L)<this.startOf(Z)},A.isBefore=function(L,Z){return this.endOf(Z)<k(L)},A.$g=function(L,Z,H){return j.u(L)?this[Z]:this.set(H,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,Z){var H=this,R=!!j.u(Z)||Z,g=j.p(L),N=function(oe,X){var ee=j.w(H.$u?Date.UTC(H.$y,X,oe):new Date(H.$y,X,oe),H);return R?ee:ee.endOf(l)},V=function(oe,X){return j.w(H.toDate()[oe].apply(H.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},S=this.$W,K=this.$M,J=this.$D,Y="set"+(this.$u?"UTC":"");switch(g){case p:return R?N(1,0):N(31,11);case f:return R?N(1,K):N(0,K+1);case u:var Q=this.$locale().weekStart||0,ae=(S<Q?S+7:S)-Q;return N(R?J-ae:J+(6-ae),K);case l:case m:return V(Y+"Hours",0);case c:return V(Y+"Minutes",1);case s:return V(Y+"Seconds",2);case o:return V(Y+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,Z){var H,R=j.p(L),g="set"+(this.$u?"UTC":""),N=(H={},H[l]=g+"Date",H[m]=g+"Date",H[f]=g+"Month",H[p]=g+"FullYear",H[c]=g+"Hours",H[s]=g+"Minutes",H[o]=g+"Seconds",H[a]=g+"Milliseconds",H)[R],V=R===l?this.$D+(Z-this.$W):Z;if(R===f||R===p){var S=this.clone().set(m,1);S.$d[N](V),S.init(),this.$d=S.set(m,Math.min(this.$D,S.daysInMonth())).$d}else N&&this.$d[N](V);return this.init(),this},A.set=function(L,Z){return this.clone().$set(L,Z)},A.get=function(L){return this[j.p(L)]()},A.add=function(L,Z){var H,R=this;L=Number(L);var g=j.p(Z),N=function(K){var J=k(R);return j.w(J.date(J.date()+Math.round(K*L)),R)};if(g===f)return this.set(f,this.$M+L);if(g===p)return this.set(p,this.$y+L);if(g===l)return N(1);if(g===u)return N(7);var V=(H={},H[s]=r,H[c]=i,H[o]=n,H)[g]||1,S=this.$d.getTime()+L*V;return j.w(S,this)},A.subtract=function(L,Z){return this.add(-1*L,Z)},A.format=function(L){var Z=this,H=this.$locale();if(!this.isValid())return H.invalidDate||h;var R=L||"YYYY-MM-DDTHH:mm:ssZ",g=j.z(this),N=this.$H,V=this.$m,S=this.$M,K=H.weekdays,J=H.months,Y=H.meridiem,Q=function(X,ee,G,pe){return X&&(X[ee]||X(Z,R))||G[ee].slice(0,pe)},ae=function(X){return j.s(N%12||12,X,"0")},oe=Y||function(X,ee,G){var pe=X<12?"AM":"PM";return G?pe.toLowerCase():pe};return R.replace(v,function(X,ee){return ee||function(G){switch(G){case"YY":return String(Z.$y).slice(-2);case"YYYY":return j.s(Z.$y,4,"0");case"M":return S+1;case"MM":return j.s(S+1,2,"0");case"MMM":return Q(H.monthsShort,S,J,3);case"MMMM":return Q(J,S);case"D":return Z.$D;case"DD":return j.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Q(H.weekdaysMin,Z.$W,K,2);case"ddd":return Q(H.weekdaysShort,Z.$W,K,3);case"dddd":return K[Z.$W];case"H":return String(N);case"HH":return j.s(N,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return oe(N,V,!0);case"A":return oe(N,V,!1);case"m":return String(V);case"mm":return j.s(V,2,"0");case"s":return String(Z.$s);case"ss":return j.s(Z.$s,2,"0");case"SSS":return j.s(Z.$ms,3,"0");case"Z":return g}return null}(X)||g.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(L,Z,H){var R,g=this,N=j.p(Z),V=k(L),S=(V.utcOffset()-this.utcOffset())*r,K=this-V,J=function(){return j.m(g,V)};switch(N){case p:R=J()/12;break;case f:R=J();break;case d:R=J()/3;break;case u:R=(K-S)/6048e5;break;case l:R=(K-S)/864e5;break;case c:R=K/i;break;case s:R=K/r;break;case o:R=K/n;break;default:R=K}return H?R:j.a(R)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return _[this.$L]},A.locale=function(L,Z){if(!L)return this.$L;var H=this.clone(),R=z(L,Z,!0);return R&&(H.$L=R),H},A.clone=function(){return j.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I}(),B=W.prototype;return k.prototype=B,[["$ms",a],["$s",o],["$m",s],["$H",c],["$W",l],["$M",f],["$y",p],["$D",m]].forEach(function(I){B[I[1]]=function(A){return this.$g(A,I[0],I[1])}}),k.extend=function(I,A){return I.$i||(I(A,W,k),I.$i=!0),k},k.locale=z,k.isDayjs=U,k.unix=function(I){return k(1e3*I)},k.en=_[E],k.Ls=_,k.p={},k})})(zg);var cR=zg.exports;const Pl=Ge(cR);var qg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(qg);var uR=qg.exports;const fR=Ge(uR);var Wg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Wg);var dR=Wg.exports;const pR=Ge(dR);let Dl;const hR=new Uint8Array(16);function mR(){if(!Dl&&(Dl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dl(hR)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function vR(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const Vg={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Hg(e,t,n){if(Vg.randomUUID&&!t&&!e)return Vg.randomUUID();e=e||{};const r=e.random||(e.rng||mR)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,vR(r)}Pl.extend(fR),Pl.extend(pR);function yR(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Zg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,c=(a=e[o+1])==null?void 0:a.timestamp;!Pl(s).isSame(c,t)&&c&&n.push(Zg(c))}return n}function Zg(e){return{id:Hg(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:gR(e)}}}function gR(e,t=!1){const n=Pl(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 bR(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 wR(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function xR(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function SR(e,t){return e.map(n=>Math.round(n*t))}const Io=e=>t=>xR(t,e),Ro=e=>t=>SR(t,e),ER={50:Io(.95),100:Io(.9),200:Io(.75),300:Io(.6),400:Io(.3),500:e=>e,600:Ro(.9),700:Ro(.6),800:Ro(.45),900:Ro(.3),950:Ro(.2)};function Kg(e,t=ER){const n={},r=bR(e);for(const[i,a]of Object.entries(t))n[i]=wR(a(r));return n}var st;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(st||(st={}));var Xf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xf||(Xf={}));const we=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ii=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},me=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_R=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Kn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Kn.create=e=>new Kn(e);const Ao=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}};let Gg=Ao;function kR(e){Gg=e}function jl(){return Gg}const Nl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},TR=[];function ke(e,t){const n=Nl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jl(),Ao].filter(r=>!!r)});e.common.issues.push(n)}let wn=class kI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return kI.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),Yg=e=>({status:"dirty",value:e}),mn=e=>({status:"valid",value:e}),Qf=e=>e.status==="aborted",ed=e=>e.status==="dirty",Po=e=>e.status==="valid",Ml=e=>typeof Promise<"u"&&e instanceof Promise;var Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));let hr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const Jg=(e,t)=>{if(Po(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let We=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ii(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new wn,ctx:{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ml(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Jg(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Ml(i)?i:Promise.resolve(i));return Jg(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:me.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Gn({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ur.create(this,this._def)}nullable(){return Fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return ha.create(this,this._def)}or(t){return Bo.create([this,t],this._def)}and(t){return Uo.create(this,t,this._def)}transform(t){return new Gn({...Be(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ho({...Be(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new nb({typeName:je.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ql({...Be(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rd.create(this,t)}readonly(){return Vl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const CR=/^c[^\s-]{8,}$/i,OR=/^[a-z][a-z0-9]*$/,$R=/^[0-9A-HJKMNP-TV-Z]{26}$/,IR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,RR=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let td;const PR=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,DR=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,jR=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function NR(e,t){return!!((t==="v4"||!t)&&PR.test(e)||(t==="v6"||!t)&&DR.test(e))}let fa=class Il extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.string,received:a.parsedType}),Le}const r=new wn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?ke(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&ke(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")RR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"email",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")td||(td=new RegExp(AR,"u")),td.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"emoji",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")IR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"uuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")CR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"cuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")OR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"cuid2",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$R.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"ulid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ke(i,{validation:"url",code:me.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"regex",code:me.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?jR(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?NR(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"ip",code:me.invalid_string,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:me.invalid_string,...Pe.errToObj(r)})}_addCheck(t){return new Il({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Pe.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Pe.errToObj(n)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new Il({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Il({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Il({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};fa.create=e=>{var t;return new fa({checks:[],typeName:je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function MR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let Do=class wg extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.number,received:a.parsedType}),Le}let r;const i=new wn;for(const a of this._def.checks)a.kind==="int"?st.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ke(r,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?MR(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_finite,message:a.message}),i.dirty()):st.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new wg({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new wg({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Do.create=e=>new Do({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let jo=class xg extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==we.bigint){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.bigint,received:a.parsedType}),Le}let r;const i=new wn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):st.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new xg({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new xg({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};jo.create=e=>{var t;return new jo({checks:[],typeName:je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let No=class extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.boolean,received:r.parsedType}),Le}return mn(t.data)}};No.create=e=>new No({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let Mo=class TI extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_date}),Le}const r=new wn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):st.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new TI({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Mo.create=e=>new Mo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodDate,...Be(e)});let Fl=class extends We{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.symbol,received:r.parsedType}),Le}return mn(t.data)}};Fl.create=e=>new Fl({typeName:je.ZodSymbol,...Be(e)});let Fo=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.undefined,received:r.parsedType}),Le}return mn(t.data)}};Fo.create=e=>new Fo({typeName:je.ZodUndefined,...Be(e)});let Lo=class extends We{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.null,received:r.parsedType}),Le}return mn(t.data)}};Lo.create=e=>new Lo({typeName:je.ZodNull,...Be(e)});let da=class extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return mn(t.data)}};da.create=e=>new da({typeName:je.ZodAny,...Be(e)});let Ni=class extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mn(t.data)}};Ni.create=e=>new Ni({typeName:je.ZodUnknown,...Be(e)});let Br=class extends We{_parse(t){const n=this._getOrReturnCtx(t);return ke(n,{code:me.invalid_type,expected:we.never,received:n.parsedType}),Le}};Br.create=e=>new Br({typeName:je.ZodNever,...Be(e)});let Ll=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.void,received:r.parsedType}),Le}return mn(t.data)}};Ll.create=e=>new Ll({typeName:je.ZodVoid,...Be(e)});let Mi=class zf extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return ke(n,{code:me.invalid_type,expected:we.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(ke(n,{code:o?me.too_big:me.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ke(n,{code:me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ke(n,{code:me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new hr(n,o,n.path,s)))).then(o=>wn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new hr(n,o,n.path,s)));return wn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new zf({...this._def,minLength:{value:t,message:Pe.toString(n)}})}max(t,n){return new zf({...this._def,maxLength:{value:t,message:Pe.toString(n)}})}length(t,n){return new zf({...this._def,exactLength:{value:t,message:Pe.toString(n)}})}nonempty(t){return this.min(1,t)}};Mi.create=(e,t)=>new Mi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...Be(t)});function pa(e){if(e instanceof Mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ur.create(pa(r))}return new Mn({...e._def,shape:()=>t})}else return e instanceof Mi?new Mi({...e._def,type:pa(e.element)}):e instanceof Ur?Ur.create(pa(e.unwrap())):e instanceof Fi?Fi.create(pa(e.unwrap())):e instanceof ai?ai.create(e.items.map(t=>pa(t))):e}let Mn=class pr extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return ke(l,{code:me.invalid_type,expected:we.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],f=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new hr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Br){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(ke(i,{code:me.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new hr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key;l.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>wn.mergeObjectSync(r,l)):wn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Pe.errToObj,new pr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Pe.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new pr({...this._def,unknownKeys:"strip"})}passthrough(){return new pr({...this._def,unknownKeys:"passthrough"})}extend(t){return new pr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new pr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new pr({...this._def,catchall:t})}pick(t){const n={};return st.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new pr({...this._def,shape:()=>n})}omit(t){const n={};return st.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new pr({...this._def,shape:()=>n})}deepPartial(){return pa(this)}partial(t){const n={};return st.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new pr({...this._def,shape:()=>n})}required(t){const n={};return st.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Ur;)a=a._def.innerType;n[r]=a}}),new pr({...this._def,shape:()=>n})}keyof(){return tb(st.objectKeys(this.shape))}};Mn.create=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:je.ZodObject,...Be(t)}),Mn.strictCreate=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:je.ZodObject,...Be(t)}),Mn.lazycreate=(e,t)=>new Mn({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:je.ZodObject,...Be(t)});let Bo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Kn(s.ctx.common.issues));return ke(n,{code:me.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Kn(c));return ke(n,{code:me.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};Bo.create=(e,t)=>new Bo({options:e,typeName:je.ZodUnion,...Be(t)});const Bl=e=>e instanceof zo?Bl(e.schema):e instanceof Gn?Bl(e.innerType()):e instanceof qo?[e.value]:e instanceof Wo?e.options:e instanceof Vo?Object.keys(e.enum):e instanceof Ho?Bl(e._def.innerType):e instanceof Fo?[void 0]:e instanceof Lo?[null]:null;let Xg=class CI extends We{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return ke(n,{code:me.invalid_type,expected:we.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ke(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Bl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new CI({typeName:je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function nd(e,t){const n=ii(e),r=ii(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=st.objectKeys(t),a=st.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=nd(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=nd(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Uo=class extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Qf(a)||Qf(o))return Le;const s=nd(a.value,o.value);return s.valid?((ed(a)||ed(o))&&n.dirty(),{status:n.value,value:s.data}):(ke(r,{code:me.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Uo.create=(e,t,n)=>new Uo({left:e,right:t,typeName:je.ZodIntersection,...Be(n)});let ai=class OI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return ke(r,{code:me.invalid_type,expected:we.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ke(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ke(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new hr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>wn.mergeArray(n,o)):wn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new OI({...this._def,rest:t})}};ai.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ai({items:e,typeName:je.ZodTuple,rest:null,...Be(t)})};let Qg=class Sg extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ke(r,{code:me.invalid_type,expected:we.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new hr(r,s,r.path,s)),value:o._parse(new hr(r,r.data[s],r.path,s))});return r.common.async?wn.mergeObjectAsync(n,i):wn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof We?new Sg({keyType:t,valueType:n,typeName:je.ZodRecord,...Be(r)}):new Sg({keyType:fa.create(),valueType:t,typeName:je.ZodRecord,...Be(n)})}},Ul=class extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return ke(r,{code:me.invalid_type,expected:we.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new hr(r,s,r.path,[l,"key"])),value:a._parse(new hr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Le;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Le;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}};Ul.create=(e,t,n)=>new Ul({valueType:t,keyType:e,typeName:je.ZodMap,...Be(n)});let zl=class Eg extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return ke(r,{code:me.invalid_type,expected:we.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ke(r,{code:me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ke(r,{code:me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new hr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Eg({...this._def,minSize:{value:t,message:Pe.toString(n)}})}max(t,n){return new Eg({...this._def,maxSize:{value:t,message:Pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};zl.create=(e,t)=>new zl({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...Be(t)});let eb=class qf extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return ke(n,{code:me.invalid_type,expected:we.function,received:n.parsedType}),Le;function r(s,c){return Nl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jl(),Ao].filter(l=>!!l),issueData:{code:me.invalid_arguments,argumentsError:c}})}function i(s,c){return Nl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jl(),Ao].filter(l=>!!l),issueData:{code:me.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ha){const s=this;return mn(async function(...c){const l=new Kn([]),u=await s._def.args.parseAsync(c,a).catch(p=>{throw l.addIssue(r(c,p)),l}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return mn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Kn([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new Kn([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new qf({...this._def,args:ai.create(t).rest(Ni.create())})}returns(t){return new qf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new qf({args:t||ai.create([]).rest(Ni.create()),returns:n||Ni.create(),typeName:je.ZodFunction,...Be(r)})}},zo=class extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};zo.create=(e,t)=>new zo({getter:e,typeName:je.ZodLazy,...Be(t)});let qo=class extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ke(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};qo.create=(e,t)=>new qo({value:e,typeName:je.ZodLiteral,...Be(t)});function tb(e,t){return new Wo({values:e,typeName:je.ZodEnum,...Be(t)})}let Wo=class _g extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ke(n,{expected:st.joinValues(r),received:n.parsedType,code:me.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ke(n,{received:n.data,code:me.invalid_enum_value,options:r}),Le}return mn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return _g.create(t)}exclude(t){return _g.create(this.options.filter(n=>!t.includes(n)))}};Wo.create=tb;let Vo=class extends We{_parse(t){const n=st.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=st.objectValues(n);return ke(r,{expected:st.joinValues(i),received:r.parsedType,code:me.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=st.objectValues(n);return ke(r,{received:r.data,code:me.invalid_enum_value,options:i}),Le}return mn(t.data)}get enum(){return this._def.values}};Vo.create=(e,t)=>new Vo({values:e,typeName:je.ZodNativeEnum,...Be(t)});let ha=class extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return ke(n,{code:me.invalid_type,expected:we.promise,received:n.parsedType}),Le;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return mn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ha.create=(e,t)=>new ha({type:e,typeName:je.ZodPromise,...Be(t)});let Gn=class extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ke(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Po(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Po(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);st.assertNever(i)}};Gn.create=(e,t,n)=>new Gn({schema:e,typeName:je.ZodEffects,effect:t,...Be(n)}),Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...Be(n)});let Ur=class extends We{_parse(t){return this._getType(t)===we.undefined?mn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ur.create=(e,t)=>new Ur({innerType:e,typeName:je.ZodOptional,...Be(t)});let Fi=class extends We{_parse(t){return this._getType(t)===we.null?mn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fi.create=(e,t)=>new Fi({innerType:e,typeName:je.ZodNullable,...Be(t)});let Ho=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Ho.create=(e,t)=>new Ho({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let ql=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ml(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};ql.create=(e,t)=>new ql({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let Wl=class extends We{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};Wl.create=e=>new Wl({typeName:je.ZodNaN,...Be(e)});const FR=Symbol("zod_brand");let nb=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},rd=class $I extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),Yg(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new $I({in:t,out:n,typeName:je.ZodPipeline})}},Vl=class extends We{_parse(t){const n=this._def.innerType._parse(t);return Po(n)&&(n.value=Object.freeze(n.value)),n}};Vl.create=(e,t)=>new Vl({innerType:e,typeName:je.ZodReadonly,...Be(t)});const rb=(e,t={},n)=>e?da.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):da.create(),LR={object:Mn.lazycreate};var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const BR=(e,t={message:`Input not instance of ${e.name}`})=>rb(n=>n instanceof e,t),ib=fa.create,ab=Do.create,UR=Wl.create,zR=jo.create,ob=No.create,qR=Mo.create,WR=Fl.create,VR=Fo.create,HR=Lo.create,ZR=da.create,KR=Ni.create,GR=Br.create,YR=Ll.create,JR=Mi.create,XR=Mn.create,QR=Mn.strictCreate,eA=Bo.create,tA=Xg.create,nA=Uo.create,rA=ai.create,iA=Qg.create,aA=Ul.create,oA=zl.create,sA=eb.create,lA=zo.create,cA=qo.create,uA=Wo.create,fA=Vo.create,dA=ha.create,sb=Gn.create,pA=Ur.create,hA=Fi.create,mA=Gn.createWithPreprocess,vA=rd.create;var Te=Object.freeze({__proto__:null,defaultErrorMap:Ao,setErrorMap:kR,getErrorMap:jl,makeIssue:Nl,EMPTY_PATH:TR,addIssueToContext:ke,ParseStatus:wn,INVALID:Le,DIRTY:Yg,OK:mn,isAborted:Qf,isDirty:ed,isValid:Po,isAsync:Ml,get util(){return st},get objectUtil(){return Xf},ZodParsedType:we,getParsedType:ii,ZodType:We,ZodString:fa,ZodNumber:Do,ZodBigInt:jo,ZodBoolean:No,ZodDate:Mo,ZodSymbol:Fl,ZodUndefined:Fo,ZodNull:Lo,ZodAny:da,ZodUnknown:Ni,ZodNever:Br,ZodVoid:Ll,ZodArray:Mi,ZodObject:Mn,ZodUnion:Bo,ZodDiscriminatedUnion:Xg,ZodIntersection:Uo,ZodTuple:ai,ZodRecord:Qg,ZodMap:Ul,ZodSet:zl,ZodFunction:eb,ZodLazy:zo,ZodLiteral:qo,ZodEnum:Wo,ZodNativeEnum:Vo,ZodPromise:ha,ZodEffects:Gn,ZodTransformer:Gn,ZodOptional:Ur,ZodNullable:Fi,ZodDefault:Ho,ZodCatch:ql,ZodNaN:Wl,BRAND:FR,ZodBranded:nb,ZodPipeline:rd,ZodReadonly:Vl,custom:rb,Schema:We,ZodSchema:We,late:LR,get ZodFirstPartyTypeKind(){return je},coerce:{string:e=>fa.create({...e,coerce:!0}),number:e=>Do.create({...e,coerce:!0}),boolean:e=>No.create({...e,coerce:!0}),bigint:e=>jo.create({...e,coerce:!0}),date:e=>Mo.create({...e,coerce:!0})},any:ZR,array:JR,bigint:zR,boolean:ob,date:qR,discriminatedUnion:tA,effect:sb,enum:uA,function:sA,instanceof:BR,intersection:nA,lazy:lA,literal:cA,map:aA,nan:UR,nativeEnum:fA,never:GR,null:HR,nullable:hA,number:ab,object:XR,oboolean:()=>ob().optional(),onumber:()=>ab().optional(),optional:pA,ostring:()=>ib().optional(),pipeline:vA,preprocess:mA,promise:dA,record:iA,set:oA,strictObject:QR,string:ib,symbol:WR,transformer:sb,tuple:rA,undefined:VR,union:eA,unknown:KR,void:YR,NEVER:Le,ZodIssueCode:me,quotelessJson:_R,ZodError:Kn});const ma=Te.object({title:Te.string().optional(),link:Te.string().optional()}),id=Te.object({color:Te.string().optional(),variant:Te.enum(["soft","solid"]).optional(),themeMode:Te.enum(["light","dark"]).optional(),fontFamily:Te.enum(["rubik","inter","ibm","fira"]).optional(),radius:Te.number().min(.5).max(4).optional()}),lb=Te.object({composerPlaceholder:Te.string().optional(),botName:Te.string().optional(),botAvatar:Te.string().optional(),botDescription:Te.string().optional(),website:ma.optional(),email:ma.optional(),phone:ma.optional(),privacyPolicy:ma.optional(),termsOfService:ma.optional(),showPoweredBy:Te.boolean().optional(),storageLocation:Te.enum(["localStorage","sessionStorage"]).optional()}).merge(id),cb=Te.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),ub=Te.object({}).passthrough().transform(e=>e),ve=Te.object({className:Te.string().optional(),style:ub.optional()}),Hl=Te.object({container:ve.optional(),image:ve.optional(),fallback:ve.optional()}),fb=Te.object({button:ve.optional(),text:Te.record(cb,ve.optional()),image:Te.object({image:ve.optional(),placeholder:ve.optional()}).optional(),audio:ve.optional(),video:ve.optional(),file:Te.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),location:Te.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),column:ve.optional(),row:ve.optional(),bubble:ve.optional(),carousel:Te.object({container:ve.optional(),slidesContainer:ve.optional(),backButton:ve.optional(),nextButton:ve.optional()}).optional(),dropdown:Te.object({button:Te.object({container:ve.optional(),icon:ve.optional(),text:ve.optional()}).optional(),content:Te.object({container:ve.optional(),item:ve.optional()}).optional()}).optional()}),db=Te.object({container:ve.optional(),modal:Te.object({overlay:ve.optional(),container:ve.optional(),dialog:Te.object({container:ve.optional(),title:Te.object({container:ve.optional(),text:ve.optional(),closeIcon:ve.optional()}).optional(),content:ve.optional(),newConversation:Te.object({text:ve.optional(),button:ve.optional()}).optional()}).optional()}).optional(),notification:Te.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),icon:ve.optional(),closeIcon:ve.optional()}).optional(),header:Te.object({container:ve.optional(),content:Te.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Hl.optional(),actions:Te.object({container:ve.optional(),icons:ve.optional()}).optional()}),expandedContent:Te.object({container:ve.optional(),group:ve.optional(),descriptionItems:Te.object({container:ve.optional(),icon:ve.optional(),text:ve.optional(),link:ve.optional(),poweredBy:ve.optional()}).optional()}).optional(),description:Te.object({container:ve.optional(),title:ve.optional(),subtitle:ve.optional()}).optional(),newConversationIcon:ve.optional()}).optional(),composer:Te.object({container:ve.optional(),input:ve.optional(),uploadButton:Te.object({container:ve.optional(),icon:ve.optional()}).optional(),button:Te.object({container:ve.optional(),icon:ve.optional()}).optional()}).optional(),fab:Te.object({icon:ve.optional(),container:ve.optional()}).optional(),messageList:Te.object({scrollbar:Te.object({container:ve.optional(),viewport:ve.optional(),thumb:ve.optional(),corner:ve.optional(),background:ve.optional()}).optional(),container:ve.optional(),marquee:Te.object({content:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Hl.optional(),container:ve.optional()}).optional(),scrollDownButton:Te.object({container:ve.optional(),button:ve.optional(),icon:ve.optional()}).optional()}).optional(),message:Te.object({container:ve.optional(),avatar:Hl.optional(),blocks:fb.optional()}).optional(),loadingIndicator:Te.object({container:ve.optional(),loader:ve.optional()}).optional()}),pb=Te.enum(["opened","closed","initial"]),hb=Te.object({name:Te.string().optional(),pictureUrl:Te.string().optional(),data:Te.record(Te.unknown()).optional(),userKey:Te.string().optional()}),mb=Te.object({configuration:lb.optional().catch(void 0),theme:db.optional().catch(void 0),style:Te.string().optional().catch(void 0),user:hb.optional().catch(void 0)}),yA=mb.extend({clientId:Te.string(),botId:Te.string(),selector:Te.string().optional().catch(void 0),webchatScriptUrl:Te.string().optional().catch(void 0),fabScriptUrl:Te.string().optional().catch(void 0),pushpinUrl:Te.string().optional().catch(void 0),defaultState:pb.optional().catch(void 0)});function vb(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=id.parse(e);let o={},s={};if(a){const u=Kg(a),f=r==="dark"?Pg(u):u,d=Kg(VI(HI(Jf(a)))),p=r==="dark"?Pg(d):d,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,b])=>({...y,[`--bpPrimary-${v}`]:b}),{});const h=Object.entries({...p,1:m}).reduce((y,[v,b])=>({...y,[`--bpGray-${v}`]:b}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const c=s?Lg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=i==="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)","--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-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--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":s?Lg(s["--bpPrimary-500"],s["--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)"};return o={...o,...l},Bg(":root",o)+(t?Bg(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const gA=(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 a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Zl=D.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Ug(e??"",15);return O.jsxs(Kf,{ref:o,"data-color":s,...n,...a,children:[O.jsx(Gf,{src:t,...r}),O.jsx(Yf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});Zl.displayName="Avatar";function hfe(){}function mfe(){}function bA(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SA={};function yb(e,t){return(SA.jsx?xA:wA).test(e)}const EA=/[ \t\n\f\r]/g;function _A(e){return typeof e=="object"?e.type==="text"?gb(e.value):!1:gb(e)}function gb(e){return e.replace(EA,"")===""}class Zo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zo.prototype.property={},Zo.prototype.normal={},Zo.prototype.space=null;function bb(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 Zo(n,r,t)}function ad(e){return e.toLowerCase()}class Fn{constructor(t,n){this.property=t,this.attribute=n}}Fn.prototype.space=null,Fn.prototype.boolean=!1,Fn.prototype.booleanish=!1,Fn.prototype.overloadedBoolean=!1,Fn.prototype.number=!1,Fn.prototype.commaSeparated=!1,Fn.prototype.spaceSeparated=!1,Fn.prototype.commaOrSpaceSeparated=!1,Fn.prototype.mustUseProperty=!1,Fn.prototype.defined=!1;let kA=0;const Ue=Li(),Lt=Li(),wb=Li(),de=Li(),xt=Li(),va=Li(),$n=Li();function Li(){return 2**++kA}const od=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Lt,commaOrSpaceSeparated:$n,commaSeparated:va,number:de,overloadedBoolean:wb,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),sd=Object.keys(od);class ld extends Fn{constructor(t,n,r,i){let a=-1;if(super(t,n),xb(this,"space",i),typeof r=="number")for(;++a<sd.length;){const o=sd[a];xb(this,sd[a],(r&od[o])===od[o])}}}ld.prototype.defined=!0;function xb(e,t,n){n&&(e[t]=n)}const TA={}.hasOwnProperty;function ya(e){const t={},n={};let r;for(r in e.properties)if(TA.call(e.properties,r)){const i=e.properties[r],a=new ld(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ad(r)]=r,n[ad(a.attribute)]=r}return new Zo(t,n,e.space)}const Sb=ya({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}}),Eb=ya({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _b(e,t){return t in e?e[t]:t}function kb(e,t){return _b(e,t.toLowerCase())}const Tb=ya({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:kb,properties:{xmlns:null,xmlnsXLink:null}}),Cb=ya({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:xt,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:de,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:xt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Lt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null}}),CA=ya({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:kb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:va,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:xt,autoFocus:Ue,autoPlay:Ue,blocking:xt,capture:null,charSet:null,checked:Ue,cite:null,className:xt,cols:de,colSpan:null,content:null,contentEditable:Lt,controls:Ue,controlsList:xt,coords:de|va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:wb,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:xt,height:de,hidden:Ue,high:de,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ue,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:de,pattern:null,ping:xt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:xt,required:Ue,reversed:Ue,rows:de,rowSpan:de,sandbox:xt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Lt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:de,security:null,unselectable:null}}),OA=ya({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:_b,properties:{about:$n,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:xt,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:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,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:va,g2:va,glyphName:va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,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:de,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:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,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:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),$A=/^data[-\w.:]+$/i,Ob=/-[a-z]/g,IA=/[A-Z]/g;function RA(e,t){const n=ad(t);let r=t,i=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$A.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ob,PA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ob.test(a)){let o=a.replace(IA,AA);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ld}return new i(r,t)}function AA(e){return"-"+e.toLowerCase()}function PA(e){return e.charAt(1).toUpperCase()}const DA={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"},jA=bb([Eb,Sb,Tb,Cb,CA],"html"),cd=bb([Eb,Sb,Tb,Cb,OA],"svg");function NA(e){return e.join(" ").trim()}var $b={},Ib=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,MA=/\n/g,FA=/^\s*/,LA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,BA=/^:\s*/,UA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,zA=/^[;\s]*/,qA=/^\s+|\s+$/g,WA=`
|
|
31
|
-
`,Rb="/",Ab="*",Bi="",VA="comment",HA="declaration",ZA=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(m){var h=m.match(MA);h&&(n+=h.length);var y=m.lastIndexOf(WA);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function c(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){c(FA)}function u(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!(Rb!=e.charAt(0)||Ab!=e.charAt(1))){for(var h=2;Bi!=e.charAt(h)&&(Ab!=e.charAt(h)||Rb!=e.charAt(h+1));)++h;if(h+=2,Bi===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:VA,comment:y})}}function d(){var m=a(),h=c(LA);if(h){if(f(),!c(BA))return s("property missing ':'");var y=c(UA),v=m({type:HA,property:Pb(h[0].replace(Ib,Bi)),value:y?Pb(y[0].replace(Ib,Bi)):Bi});return c(zA),v}}function p(){var m=[];u(m);for(var h;h=d();)h!==!1&&(m.push(h),u(m));return m}return l(),p()};function Pb(e){return e?e.replace(qA,Bi):Bi}var KA=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($b,"__esModule",{value:!0});var Db=$b.default=YA,GA=KA(ZA);function YA(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,GA.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const JA=Db.default||Db,jb=Nb("end"),ud=Nb("start");function Nb(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 XA(e){const t=ud(e),n=jb(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mb(e.position):"start"in e||"end"in e?Mb(e):"line"in e||"column"in e?fd(e):""}function fd(e){return Fb(e&&e.line)+":"+Fb(e&&e.column)}function Mb(e){return fd(e&&e.start)+"-"+fd(e&&e.end)}function Fb(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Ko(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}sn.prototype.file="",sn.prototype.name="",sn.prototype.reason="",sn.prototype.message="",sn.prototype.stack="",sn.prototype.column=void 0,sn.prototype.line=void 0,sn.prototype.ancestors=void 0,sn.prototype.cause=void 0,sn.prototype.fatal=void 0,sn.prototype.place=void 0,sn.prototype.ruleId=void 0,sn.prototype.source=void 0;const dd={}.hasOwnProperty,QA=new Map,eP=/[A-Z]/g,tP=/-([a-z])/g,nP=new Set(["table","tbody","thead","tfoot","tr"]),rP=new Set(["td","th"]),Lb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iP(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=dP(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=fP(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"?cd:jA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Bb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Bb(e,t,n){if(t.type==="element")return aP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lP(e,t,n);if(t.type==="mdxjsEsm")return sP(e,t);if(t.type==="root")return cP(e,t,n);if(t.type==="text")return uP(e,t)}function aP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=cd,e.schema=i),e.ancestors.push(t);const a=zb(e,t.tagName,!1),o=pP(e,t);let s=hd(e,t);return nP.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!_A(c):!0})),Ub(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function oP(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)}Go(e,t.position)}function sP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Go(e,t.position)}function lP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=cd,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:zb(e,t.name,!0),o=hP(e,t),s=hd(e,t);return Ub(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cP(e,t,n){const r={};return pd(r,hd(e,t)),e.create(t,e.Fragment,r,n)}function uP(e,t){return t.value}function Ub(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fP(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function dP(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),c=ud(r);return t(i,a,o,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function pP(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dd.call(t.properties,i)){const a=mP(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&rP.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function hP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Go(e,t.position);else{const i=r.name;let a;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,a=e.evaluater.evaluateExpression(s.expression)}else Go(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function hd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:QA;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const l=i.get(c)||0;o=c+"-"+l,i.set(c,l+1)}}const s=Bb(e,a,o);s!==void 0&&n.push(s)}return n}function mP(e,t,n){const r=RA(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bA(n):NA(n)),r.property==="style"){let i=typeof n=="object"?n:vP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=yP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?DA[r.property]||r.property:r.attribute,n]}}function vP(e,t){const n={};try{JA(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lb+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(tP,bP)),n[o]=a}}function zb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=yb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=yb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Go(e)}function Go(e,t){const n=new sn("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=Lb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yP(e){const t={};let n;for(n in e)dd.call(e,n)&&(t[gP(n)]=e[n]);return t}function gP(e){let t=e.replace(eP,wP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bP(e,t){return t.toUpperCase()}function wP(e){return"-"+e.toLowerCase()}const md={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"]},xP={};function vd(e,t){const n=xP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return qb(e,r,i)}function qb(e,t,n){if(SP(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 Wb(e.children,t,n)}return Array.isArray(e)?Wb(e,t,n):""}function Wb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=qb(e[i],t,n);return r.join("")}function SP(e){return!!(e&&typeof e=="object")}const Vb=document.createElement("i");function yd(e){const t="&"+e+";";Vb.innerHTML=t;const n=Vb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ln(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Bn(e,t){return e.length>0?(Ln(e,e.length,0,t),e):t}const Hb={}.hasOwnProperty;function Zb(e){const t={};let n=-1;for(;++n<e.length;)EP(t,e[n]);return t}function EP(e,t){let n;for(n in t){const i=(Hb.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Hb.call(i,o)||(i[o]=[]);const s=a[o];_P(i[o],Array.isArray(s)?s:s?[s]:[])}}}function _P(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ln(e,0,0,r)}function Kb(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 Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vn=oi(/[A-Za-z]/),ln=oi(/[\dA-Za-z]/),kP=oi(/[#-'*+\--9=?A-Z^-~]/);function Kl(e){return e!==null&&(e<32||e===127)}const gd=oi(/\d/),TP=oi(/[\dA-Fa-f]/),CP=oi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Gl=oi(new RegExp("\\p{P}|\\p{S}","u")),Ui=oi(/\s/);function oi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ga(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Ye(c)?(e.enter(n),s(c)):t(c)}function s(c){return Ye(c)&&a++<i?(e.consume(c),s):(e.exit(n),t(c))}}const OP={tokenize:$P};function $P(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"),tt(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return De(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const IP={tokenize:RP},Gb={tokenize:AP};function RP(e){const t=this,n=[];let r=0,i,a,o;return s;function s(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,l)(w)}return l(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const T=t.events.length;let E=T,_;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){_=t.events[E][1].end;break}v(r);let $=T;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},_),$++;return Ln(t.events,E+1,0,t.events.slice(T)),t.events.length=$,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return d(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Gb,u,f)(w)}function u(w){return i&&b(),v(r),d(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(w)}function d(w){return t.containerState={},e.attempt(Gb,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),d(w)}function m(w){if(w===null){i&&b(),v(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(w)}function h(w){if(w===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return De(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function y(w,T){const E=t.sliceStream(w);if(T&&E.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const $=t.events.length;let U=$,z,k;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(z){k=t.events[U][1].end;break}z=!0}for(v(r),_=$;_<t.events.length;)t.events[_][1].end=Object.assign({},k),_++;Ln(t.events,U+1,0,t.events.slice($)),t.events.length=_}}function v(w){let T=n.length;for(;T-- >w;){const E=n[T];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function AP(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yl(e){if(e===null||gt(e)||Ui(e))return 1;if(Gl(e))return 2}function Jl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const bd={name:"attention",tokenize:DP,resolveAll:PP};function PP(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=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),d=Object.assign({},e[n][1].start);Yb(f,-c),Yb(d,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Bn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Bn(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Bn(l,Jl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Bn(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Bn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Ln(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yl(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===a)return e.consume(c),s;const l=e.exit("attentionSequence"),u=Yl(c),f=!u||u===2&&i||n.includes(c),d=!i||i===2&&u||n.includes(r);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(u||!f)),t(c)}}function Yb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jP={name:"autolink",tokenize:NP};function NP(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return vn(p)?(e.consume(p),o):p===64?n(p):l(p)}function o(p){return p===43||p===45||p===46||ln(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ln(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Kl(p)?n(p):(e.consume(p),c)}function l(p){return p===64?(e.consume(p),u):kP(p)?(e.consume(p),l):n(p)}function u(p){return ln(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||ln(p))&&r++<63){const m=p===45?d:f;return e.consume(p),m}return n(p)}}const Yo={tokenize:MP,partial:!0};function MP(e,t,n){return r;function r(a){return Ye(a)?tt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const Jb={name:"blockQuote",tokenize:FP,continuation:{tokenize:LP},exit:BP};function FP(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ye(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function LP(e,t,n){const r=this;return i;function i(o){return Ye(o)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Jb,t,n)(o)}}function BP(e){e.exit("blockQuote")}const Xb={name:"characterEscape",tokenize:UP};function UP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return CP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Qb={name:"characterReference",tokenize:zP};function zP(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ln,u(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=TP,u):(e.enter("characterReferenceValue"),a=7,o=gd,u(f))}function u(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===ln&&!yd(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),u):n(f)}}const ew={tokenize:WP,partial:!0},tw={name:"codeFenced",tokenize:qP,concrete:!0};function qP(e,t,n){const r=this,i={tokenize:E,partial:!0};let a=0,o=0,s;return c;function c(_){return l(_)}function l(_){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(_)}function u(_){return _===s?(o++,e.consume(_),u):o<3?n(_):(e.exit("codeFencedFenceSequence"),Ye(_)?tt(e,f,"whitespace")(_):f(_))}function f(_){return _===null||De(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(ew,h,T)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ye(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,p,"whitespace")(_)):_===96&&_===s?n(_):(e.consume(_),d)}function p(_){return _===null||De(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?n(_):(e.consume(_),m)}function h(_){return e.attempt(i,T,y)(_)}function y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ye(_)?tt(e,b,"linePrefix",a+1)(_):b(_)}function b(_){return _===null||De(_)?e.check(ew,h,T)(_):(e.enter("codeFlowValue"),w(_))}function w(_){return _===null||De(_)?(e.exit("codeFlowValue"),b(_)):(e.consume(_),w)}function T(_){return e.exit("codeFenced"),t(_)}function E(_,$,U){let z=0;return k;function k(A){return _.enter("lineEnding"),_.consume(A),_.exit("lineEnding"),j}function j(A){return _.enter("codeFencedFence"),Ye(A)?tt(_,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):W(A)}function W(A){return A===s?(_.enter("codeFencedFenceSequence"),B(A)):U(A)}function B(A){return A===s?(z++,_.consume(A),B):z>=o?(_.exit("codeFencedFenceSequence"),Ye(A)?tt(_,I,"whitespace")(A):I(A)):U(A)}function I(A){return A===null||De(A)?(_.exit("codeFencedFence"),$(A)):U(A)}}}function WP(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const wd={name:"codeIndented",tokenize:HP},VP={tokenize:ZP,partial:!0};function HP(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?c(l):De(l)?e.attempt(VP,o,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||De(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function ZP(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):tt(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):De(o)?i(o):n(o)}}const KP={name:"codeText",tokenize:JP,resolve:GP,previous:YP};function GP(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 YP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function JP(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(a=e.enter("codeTextSequence"),i=0,u(f)):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||De(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class XP{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Jo(this.left,r),a.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),Jo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jo(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);Jo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jo(this.left,n.reverse())}}}function Jo(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 nw(e){const t={};let n=-1,r,i,a,o,s,c,l;const u=new XP(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,QP(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},u.get(i)[1].start),s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ln(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function QP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,c=[],l={};let u,f,d=-1,p=n,m=0,h=0;const y=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(h=d+1,y.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),b=a.pop();c.push([b,b+v.length-1]),e.splice(b,2,v)}for(c.reverse(),d=-1;++d<c.length;)l[m+c[d][0]]=m+c[d][1],m+=c[d][1]-c[d][0]-1;return l}const eD={tokenize:rD,resolve:nD},tD={tokenize:iD,partial:!0};function nD(e){return nw(e),e}function rD(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?a(s):De(s)?e.check(tD,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function iD(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(o){if(o===null||De(o))return n(o);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(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function rw(e,t,n,r,i,a,o,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||Kl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||De(v)?n(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function h(v){return!u&&(v===null||v===41||gt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):u<l&&v===40?(e.consume(v),u++,h):v===41?(e.consume(v),u--,h):v===null||v===32||v===40||Kl(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function iw(e,t,n,r,i,a){const o=this;let s=0,c;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),u}function u(p){return s>999||p===null||p===91||p===93&&!c||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||De(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),c||(c=!Ye(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function aw(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,c):n(d)}function c(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),c(o)):d===null?n(d):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),tt(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===o||d===null||De(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:u)}function f(d){return d===o||d===92?(e.consume(d),u):u(d)}}function Xo(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?tt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const aD={name:"definition",tokenize:sD},oD={tokenize:lD,partial:!0};function sD(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return iw.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return gt(p)?Xo(e,l)(p):l(p)}function l(p){return rw(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(oD,f,f)(p)}function f(p){return Ye(p)?tt(e,d,"whitespace")(p):d(p)}function d(p){return p===null||De(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function lD(e,t,n){return r;function r(s){return gt(s)?Xo(e,i)(s):n(s)}function i(s){return aw(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ye(s)?tt(e,o,"whitespace")(s):o(s)}function o(s){return s===null||De(s)?t(s):n(s)}}const cD={name:"hardBreakEscape",tokenize:uD};function uD(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const fD={name:"headingAtx",tokenize:pD,resolve:dD};function dD(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ln(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function pD(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||gt(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||De(u)?(e.exit("atxHeading"),t(u)):Ye(u)?tt(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||gt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const hD=["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"],ow=["pre","script","style","textarea"],mD={name:"htmlFlow",tokenize:bD,resolveTo:gD,concrete:!0},vD={tokenize:xD,partial:!0},yD={tokenize:wD,partial:!0};function gD(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 bD(e,t,n){const r=this;let i,a,o,s,c;return l;function l(S){return u(S)}function u(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),a=!0,h):S===63?(e.consume(S),i=3,r.interrupt?t:g):vn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function d(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,s=0,m):vn(S)?(e.consume(S),i=4,r.interrupt?t:g):n(S)}function p(S){return S===45?(e.consume(S),r.interrupt?t:g):n(S)}function m(S){const K="CDATA[";return S===K.charCodeAt(s++)?(e.consume(S),s===K.length?r.interrupt?t:W:m):n(S)}function h(S){return vn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function y(S){if(S===null||S===47||S===62||gt(S)){const K=S===47,J=o.toLowerCase();return!K&&!a&&ow.includes(J)?(i=1,r.interrupt?t(S):W(S)):hD.includes(o.toLowerCase())?(i=6,K?(e.consume(S),v):r.interrupt?t(S):W(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):a?b(S):w(S))}return S===45||ln(S)?(e.consume(S),o+=String.fromCharCode(S),y):n(S)}function v(S){return S===62?(e.consume(S),r.interrupt?t:W):n(S)}function b(S){return Ye(S)?(e.consume(S),b):k(S)}function w(S){return S===47?(e.consume(S),k):S===58||S===95||vn(S)?(e.consume(S),T):Ye(S)?(e.consume(S),w):k(S)}function T(S){return S===45||S===46||S===58||S===95||ln(S)?(e.consume(S),T):E(S)}function E(S){return S===61?(e.consume(S),_):Ye(S)?(e.consume(S),E):w(S)}function _(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),c=S,$):Ye(S)?(e.consume(S),_):U(S)}function $(S){return S===c?(e.consume(S),c=null,z):S===null||De(S)?n(S):(e.consume(S),$)}function U(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||gt(S)?E(S):(e.consume(S),U)}function z(S){return S===47||S===62||Ye(S)?w(S):n(S)}function k(S){return S===62?(e.consume(S),j):n(S)}function j(S){return S===null||De(S)?W(S):Ye(S)?(e.consume(S),j):n(S)}function W(S){return S===45&&i===2?(e.consume(S),L):S===60&&i===1?(e.consume(S),Z):S===62&&i===4?(e.consume(S),N):S===63&&i===3?(e.consume(S),g):S===93&&i===5?(e.consume(S),R):De(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vD,V,B)(S)):S===null||De(S)?(e.exit("htmlFlowData"),B(S)):(e.consume(S),W)}function B(S){return e.check(yD,I,V)(S)}function I(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),A}function A(S){return S===null||De(S)?B(S):(e.enter("htmlFlowData"),W(S))}function L(S){return S===45?(e.consume(S),g):W(S)}function Z(S){return S===47?(e.consume(S),o="",H):W(S)}function H(S){if(S===62){const K=o.toLowerCase();return ow.includes(K)?(e.consume(S),N):W(S)}return vn(S)&&o.length<8?(e.consume(S),o+=String.fromCharCode(S),H):W(S)}function R(S){return S===93?(e.consume(S),g):W(S)}function g(S){return S===62?(e.consume(S),N):S===45&&i===2?(e.consume(S),g):W(S)}function N(S){return S===null||De(S)?(e.exit("htmlFlowData"),V(S)):(e.consume(S),N)}function V(S){return e.exit("htmlFlow"),t(S)}}function wD(e,t,n){const r=this;return i;function i(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function xD(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Yo,t,n)}}const SD={name:"htmlText",tokenize:ED};function ED(e,t,n){const r=this;let i,a,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),l):g===47?(e.consume(g),E):g===63?(e.consume(g),w):vn(g)?(e.consume(g),U):n(g)}function l(g){return g===45?(e.consume(g),u):g===91?(e.consume(g),a=0,m):vn(g)?(e.consume(g),b):n(g)}function u(g){return g===45?(e.consume(g),p):n(g)}function f(g){return g===null?n(g):g===45?(e.consume(g),d):De(g)?(o=f,Z(g)):(e.consume(g),f)}function d(g){return g===45?(e.consume(g),p):f(g)}function p(g){return g===62?L(g):g===45?d(g):f(g)}function m(g){const N="CDATA[";return g===N.charCodeAt(a++)?(e.consume(g),a===N.length?h:m):n(g)}function h(g){return g===null?n(g):g===93?(e.consume(g),y):De(g)?(o=h,Z(g)):(e.consume(g),h)}function y(g){return g===93?(e.consume(g),v):h(g)}function v(g){return g===62?L(g):g===93?(e.consume(g),v):h(g)}function b(g){return g===null||g===62?L(g):De(g)?(o=b,Z(g)):(e.consume(g),b)}function w(g){return g===null?n(g):g===63?(e.consume(g),T):De(g)?(o=w,Z(g)):(e.consume(g),w)}function T(g){return g===62?L(g):w(g)}function E(g){return vn(g)?(e.consume(g),_):n(g)}function _(g){return g===45||ln(g)?(e.consume(g),_):$(g)}function $(g){return De(g)?(o=$,Z(g)):Ye(g)?(e.consume(g),$):L(g)}function U(g){return g===45||ln(g)?(e.consume(g),U):g===47||g===62||gt(g)?z(g):n(g)}function z(g){return g===47?(e.consume(g),L):g===58||g===95||vn(g)?(e.consume(g),k):De(g)?(o=z,Z(g)):Ye(g)?(e.consume(g),z):L(g)}function k(g){return g===45||g===46||g===58||g===95||ln(g)?(e.consume(g),k):j(g)}function j(g){return g===61?(e.consume(g),W):De(g)?(o=j,Z(g)):Ye(g)?(e.consume(g),j):z(g)}function W(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,B):De(g)?(o=W,Z(g)):Ye(g)?(e.consume(g),W):(e.consume(g),I)}function B(g){return g===i?(e.consume(g),i=void 0,A):g===null?n(g):De(g)?(o=B,Z(g)):(e.consume(g),B)}function I(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||gt(g)?z(g):(e.consume(g),I)}function A(g){return g===47||g===62||gt(g)?z(g):n(g)}function L(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Z(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H}function H(g){return Ye(g)?tt(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):R(g)}function R(g){return e.enter("htmlTextData"),o(g)}}const xd={name:"labelEnd",tokenize:$D,resolveTo:OD,resolveAll:CD},_D={tokenize:ID},kD={tokenize:RD},TD={tokenize:AD};function CD(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 OD(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Bn(s,e.slice(a+1,a+r+3)),s=Bn(s,[["enter",u,t]]),s=Bn(s,Jl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Bn(s,[["exit",u,t],e[o-2],e[o-1],["exit",l,t]]),s=Bn(s,e.slice(o+1)),s=Bn(s,[["exit",c,t]]),Ln(e,a,e.length,s),e}function $D(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(Yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):n(d)}function c(d){return d===40?e.attempt(_D,u,o?u:f)(d):d===91?e.attempt(kD,u,o?l:f)(d):o?u(d):f(d)}function l(d){return e.attempt(TD,u,f)(d)}function u(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function ID(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 gt(f)?Xo(e,a)(f):a(f)}function a(f){return f===41?u(f):rw(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return gt(f)?Xo(e,c)(f):u(f)}function s(f){return n(f)}function c(f){return f===34||f===39||f===40?aw(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function l(f){return gt(f)?Xo(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function RD(e,t,n){const r=this;return i;function i(s){return iw.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function AD(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const PD={name:"labelStartImage",tokenize:DD,resolveAll:xd.resolveAll};function DD(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const jD={name:"labelStartLink",tokenize:ND,resolveAll:xd.resolveAll};function ND(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Sd={name:"lineEnding",tokenize:MD};function MD(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const Xl={name:"thematicBreak",tokenize:FD};function FD(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||De(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===i?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),Ye(l)?tt(e,s,"whitespace")(l):s(l))}}const xn={name:"list",tokenize:UD,continuation:{tokenize:zD},exit:WD},LD={tokenize:VD,partial:!0},BD={tokenize:qD,partial:!0};function UD(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:gd(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xl,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return gd(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Yo,r.interrupt?n:u,e.attempt(LD,d,f))}function u(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ye(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function zD(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Yo,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(BD,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function qD(e,t,n){const r=this;return tt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function WD(e){e.exit(this.containerState.type)}function VD(e,t,n){const r=this;return tt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ye(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const sw={name:"setextUnderline",tokenize:ZD,resolveTo:HD};function HD(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function ZD(e,t,n){const r=this;let i;return a;function a(l){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ye(l)?tt(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||De(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const KD={tokenize:GD};function GD(e){const t=this,n=e.attempt(Yo,r,e.attempt(this.parser.constructs.flowInitial,i,tt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(eD,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YD={resolveAll:cw()},JD=lw("string"),XD=lw("text");function lw(e){return{tokenize:t,resolveAll:cw(e==="text"?QD:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(u){return l(u)?a(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return l(u)?(n.exit("data"),a(u)):(n.consume(u),c)}function l(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function cw(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function QD(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 a=i.length,o=-1,s=0,c;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)c=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function ej(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const c={consume:b,enter:w,exit:T,attempt:$(E),check:$(_),interrupt:$(_,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:m,defineSkip:h,write:f};let u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function f(j){return o=Bn(o,j),y(),o[o.length-1]!==null?[]:(U(t,0),l.events=Jl(a,l.events,l),l.events)}function d(j,W){return nj(p(j),W)}function p(j){return tj(o,j)}function m(){const{line:j,column:W,offset:B,_index:I,_bufferIndex:A}=r;return{line:j,column:W,offset:B,_index:I,_bufferIndex:A}}function h(j){i[j.line]=j.column,k()}function y(){let j;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<W.length;)v(W.charCodeAt(r._bufferIndex));else v(W)}}function v(j){u=u(j)}function b(j){De(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,k()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=j}function w(j,W){const B=W||{};return B.type=j,B.start=m(),l.events.push(["enter",B,l]),s.push(B),B}function T(j){const W=s.pop();return W.end=m(),l.events.push(["exit",W,l]),W}function E(j,W){U(j,W.from)}function _(j,W){W.restore()}function $(j,W){return B;function B(I,A,L){let Z,H,R,g;return Array.isArray(I)?V(I):"tokenize"in I?V([I]):N(I);function N(Y){return Q;function Q(ae){const oe=ae!==null&&Y[ae],X=ae!==null&&Y.null,ee=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(X)?X:X?[X]:[]];return V(ee)(ae)}}function V(Y){return Z=Y,H=0,Y.length===0?L:S(Y[H])}function S(Y){return Q;function Q(ae){return g=z(),R=Y,Y.partial||(l.currentConstruct=Y),Y.name&&l.parser.constructs.disable.null.includes(Y.name)?J():Y.tokenize.call(W?Object.assign(Object.create(l),W):l,c,K,J)(ae)}}function K(Y){return j(R,g),A}function J(Y){return g.restore(),++H<Z.length?S(Z[H]):L}}}function U(j,W){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&Ln(l.events,W,l.events.length-W,j.resolve(l.events.slice(W),l)),j.resolveTo&&(l.events=j.resolveTo(l.events,l))}function z(){const j=m(),W=l.previous,B=l.currentConstruct,I=l.events.length,A=Array.from(s);return{restore:L,from:I};function L(){r=j,l.previous=W,l.currentConstruct=B,l.events.length=I,s=A,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tj(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function nj(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
32
|
-
`;break}case-3:{
|
|
33
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const rj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:aD},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:Jb},flow:{35:fD,42:Xl,45:[sw,Xl],60:mD,61:sw,95:Xl,96:tw,126:tw},flowInitial:{[-2]:wd,[-1]:wd,32:wd},insideSpan:{null:[bd,YD]},string:{38:Qb,92:Xb},text:{[-5]:Sd,[-4]:Sd,[-3]:Sd,33:PD,38:Qb,42:bd,60:[jP,SD],91:jD,92:[cD,Xb],93:xd,95:bd,96:KP}},Symbol.toStringTag,{value:"Module"}));function ij(e){const n=Zb([rj,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(OP),document:i(IP),flow:i(KD),string:i(JD),text:i(XD)};return r;function i(a){return o;function o(s){return ej(r,a,s)}}}function aj(e){for(;!nw(e););return e}const uw=/[\0\t\n\r]/g;function oj(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const c=[];let l,u,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(uw.lastIndex=f,l=uw.exec(a),d=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(d),!l){t=a.slice(f);break}if(p===10&&f===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<d&&(c.push(a.slice(f,d)),e+=d-f),p){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const sj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lj(e){return e.replace(sj,cj)}function cj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Kb(n.slice(a?2:1),a?16:10)}return yd(n)||e}const fw={}.hasOwnProperty;function uj(e,t,n){return typeof t!="string"&&(n=t,t=void 0),fj(n)(aj(ij(n).document().write(oj()(e,t,!0))))}function fj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(se),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ie),blockQuote:a(X),characterEscape:z,characterReference:z,codeFenced:a(ee),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ee,o),codeText:a(G,o),codeTextData:z,data:z,codeFlowValue:z,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(F),hardBreakTrailing:a(F),htmlFlow:a(ie,o),htmlFlowData:z,htmlText:a(ie,o),htmlTextData:z,image:a(ue),label:o,link:a(se),listItem:a(Ee),listItemValue:d,listOrdered:a(Ce,f),listUnordered:a(Ce),paragraph:a(Ae),reference:S,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ie),strong:a(He),thematicBreak:a(fe)},exit:{atxHeading:c(),atxHeadingSequence:E,autolink:c(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Y,characterReference:Q,codeFenced:c(y),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:c(v),codeText:c(A),codeTextData:k,data:k,definition:c(),definitionDestinationString:T,definitionLabelString:b,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(W),hardBreakTrailing:c(W),htmlFlow:c(B),htmlFlowData:k,htmlText:c(I),htmlTextData:k,image:c(Z),label:R,labelText:H,lineEnding:j,link:c(L),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:K,resourceDestinationString:g,resourceTitleString:N,resource:V,setextHeading:c(U),setextHeadingLineSequence:$,setextHeadingText:_,strong:c(),thematicBreak:c()}};dw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let M={type:"root",children:[]};const ne={stack:[M],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},he=[];let Se=-1;for(;++Se<q.length;)if(q[Se][1].type==="listOrdered"||q[Se][1].type==="listUnordered")if(q[Se][0]==="enter")he.push(Se);else{const $e=he.pop();Se=i(q,$e,Se)}for(Se=-1;++Se<q.length;){const $e=t[q[Se][0]];fw.call($e,q[Se][1].type)&&$e[q[Se][1].type].call(Object.assign({sliceSerialize:q[Se][2].sliceSerialize},ne),q[Se][1])}if(ne.tokenStack.length>0){const $e=ne.tokenStack[ne.tokenStack.length-1];($e[1]||pw).call(ne,void 0,$e[0])}for(M.position={start:si(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:si(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)M=t.transforms[Se](M)||M;return M}function i(q,M,ne){let he=M-1,Se=-1,$e=!1,Ze,et,Tt,Et;for(;++he<=ne;){const qe=q[he];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?Se++:Se--,Et=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Ze&&!Et&&!Se&&!Tt&&(Tt=he),Et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Et=void 0}if(!Se&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||Se===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Ze){let _t=he;for(et=void 0;_t--;){const Ke=q[_t];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;et&&(q[et][1].type="lineEndingBlank",$e=!0),Ke[1].type="lineEnding",et=_t}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}Tt&&(!et||Tt<et)&&(Ze._spread=!0),Ze.end=Object.assign({},et?q[et][1].start:qe[1].end),q.splice(et||he,0,["exit",Ze,qe[2]]),he++,ne++}if(qe[1].type==="listItemPrefix"){const _t={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Ze=_t,q.splice(he,0,["enter",_t,qe[2]]),he++,ne++,Tt=void 0,Et=!0}}}return q[M][1]._spread=$e,ne}function a(q,M){return ne;function ne(he){s.call(this,q(he),he),M&&M.call(this,he)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(q,M,ne){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([M,ne]),q.position={start:si(M.start),end:void 0}}function c(q){return M;function M(ne){q&&q.call(this,ne),l.call(this,ne)}}function l(q,M){const ne=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==q.type&&(M?M.call(this,q,he[0]):(he[1]||pw).call(this,q,he[0]));else throw new Error("Cannot close `"+q.type+"` ("+Ko({start:q.start,end:q.end})+"): it’s not open");ne.position.end=si(q.end)}function u(){return vd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(q){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function p(){const q=this.resume(),M=this.stack[this.stack.length-1];M.lang=q}function m(){const q=this.resume(),M=this.stack[this.stack.length-1];M.meta=q}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q.replace(/(\r?\n|\r)$/g,"")}function b(q){const M=this.resume(),ne=this.stack[this.stack.length-1];ne.label=M,ne.identifier=Yn(this.sliceSerialize(q)).toLowerCase()}function w(){const q=this.resume(),M=this.stack[this.stack.length-1];M.title=q}function T(){const q=this.resume(),M=this.stack[this.stack.length-1];M.url=q}function E(q){const M=this.stack[this.stack.length-1];if(!M.depth){const ne=this.sliceSerialize(q).length;M.depth=ne}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function $(q){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function z(q){const ne=this.stack[this.stack.length-1].children;let he=ne[ne.length-1];(!he||he.type!=="text")&&(he=te(),he.position={start:si(q.start),end:void 0},ne.push(he)),this.stack.push(he)}function k(q){const M=this.stack.pop();M.value+=this.sliceSerialize(q),M.position.end=si(q.end)}function j(q){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=M.children[M.children.length-1];ne.position.end=si(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(z.call(this,q),k.call(this,q))}function W(){this.data.atHardBreak=!0}function B(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function I(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function A(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function L(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=M,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Z(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=M,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function H(q){const M=this.sliceSerialize(q),ne=this.stack[this.stack.length-2];ne.label=lj(M),ne.identifier=Yn(M).toLowerCase()}function R(){const q=this.stack[this.stack.length-1],M=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const he=q.children;ne.children=he}else ne.alt=M}function g(){const q=this.resume(),M=this.stack[this.stack.length-1];M.url=q}function N(){const q=this.resume(),M=this.stack[this.stack.length-1];M.title=q}function V(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function K(q){const M=this.resume(),ne=this.stack[this.stack.length-1];ne.label=M,ne.identifier=Yn(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function J(q){this.data.characterReferenceType=q.type}function Y(q){const M=this.sliceSerialize(q),ne=this.data.characterReferenceType;let he;ne?(he=Kb(M,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=yd(M);const Se=this.stack[this.stack.length-1];Se.value+=he}function Q(q){const M=this.stack.pop();M.position.end=si(q.end)}function ae(q){k.call(this,q);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(q)}function oe(q){k.call(this,q);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(q)}function X(){return{type:"blockquote",children:[]}}function ee(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function F(){return{type:"break"}}function ie(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function se(){return{type:"link",title:null,url:"",children:[]}}function Ce(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Ee(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function dw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?dw(e,r):dj(e,r)}}function dj(e,t){let n;for(n in t)if(fw.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 pw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ko({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is still open")}function pj(e){const t=this;t.parser=n;function n(r){return uj(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function hj(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 mj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
34
|
-
`}]}function
|
|
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
|
|
36
|
-
`}),
|
|
37
|
-
`});const
|
|
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=`
|
|
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:`
|
|
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:`
|
|
38
38
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
39
|
-
`}]}}const
|
|
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:`
|
|
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
|
|
43
|
-
`},i),a}function s2(e,t){return e&&"run"in e?async function(n,r){const i=Ow(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ow(n,{file:r,...e||t})}}function $w(e){if(e)throw e}var sc=Object.prototype.hasOwnProperty,Iw=Object.prototype.toString,Rw=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Pw=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Iw.call(t)==="[object Array]"},Dw=function(t){if(!t||Iw.call(t)!=="[object Object]")return!1;var n=sc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&sc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||sc.call(t,i)},jw=function(t,n){Rw&&n.name==="__proto__"?Rw(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Nw=function(t,n){if(n==="__proto__")if(sc.call(t,n)){if(Aw)return Aw(t,n).value}else return;return t[n]},l2=function e(){var t,n,r,i,a,o,s=arguments[0],c=1,l=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},c=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=Nw(s,n),i=Nw(t,n),s!==i&&(u&&i&&(Dw(i)||(a=Pw(i)))?(a?(a=!1,o=r&&Pw(r)?r:[]):o=r&&Dw(r)?r:{},jw(s,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&jw(s,{name:n,newValue:i}));return s};const Id=Ge(l2);function Rd(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 c2(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(c,...l){const u=e[++a];let f=-1;if(c){o(c);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,u?u2(u,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function u2(e,t){let n;return r;function r(...o){const s=e.length>o.length;let c;s&&o.push(i);try{c=e.apply(this,o)}catch(l){const u=l;if(s&&n)throw u;return i(u)}s||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const mr={basename:f2,dirname:d2,extname:p2,join:h2,sep:"/"};function f2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');es(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function d2(e){if(es(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 p2(e){es(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function h2(...e){let t=-1,n;for(;++t<e.length;)es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":m2(n)}function m2(e){es(e);const t=e.codePointAt(0)===47;let n=v2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function v2(e,t){let n="",r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const y2={cwd:g2};function g2(){return"/"}function Ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function b2(e){if(typeof e=="string")e=new URL(e);else if(!Ad(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 w2(e)}function w2(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 Pd=["history","path","basename","stem","extname","dirname"];class Mw{constructor(t){let n;t?Ad(t)?n={path:t}:typeof t=="string"||x2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":y2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pd.length;){const a=Pd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Pd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(t){jd(t,"basename"),Dd(t,"basename"),this.path=mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?mr.dirname(this.path):void 0}set dirname(t){Fw(this.basename,"dirname"),this.path=mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?mr.extname(this.path):void 0}set extname(t){if(Dd(t,"extname"),Fw(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=mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ad(t)&&(t=b2(t)),jd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?mr.basename(this.path,this.extname):void 0}set stem(t){jd(t,"stem"),Dd(t,"stem"),this.path=mr.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 sn(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 Dd(e,t){if(e&&e.includes(mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function jd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function x2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S2=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},E2={}.hasOwnProperty;class Nd extends S2{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=c2()}copy(){const t=new Nd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Id(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ld("data",this.frozen),this.namespace[t]=n,this):E2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ld("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=lc(t),r=this.parser||this.Parser;return Md("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Md("process",this.parser||this.Parser),Fd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=lc(t),c=r.parse(s);r.run(c,s,function(u,f,d){if(u||!f||!d)return l(u);const p=f,m=r.stringify(p,d);T2(m)?d.value=m:d.result=m,l(u,d)});function l(u,f){u||!f?o(u):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Md("processSync",this.parser||this.Parser),Fd("processSync",this.compiler||this.Compiler),this.process(t,i),Bw("processSync","process",n),r;function i(a,o){n=!0,$w(a),r=o}}run(t,n,r){Lw(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const c=lc(n);i.run(t,c,l);function l(u,f,d){const p=f||t;u?s(u):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Bw("runSync","run",r),i;function a(o,s){$w(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=lc(n),i=this.compiler||this.Compiler;return Fd("stringify",i),Lw(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ld("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[u,...f]=l;c(u,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))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(l.plugins),l.settings&&(i.settings=Id(!0,i.settings,l.settings))}function s(l){let u=-1;if(l!=null)if(Array.isArray(l))for(;++u<l.length;){const f=l[u];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===l){d=f;break}if(d===-1)r.push([l,...u]);else if(u.length>0){let[p,...m]=u;const h=r[d][1];Rd(h)&&Rd(p)&&(p=Id(!0,h,p)),r[d]=[l,p,...m]}}}}const _2=new Nd().freeze();function Md(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ld(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 Lw(e){if(!Rd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Bw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lc(e){return k2(e)?e:new Mw(e)}function k2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function T2(e){return typeof e=="string"||C2(e)}function C2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const O2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Uw=[],zw={allowDangerousHtml:!0},$2=/^(https?|ircs?|mailto|xmpp)$/i,I2=[{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 R2(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Uw,c=e.remarkPlugins||Uw,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zw}:zw,u=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||qw,p=_2().use(pj).use(c).use(s2,l).use(s),m=new Mw;typeof r=="string"&&(m.value=r);for(const b of I2)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+O2+b.id,void 0);const h=p.parse(m);let y=p.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Od(y,v),iP(y,{Fragment:O.Fragment,components:a,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function v(b,w,T){if(b.type==="raw"&&T&&typeof w=="number")return u?T.children.splice(w,1):T.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let E;for(E in md)if(Object.hasOwn(md,E)&&Object.hasOwn(b.properties,E)){const _=b.properties[E],$=md[E];($===null||$.includes(b.tagName))&&(b.properties[E]=d(String(_||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):o?o.includes(b.tagName):!1;if(!E&&n&&typeof w=="number"&&(E=!n(b,w,T)),E&&T&&typeof w=="number")return f&&b.children?T.children.splice(w,1,...b.children):T.children.splice(w,1),w}}}function qw(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||$2.test(e.slice(0,t))?e:""}function A2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ww(e,t,n){const i=ac((n||{}).ignore||[]),a=P2(t);let o=-1;for(;++o<a.length;)Tw(e,"text",s);function s(l,u){let f=-1,d;for(;++f<u.length;){const p=u[f],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return c(l,u)}function c(l,u){const f=u[u.length-1],d=a[o][0],p=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,b=[];d.lastIndex=0;let w=d.exec(l.value);for(;w;){const T=w.index,E={index:w.index,input:w.input,stack:[...u,l]};let _=p(...w,E);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=T+1:(m!==T&&b.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(_)?b.push(..._):_&&b.push(_),m=T+w[0].length,v=!0),!d.global)break;w=d.exec(l.value)}return v?(m<l.value.length&&b.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...b)):b=[l],y+b.length}}function P2(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([D2(i[0]),j2(i[1])])}return t}function D2(e){return typeof e=="string"?new RegExp(A2(e),"g"):e}function j2(e){return typeof e=="function"?e:function(){return e}}function N2(e){Ww(e,[/\r?\n|\r/g,M2])}function M2(){return{type:"break"}}function F2(){return function(e){N2(e)}}function Vw(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 Bd="phrasing",Ud=["autolink","link","image","label"];function L2(){return{transforms:[H2],enter:{literalAutolink:U2,literalAutolinkEmail:zd,literalAutolinkHttp:zd,literalAutolinkWww:zd},exit:{literalAutolink:V2,literalAutolinkEmail:W2,literalAutolinkHttp:z2,literalAutolinkWww:q2}}}function B2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:Ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:Ud},{character:":",before:"[ps]",after:"\\/",inConstruct:Bd,notInConstruct:Ud}]}}function U2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zd(e){this.config.enter.autolinkProtocol.call(this,e)}function z2(e){this.config.exit.autolinkProtocol.call(this,e)}function q2(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 W2(e){this.config.exit.autolinkEmail.call(this,e)}function V2(e){this.exit(e)}function H2(e){Ww(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Z2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),K2]],{ignore:["link","linkReference"]})}function Z2(e,t,n,r,i){let a="";if(!Hw(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!G2(n)))return!1;const o=Y2(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function K2(e,t,n,r){return!Hw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function G2(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 Y2(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=Vw(e,"(");let a=Vw(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Hw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||Gl(n))&&(!t||n!==47)}Zw.peek=sN;function J2(){return{enter:{gfmFootnoteDefinition:Q2,gfmFootnoteDefinitionLabelString:eN,gfmFootnoteCall:rN,gfmFootnoteCallString:iN},exit:{gfmFootnoteDefinition:nN,gfmFootnoteDefinitionLabelString:tN,gfmFootnoteCall:oN,gfmFootnoteCallString:aN}}}function X2(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:lN,footnoteReference:Zw}}}function Q2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eN(){this.buffer()}function tN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase()}function nN(e){this.exit(e)}function rN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iN(){this.buffer()}function aN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase()}function oN(e){this.exit(e)}function Zw(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function sN(){return"["}function lN(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),cN)),o(),a}function cN(e,t,n){return t===0?e:(n?"":" ")+e}const uN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kw.peek=mN;function fN(){return{canContainEols:["delete"],enter:{strikethrough:pN},exit:{strikethrough:hN}}}function dN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uN}],handlers:{delete:Kw}}}function pN(e){this.enter({type:"delete",children:[]},e)}function hN(e){this.exit(e)}function Kw(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function mN(){return"~"}function vN(e){return e.length}function yN(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||vN,a=[],o=[],s=[],c=[];let l=0,u=-1;for(;++u<e.length;){const h=[],y=[];let v=-1;for(e[u].length>l&&(l=e[u].length);++v<e[u].length;){const b=gN(e[u][v]);if(n.alignDelimiters!==!1){const w=i(b);y[v]=w,(c[v]===void 0||w>c[v])&&(c[v]=w)}h.push(b)}o[u]=h,s[u]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=Gw(r[f]);else{const h=Gw(r);for(;++f<l;)a[f]=h}f=-1;const d=[],p=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,c[f]-y.length-v.length);const w=y+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=y.length+b+v.length,b>c[f]&&(c[f]=b),p[f]=b),d[f]=w}o.splice(1,0,d),s.splice(1,0,p),u=-1;const m=[];for(;++u<o.length;){const h=o[u],y=s[u];f=-1;const v=[];for(;++f<l;){const b=h[f]||"";let w="",T="";if(n.alignDelimiters!==!1){const E=c[f]-(y[f]||0),_=a[f];_===114?w=" ".repeat(E):_===99?E%2?(w=" ".repeat(E/2+.5),T=" ".repeat(E/2-.5)):(w=" ".repeat(E/2),T=w):T=" ".repeat(E)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(w),v.push(b),n.alignDelimiters!==!1&&v.push(T),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
|
|
44
|
-
`)}function
|
|
45
|
-
`&&
|
|
46
|
-
`}function
|
|
47
|
-
`,encode:["`"],...s.current()})),f()}return
|
|
48
|
-
`),
|
|
49
|
-
`)),
|
|
50
|
-
`,...
|
|
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:`
|
|
47
|
+
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
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:`
|
|
51
51
|
`,after:`
|
|
52
|
-
`});return f(),
|
|
53
|
-
`+(i===1?"=":"-").repeat(
|
|
54
|
-
`))+1))}const
|
|
55
|
-
`,...
|
|
56
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
57
|
-
`))}function c(p,m,h,y){const v=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(p,{...y,before:a,after:a});return b(),v(),w}function l(p,m){return yN(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function u(p,m,h){const y=p.children;let v=-1;const b=[],w=m.enter("table");for(;++v<y.length;)b[v]=f(y[v],m,h);return w(),b}function f(p,m,h){const y=p.children;let v=-1;const b=[],w=m.enter("tableRow");for(;++v<y.length;)b[v]=c(y[v],p,m,h);return w(),b}function d(p,m,h){let y=l0.inlineCode(p,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function iM(){return{exit:{taskListCheckValueChecked:u0,taskListCheckValueUnchecked:u0,paragraph:oM}}}function aM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sM}}}function u0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function oM(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 a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===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 sM(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let c=l0.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+o}}function lM(){return[L2(),J2(),fN(),JN(),iM()]}function cM(e){return{extensions:[B2(),X2(),dN(),rM(e),aM()]}}const uM={tokenize:vM,partial:!0},f0={tokenize:yM,partial:!0},d0={tokenize:gM,partial:!0},p0={tokenize:bM,partial:!0},fM={tokenize:wM,partial:!0},h0={name:"wwwAutolink",tokenize:hM,previous:v0},m0={name:"protocolAutolink",tokenize:mM,previous:y0},zr={name:"emailAutolink",tokenize:pM,previous:g0},vr={};function dM(){return{text:vr}}let zi=48;for(;zi<123;)vr[zi]=zr,zi++,zi===58?zi=65:zi===91&&(zi=97);vr[43]=zr,vr[45]=zr,vr[46]=zr,vr[95]=zr,vr[72]=[zr,m0],vr[104]=[zr,m0],vr[87]=[zr,h0],vr[119]=[zr,h0];function pM(e,t,n){const r=this;let i,a;return o;function o(f){return!Hd(f)||!g0.call(r,r.previous)||Zd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Hd(f)?(e.consume(f),s):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(fM,u,l)(f):f===45||f===95||ln(f)?(a=!0,e.consume(f),c):u(f)}function l(f){return e.consume(f),i=!0,c}function u(f){return a&&i&&vn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function hM(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!v0.call(r,r.previous)||Zd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uM,e.attempt(f0,e.attempt(d0,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function mM(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&y0.call(r,r.previous)&&!Zd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(vn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),a?l:(a=!0,c)):n(f)}function l(f){return f===null||Kl(f)||gt(f)||Ui(f)||Gl(f)?n(f):e.attempt(f0,e.attempt(d0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function vM(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function yM(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(p0,c,s)(l):l===null||gt(l)||Ui(l)||l!==45&&Gl(l)?c(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function c(l){return i||r||!a?n(l):t(l)}}function gM(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(p0,t,a)(o):o===null||gt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function bM(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),a):s===93?(e.consume(s),i):s===60||s===null||gt(s)||Ui(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gt(s)||Ui(s)?t(s):r(s)}function a(s){return vn(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):vn(s)?(e.consume(s),o):n(s)}}function wM(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ln(a)?n(a):t(a)}}function v0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function y0(e){return!vn(e)}function g0(e){return!(e===47||Hd(e))}function Hd(e){return e===43||e===45||e===46||e===95||ln(e)}function Zd(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 xM={tokenize:$M,partial:!0};function SM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:TM,continuation:{tokenize:CM},exit:OM}},text:{91:{name:"gfmFootnoteCall",tokenize:kM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EM,resolveTo:_M}}}}function EM(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!o||!o._balanced)return n(c);const l=Yn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function _M(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function kM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||gt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Yn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return gt(f)||(o=!0),a++,e.consume(f),f===92?u:l}function u(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function TM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(m)}function u(m){if(o>999||m===93&&!s||m===null||m===91||gt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=Yn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return gt(m)||(s=!0),o++,e.consume(m),m===92?f:u}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,u):u(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),tt(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function CM(e,t,n){return e.check(Yo,t,e.attempt(xM,t,n))}function OM(e){e.exit("gfmFootnoteDefinition")}function $M(e,t,n){const r=this;return tt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function IM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let l=c;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[c][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[c][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[c][1].start)},d=[["enter",u,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Ln(d,d.length,0,Jl(p,o.slice(l+1,c),s)),Ln(d,d.length,0,[["exit",f,s],["enter",o[c][1],s],["exit",o[c][1],s],["exit",u,s]]),Ln(o,l-1,c-l+3,d),c=l+d.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,s,c){const l=this.previous,u=this.events;let f=0;return d;function d(m){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(m):(o.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const h=Yl(l);if(m===126)return f>1?c(m):(o.consume(m),f++,p);if(f<2&&!n)return c(m);const y=o.exit("strikethroughSequenceTemporary"),v=Yl(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class RM{constructor(){this.map=[]}add(t,n,r){AM(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[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 AM(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 PM(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 a=r.length-1;r[a]=r[a]==="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 DM(){return{flow:{null:{name:"table",tokenize:jM,resolveAll:NM}}}}function jM(e,t,n){const r=this;let i=0,a=0,o;return s;function s(k){let j=r.events.length-1;for(;j>-1;){const I=r.events[j][1].type;if(I==="lineEnding"||I==="linePrefix")j--;else break}const W=j>-1?r.events[j][1].type:null,B=W==="tableHead"||W==="tableRow"?_:c;return B===_&&r.parser.lazy[r.now().line]?n(k):B(k)}function c(k){return e.enter("tableHead"),e.enter("tableRow"),l(k)}function l(k){return k===124||(o=!0,a+=1),u(k)}function u(k){return k===null?n(k):De(k)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):Ye(k)?tt(e,u,"whitespace")(k):(a+=1,o&&(o=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||gt(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?d:f)}function d(k){return k===92||k===124?(e.consume(k),f):f(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),o=!1,Ye(k)?tt(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?y(k):k===124?(o=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),h):E(k)}function h(k){return Ye(k)?tt(e,y,"whitespace")(k):y(k)}function y(k){return k===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),v):k===45?(a+=1,v(k)):k===null||De(k)?T(k):E(k)}function v(k){return k===45?(e.enter("tableDelimiterFiller"),b(k)):E(k)}function b(k){return k===45?(e.consume(k),b):k===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(k))}function w(k){return Ye(k)?tt(e,T,"whitespace")(k):T(k)}function T(k){return k===124?m(k):k===null||De(k)?!o||i!==a?E(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):E(k)}function E(k){return n(k)}function _(k){return e.enter("tableRow"),$(k)}function $(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),$):k===null||De(k)?(e.exit("tableRow"),t(k)):Ye(k)?tt(e,$,"whitespace")(k):(e.enter("data"),U(k))}function U(k){return k===null||k===124||gt(k)?(e.exit("data"),$(k)):(e.consume(k),k===92?z:U)}function z(k){return k===92||k===124?(e.consume(k),U):U(k)}}function NM(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,f;const d=new RM;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,c!==0&&(b0(d,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",u,t]])),i=m.type==="tableDelimiterRow"?2:u?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=cc(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=cc(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],f=cc(d,t,a,i,n,f)):o[1]!==0&&(f=cc(d,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&b0(d,t,c,l,u),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=PM(t.events,n))}return e}function cc(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},wa(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=wa(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=wa(t.events,n[2]),u=wa(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},wa(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function b0(e,t,n,r,i){const a=[],o=wa(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function wa(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const MM={name:"tasklistCheck",tokenize:LM};function FM(){return{text:{91:MM}}}function LM(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return gt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return De(c)?t(c):Ye(c)?e.check({tokenize:BM},t,n)(c):n(c)}}function BM(e,t,n){return tt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function UM(e){return Zb([dM(),SM(),IM(e),DM(),FM()])}const zM={};function qM(e){const t=this,n=e||zM,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(UM(n)),a.push(lM()),o.push(cM(n))}const lt={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},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:{container:{className:"bpReset bpComposerContainer bpFont"},poweredBy:{className:"bpComposerPoweredBy"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}},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:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},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:{className:"bpMessageBlocksBubble"},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"}}};function WM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const VM=x.forwardRef(WM);function HM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))}const ZM=x.forwardRef(HM);function KM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const GM=x.forwardRef(KM);function YM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const JM=x.forwardRef(YM);function XM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}))}const QM=x.forwardRef(XM);function eF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"}))}const tF=x.forwardRef(eF);function nF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const w0=x.forwardRef(nF),rF=({text:e})=>{const{message:{blocks:{text:t}}}=lt,n={h1:({node:r,...i})=>O.jsx("h1",{...i,...t.heading1}),h2:({node:r,...i})=>O.jsx("h2",{...i,...t.heading2}),h3:({node:r,...i})=>O.jsx("h3",{...i,...t.heading3}),h4:({node:r,...i})=>O.jsx("h4",{...i,...t.heading4}),h5:"h4",h6:"h4",em:({node:r,...i})=>O.jsx("em",{...i,...t.italic}),strong:({node:r,...i})=>O.jsx("strong",{...i,...t.bold}),p:({node:r,...i})=>O.jsx("p",{...i,...t.text}),hr:({node:r,...i})=>O.jsx("hr",{...i,...t.horizontalRule}),a:({node:r,...i})=>O.jsx("a",{...i,...t.link,target:"_blank"}),img:({node:r,...i})=>O.jsx("img",{...i,...t.image}),ol:({node:r,...i})=>O.jsx("ol",{...i,...t.orderedList}),ul:({node:r,...i})=>O.jsx("ul",{...i,...t.unorderedList}),li:({node:r,...i})=>O.jsx("li",{...i,...t.listItem}),br:({node:r,...i})=>O.jsx("br",{...i,...t.lineBreak}),pre:({node:r,...i})=>{var f,d;const a=r==null?void 0:r.children[0],o=iF(((d=(f=a==null?void 0:a.properties)==null?void 0:f.className)==null?void 0:d[0])||""),[s,c]=D.useState(!1),l=D.useRef(null),u=()=>{if(!l.current)return;const p=l.current.textContent||"";navigator.clipboard.writeText(p).then(()=>{c(!0),setTimeout(()=>{c(!1)},1500)}).catch(m=>{console.error("Failed to copy code to clipboard:",m)})};return O.jsxs("div",{...t.codeBlockContainer,children:[O.jsxs("div",{...t.codeBlockTitle,children:[o?O.jsx("span",{children:o}):"Code",s?O.jsx(VM,{...t.codeBlockCopyIcon}):O.jsx(ZM,{...t.codeBlockCopyIcon,onClick:u})]}),O.jsx("pre",{ref:l,...i,...t.codeBlock})]})},input:({node:r,...i})=>O.jsx("input",{...i,...t.input,disabled:!1}),code:({node:r,...i})=>O.jsx("code",{...i,...t.code}),table:({node:r,...i})=>O.jsx("div",{...t.tableContainer,children:O.jsx("table",{...i,...t.table})}),th:({node:r,...i})=>O.jsx("th",{...i,...t.tableHeader}),tr:({node:r,...i})=>O.jsx("tr",{...i,...t.tableRow}),td:({node:r,...i})=>O.jsx("td",{...i,...t.tableData})};return O.jsx(R2,{urlTransform:r=>r.startsWith("tel:")?r:qw(r),components:n,remarkPlugins:[qM,F2],children:e})},iF=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},aF={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},x0=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(aF?"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()}},l=t=e(r,i,c);return c},oF=e=>e?x0(e):x0;var Kd={exports:{}},Gd={},uc={exports:{}},Yd={};/**
|
|
52
|
+
`});return f(),c(),p+`
|
|
53
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
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:`
|
|
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"}}};/**
|
|
58
|
+
* @license lucide-react v0.424.0 - ISC
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the ISC license.
|
|
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(" ");/**
|
|
63
|
+
* @license lucide-react v0.424.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
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"};/**
|
|
68
|
+
* @license lucide-react v0.424.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
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]]));/**
|
|
73
|
+
* @license lucide-react v0.424.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
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};/**
|
|
78
|
+
* @license lucide-react v0.424.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
83
|
+
* @license lucide-react v0.424.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
88
|
+
* @license lucide-react v0.424.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
93
|
+
* @license lucide-react v0.424.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
98
|
+
* @license lucide-react v0.424.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
103
|
+
* @license lucide-react v0.424.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
108
|
+
* @license lucide-react v0.424.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
113
|
+
* @license lucide-react v0.424.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
118
|
+
* @license lucide-react v0.424.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
123
|
+
* @license lucide-react v0.424.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
128
|
+
* @license lucide-react v0.424.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
133
|
+
* @license lucide-react v0.424.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
138
|
+
* @license lucide-react v0.424.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
143
|
+
* @license lucide-react v0.424.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
148
|
+
* @license lucide-react v0.424.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
153
|
+
* @license lucide-react v0.424.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
158
|
+
* @license lucide-react v0.424.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
163
|
+
* @license lucide-react v0.424.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
168
|
+
* @license lucide-react v0.424.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
173
|
+
* @license lucide-react v0.424.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
178
|
+
* @license lucide-react v0.424.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
183
|
+
* @license lucide-react v0.424.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
188
|
+
* @license lucide-react v0.424.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
193
|
+
* @license lucide-react v0.424.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
198
|
+
* @license lucide-react v0.424.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
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"}]]);/**
|
|
203
|
+
* @license lucide-react v0.424.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
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={};/**
|
|
58
208
|
* @license React
|
|
59
209
|
* use-sync-external-store-shim.production.min.js
|
|
60
210
|
*
|
|
@@ -62,7 +212,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
62
212
|
*
|
|
63
213
|
* This source code is licensed under the MIT license found in the
|
|
64
214
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var
|
|
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={};/**
|
|
66
216
|
* @license React
|
|
67
217
|
* use-sync-external-store-shim.development.js
|
|
68
218
|
*
|
|
@@ -70,7 +220,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
70
220
|
*
|
|
71
221
|
* This source code is licensed under the MIT license found in the
|
|
72
222
|
* LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var
|
|
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}/**
|
|
74
224
|
* @license React
|
|
75
225
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
76
226
|
*
|
|
@@ -78,7 +228,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
78
228
|
*
|
|
79
229
|
* This source code is licensed under the MIT license found in the
|
|
80
230
|
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/var
|
|
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={};/**
|
|
82
232
|
* @license React
|
|
83
233
|
* use-sync-external-store-shim/with-selector.development.js
|
|
84
234
|
*
|
|
@@ -86,103 +236,92 @@ React keys must be passed directly to JSX without using spread:
|
|
|
86
236
|
*
|
|
87
237
|
* This source code is licensed under the MIT license found in the
|
|
88
238
|
* LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/var
|
|
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(`
|
|
90
240
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
91
241
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
92
242
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
93
|
-
`);const b=v.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&p(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return p(m),s===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(dc(c.name));case"COMMIT":if(s===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(dc(c.name));case"ROLLBACK":return ep(h.state,v=>{if(s===void 0){p(v),u==null||u.init(i.getState());return}p(v[s]),u==null||u.init(dc(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ep(h.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,b=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!b)return;p(s===void 0?b:b[s]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),m},ep=(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 I0(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=c=>c===null?null:JSON.parse(c,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const ts=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return ts(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return ts(r)(n)}}}},bF=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,c=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const u=ts(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const b=u({state:y,version:a.version}).then(w=>l.setItem(a.name,w)).catch(w=>{v=w});if(v)throw v;return b},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(b=>b(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return ts(l.getItem.bind(l))(a.name).then(b=>{if(b)return a.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return a.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 m=a.merge(b,(w=r())!=null?w:p),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,c.forEach(b=>b(m))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},h(),m||p},wF=(e,t)=>(n,r,i)=>{let a={storage:I0(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,c=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const u=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),u()};const d=e((...h)=>{n(...h),u()},r,i);i.getInitialState=()=>d;let p;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:d))||void 0;return ts(l.getItem.bind(l))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.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[T,E]=b;if(p=a.merge(E,(w=r())!=null?w:d),n(p,!0),T)return u()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,c.forEach(b=>b(p))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(c.add(h),()=>{c.delete(h)})},a.skipHydration||m(),p||d},R0=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((fc?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),bF(e,t)):wF(e,t),A0=xa()(pc(R0(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));function li(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=tp(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const tp=e=>{switch(e.type){case"audio":return P0(e);case"card":return xF(e);case"carousel":return SF(e);case"choice":return EF(e);case"dropdown":return _F(e);case"file":return D0(e);case"image":return j0(e);case"location":return N0(e);case"markdown":return M0(e);case"text":return F0(e);case"video":return L0(e);case"bloc":return kF(e);case"custom":return{payload:e};case"reaction":return{payload:{type:"text",text:"Unsupported message type"}};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},ns=e=>({block:e,type:"bubble"}),P0=e=>({payload:{type:"audio",url:e.audioUrl}}),xF=e=>({payload:ns(B0(e))}),SF=e=>({payload:{type:"carousel",blocks:e.items.map(t=>B0({type:"card",...t}))}}),EF=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=Hg(),i=ns({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:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:r}))}]}}},_F=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:ns({type:"column",blocks:r})}},D0=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),j0=e=>({payload:{type:"image",url:e.imageUrl}}),N0=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),M0=e=>({payload:ns({type:"text",text:e.markdown})}),F0=e=>({payload:ns({type:"text",text:e.text,value:e.value})}),L0=e=>({payload:{type:"video",url:e.videoUrl}}),kF=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return P0({...n.payload,type:n.type}).payload;case"file":return D0({...n.payload,type:n.type}).payload;case"image":return j0({...n.payload,type:n.type}).payload;case"location":return N0({...n.payload,type:n.type}).payload;case"markdown":return M0({...n.payload,type:n.type}).payload;case"text":return F0({...n.payload,type:n.type}).payload;case"video":return L0({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),B0=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`#### ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}};function np(e){const{metadata:t,conversationId:n,userId:r}=e;return e.payload.type==="reaction"?{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:{type:"text",text:e.payload.reaction},metadata:t}:li(e)}const yr=xa()(pc(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.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:a,meta:o}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...a),i=o.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(np).filter(Boolean)},fetchMessagesLegacy:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),TF=(e,t)=>xa()(pc(R0(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:I0(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),To=class To{constructor(){}static getInstance(t="bp-webchat",n){return To._instances[t]||(To._instances[t]=TF(t,n)),To._instances[t]}};_e(To,"_instances",{});let rp=To;const ip=rp.getInstance,hc=xa()(pc(e=>({eventEmitter:lR,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),CF=8,rs=xa()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(o=>o.name===n.name)?r.map(o=>o.name===n.name?{...o,...n}:o):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(o=>o.name===n.name),a=t().files.length===CF;if(!(!i&&a)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:o,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:o,instance:n,status:"uploaded"})}catch(o){console.error("Error sending file:",o),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),OF=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const c=hc(w=>w.eventEmitter),[l,u]=D.useState(!1),[f,d]=D.useState(!1),[p,m]=D.useState(!1),{message:{blocks:{button:h}}}=lt;D.useEffect(()=>{if(r)return c.on(`button-group-${r}-click`,()=>{d(!0),i||m(!0)})},[c,r,i]);const v={...s,onClick:w=>{if((p||o)&&n==="link"){w.preventDefault();return}u(!0),i||m(!0),r&&c.emit(`button-group-${r}-click`),n!=="link"&&a&&(a==null||a({type:"text",text:e,value:t}))},"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=p||o;return n==="link"?O.jsx("a",{...v,style:o?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):O.jsx("button",{...v,style:o?{pointerEvents:"none"}:void 0,disabled:b,children:e})},U0=D.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s,...c},l)=>{const{message:{blocks:{bubble:u}}}=lt;return O.jsx("div",{"data-direction":t,...c,...u,ref:l,children:O.jsx(Pa,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a,isReadOnly:s},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s})})});U0.displayName="Bubble";const z0=D.createContext(null);function $F(){const e=D.useContext(z0);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const q0=D.createContext(null);function W0(){const e=D.useContext(q0);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}var Un=function(){return Un=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Un.apply(this,arguments)};function V0(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 Sa(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function Ea(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function H0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ap(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function IF(){var e=D.useRef(!1),t=D.useCallback(function(){return e.current},[]);return D.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function RF(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=D.useRef(0),i=IF(),a=D.useState(n),o=a[0],s=a[1],c=D.useCallback(function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var f=++r.current;return o.loading||s(function(d){return Un(Un({},d),{loading:!0})}),e.apply(void 0,l).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,c]}function AF(e,t){t===void 0&&(t=[]);var n=RF(e,t,{loading:!0}),r=n[0],i=n[1];return D.useEffect(function(){i()},[i]),r}const Z0=D.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=D.useId(),{setIsLoading:o}=$F(),[s,c]=D.useState(n),[l,u]=D.useState(!1),{message:{blocks:{image:f}}}=lt;return D.useLayoutEffect(()=>{o(d=>[...d,a])},[]),AF(async()=>{if(e){try{const{width:d,height:p}=await gA(e);s==="auto"&&c(PF(d,p))}catch(d){c("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),O.jsxs(O.Fragment,{children:[l?null:O.jsx("div",{"data-orientation":s,...f.placeholder}),O.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{u(!0)}})]})});Z0.displayName="Image";function PF(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const K0=D.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=lt;return O.jsx("div",{children:O.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});K0.displayName="Video";const G0=D.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=lt;return O.jsx("div",{children:O.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});G0.displayName="Audio";function DF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const jF=x.forwardRef(DF);function NF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const MF=x.forwardRef(NF);function FF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const LF=x.forwardRef(FF);function BF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const UF=x.forwardRef(BF);function zF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const qF=x.forwardRef(zF);function WF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const op=x.forwardRef(WF),Y0=D.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=lt;return O.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:o,type:"_blank",rel:"noopener",ref:a,children:[O.jsx("p",{...s.title,children:n}),O.jsx(qF,{...s.icon})]})});Y0.displayName="Location";const J0=D.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:c,isReadOnly:l,...u},f)=>{const{message:{blocks:{column:d}}}=lt;return O.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...d,ref:f,children:e.map((p,m)=>O.jsx(Pa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:c,isReadOnly:l},direction:r,timestamp:a,sender:i,metadata:o,sendMessage:c,messageId:s,isReadOnly:l},m))})});J0.displayName="Column";const X0=D.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:c,isReadOnly:l,...u},f)=>{const{message:{blocks:{row:d}}}=lt;return O.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...d,ref:f,children:e.map((p,m)=>O.jsx(Pa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:c,sendMessage:s,isReadOnly:l},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:c,isReadOnly:l},m))})});X0.displayName="Row";function VF(e){return Object.prototype.toString.call(e)==="[object Object]"}function Q0(e){return VF(e)||Array.isArray(e)}function HF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sp(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||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],c=t[o];return typeof s=="function"?`${s}`==`${c}`:!Q0(s)||!Q0(c)?s===c:sp(s,c)})}function ex(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function ZF(e,t){if(e.length!==t.length)return!1;const n=ex(e),r=ex(t);return n.every((i,a)=>{const o=r[a];return sp(i,o)})}function lp(e){return typeof e=="number"}function tx(e){return typeof e=="string"}function cp(e){return typeof e=="boolean"}function nx(e){return Object.prototype.toString.call(e)==="[object Object]"}function At(e){return Math.abs(e)}function up(e){return Math.sign(e)}function mc(e,t){return At(e-t)}function KF(e,t){if(e===0||t===0||At(e)<=At(t))return 0;const n=mc(At(e),At(t));return At(n/e)}function is(e){return yc(e).map(Number)}function qr(e){return e[vc(e)]}function vc(e){return Math.max(0,e.length-1)}function yc(e){return Object.keys(e)}function rx(e,t){return[e,t].reduce((n,r)=>(yc(r).forEach(i=>{const a=n[i],o=r[i],s=nx(a)&&nx(o);n[i]=s?rx(a,o):o}),n),{})}function ix(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function GF(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return lp(e)?o():n[e](l)}return{measure:s}}function YF(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=c();function o(u){const{width:f,height:d}=u;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ci(e,t){const n=At(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function ax(e,t,n){const{constrain:r}=ci(0,e),i=e+1;let a=o(t);function o(d){return n?At((i+d)%i):r(d)}function s(){return a}function c(d){return a=o(d),f}function l(d){return u().set(s()+d)}function u(){return ax(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function JF(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function as(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function XF(e,t,n,r,i,a,o,s,c,l,u,f,d,p,m,h,y,v,b){const{cross:w}=e,T=["INPUT","SELECT","TEXTAREA"],E={passive:!1},_=as(),$=as(),U=ci(50,225).constrain(m.measure(20)),z={mouse:300,touch:400},k={mouse:500,touch:600},j=h?43:25;let W=!1,B=0,I=0,A=!1,L=!1,Z=!1,H=!1;function R(ee,G){if(!G)return;function pe(Ie){(cp(G)||G(ee,Ie))&&J(Ie)}const ge=n;_.add(ge,"dragstart",Ie=>Ie.preventDefault(),E).add(ge,"touchmove",()=>{},E).add(ge,"touchend",()=>{}).add(ge,"touchstart",pe).add(ge,"mousedown",pe).add(ge,"touchcancel",Q).add(ge,"contextmenu",Q).add(ge,"click",ae,!0)}function g(){_.clear(),$.clear()}function N(){const ee=H?r:n;$.add(ee,"touchmove",Y,E).add(ee,"touchend",Q).add(ee,"mousemove",Y,E).add(ee,"mouseup",Q)}function V(ee){const G=ee.nodeName||"";return T.includes(G)}function S(){return(h?k:z)[H?"mouse":"touch"]}function K(ee,G){const pe=d.add(up(ee)*-1),ge=f.byDistance(ee,!h).distance;return h||At(ee)<U?ge:v&&G?ge*.5:f.byIndex(pe.get(),0).distance}function J(ee){const G=ix(ee,i);H=G,!(G&&ee.button!==0)&&(V(ee.target)||(Z=h&&G&&!ee.buttons&&W,W=mc(a.get(),s.get())>=2,A=!0,o.pointerDown(ee),u.useFriction(0).useDuration(0),a.set(s),N(),B=o.readPoint(ee),I=o.readPoint(ee,w),p.emit("pointerDown")))}function Y(ee){const G=o.readPoint(ee),pe=o.readPoint(ee,w),ge=mc(G,B),Ie=mc(pe,I);if(!L&&!H&&(!ee.cancelable||(L=ge>Ie,!L)))return Q(ee);const F=o.pointerMove(ee);ge>y&&(Z=!0),u.useFriction(.3).useDuration(1),c.start(),a.add(t.apply(F)),ee.preventDefault()}function Q(ee){const pe=f.byDistance(0,!1).index!==d.get(),ge=o.pointerUp(ee)*S(),Ie=K(t.apply(ge),pe),F=KF(ge,Ie),ie=j-10*F,ue=b+F/50;L=!1,A=!1,$.clear(),u.useDuration(ie).useFriction(ue),l.distance(Ie,!h),H=!1,p.emit("pointerUp")}function ae(ee){Z&&(ee.stopPropagation(),ee.preventDefault())}function oe(){return A}return{init:R,pointerDown:oe,destroy:g}}function QF(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const m=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(ix(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function c(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function l(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),m=a(f)-a(i)>170,h=d/p;return p&&!m&&At(h)>.1?h:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:o}}function eL(e){function t(r){return e*(r/100)}return{measure:t}}function tL(e,t,n,r,i){let a,o,s=[],c=!1;function l(p){return i.measureSize(p.getBoundingClientRect())}function u(p,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const b of v){const w=b.target===e,T=r.indexOf(b.target),E=w?o:s[T],_=l(w?e:r[T]);if(E!==_){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{c||(cp(m)||m(p,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),c=!0}return{init:u,destroy:f}}function nL(e,t,n,r){let i=!0,a=0,o=0,s=n,c=r,l=e.get(),u=0;function f(){const E=t.get()-e.get(),_=!s;let $=0;return _?(a=0,e.set(t),$=E):(a+=E/s,a*=c,l+=a,e.add(a),$=l-u),o=up($),u=l,i=At(E)<.001,T}function d(){return i}function p(){return s}function m(){return o}function h(){return a}function y(){return b(n)}function v(){return w(r)}function b(E){return s=E,T}function w(E){return c=E,T}const T={direction:m,duration:p,velocity:h,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:w,useDuration:b};return T}function rL(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ci(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(p){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=At(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!p&&At(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){c=!p}return{constrain:u,toggleActive:f}}function iL(e,t,n,r){const i=ci(-t+e,n[0]),a=c(),o=l();function s(){const f=a[0],d=qr(a),p=a.lastIndexOf(f),m=a.indexOf(d)+1;return ci(p,m)}function c(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function aL(e,t,n){const r=t[0],i=n?r-e:qr(t);return{limit:ci(i,r)}}function oL(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:c}=ci(a,o);function l(d){return d===1?c(n.get()):d===-1?s(n.get()):!1}function u(d){if(!l(d))return;const p=e*(d*-1);r.forEach(m=>m.add(p))}return{loop:u}}function sL(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function lL(e,t,n,r,i,a,o){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=a,u=p().map(t.measure),f=m(),d=h();function p(){return l(r).map(v=>qr(v)[c]-v[0][s]).map(At)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-At(v))}function h(){const b=qr(f)-qr(i);return l(f).map(w=>w[0]).map((w,T,E)=>{const _=!T,$=T===vc(E);return o&&_?0:o&&$?b:w+u[T]})}return{snaps:f,snapsAligned:d}}function cL(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function c(m){return m.concat().sort((h,y)=>At(h)-At(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(b=>b-h).map(b=>u(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>At(b.diff)-At(w.diff)),{index:v}=y[0];return{index:v,distance:h}}function u(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return c(y);const v=y.filter(b=>up(b)===h);return c(v)}function f(m,h){const y=t[m]-i.get(),v=u(y,h);return{index:m,distance:v}}function d(m,h){const y=i.get()+m,{index:v,distance:b}=l(y),w=!e&&a(y);if(!h||w)return{index:v,distance:m};const T=t[v]-b,E=m+u(T,0);return{index:v,distance:E}}return{byDistance:d,byIndex:f,shortcut:u}}function uL(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function c(f,d){const p=r.byDistance(f,d);s(p)}function l(f,d){const p=t.clone().set(f),m=r.byIndex(p.get(),d);s(m)}return{distance:c,index:l}}function gc(e){let t=e;function n(){return t}function r(c){t=o(c)}function i(c){t+=o(c)}function a(c){t-=o(c)}function o(c){return lp(c)?c:c.get()}return{get:n,set:r,add:i,subtract:a}}function ox(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function c(d){a||(i.transform=r(t.apply(d)))}function l(d){a=!d}function u(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function fL(e,t,n,r,i,a,o,s,c){const l=is(i),u=is(i).reverse(),f=h().concat(y());function d(E,_){return E.reduce(($,U)=>$-i[U],_)}function p(E,_){return E.reduce(($,U)=>d($,_)>0?$.concat([U]):$,[])}function m(E,_){const $=_==="start",U=$?-r:r,z=o.findSlideBounds([U]);return E.map(k=>{const j=$?0:-r,W=$?r:0,I=z.filter(A=>A.index===k)[0][$?"end":"start"];return{index:k,slideLocation:gc(-1),translate:ox(e,t,c[k]),target:()=>s.get()>I?j:W}})}function h(){const E=a[0]-1,_=p(u,E);return m(_,"end")}function y(){const E=n-a[0]-1,_=p(l,E);return m(_,"start")}function v(){return f.every(({index:E})=>{const _=l.filter($=>$!==E);return d(_,n)<=.1})}function b(){f.forEach(E=>{const{target:_,translate:$,slideLocation:U}=E,z=_();z!==U.get()&&($.to(z),U.set(z))})}function w(){f.forEach(E=>E.translate.clear())}return{canLoop:v,clear:w,loop:b,loopPoints:f}}function dL(e,t){let n,r=!1;function i(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(cp(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function pL(e,t,n,r,i,a,o){const{removeOffset:s,constrain:c}=i,l=.5,u=a?[0,t,-t]:[0],f=p(u,o);function d(y){const v=y||0;return n.map(b=>ci(l,b-l).constrain(b*v))}function p(y,v){const b=y||u,w=d(v);return b.reduce((T,E)=>{const _=r.map(($,U)=>({start:$-n[U]+w[U]+E,end:$+e-w[U]+E,index:U}));return T.concat(_)},[])}function m(y,v){const b=a?s(y):c(y);return(v||f).reduce((T,E)=>{const{index:_,start:$,end:U}=E,z=T.includes(_),k=$<b&&U>b;return!z&&k?T.concat([_]):T},[])}return{check:m,findSlideBounds:p}}function hL(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),f=h(),d=n.map(o),p=y();function m(){if(!l)return 0;const b=n[0];return At(t[s]-b[s])}function h(){if(!l)return 0;const b=a.getComputedStyle(qr(r));return parseFloat(b.getPropertyValue(`margin-${c}`))}function y(){return n.map((b,w,T)=>{const E=!w,_=w===vc(T);return E?d[w]+u:_?d[w]+f:T[w+1][s]-b[s]}).map(At)}return{slideSizes:d,slideSizesWithGaps:p}}function mL(e,t,n){const r=lp(n);function i(c,l){return is(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function a(c){return is(c).reduce((l,u)=>{const d=t.slice(qr(l),u+1).reduce((p,m)=>p+m,0);return!u||d>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function o(c){return r?i(c,n):a(c)}return{groupSlides:o}}function vL(e,t,n,r,i,a,o,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:d,loop:p,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:b,containScroll:w}=a,T=t.getBoundingClientRect(),E=n.map(ue=>ue.getBoundingClientRect()),_=JF(u),$=YF(l,u),U=$.measureSize(T),z=eL(U),k=GF(c,U),j=!p&&!!w,W=p||!!w,{slideSizes:B,slideSizesWithGaps:I}=hL($,T,E,n,W,i),A=mL(U,I,v),{snaps:L,snapsAligned:Z}=lL($,k,T,E,I,A,j),H=-qr(L)+qr(I),{snapsContained:R}=iL(U,H,Z,w),g=j?R:Z,{limit:N}=aL(H,g,p),V=ax(vc(g),f,p),S=V.clone(),K=is(n),J=({dragHandler:ue,scrollBody:se,scrollBounds:Ce,eventHandler:Ee,animation:Ae,options:{loop:He}})=>{const te=ue.pointerDown();He||Ce.constrain(te);const fe=se.seek().settled();fe&&!te&&(Ae.stop(),Ee.emit("settle")),fe||Ee.emit("scroll")},Y=({scrollBody:ue,translate:se,location:Ce,offsetLocation:Ee,scrollLooper:Ae,slideLooper:He,options:{loop:te}},fe)=>{const q=ue.velocity();Ee.set(Ce.get()-q+q*fe),te&&(Ae.loop(ue.direction()),He.loop()),se.to(Ee.get())},Q={start:()=>s.start(ie),stop:()=>s.stop(ie),update:()=>J(ie),render:ue=>Y(ie,ue)},ae=.68,oe=g[V.get()],X=gc(oe),ee=gc(oe),G=gc(oe),pe=nL(X,G,m,ae),ge=cL(p,g,H,N,G),Ie=uL(Q,V,S,ge,pe,G,o),F=pL(U,H,B,L,N,p,d),ie={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:T,slideRects:E,animation:Q,axis:$,direction:_,dragHandler:XF($,_,e,r,i,G,QF($,i),X,Q,Ie,pe,ge,V,o,z,h,y,b,ae),eventStore:as(),percentOfView:z,index:V,indexPrevious:S,limit:N,location:X,offsetLocation:ee,options:a,resizeHandler:tL(t,o,i,n,$),scrollBody:pe,scrollBounds:rL(N,X,G,pe,z),scrollLooper:oL(H,N,ee,[X,ee,G]),scrollProgress:sL(N),scrollSnaps:g,scrollTarget:ge,scrollTo:Ie,slideLooper:fL($,_,U,H,I,g,F,ee,n),slidesHandler:dL(t,o),slidesInView:F,slideIndexes:K,slidesToScroll:A,target:G,translate:ox($,_,t)};return ie}function yL(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const p=At(i/t);n.forEach(({animation:m})=>m.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function c(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:c,reset:l,window:e}}function gL(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function i(c){return r(c).forEach(l=>l(t,c)),s}function a(c,l){return e[c]=r(c).concat([l]),s}function o(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const bL={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 wL(e){function t(a,o){return rx(a,o||{})}function n(a){const o=a.breakpoints||{},s=yc(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,l)=>t(c,l),{});return t(a,s)}function r(a){return a.map(o=>yc(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function xL(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function _a(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=wL(i),o=xL(a),s=as(),c=as(),l=gL(),{animationRealms:u}=_a,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:m,off:h,emit:y}=l,v=B;let b=!1,w,T=f(bL,_a.globalOptions),E=f(T),_=[],$,U,z;function k(){const{container:pe,slides:ge}=E;U=(tx(pe)?e.querySelector(pe):pe)||e.children[0];const F=tx(ge)?U.querySelectorAll(ge):ge;z=[].slice.call(F||U.children)}function j(pe,ge){const Ie=vL(e,U,z,r,i,pe,l,ge);if(pe.loop&&!Ie.slideLooper.canLoop()){const F=Object.assign({},pe,{loop:!1});return j(F,ge)}return Ie}function W(pe,ge){if(b)return;const Ie=u.find(ie=>ie.window===i),F=Ie||yL(i);Ie||u.push(F),T=f(T,pe),E=d(T),_=ge||_,k(),w=j(E,F),p([T,..._.map(({options:ie})=>ie)]).forEach(ie=>s.add(ie,"change",B)),E.active&&(w.translate.to(w.location.get()),w.eventHandler.init(G),w.resizeHandler.init(G,E.watchResize),w.slidesHandler.init(G,E.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&F.reset()}),w.options.loop&&w.slideLooper.loop(),U.offsetParent&&z.length&&w.dragHandler.init(G,E.watchDrag),$=o.init(_,G))}function B(pe,ge){const Ie=J();I(),W(f({startIndex:Ie},pe),ge),l.emit("reInit")}function I(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),o.destroy(),s.clear(),c.clear()}function A(){b||(b=!0,s.clear(),I(),l.emit("destroy"))}function L(pe){const ge=w[pe?"target":"location"].get(),Ie=E.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[Ie](ge))}function Z(pe){const ge=L(pe);return w.slideIndexes.filter(Ie=>!ge.includes(Ie))}function H(pe,ge,Ie){!E.active||b||(w.scrollBody.useBaseFriction().useDuration(ge?0:E.duration),w.scrollTo.index(pe,Ie||0))}function R(pe){const ge=w.index.add(1).get();H(ge,pe===!0,-1)}function g(pe){const ge=w.index.add(-1).get();H(ge,pe===!0,1)}function N(){return w.index.add(1).get()!==J()}function V(){return w.index.add(-1).get()!==J()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function K(){return w.scrollProgress.get(w.location.get())}function J(){return w.index.get()}function Y(){return w.indexPrevious.get()}function Q(){return $}function ae(){return w}function oe(){return e}function X(){return U}function ee(){return z}const G={canScrollNext:N,canScrollPrev:V,containerNode:X,internalEngine:ae,destroy:A,off:h,on:m,emit:y,plugins:Q,previousScrollSnap:Y,reInit:v,rootNode:oe,scrollNext:R,scrollPrev:g,scrollProgress:K,scrollSnapList:S,scrollTo:H,selectedScrollSnap:J,slideNodes:ee,slidesInView:L,slidesNotInView:Z};return W(t,n),setTimeout(()=>l.emit("init"),0),G}_a.animationRealms=[],_a.globalOptions=void 0;function fp(e={},t=[]){const n=D.useRef(e),r=D.useRef(t),[i,a]=D.useState(),[o,s]=D.useState(),c=D.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return D.useEffect(()=>{if(HF()&&o){_a.globalOptions=fp.globalOptions;const l=_a(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),D.useEffect(()=>{sp(n.current,e)||(n.current=e,c())},[e,c]),D.useEffect(()=>{ZF(r.current,t)||(r.current=t,c())},[t,c]),[s,i]}fp.globalOptions=void 0;function SL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const EL=x.forwardRef(SL);function _L({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const kL=x.forwardRef(_L);function TL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const CL=x.forwardRef(TL);function OL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6 6 0 0 0-5.98 6.496A5.25 5.25 0 0 0 6.75 20.25H18a4.5 4.5 0 0 0 2.206-8.423 3.75 3.75 0 0 0-4.133-4.303A6.001 6.001 0 0 0 10.5 3.75Zm2.03 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v4.94a.75.75 0 0 0 1.5 0v-4.94l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z",clipRule:"evenodd"}))}const $L=x.forwardRef(OL);function IL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),x.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const RL=x.forwardRef(IL);function AL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),x.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const PL=x.forwardRef(AL);function DL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const jL=x.forwardRef(DL);function NL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const ML=x.forwardRef(NL);function FL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const LL=x.forwardRef(FL);function BL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const UL=x.forwardRef(BL),sx=D.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},c)=>{const[l,u]=fp({skipSnaps:!0,loop:!0}),[f,d]=D.useState(!0),[p,m]=D.useState(!0),h=D.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),y=D.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:v}}}=lt,b=D.useCallback(w=>{d(!w.canScrollPrev()),m(!w.canScrollNext())},[]);return D.useEffect(()=>{u&&(b(u),u.on("reInit",b),u.on("select",b))},[u,b]),O.jsxs("div",{...v==null?void 0:v.container,"data-container":"carousel",ref:l,children:[O.jsx("div",{ref:c,...v==null?void 0:v.slidesContainer,children:e.map((w,T)=>O.jsx(Pa,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:s},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},T))}),e.length>1&&O.jsxs(O.Fragment,{children:[O.jsx(kL,{...v==null?void 0:v.backButton,"data-disabled":f?"":void 0,onClick:h}),O.jsx(CL,{...v==null?void 0:v.nextButton,"data-disabled":p?"":void 0,onClick:y})]})]})});sx.displayName="Carousel";const lx=Math.floor;function cx(e){return ux(e)?(e.nodeName||"").toLowerCase():"#document"}function os(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zL(e){var t;return(t=(ux(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ux(e){return e instanceof Node||e instanceof os(e).Node}function zn(e){return e instanceof Element||e instanceof os(e).Element}function ka(e){return e instanceof HTMLElement||e instanceof os(e).HTMLElement}function dp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof os(e).ShadowRoot}function qL(e){return["html","body","#document"].includes(cx(e))}function WL(e){return os(e).getComputedStyle(e)}function VL(e){if(cx(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dp(e)&&e.host||zL(e);return dp(t)?t.host:t}function ui(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 Sn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function fx(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function HL(){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 dx(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(fx())||t.test(HL()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function px(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 hx(){return/apple/i.test(navigator.vendor)}function ZL(){return fx().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function mx(e,t){return["mouse","pen"].includes(e)}function KL(e){return"nativeEvent"in e}function GL(e){return e.matches("html,body")}function Jn(e){return(e==null?void 0:e.ownerDocument)||document}function pp(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 vx(e){return"composedPath"in e?e.composedPath()[0]:e.target}const YL="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function yx(e){return ka(e)&&e.matches(YL)}function nn(e){e.preventDefault(),e.stopPropagation()}const Ta=Math.min,In=Math.max,bc=Math.round,wc=Math.floor,fi=e=>({x:e,y:e});function gx(e,t,n){return In(e,Ta(t,n))}function xc(e,t){return typeof e=="function"?e(t):e}function ss(e){return e.split("-")[0]}function hp(e){return e.split("-")[1]}function bx(e){return e==="x"?"y":"x"}function JL(e){return e==="y"?"height":"width"}function ls(e){return["top","bottom"].includes(ss(e))?"y":"x"}function XL(e){return bx(ls(e))}function QL(e){return{top:0,right:0,bottom:0,left:0,...e}}function e5(e){return typeof e!="number"?QL(e):{top:e,right:e,bottom:e,left:e}}function Sc(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 wx(e,t,n){let{reference:r,floating:i}=e;const a=ls(t),o=XL(t),s=JL(o),c=ss(t),l=a==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(hp(t)){case"start":p[o]-=d*(n&&l?-1:1);break;case"end":p[o]+=d*(n&&l?-1:1);break}return p}const t5=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=wx(l,r,c),d=r,p={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:b,y:w,data:T,reset:E}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=b??u,f=w??f,p={...p,[y]:{...p[y],...T}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(l=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:f}=wx(l,d,c)),h=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:p}};async function xx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=xc(t,e),m=e5(p),y=s[d?f==="floating"?"reference":"floating":f],v=Sc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),b=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),T=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:c}):b);return{top:(v.top-E.top+m.top)/T.y,bottom:(E.bottom-v.bottom+m.bottom)/T.y,left:(v.left-E.left+m.left)/T.x,right:(E.right-v.right+m.right)/T.x}}async function n5(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ss(n),s=hp(n),c=ls(n)==="y",l=["left","top"].includes(o)?-1:1,u=a&&c?-1:1,f=xc(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}const r5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await n5(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},i5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...c}=xc(e,t),l={x:n,y:r},u=await xx(t,c),f=ls(ss(i)),d=bx(f);let p=l[d],m=l[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+u[y],w=p-u[v];p=gx(b,p,w)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=m+u[y],w=m-u[v];m=gx(b,m,w)}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:a,[f]:o}}}}}},a5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=xc(e,t),u=await xx(t,l),f=ss(i),d=hp(i),p=ls(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=m-u.left-u.right,T=Ta(h-u[y],b),E=Ta(m-u[v],w),_=!t.middlewareData.shift;let $=T,U=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),_&&!d){const k=In(u.left,0),j=In(u.right,0),W=In(u.top,0),B=In(u.bottom,0);p?U=m-2*(k!==0||j!==0?k+j:In(u.left,u.right)):$=h-2*(W!==0||B!==0?W+B:In(u.top,u.bottom))}await c({...t,availableWidth:U,availableHeight:$});const z=await o.getDimensions(s.floating);return m!==z.width||h!==z.height?{reset:{rects:!0}}:{}}}};function Ec(){return typeof window<"u"}function Ca(e){return Sx(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=(Sx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sx(e){return Ec()?e instanceof Node||e instanceof Rn(e).Node:!1}function Xn(e){return Ec()?e instanceof Element||e instanceof Rn(e).Element:!1}function br(e){return Ec()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function Ex(e){return!Ec()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function cs(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function o5(e){return["table","td","th"].includes(Ca(e))}function _c(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mp(e){const t=vp(),n=Xn(e)?Qn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function s5(e){let t=di(e);for(;br(t)&&!Oa(t);){if(mp(t))return t;if(_c(t))return null;t=di(t)}return null}function vp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(e){return["html","body","#document"].includes(Ca(e))}function Qn(e){return Rn(e).getComputedStyle(e)}function kc(e){return Xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ex(e)&&e.host||gr(e);return Ex(t)?t.host:t}function _x(e){const t=di(e);return Oa(t)?e.ownerDocument?e.ownerDocument.body:e.body:br(t)&&cs(t)?t:_x(t)}function pi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=_x(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Rn(i);if(a){const s=yp(o);return t.concat(o,o.visualViewport||[],cs(i)?i:[],s&&n?pi(s):[])}return t.concat(i,pi(i,[],n))}function yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kx(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=br(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bc(n)!==a||bc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gp(e){return Xn(e)?e:e.contextElement}function $a(e){const t=gp(e);if(!br(t))return fi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kx(t);let o=(a?bc(n.width):n.width)/r,s=(a?bc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const l5=fi(0);function Tx(e){const t=Rn(e);return!vp()||!t.visualViewport?l5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function c5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function qi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=gp(e);let o=fi(1);t&&(r?Xn(r)&&(o=$a(r)):o=$a(e));const s=c5(a,n,r)?Tx(a):fi(0);let c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){const d=Rn(a),p=r&&Xn(r)?Rn(r):r;let m=d,h=yp(m);for(;h&&r&&p!==m;){const y=$a(h),v=h.getBoundingClientRect(),b=Qn(h),w=v.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,f*=y.y,c+=w,l+=T,m=Rn(h),h=yp(m)}}return Sc({width:u,height:f,x:c,y:l})}function u5(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=gr(r),s=t?_c(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fi(1);const u=fi(0),f=br(r);if((f||!f&&!a)&&((Ca(r)!=="body"||cs(o))&&(c=kc(r)),br(r))){const d=qi(r);l=$a(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function f5(e){return Array.from(e.getClientRects())}function bp(e,t){const n=kc(e).scrollLeft;return t?t.left+n:qi(gr(e)).left+n}function d5(e){const t=gr(e),n=kc(e),r=e.ownerDocument.body,i=In(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=In(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+bp(e);const s=-n.scrollTop;return Qn(r).direction==="rtl"&&(o+=In(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function p5(e,t){const n=Rn(e),r=gr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const l=vp();(!l||l&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function h5(e,t){const n=qi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=br(e)?$a(e):fi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function Cx(e,t,n){let r;if(t==="viewport")r=p5(e,n);else if(t==="document")r=d5(gr(e));else if(Xn(t))r=h5(t,n);else{const i=Tx(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Sc(r)}function Ox(e,t){const n=di(e);return n===t||!Xn(n)||Oa(n)?!1:Qn(n).position==="fixed"||Ox(n,t)}function m5(e,t){const n=t.get(e);if(n)return n;let r=pi(e,[],!1).filter(s=>Xn(s)&&Ca(s)!=="body"),i=null;const a=Qn(e).position==="fixed";let o=a?di(e):e;for(;Xn(o)&&!Oa(o);){const s=Qn(o),c=mp(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||cs(o)&&!c&&Ox(e,o))?r=r.filter(u=>u!==o):i=s,o=di(o)}return t.set(e,r),r}function v5(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?_c(t)?[]:m5(t,this._c):[].concat(n),r],s=o[0],c=o.reduce((l,u)=>{const f=Cx(t,u,i);return l.top=In(f.top,l.top),l.right=Ta(f.right,l.right),l.bottom=Ta(f.bottom,l.bottom),l.left=In(f.left,l.left),l},Cx(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function y5(e){const{width:t,height:n}=kx(e);return{width:t,height:n}}function g5(e,t,n){const r=br(t),i=gr(t),a=n==="fixed",o=qi(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=fi(0);if(r||!r&&!a)if((Ca(t)!=="body"||cs(i))&&(s=kc(t)),r){const p=qi(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&(c.x=bp(i));let l=0,u=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();u=p.top+s.scrollTop,l=p.left+s.scrollLeft-bp(i,p)}const f=o.left+s.scrollLeft-c.x-l,d=o.top+s.scrollTop-c.y-u;return{x:f,y:d,width:o.width,height:o.height}}function wp(e){return Qn(e).position==="static"}function $x(e,t){if(!br(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gr(e)===n&&(n=n.ownerDocument.body),n}function Ix(e,t){const n=Rn(e);if(_c(e))return n;if(!br(e)){let i=di(e);for(;i&&!Oa(i);){if(Xn(i)&&!wp(i))return i;i=di(i)}return n}let r=$x(e,t);for(;r&&o5(r)&&wp(r);)r=$x(r,t);return r&&Oa(r)&&wp(r)&&!mp(r)?n:r||s5(e)||n}const b5=async function(e){const t=this.getOffsetParent||Ix,n=this.getDimensions,r=await n(e.floating);return{reference:g5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function w5(e){return Qn(e).direction==="rtl"}const x5={convertOffsetParentRelativeRectToViewportRelativeRect:u5,getDocumentElement:gr,getClippingRect:v5,getOffsetParent:Ix,getElementRects:b5,getClientRects:f5,getDimensions:y5,getScale:$a,isElement:Xn,isRTL:w5};function S5(e,t){let n=null,r;const i=gr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=wc(u),m=wc(i.clientWidth-(l+f)),h=wc(i.clientHeight-(u+d)),y=wc(l),b={rootMargin:-p+"px "+-m+"px "+-h+"px "+-y+"px",threshold:In(0,Ta(1,c))||1};let w=!0;function T(E){const _=E[0].intersectionRatio;if(_!==c){if(!w)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(T,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return o(!0),a}function E5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=gp(e),u=i||a?[...l?pi(l):[],...pi(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?S5(l,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?qi(e):null;c&&y();function y(){const v=qi(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const _5=r5,k5=i5,T5=a5,C5=(e,t,n)=>{const r=new Map,i={platform:x5,...n},a={...i.platform,_c:r};return t5(e,t,{...i,platform:a})};var Tc=typeof document<"u"?D.useLayoutEffect:D.useEffect;function Cc(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(!Cc(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Cc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Rx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ax(e,t){const n=Rx(e);return Math.round(t*n)/n}function xp(e){const t=x.useRef(e);return Tc(()=>{t.current=e}),t}function O5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=x.useState(r);Cc(d,r)||p(r);const[m,h]=x.useState(null),[y,v]=x.useState(null),b=x.useCallback(H=>{H!==_.current&&(_.current=H,h(H))},[]),w=x.useCallback(H=>{H!==$.current&&($.current=H,v(H))},[]),T=a||m,E=o||y,_=x.useRef(null),$=x.useRef(null),U=x.useRef(u),z=c!=null,k=xp(c),j=xp(i),W=xp(l),B=x.useCallback(()=>{if(!_.current||!$.current)return;const H={placement:t,strategy:n,middleware:d};j.current&&(H.platform=j.current),C5(_.current,$.current,H).then(R=>{const g={...R,isPositioned:W.current!==!1};I.current&&!Cc(U.current,g)&&(U.current=g,Tg.flushSync(()=>{f(g)}))})},[d,t,n,j,W]);Tc(()=>{l===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[l]);const I=x.useRef(!1);Tc(()=>(I.current=!0,()=>{I.current=!1}),[]),Tc(()=>{if(T&&(_.current=T),E&&($.current=E),T&&E){if(k.current)return k.current(T,E,B);B()}},[T,E,B,k,z]);const A=x.useMemo(()=>({reference:_,floating:$,setReference:b,setFloating:w}),[b,w]),L=x.useMemo(()=>({reference:T,floating:E}),[T,E]),Z=x.useMemo(()=>{const H={position:n,left:0,top:0};if(!L.floating)return H;const R=Ax(L.floating,u.x),g=Ax(L.floating,u.y);return s?{...H,transform:"translate("+R+"px, "+g+"px)",...Rx(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:g}},[n,s,L.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:B,refs:A,elements:L,floatingStyles:Z}),[u,B,A,L,Z])}const $5=(e,t)=>({..._5(e),options:[e,t]}),I5=(e,t)=>({...k5(e),options:[e,t]}),R5=(e,t)=>({...T5(e),options:[e,t]});/*!
|
|
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]});/*!
|
|
94
244
|
* tabbable 6.2.0
|
|
95
245
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
96
|
-
*/var A5=["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])"],Sp=A5.join(","),Px=typeof Element>"u",us=Px?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oc=!Px&&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},$c=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"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},P5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},D5=function(t,n,r){if($c(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Sp));return n&&us.call(t,Sp)&&i.unshift(t),i=i.filter(r),i},j5=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!$c(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),c=s.length?s:o.children,l=e(c,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var u=us.call(o,Sp);u&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!$c(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},Dx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},jx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||P5(t))&&!Dx(t)?0:t.tabIndex},N5=function(t,n){var r=jx(t);return r<0&&n&&!Dx(t)?0:r},M5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Nx=function(t){return t.tagName==="INPUT"},F5=function(t){return Nx(t)&&t.type==="hidden"},L5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},B5=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},U5=function(t){if(!t.name)return!0;var n=t.form||Oc(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(o){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",o.message),!1}var a=B5(i,t.form);return!a||a===t},z5=function(t){return Nx(t)&&t.type==="radio"},q5=function(t){return z5(t)&&!U5(t)},W5=function(t){var n,r=t&&Oc(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,c;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!a&&i;){var l,u,f;r=Oc(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((u=i)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},Mx=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},V5=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=us.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(us.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var c=t.parentElement,l=Oc(t);if(c&&!c.shadowRoot&&i(c)===!0)return Mx(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(W5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Mx(t);return!1},H5=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 us.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Z5=function(t,n){return!(n.disabled||$c(n)||F5(n)||V5(n,t)||L5(n)||H5(n))},Fx=function(t,n){return!(q5(n)||jx(n)<0||!Z5(t,n))},K5=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},G5=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,c=N5(s,o),l=o?e(i.candidates):s;c===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:c,item:i,isScope:o,content:l})}),r.sort(M5).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Ep=function(t,n){n=n||{};var r;return n.getShadowRoot?r=j5([t],n.includeContainer,{filter:Fx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:K5}):r=D5(t,n.includeContainer,Fx.bind(null,n)),G5(r)};const _p="ArrowUp",Ic="ArrowDown",Ia="ArrowLeft",fs="ArrowRight";function Rc(e,t,n){return Math.floor(e/t)!==n}function ds(e,t){return t<0||t>=e.current.length}function kp(e,t){return cn(e,{disabledIndices:t})}function Lx(e,t){return cn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var c,l;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(c=o[s])!=null&&c.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function Y5(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===_p){if(u&&nn(n),l===-1)f=c;else if(f=cn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const d=l%a,p=c%a,m=c-(p-d);p===d?f=c:f=p>d?m:m-a}ds(e,f)&&(f=l)}if(n.key===Ic&&(u&&nn(n),l===-1?f=s:(f=cn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>c&&(f=cn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),ds(e,f)&&(f=l)),r==="both"){const d=lx(l/a);n.key===fs&&(u&&nn(n),l%a!==a-1?(f=cn(e,{startingIndex:l,disabledIndices:o}),i&&Rc(f,a,d)&&(f=cn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=cn(e,{startingIndex:l-l%a-1,disabledIndices:o})),Rc(f,a,d)&&(f=l)),n.key===Ia&&(u&&nn(n),l%a!==0?(f=cn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&Rc(f,a,d)&&(f=cn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=cn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),Rc(f,a,d)&&(f=l));const p=lx(c/a)===d;ds(e,f)&&(i&&p?f=n.key===Ia?c:cn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let Bx=0;function Wr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Bx);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():Bx=requestAnimationFrame(a)}var Wt=typeof document<"u"?D.useLayoutEffect:D.useEffect;function Ac(){return Ac=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},Ac.apply(this,arguments)}let Tp=!1,J5=0;const Ux=()=>"floating-ui-"+J5++;function X5(){const[e,t]=x.useState(()=>Tp?Ux():void 0);return Wt(()=>{e==null&&t(Ux())},[]),x.useEffect(()=>{Tp||(Tp=!0)},[]),e}const Cp=x.useId||X5;function Q5(){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 e4=x.createContext(null),t4=x.createContext(null),zx=()=>{var e;return((e=x.useContext(e4))==null?void 0:e.id)||null},Pc=()=>x.useContext(t4);function ps(e){return"data-floating-ui-"+e}function hi(e){const t=D.useRef(e);return Wt(()=>{t.current=e}),t}function n4(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Ra(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function r4(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),Ra(e,a).forEach(c=>{i(c.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let Aa=new WeakMap,Dc=new WeakSet,jc={},Op=0;const i4=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,qx=e=>e&&(e.host||qx(e.parentNode)),a4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=qx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function o4(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=a4(t,e),s=new Set,c=new Set(o),l=[];jc[i]||(jc[i]=new WeakMap);const u=jc[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,m=>{if(s.has(m))d(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(Aa.get(m)||0)+1,b=(u.get(m)||0)+1;Aa.set(m,v),u.set(m,b),l.push(m),v===1&&y&&Dc.add(m),b===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return Op++,()=>{l.forEach(p=>{const m=(Aa.get(p)||0)-1,h=(u.get(p)||0)-1;Aa.set(p,m),u.set(p,h),m||(!Dc.has(p)&&a&&p.removeAttribute(a),Dc.delete(p)),h||p.removeAttribute(i)}),Op--,Op||(Aa=new WeakMap,Aa=new WeakMap,Dc=new WeakSet,jc={})}}function Wx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Jn(e[0]).body;return o4(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $p=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Vx(e,t){const n=Ep(e,$p());t==="prev"&&n.reverse();const r=n.indexOf(ui(Jn(e)));return n.slice(r+1)[0]}function Hx(){return Vx(document.body,"next")}function Zx(){return Vx(document.body,"prev")}function hs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Sn(n,r)}function s4(e){Ep(e,$p()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function l4(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 Ip={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 c4;function Kx(e){e.key==="Tab"&&(e.target,clearTimeout(c4))}const Nc=x.forwardRef(function(t,n){const[r,i]=x.useState();Wt(()=>(hx()&&i("button"),document.addEventListener("keydown",Kx),()=>{document.removeEventListener("keydown",Kx)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ps("focus-guard")]:"",style:Ip};return x.createElement("span",Ac({},t,a))}),Gx=x.createContext(null);function u4(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=x.useState(null),a=Cp(),o=Yx(),s=x.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),c=x.useRef();return Wt(()=>()=>{r==null||r.remove()},[r,s]),Wt(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:f,uniqueId:d}=s,p=l?document.getElementById(l):null,m=ps("portal");if(p){const h=document.createElement("div");h.id=d,h.setAttribute(m,""),p.appendChild(h),i(h)}else{let h=u||(f==null?void 0:f.portalNode);h&&!zn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function f4(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=u4({id:n,root:r}),[o,s]=x.useState(null),c=x.useRef(null),l=x.useRef(null),u=x.useRef(null),f=x.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return x.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(m){a&&hs(m)&&(m.type==="focusin"?l4:s4)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),x.createElement(Gx.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&x.createElement(Nc,{"data-type":"outside",ref:c,onFocus:p=>{if(hs(p,a)){var m;(m=u.current)==null||m.focus()}else{const h=Zx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),d&&a&&x.createElement("span",{"aria-owns":a.id,style:Ip}),a&&ji.createPortal(t,a),d&&a&&x.createElement(Nc,{"data-type":"outside",ref:l,onFocus:p=>{if(hs(p,a)){var m;(m=f.current)==null||m.focus()}else{const h=Hx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const Yx=()=>x.useContext(Gx),d4=x.forwardRef(function(t,n){return x.createElement("button",Ac({},t,{type:"button",ref:n,tabIndex:-1,style:Ip}))});function p4(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:b}}=t,w=i4()?a:!0,T=hi(i),E=hi(o),_=hi(s),$=Pc(),U=Yx(),z=typeof o=="number"&&o<0,k=x.useRef(null),j=x.useRef(null),W=x.useRef(!1),B=x.useRef(null),I=x.useRef(!1),A=U!=null,L=v&&v.getAttribute("role")==="combobox"&&yx(v)&&z,Z=x.useCallback(function(N){return N===void 0&&(N=b),N?Ep(N,$p()):[]},[b]),H=x.useCallback(N=>{const V=Z(N);return T.current.map(S=>v&&S==="reference"?v:b&&S==="floating"?b:V).filter(Boolean).flat()},[v,b,T,Z]);x.useEffect(()=>{if(r||!c)return;function N(S){if(S.key==="Tab"){Sn(b,ui(Jn(b)))&&Z().length===0&&!L&&nn(S);const K=H(),J=vx(S);T.current[0]==="reference"&&J===v&&(nn(S),S.shiftKey?Wr(K[K.length-1]):Wr(K[1])),T.current[1]==="floating"&&J===b&&S.shiftKey&&(nn(S),Wr(K[0]))}}const V=Jn(b);return V.addEventListener("keydown",N),()=>{V.removeEventListener("keydown",N)}},[r,v,b,c,T,d,L,Z,H]),x.useEffect(()=>{if(r||!u)return;function N(){I.current=!0,setTimeout(()=>{I.current=!1})}function V(S){const K=S.relatedTarget;queueMicrotask(()=>{const J=!(Sn(v,K)||Sn(b,K)||Sn(K,b)||Sn(U==null?void 0:U.portalNode,K)||K!=null&&K.hasAttribute(ps("focus-guard"))||$&&(Ra($.nodesRef.current,p).find(Y=>{var Q,ae;return Sn((Q=Y.context)==null?void 0:Q.elements.floating,K)||Sn((ae=Y.context)==null?void 0:ae.elements.domReference,K)})||n4($.nodesRef.current,p).find(Y=>{var Q,ae;return((Q=Y.context)==null?void 0:Q.elements.floating)===K||((ae=Y.context)==null?void 0:ae.elements.domReference)===K})));K&&J&&!I.current&&K!==B.current&&(W.current=!0,m(!1,S))})}if(b&&ka(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",N),!c&&b.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",N),!c&&b.removeEventListener("focusout",V)}},[r,v,b,c,p,$,U,m,u]),x.useEffect(()=>{var N;if(r)return;const V=Array.from((U==null||(N=U.portalNode)==null?void 0:N.querySelectorAll("["+ps("portal")+"]"))||[]);if(b){const S=[b,...V,k.current,j.current,T.current.includes("reference")||L?v:null].filter(J=>J!=null),K=c?Wx(S,w,!w):Wx(S);return()=>{K()}}},[r,v,b,c,T,U,L,w]),Wt(()=>{if(r||!b)return;const N=Jn(b),V=ui(N);queueMicrotask(()=>{const S=H(b),K=E.current,J=(typeof K=="number"?S[K]:K.current)||b,Y=Sn(b,V);!z&&!Y&&f&&Wr(J,{preventScroll:J===b})})},[r,f,b,z,H,E]),Wt(()=>{if(r||!b)return;let N=!1;const V=Jn(b),S=ui(V),K=y.current;B.current=S;function J(Y){if(Y.type==="escapeKey"&&d.domReference.current&&(B.current=d.domReference.current),["referencePress","escapeKey"].includes(Y.type))return;const Q=Y.data.returnFocus;typeof Q=="object"?(W.current=!1,N=Q.preventScroll):W.current=!Q}return h.on("dismiss",J),()=>{h.off("dismiss",J);const Y=ui(V);(Sn(b,Y)||$&&Ra($.nodesRef.current,p).some(ae=>{var oe;return Sn((oe=ae.context)==null?void 0:oe.elements.floating,Y)})||K.openEvent&&["click","mousedown"].includes(K.openEvent.type))&&d.domReference.current&&(B.current=d.domReference.current),_.current&&ka(B.current)&&!W.current&&Wr(B.current,{cancelPrevious:!1,preventScroll:N})}},[r,b,_,y,d,h,$,p]),Wt(()=>{if(!(r||!U))return U.setFocusManagerState({modal:c,closeOnFocusOut:u,open:f,onOpenChange:m,refs:d}),()=>{U.setFocusManagerState(null)}},[r,U,c,f,m,d,u]),Wt(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!z){const N=()=>{const S=b.getAttribute("tabindex");T.current.includes("floating")||ui(Jn(b))!==d.domReference.current&&Z().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};N();const V=new MutationObserver(N);return V.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}}},[r,b,d,T,Z,z]);function R(N){return r||!l||!c?null:x.createElement(d4,{ref:N==="start"?k:j,onClick:V=>m(!1,V.nativeEvent)},typeof l=="string"?l:"Dismiss")}const g=!r&&w&&!L&&(A||c);return x.createElement(x.Fragment,null,g&&x.createElement(Nc,{"data-type":"inside",ref:U==null?void 0:U.beforeInsideRef,onFocus:N=>{if(c){const S=H();Wr(i[0]==="reference"?S[0]:S[S.length-1])}else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(W.current=!1,hs(N,U.portalNode)){const S=Hx()||v;S==null||S.focus()}else{var V;(V=U.beforeOutsideRef.current)==null||V.focus()}}}),!L&&R("start"),n,R("end"),g&&x.createElement(Nc,{"data-type":"inside",ref:U==null?void 0:U.afterInsideRef,onFocus:N=>{if(c)Wr(H()[0]);else if(U!=null&&U.preserveTabOrder&&U.portalNode)if(u&&(W.current=!0),hs(N,U.portalNode)){const S=Zx()||v;S==null||S.focus()}else{var V;(V=U.afterOutsideRef.current)==null||V.focus()}}}))}function Jx(e){return ka(e.target)&&e.target.tagName==="BUTTON"}function Xx(e){return yx(e)}function h4(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,f=x.useRef(),d=x.useRef(!1);return x.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(mx(f.current)&&l||s!=="click"&&(n&&c&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}mx(f.current)&&l||(n&&c&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||Jx(p))&&(p.key===" "&&!Xx(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&c),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!u||Jx(p)||Xx(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&c),p.nativeEvent))}}}:{},[o,i,s,l,u,a,c,n,r])}const m4=x.useInsertionEffect||(e=>e());function mi(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return m4(()=>{t.current=e}),x.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 v4={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},y4={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},g4=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 b4(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,b=Pc(),w=zx()!=null,T=mi(typeof d=="function"?d:()=>!1),E=typeof d=="function"?T:d,_=x.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:U}=g4(v),z=mi(j=>{if(!n||!u||!f||j.key!=="Escape")return;const W=b?Ra(b.nodesRef.current,a):[];if(!$&&(j.stopPropagation(),W.length>0)){let B=!0;if(W.forEach(I=>{var A;if((A=I.context)!=null&&A.open&&!I.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,KL(j)?j.nativeEvent:j)}),k=mi(j=>{const W=_.current;if(_.current=!1,W||typeof E=="function"&&!E(j))return;const B=vx(j),I="["+ps("inert")+"]",A=Jn(c).querySelectorAll(I);let L=zn(B)?B:null;for(;L&&!qL(L);){const R=VL(L);if(R===Jn(c).body||!zn(R))break;L=R}if(A.length&&zn(B)&&!GL(B)&&!Sn(B,c)&&Array.from(A).every(R=>!Sn(L,R)))return;if(ka(B)&&c){const R=B.clientWidth>0&&B.scrollWidth>B.clientWidth,g=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let N=g&&j.offsetX>B.clientWidth;if(g&&WL(B).direction==="rtl"&&(N=j.offsetX<=B.offsetWidth-B.clientWidth),N||R&&j.offsetY>B.clientHeight)return}const Z=b&&Ra(b.nodesRef.current,a).some(R=>{var g;return pp(j,(g=R.context)==null?void 0:g.elements.floating)});if(pp(j,c)||pp(j,s)||Z)return;const H=b?Ra(b.nodesRef.current,a):[];if(H.length>0){let R=!0;if(H.forEach(g=>{var N;if((N=g.context)!=null&&N.open&&!g.context.dataRef.current.__outsidePressBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:dx(j)||px(j)}}),r(!1,j)});return x.useEffect(()=>{if(!n||!u)return;l.current.__escapeKeyBubbles=$,l.current.__outsidePressBubbles=U;function j(I){r(!1,I)}const W=Jn(c);f&&W.addEventListener("keydown",z),E&&W.addEventListener(p,k);let B=[];return y&&(zn(s)&&(B=pi(s)),zn(c)&&(B=B.concat(pi(c))),!zn(o)&&o&&o.contextElement&&(B=B.concat(pi(o.contextElement)))),B=B.filter(I=>{var A;return I!==((A=W.defaultView)==null?void 0:A.visualViewport)}),B.forEach(I=>{I.addEventListener("scroll",j,{passive:!0})}),()=>{f&&W.removeEventListener("keydown",z),E&&W.removeEventListener(p,k),B.forEach(I=>{I.removeEventListener("scroll",j)})}},[l,c,s,o,f,E,p,n,r,y,u,$,U,z,k]),x.useEffect(()=>{_.current=!1},[E,p]),x.useMemo(()=>u?{reference:{onKeyDown:z,[v4[h]]:j=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,j.nativeEvent))}},floating:{onKeyDown:z,[y4[p]]:()=>{_.current=!0}}}:{},[u,i,m,p,h,r,z])}let Rp;process.env.NODE_ENV!=="production"&&(Rp=new Set);function w4(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const $="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((a=e.elements)!=null&&a.reference&&!zn(e.elements.reference)){var o;if(!((o=Rp)!=null&&o.has($))){var s;(s=Rp)==null||s.add($),console.error($)}}}const[c,l]=x.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,f=O5(e),d=Pc(),p=mi(($,U)=>{$&&(h.current.openEvent=U),r==null||r($,U)}),m=x.useRef(null),h=x.useRef({}),y=x.useState(()=>Q5())[0],v=Cp(),b=x.useCallback($=>{const U=zn($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(U)},[f.refs]),w=x.useCallback($=>{(zn($)||$===null)&&(m.current=$,l($)),(zn(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!zn($))&&f.refs.setReference($)},[f.refs]),T=x.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:m}),[f.refs,w,b]),E=x.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),_=x.useMemo(()=>({...f,refs:T,elements:E,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,T,E]);return Wt(()=>{const $=d==null?void 0:d.nodesRef.current.find(U=>U.id===i);$&&($.context=_)}),x.useMemo(()=>({...f,context:_,refs:T,elements:E}),[f,T,E,_])}function Ap(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,c]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof c=="function"){var l;(l=r.get(s))==null||l.push(c),i[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(u=r.get(s))==null?void 0:u.map(m=>m(...d)).find(m=>m!==void 0)}}}else i[s]=c}),i),{})}}function x4(e){e===void 0&&(e=[]);const t=e,n=x.useCallback(a=>Ap(a,e,"reference"),t),r=x.useCallback(a=>Ap(a,e,"floating"),t),i=x.useCallback(a=>Ap(a,e,"item"),e.map(a=>a==null?void 0:a.item));return x.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Qx=!1;function Mc(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e1(e,t){return Mc(t,e===_p||e===Ic,e===Ia||e===fs)}function Pp(e,t,n){return Mc(t,e===Ic,n?e===Ia:e===fs)||e==="Enter"||e==" "||e===""}function S4(e,t,n){return Mc(t,n?e===Ia:e===fs,e===Ic)}function t1(e,t,n){return Mc(t,n?e===fs:e===Ia,e===_p)}function E4(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:T=void 0,orientation:E="vertical",cols:_=1,scrollItemIntoView:$=!0,virtualItemRef:U}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=zx(),k=Pc(),j=mi(l),W=x.useRef(v),B=x.useRef(f??-1),I=x.useRef(null),A=x.useRef(!0),L=x.useRef(j),Z=x.useRef(!!o),H=x.useRef(!1),R=x.useRef(!1),g=hi(T),N=hi(n),V=hi($),[S,K]=x.useState(),[J,Y]=x.useState(),Q=mi(function(X,ee,G){G===void 0&&(G=!1);const pe=X.current[ee.current];pe&&(y?(K(pe.id),k==null||k.events.emit("virtualfocus",pe),U&&(U.current=pe)):Wr(pe,{preventScroll:!0,sync:ZL()&&hx()?Qx||H.current:!1}),requestAnimationFrame(()=>{const ge=V.current;ge&&pe&&(G||!A.current)&&(pe.scrollIntoView==null||pe.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});Wt(()=>{document.createElement("div").focus({get preventScroll(){return Qx=!0,!1}})},[]),Wt(()=>{u&&(n&&o?W.current&&f!=null&&(R.current=!0,j(f)):Z.current&&(B.current=-1,L.current(null)))},[u,n,o,f,j]),Wt(()=>{if(u&&n&&o)if(c==null){if(H.current=!1,f!=null)return;if(Z.current&&(B.current=-1,Q(s,B)),!Z.current&&W.current&&(I.current!=null||W.current===!0&&I.current==null)){let X=0;const ee=()=>{s.current[0]==null?(X<2&&(X?requestAnimationFrame:queueMicrotask)(ee),X++):(B.current=I.current==null||Pp(I.current,E,h)||m?kp(s,g.current):Lx(s,g.current),I.current=null,j(B.current))};ee()}}else ds(s,c)||(B.current=c,Q(s,B,R.current),R.current=!1)},[u,n,o,c,f,m,s,E,h,j,Q,g]),Wt(()=>{var X,ee;if(!u||o||!k||y||!Z.current)return;const G=k.nodesRef.current,pe=(X=G.find(F=>F.id===z))==null||(ee=X.context)==null?void 0:ee.elements.floating,ge=ui(Jn(o)),Ie=G.some(F=>F.context&&Sn(F.context.elements.floating,ge));pe&&!Ie&&A.current&&pe.focus({preventScroll:!0})},[u,o,k,z,y]),Wt(()=>{if(!u||!k||!y||z)return;function X(ee){Y(ee.id),U&&(U.current=ee)}return k.events.on("virtualfocus",X),()=>{k.events.off("virtualfocus",X)}},[u,k,y,z,U]),Wt(()=>{L.current=j,Z.current=!!o}),Wt(()=>{n||(I.current=null)},[n]);const ae=c!=null,oe=x.useMemo(()=>{function X(G){if(!n)return;const pe=s.current.indexOf(G);pe!==-1&&j(pe)}return{onFocus(G){let{currentTarget:pe}=G;X(pe)},onClick:G=>{let{currentTarget:pe}=G;return pe.focus({preventScroll:!0})},...b&&{onMouseMove(G){let{currentTarget:pe}=G;X(pe)},onPointerLeave(G){let{pointerType:pe}=G;!A.current||pe==="touch"||(B.current=-1,Q(s,B),j(null),y||Wr(i.floating.current,{preventScroll:!0}))}}}},[n,i,Q,b,s,j,y]);return x.useMemo(()=>{if(!u)return{};const X=g.current;function ee(F){if(A.current=!1,H.current=!0,!N.current&&F.currentTarget===i.floating.current)return;if(m&&t1(F.key,E,h)){nn(F),r(!1,F.nativeEvent),ka(a)&&!y&&a.focus();return}const ie=B.current,ue=kp(s,X),se=Lx(s,X);if(F.key==="Home"&&(nn(F),B.current=ue,j(B.current)),F.key==="End"&&(nn(F),B.current=se,j(B.current)),!(_>1&&(B.current=Y5(s,{event:F,orientation:E,loop:p,cols:_,disabledIndices:X,minIndex:ue,maxIndex:se,prevIndex:B.current,stopEvent:!0}),j(B.current),E==="both"))&&e1(F.key,E)){if(nn(F),n&&!y&&ui(F.currentTarget.ownerDocument)===F.currentTarget){B.current=Pp(F.key,E,h)?ue:se,j(B.current);return}Pp(F.key,E,h)?p?B.current=ie>=se?d&&ie!==s.current.length?-1:ue:cn(s,{startingIndex:ie,disabledIndices:X}):B.current=Math.min(se,cn(s,{startingIndex:ie,disabledIndices:X})):p?B.current=ie<=ue?d&&ie!==-1?s.current.length:se:cn(s,{startingIndex:ie,decrement:!0,disabledIndices:X}):B.current=Math.max(ue,cn(s,{startingIndex:ie,decrement:!0,disabledIndices:X})),ds(s,B.current)?j(null):j(B.current)}}function G(F){v==="auto"&&dx(F.nativeEvent)&&(W.current=!0)}function pe(F){W.current=v,v==="auto"&&px(F.nativeEvent)&&(W.current=!0)}const ge=y&&n&&ae&&{"aria-activedescendant":J||S},Ie=s.current.find(F=>(F==null?void 0:F.id)===S);return{reference:{...ge,onKeyDown(F){A.current=!1;const ie=F.key.indexOf("Arrow")===0,ue=S4(F.key,E,h),se=t1(F.key,E,h),Ce=e1(F.key,E),Ee=(m?ue:Ce)||F.key==="Enter"||F.key.trim()==="";if(y&&n){const fe=k==null?void 0:k.nodesRef.current.find(M=>M.parentId==null),q=k&&fe?r4(k.nodesRef.current,fe.id):null;if(ie&&q&&U){const M=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(ue||se){var Ae,He;const ne=((Ae=q.context)==null?void 0:Ae.elements.domReference)===F.currentTarget,he=se&&!ne?(He=q.context)==null?void 0:He.elements.domReference:ue?Ie:null;he&&(nn(F),he.dispatchEvent(M),Y(void 0))}if(Ce&&q.context&&q.context.open&&q.parentId&&F.currentTarget!==q.context.elements.domReference){var te;nn(F),(te=q.context.elements.domReference)==null||te.dispatchEvent(M);return}}return ee(F)}if(!(!n&&!w&&ie)){if(Ee&&(I.current=m&&Ce?null:F.key),m){ue&&(nn(F),n?(B.current=kp(s,X),j(B.current)):r(!0,F.nativeEvent));return}Ce&&(f!=null&&(B.current=f),nn(F),!n&&w?r(!0,F.nativeEvent):ee(F),n&&j(B.current))}},onFocus(){n&&j(null)},onPointerDown:pe,onMouseDown:G,onClick:G},floating:{"aria-orientation":E==="both"?void 0:E,...ge,onKeyDown:ee,onPointerMove(){A.current=!0}},item:oe}},[a,i,S,J,g,N,s,u,E,h,y,n,ae,m,f,w,d,_,p,v,j,r,oe,k,U])}function _4(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Cp();return x.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function k4(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,m=x.useRef(),h=x.useRef(""),y=x.useRef((n=p??o)!=null?n:-1),v=x.useRef(null),b=mi(s),w=mi(c),T=hi(u),E=hi(d);return Wt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),Wt(()=>{if(r&&h.current===""){var _;y.current=(_=p??o)!=null?_:-1}},[r,p,o]),x.useMemo(()=>{if(!l)return{};function _(z){z?i.current.typing||(i.current.typing=z,w(z)):i.current.typing&&(i.current.typing=z,w(z))}function $(z,k,j){const W=T.current?T.current(k,j):k.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return W?z.indexOf(W):-1}function U(z){const k=a.current;if(h.current.length>0&&h.current[0]!==" "&&($(k,k,h.current)===-1?_(!1):z.key===" "&&nn(z)),k==null||E.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;r&&z.key!==" "&&(nn(z),_(!0)),k.every(I=>{var A,L;return I?((A=I[0])==null?void 0:A.toLocaleLowerCase())!==((L=I[1])==null?void 0:L.toLocaleLowerCase()):!0})&&h.current===z.key&&(h.current="",y.current=v.current),h.current+=z.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,_(!1)},f);const W=y.current,B=$(k,[...k.slice((W||0)+1),...k.slice(0,(W||0)+1)],h.current);B!==-1?(b(B),v.current=B):z.key!==" "&&(h.current="",_(!1))}return{reference:{onKeyDown:U},floating:{onKeyDown:U,onKeyUp(z){z.key===" "&&_(!1)}}}},[l,r,i,a,f,E,T,b,w])}const T4=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var I,A,L,Z,H;const i=hc(R=>R.messageContainerRef),[a,o]=x.useState(!1),[s,c]=x.useState(null),[l,u]=x.useState(null),{message:{blocks:{dropdown:f}}}=lt,d=e.reduce((R,g)=>(R[g.label]=g.value,R),{}),p=d?Object.keys(d):[],m=R=>{o(l!==null&&!t?!1:R)},{refs:h,floatingStyles:y,context:v}=w4({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:E5,middleware:[$5(5),I5({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),R5({apply({rects:R,elements:g,availableHeight:N}){Object.assign(g.floating.style,{maxHeight:`${N}px`,minWidth:`${R.reference.width}px`})},padding:10})]}),b=x.useRef([]),w=x.useRef(p),T=x.useRef(!1),E=h4(v,{event:"mousedown"}),_=b4(v),$=_4(v,{role:"listbox"}),U=E4(v,{listRef:b,activeIndex:s,selectedIndex:l,onNavigate:c,loop:!0}),z=k4(v,{listRef:w,activeIndex:s,selectedIndex:l,onMatch:a?c:u,onTypingChange(R){T.current=R}}),{getReferenceProps:k,getFloatingProps:j,getItemProps:W}=x4([_,$,U,z,E]),B=R=>{u(R),p[R]!==void 0&&(n==null||n({type:"text",text:p[R]??"",value:d[p[R]]??""})),o(!1)};return O.jsxs(O.Fragment,{children:[O.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":l!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(I=f.button)==null?void 0:I.container,...k(),children:[O.jsx("span",{...(A=f.button)==null?void 0:A.text,children:"Select..."}),O.jsx(MF,{...(L=f.button)==null?void 0:L.icon})]}),a&&O.jsx(f4,{children:O.jsx(p4,{context:v,modal:!1,children:O.jsx("div",{ref:h.setFloating,className:(H=(Z=f.content)==null?void 0:Z.container)==null?void 0:H.className,style:{...y},...j(),children:p.map((R,g)=>{var N;return O.jsx("div",{ref:V=>{b.current[g]=V},role:"option",tabIndex:g===s?0:-1,"aria-selected":g===l&&g===s,"data-active":g===s?"":void 0,...(N=f.content)==null?void 0:N.item,...W({onClick(){B(g)},onKeyDown(V){V.key==="Enter"&&(V.preventDefault(),B(g)),V.key===" "&&!T.current&&(V.preventDefault(),B(g))}}),children:R},R)})})})})]})},n1=D.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:a}}}=lt;return O.jsxs("a",{...r,...a.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[O.jsx("p",{...a.title,children:e||t}),O.jsx(LF,{...a.icon})]})});n1.displayName="File";const C4=xa()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(l=>l.text()),a=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(a)),c=()=>s.default;return e(l=>({components:{...l.components,[n]:c}})),c}}));globalThis.React=D;const r1={audio:G0,bubble:U0,button:OF,carousel:sx,column:J0,dropdown:T4,file:n1,image:Z0,location:Y0,row:X0,text:rF,video:K0,custom:({url:e,name:t,data:n,...r})=>{const i=C4(l=>l.getCustomComponent),[a,o]=D.useState(null),[s,c]=D.useState(null);return D.useEffect(()=>{i(e).then(o).catch(l=>{c(l.message)})},[e]),s?O.jsx("div",{style:{color:"red"},children:s}):a?O.jsx(a,{...n,...r}):null}},Pa=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??r1[e.type],i={...n,...e};return O.jsx(r,{...i})};function O4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const $4=x.forwardRef(O4);function I4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),x.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const R4=x.forwardRef(I4);function i1(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=i1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ms(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=i1(e))&&(r&&(r+=" "),r+=t);return r}const A4=({disabled:e,onFileSelected:t})=>{const n=D.useRef(null),{container:r,icon:i}=lt.composer.uploadButton,a=()=>{n.current&&n.current.click()},o=s=>{const c=s.target.files;c&&c.length>0&&Array.from(c).forEach(l=>{t(l)})};return O.jsxs(O.Fragment,{children:[O.jsx("button",{type:"button",disabled:e,...r,children:O.jsx(UL,{...i,"data-disabled":e,onClick:a})}),O.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},P4=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:a,fileIcon:o,removeIcon:s,errorIcon:c,previewImage:l}=lt.composer.fileWidget,u=["PNG","JPEG","JPG"].includes(Lc(e)),f=D.useMemo(()=>u?URL.createObjectURL(n):"",[n]);return r==="loading"?O.jsx(Fc,{name:e,status:r,removeButton:O.jsx("div",{...a}),extension:Lc(e),children:O.jsx("div",{...o.container,children:O.jsx(Dp,{type:t,...o.icon})})}):r==="error"?O.jsx(Fc,{name:e,status:r,removeButton:O.jsx(op,{onClick:()=>i(e),...s}),extension:"Upload Error",children:O.jsxs("div",{...o.container,children:[O.jsx(UF,{...c}),O.jsx(Dp,{type:t,...o.icon})]})}):r=="uploaded"&&u?O.jsx(Fc,{name:e,status:r,removeButton:O.jsx(op,{onClick:()=>i(e),...s}),extension:Lc(e),children:O.jsx("div",{...o.container,children:O.jsx("img",{src:f,alt:e,...l})})}):O.jsx(Fc,{name:e,status:r,removeButton:O.jsx(op,{onClick:()=>i(e),...s}),extension:Lc(e),children:O.jsx("div",{...o.container,children:O.jsx(Dp,{type:t,...o.icon})})})},Fc=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:a,metadata:o}=lt.composer.fileWidget;return O.jsxs("div",{"data-status":t,title:e,...a,children:[n,r,O.jsxs("div",{...o.container,children:[O.jsx("div",{...o.name,children:e}),O.jsx("div",{...o.type,children:i})]})]})},Dp=({type:e,...t})=>e==="image"?O.jsx(JM,{...t}):e==="video"?O.jsx(tF,{...t}):e==="audio"?O.jsx(QM,{...t}):O.jsx(GM,{...t}),Lc=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"};function jp(){return jp=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},jp.apply(null,arguments)}function D4(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 j4=D.useLayoutEffect,N4=function(t){var n=x.useRef(t);return j4(function(){n.current=t}),n},a1=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},M4=function(t,n){var r=D.useRef();return D.useCallback(function(i){t.current=i,r.current&&a1(r.current,null),r.current=n,n&&a1(n,i)},[n])},o1={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},F4=function(t){Object.keys(o1).forEach(function(n){t.style.setProperty(n,o1[n],"important")})},s1=F4,yn=null,l1=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function L4(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),yn||(yn=document.createElement("textarea"),yn.setAttribute("tabindex","-1"),yn.setAttribute("aria-hidden","true"),s1(yn)),yn.parentNode===null&&document.body.appendChild(yn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;yn.style[p]=o[p]}),s1(yn),yn.value=t;var c=l1(yn,e);yn.value=t,c=l1(yn,e),yn.value="x";var l=yn.scrollHeight-i,u=l*n;s==="border-box"&&(u=u+i+a),c=Math.max(u,c);var f=l*r;return s==="border-box"&&(f=f+i+a),c=Math.min(f,c),[c,l]}var c1=function(){},B4=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},U4=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],z4=!!document.documentElement.currentStyle,q4=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=B4(U4,n),i=r.boxSizing;if(i==="")return null;z4&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},W4=q4;function u1(e,t,n){var r=N4(n);x.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var V4=function(t){u1(window,"resize",t)},H4=function(t){u1(document.fonts,"loadingdone",t)},Z4=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],K4=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?c1:o,c=t.onHeightChange,l=c===void 0?c1:c,u=D4(t,Z4),f=u.value!==void 0,d=x.useRef(null),p=M4(d,n),m=x.useRef(0),h=x.useRef(),y=function(){var w=d.current,T=r&&h.current?h.current:W4(w);if(T){h.current=T;var E=L4(T,w.value||w.placeholder||"x",a,i),_=E[0],$=E[1];m.current!==_&&(m.current=_,w.style.setProperty("height",_+"px","important"),l(_,{rowHeight:$}))}},v=function(w){f||y(),s(w)};return x.useLayoutEffect(y),V4(y),H4(y),x.createElement("textarea",jp({},u,{onChange:v,ref:p}))},G4=x.forwardRef(K4);const Y4=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:a,setHistoryIndex:o,sendComposerMessage:s})=>{const c=A0(u=>u.messageHistory),{input:l}=lt.composer;return O.jsx(G4,{...l,ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:u=>a(u.target.value),maxRows:5,onKeyDown:u=>{n||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),a(`${r}
|
|
97
|
-
`)):
|
|
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
|
|
98
248
|
* react-is.production.min.js
|
|
99
249
|
*
|
|
100
250
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
101
251
|
*
|
|
102
252
|
* This source code is licensed under the MIT license found in the
|
|
103
253
|
* LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/var
|
|
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
|
|
105
255
|
* react-is.development.js
|
|
106
256
|
*
|
|
107
257
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
108
258
|
*
|
|
109
259
|
* This source code is licensed under the MIT license found in the
|
|
110
260
|
* LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/var
|
|
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}/*
|
|
112
262
|
object-assign
|
|
113
263
|
(c) Sindre Sorhus
|
|
114
264
|
@license MIT
|
|
115
|
-
*/var
|
|
116
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
117
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
118
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
119
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
120
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1(e,t){if(e){if(typeof e=="string")return Zp(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 Zp(e,t)}}function Zp(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 GB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function YB(e){if(Array.isArray(e))return e}function B1(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 Ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B1(Object(n),!0).forEach(function(r){Kp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vc(e,t){if(e==null)return{};var n=JB(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hc=D.forwardRef(function(e,t){var n=e.children,r=Vc(e,BB),i=XB(r),a=i.open,o=Vc(i,UB);return D.useImperativeHandle(t,function(){return{open:a}},[a]),D.createElement(D.Fragment,null,n(Ot(Ot({},o),{},{open:a})))});Hc.displayName="Dropzone";var U1={disabled:!1,getFilesFromEvent:cB,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};Hc.defaultProps=U1,Hc.propTypes={children:bt.func,accept:bt.objectOf(bt.arrayOf(bt.string)),multiple:bt.bool,preventDropOnDocument:bt.bool,noClick:bt.bool,noKeyboard:bt.bool,noDrag:bt.bool,noDragEventsBubbling:bt.bool,minSize:bt.number,maxSize:bt.number,maxFiles:bt.number,disabled:bt.bool,getFilesFromEvent:bt.func,onFileDialogCancel:bt.func,onFileDialogOpen:bt.func,useFsAccessApi:bt.bool,autoFocus:bt.bool,onDragEnter:bt.func,onDragLeave:bt.func,onDragOver:bt.func,onDrop:bt.func,onDropAccepted:bt.func,onDropRejected:bt.func,onError:bt.func,validator:bt.func};var Gp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function XB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ot(Ot({},U1),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,_=t.noDrag,$=t.noDragEventsBubbling,U=t.onError,z=t.validator,k=D.useMemo(function(){return MB(n)},[n]),j=D.useMemo(function(){return NB(n)},[n]),W=D.useMemo(function(){return typeof y=="function"?y:z1},[y]),B=D.useMemo(function(){return typeof h=="function"?h:z1},[h]),I=D.useRef(null),A=D.useRef(null),L=D.useReducer(QB,Gp),Z=Hp(L,2),H=Z[0],R=Z[1],g=H.isFocused,N=H.isFileDialogActive,V=D.useRef(typeof window<"u"&&window.isSecureContext&&v&&jB()),S=function(){!V.current&&N&&setTimeout(function(){if(A.current){var fe=A.current.files;fe.length||(R({type:"closeDialog"}),B())}},300)};D.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[A,N,B,V]);var K=D.useRef([]),J=function(fe){I.current&&I.current.contains(fe.target)||(fe.preventDefault(),K.current=[])};D.useEffect(function(){return w&&(document.addEventListener("dragover",N1,!1),document.addEventListener("drop",J,!1)),function(){w&&(document.removeEventListener("dragover",N1),document.removeEventListener("drop",J))}},[I,w]),D.useEffect(function(){return!r&&b&&I.current&&I.current.focus(),function(){}},[I,b,r]);var Y=D.useCallback(function(te){U?U(te):console.error(te)},[U]),Q=D.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te),K.current=[].concat(WB(K.current),[te.target]),Wc(te)&&Promise.resolve(i(te)).then(function(fe){if(!(qc(te)&&!$)){var q=fe.length,M=q>0&&RB({files:fe,accept:k,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:z}),ne=q>0&&!M;R({isDragAccept:M,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),l&&l(te)}}).catch(function(fe){return Y(fe)})},[i,l,Y,$,k,o,a,s,c,z]),ae=D.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te);var fe=Wc(te);if(fe&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return fe&&f&&f(te),!1},[f,$]),oe=D.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te);var fe=K.current.filter(function(M){return I.current&&I.current.contains(M)}),q=fe.indexOf(te.target);q!==-1&&fe.splice(q,1),K.current=fe,!(fe.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Wc(te)&&u&&u(te))},[I,u,$]),X=D.useCallback(function(te,fe){var q=[],M=[];te.forEach(function(ne){var he=D1(ne,k),Se=Hp(he,2),$e=Se[0],Ze=Se[1],et=j1(ne,o,a),Tt=Hp(et,2),Et=Tt[0],qe=Tt[1],_t=z?z(ne):null;if($e&&Et&&!_t)q.push(ne);else{var Ke=[Ze,qe];_t&&(Ke=Ke.concat(_t)),M.push({file:ne,errors:Ke.filter(function(hn){return hn})})}}),(!s&&q.length>1||s&&c>=1&&q.length>c)&&(q.forEach(function(ne){M.push({file:ne,errors:[IB]})}),q.splice(0)),R({acceptedFiles:q,fileRejections:M,type:"setFiles"}),d&&d(q,M,fe),M.length>0&&m&&m(M,fe),q.length>0&&p&&p(q,fe)},[R,s,k,o,a,c,d,p,m,z]),ee=D.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te),K.current=[],Wc(te)&&Promise.resolve(i(te)).then(function(fe){qc(te)&&!$||X(fe,te)}).catch(function(fe){return Y(fe)}),R({type:"reset"})},[i,X,Y,$]),G=D.useCallback(function(){if(V.current){R({type:"openDialog"}),W();var te={multiple:s,types:j};window.showOpenFilePicker(te).then(function(fe){return i(fe)}).then(function(fe){X(fe,null),R({type:"closeDialog"})}).catch(function(fe){FB(fe)?(B(fe),R({type:"closeDialog"})):LB(fe)?(V.current=!1,A.current?(A.current.value=null,A.current.click()):Y(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."))):Y(fe)});return}A.current&&(R({type:"openDialog"}),W(),A.current.value=null,A.current.click())},[R,W,B,v,X,Y,j,s]),pe=D.useCallback(function(te){!I.current||!I.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),G())},[I,G]),ge=D.useCallback(function(){R({type:"focus"})},[]),Ie=D.useCallback(function(){R({type:"blur"})},[]),F=D.useCallback(function(){T||(DB()?setTimeout(G,0):G())},[T,G]),ie=function(fe){return r?null:fe},ue=function(fe){return E?null:ie(fe)},se=function(fe){return _?null:ie(fe)},Ce=function(fe){$&&fe.stopPropagation()},Ee=D.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,q=fe===void 0?"ref":fe,M=te.role,ne=te.onKeyDown,he=te.onFocus,Se=te.onBlur,$e=te.onClick,Ze=te.onDragEnter,et=te.onDragOver,Tt=te.onDragLeave,Et=te.onDrop,qe=Vc(te,zB);return Ot(Ot(Kp({onKeyDown:ue(wr(ne,pe)),onFocus:ue(wr(he,ge)),onBlur:ue(wr(Se,Ie)),onClick:ie(wr($e,F)),onDragEnter:se(wr(Ze,Q)),onDragOver:se(wr(et,ae)),onDragLeave:se(wr(Tt,oe)),onDrop:se(wr(Et,ee)),role:typeof M=="string"&&M!==""?M:"presentation"},q,I),!r&&!E?{tabIndex:0}:{}),qe)}},[I,pe,ge,Ie,F,Q,ae,oe,ee,E,_,r]),Ae=D.useCallback(function(te){te.stopPropagation()},[]),He=D.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,q=fe===void 0?"ref":fe,M=te.onChange,ne=te.onClick,he=Vc(te,qB),Se=Kp({accept:k,multiple:s,type:"file",style:{display:"none"},onChange:ie(wr(M,ee)),onClick:ie(wr(ne,Ae)),tabIndex:-1},q,A);return Ot(Ot({},Se),he)}},[A,n,s,ee,r]);return Ot(Ot({},H),{},{isFocused:g&&!r,getRootProps:Ee,getInputProps:He,rootRef:I,inputRef:A,open:ie(G)})}function QB(e,t){switch(t.type){case"focus":return Ot(Ot({},e),{},{isFocused:!0});case"blur":return Ot(Ot({},e),{},{isFocused:!1});case"openDialog":return Ot(Ot({},Gp),{},{isFileDialogActive:!0});case"closeDialog":return Ot(Ot({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ot(Ot({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ot(Ot({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ot({},Gp);default:return e}}function z1(){}const Yp=({children:e})=>{const[t,n]=D.useState(!1),[r,i]=D.useState(""),[a,o]=D.useState(null),s=({title:l,content:u})=>{i(l),o(u),n(!0)},c=()=>{n(!1)};return O.jsxs(q0.Provider,{value:{hideModal:c,showModal:s,title:r,content:a,open:t},children:[O.jsx(gi,{open:t,onOpenChange:n,children:O.jsx(gi.Content,{title:r,children:a})}),e]})},q1=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=D.useMemo(()=>vb({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return O.jsx("style",{children:a})};function Vr(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 W1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function V1(...e){return t=>{let n=!1;const r=e.map(i=>{const a=W1(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():W1(e[i],null)}}}}function vi(...e){return x.useCallback(V1(...e),e)}function e3(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,c=x.useMemo(()=>s,Object.values(s));return O.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function H1(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),c=n.length;n=[...n,o];const l=f=>{var v;const{scope:d,children:p,...m}=f,h=((v=d==null?void 0:d[e])==null?void 0:v[c])||s,y=x.useMemo(()=>m,Object.values(m));return O.jsx(h.Provider,{value:y,children:p})};l.displayName=a+"Provider";function u(f,d){var h;const p=((h=d==null?void 0:d[e])==null?void 0:h[c])||s,m=x.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,u]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,t3(i,...t)]}function t3(...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(a){const o=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var n3=x.useId||(()=>{}),r3=0;function Zc(e){const[t,n]=x.useState(n3());return ua(()=>{e||n(r=>r??String(r3++))},[e]),e||(t?`radix-${t}`:"")}function Z1({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=i3({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ri(n),c=x.useCallback(l=>{if(a){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[a,e,i,s]);return[o,c]}function i3({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),a=ri(t);return x.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var Jp=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(o3);if(a){const o=a.props.children,s=i.map(c=>c===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return O.jsx(Xp,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return O.jsx(Xp,{...r,ref:t,children:n})});Jp.displayName="Slot";var Xp=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=l3(n);return x.cloneElement(n,{...s3(r,n.props),ref:t?V1(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});Xp.displayName="SlotClone";var a3=({children:e})=>O.jsx(O.Fragment,{children:e});function o3(e){return x.isValidElement(e)&&e.type===a3}function s3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function l3(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 c3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],er=c3.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Jp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function u3(e,t){e&&Tg.flushSync(()=>e.dispatchEvent(t))}function f3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e);x.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 d3="DismissableLayer",Qp="dismissableLayer.update",p3="dismissableLayer.pointerDownOutside",h3="dismissableLayer.focusOutside",K1,G1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Y1=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=x.useContext(G1),[u,f]=x.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),m=vi(t,$=>f($)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),b=u?h.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=b>=v,E=y3($=>{const U=$.target,z=[...l.branches].some(k=>k.contains(U));!T||z||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},d),_=g3($=>{const U=$.target;[...l.branches].some(k=>k.contains(U))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},d);return f3($=>{b===l.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},d),x.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(K1=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),J1(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=K1)}},[u,d,n,l]),x.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),J1())},[u,l]),x.useEffect(()=>{const $=()=>p({});return document.addEventListener(Qp,$),()=>document.removeEventListener(Qp,$)},[]),O.jsx(er.div,{...c,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Vr(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Vr(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Vr(e.onPointerDownCapture,E.onPointerDownCapture)})});Y1.displayName=d3;var m3="DismissableLayerBranch",v3=x.forwardRef((e,t)=>{const n=x.useContext(G1),r=x.useRef(null),i=vi(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),O.jsx(er.div,{...e,ref:i})});v3.displayName=m3;function y3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){X1(p3,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&X1(h3,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function J1(){const e=new CustomEvent(Qp);document.dispatchEvent(e)}function X1(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?u3(i,a):i.dispatchEvent(a)}var eh="focusScope.autoFocusOnMount",th="focusScope.autoFocusOnUnmount",Q1={bubbles:!1,cancelable:!0},b3="FocusScope",eS=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=x.useState(null),l=ri(i),u=ri(a),f=x.useRef(null),d=vi(t,h=>c(h)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let h=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?f.current=T:yi(f.current,{select:!0})},y=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||yi(f.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&yi(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,p.paused]),x.useEffect(()=>{if(s){rS.add(p);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(eh,Q1);s.addEventListener(eh,l),s.dispatchEvent(v),v.defaultPrevented||(w3(k3(tS(s)),{select:!0}),document.activeElement===h&&yi(s))}return()=>{s.removeEventListener(eh,l),setTimeout(()=>{const v=new CustomEvent(th,Q1);s.addEventListener(th,u),s.dispatchEvent(v),v.defaultPrevented||yi(h??document.body,{select:!0}),s.removeEventListener(th,u),rS.remove(p)},0)}}},[s,l,u,p]);const m=x.useCallback(h=>{if(!n&&!r||p.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const b=h.currentTarget,[w,T]=x3(b);w&&T?!h.shiftKey&&v===T?(h.preventDefault(),n&&yi(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&yi(T,{select:!0})):v===b&&h.preventDefault()}},[n,r,p.paused]);return O.jsx(er.div,{tabIndex:-1,...o,ref:d,onKeyDown:m})});eS.displayName=b3;function w3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yi(r,{select:t}),document.activeElement!==n)return}function x3(e){const t=tS(e),n=nS(t,e),r=nS(t.reverse(),e);return[n,r]}function tS(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 nS(e,t){for(const n of e)if(!S3(n,{upTo:t}))return n}function S3(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 E3(e){return e instanceof HTMLInputElement&&"select"in e}function yi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&E3(e)&&t&&e.select()}}var rS=_3();function _3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=iS(e,t),e.unshift(t)},remove(t){var n;e=iS(e,t),(n=e[0])==null||n.resume()}}}function iS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function k3(e){return e.filter(t=>t.tagName!=="A")}function T3(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Kc=e=>{const{present:t,children:n}=e,r=C3(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=vi(r.ref,O3(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};Kc.displayName="Presence";function C3(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,c]=T3(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=Gc(r.current);a.current=s==="mounted"?l:"none"},[s]),ua(()=>{const l=r.current,u=i.current;if(u!==e){const d=a.current,p=Gc(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ua(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=p=>{const h=Gc(r.current).includes(p.animationName);if(p.target===t&&h&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Gc(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Gc(e){return(e==null?void 0:e.animationName)||"none"}function O3(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 nh=0;function $3(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aS()),document.body.insertAdjacentElement("beforeend",e[1]??aS()),nh++,()=>{nh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nh--}},[])}function aS(){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 Yc="right-scroll-bar-position",Jc="width-before-scroll-bar",I3="with-scroll-bars-hidden",R3="--removed-body-scroll-bar-size";function rh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function A3(e,t){var n=D.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 P3=typeof window<"u"?x.useLayoutEffect:x.useEffect,oS=new WeakMap;function D3(e,t){var n=A3(null,function(r){return e.forEach(function(i){return rh(i,r)})});return P3(function(){var r=oS.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||rh(s,null)}),a.forEach(function(s){i.has(s)||rh(s,o)})}oS.set(n,e)},[e]),n}function j3(e){return e}function N3(e,t){t===void 0&&(t=j3);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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var c=function(){var u=o;o=[],u.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),n}}}};return i}function M3(e){e===void 0&&(e={});var t=N3(null);return t.options=Un({async:!0,ssr:!1},e),t}var sS=function(e){var t=e.sideCar,n=V0(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 x.createElement(r,Un({},n))};sS.isSideCarExport=!0;function F3(e,t){return e.useMedium(t),sS}var lS=M3(),ih=function(){},Xc=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:ih,onWheelCapture:ih,onTouchMoveCapture:ih}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=e.gapMode,w=V0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=d,E=D3([n,t]),_=Un(Un({},w),i);return x.createElement(x.Fragment,null,u&&x.createElement(T,{sideCar:lS,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),o?x.cloneElement(x.Children.only(s),Un(Un({},_),{ref:E})):x.createElement(v,Un({},_,{className:c,ref:E}),s))});Xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xc.classNames={fullWidth:Jc,zeroRight:Yc};var L3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=L3();return t&&e.setAttribute("nonce",t),e}function U3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function z3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var q3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=B3())&&(U3(t,n),z3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W3=function(){var e=q3();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cS=function(){var e=W3(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},V3={left:0,top:0,right:0,gap:0},ah=function(e){return parseInt(e||"",10)||0},H3=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[ah(n),ah(r),ah(i)]},Z3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V3;var t=H3(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])}},K3=cS(),Da="data-scroll-locked",G3=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
121
|
-
|
|
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:{}};/*!
|
|
272
|
+
Copyright (c) 2018 Jed Watson.
|
|
273
|
+
Licensed under the MIT License (MIT), see
|
|
274
|
+
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(`
|
|
282
|
+
`,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,` {
|
|
122
285
|
overflow: hidden `).concat(r,`;
|
|
123
286
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
124
287
|
}
|
|
125
|
-
body[`).concat(
|
|
288
|
+
body[`).concat(ci,`] {
|
|
126
289
|
overflow: hidden `).concat(r,`;
|
|
127
290
|
overscroll-behavior: contain;
|
|
128
291
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
129
292
|
padding-left: `.concat(i,`px;
|
|
130
|
-
padding-top: `).concat(
|
|
131
|
-
padding-right: `).concat(
|
|
293
|
+
padding-top: `).concat(o,`px;
|
|
294
|
+
padding-right: `).concat(a,`px;
|
|
132
295
|
margin-left:0;
|
|
133
296
|
margin-top:0;
|
|
134
297
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
135
298
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
136
299
|
}
|
|
137
300
|
|
|
138
|
-
.`).concat(
|
|
301
|
+
.`).concat(qs,` {
|
|
139
302
|
right: `).concat(s,"px ").concat(r,`;
|
|
140
303
|
}
|
|
141
304
|
|
|
142
|
-
.`).concat(
|
|
305
|
+
.`).concat(Gs,` {
|
|
143
306
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
144
307
|
}
|
|
145
308
|
|
|
146
|
-
.`).concat(
|
|
309
|
+
.`).concat(qs," .").concat(qs,` {
|
|
147
310
|
right: 0 `).concat(r,`;
|
|
148
311
|
}
|
|
149
312
|
|
|
150
|
-
.`).concat(
|
|
313
|
+
.`).concat(Gs," .").concat(Gs,` {
|
|
151
314
|
margin-right: 0 `).concat(r,`;
|
|
152
315
|
}
|
|
153
316
|
|
|
154
|
-
body[`).concat(
|
|
155
|
-
`).concat(
|
|
317
|
+
body[`).concat(ci,`] {
|
|
318
|
+
`).concat(jG,": ").concat(s,`px;
|
|
156
319
|
}
|
|
157
|
-
`)},
|
|
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`
|
|
158
321
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
159
322
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
160
|
-
`)},
|
|
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.
|
|
161
324
|
|
|
162
325
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
163
326
|
|
|
164
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},SU="DialogDescriptionWarning",EU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${AS(SU).contentName}}.`;return x.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_U=wS,kU=SS,TU=_S,CU=kS,OU=CS,PS=IS;function gi({open:e,onOpenChange:t,children:n}){return O.jsx(_U,{open:e,onOpenChange:t,children:n})}function $U({title:e,children:t}){var r,i,a,o,s,c,l,u;const{modal:n}=lt;return O.jsxs(O.Fragment,{children:[O.jsx(TU,{...n==null?void 0:n.overlay}),O.jsx("div",{...n==null?void 0:n.container,children:O.jsxs(CU,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[O.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[O.jsx(OU,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),O.jsx(PS,{children:O.jsx(w0,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),O.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}gi.Button=kU,gi.Close=PS,gi.Content=$U;const fh=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...a})=>{const{container:o}=lt,s=hc(u=>u.setMessageContainerRef),c=rs(u=>u.uploadFile),l=D.useRef(null);return D.useEffect(()=>{s(l)},[l]),i&&r?O.jsx(Hc,{noClick:!0,onDrop:u=>u.forEach(f=>c(f,r)),children:({getRootProps:u,isDragActive:f})=>O.jsxs("div",{...a,className:ms(o.className,t),ref:l,children:[O.jsxs("div",{"data-hover":f,...o.dropzone.overlay,children:["Drop files to upload",O.jsx($L,{style:{width:"50px"}})]}),O.jsxs(Yp,{children:[O.jsx(DS,{connected:n}),O.jsx("div",{...o.dropzone.container,...u(),children:e})]})]})}):O.jsx("div",{...a,className:ms(o.className,t),ref:l,children:O.jsxs(Yp,{children:[O.jsx(DS,{connected:n}),e]})})},DS=({connected:e})=>{const{modal:t}=lt,{showModal:n}=W0();return D.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:O.jsxs(O.Fragment,{children:[O.jsx("p",{...(i=(r=t==null?void 0:t.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),O.jsx(gi.Close,{asChild:!0,children:O.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),O.jsx(O.Fragment,{})};fh.displayName="Container";const jS=D.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=lt,{container:a,icon:o}=i??{};return O.jsx("div",{...n,...a,ref:r,onClick:t,children:O.jsx("div",{...o})})});jS.displayName="Fab";var dh="Collapsible",[IU,Dfe]=H1(dh),[RU,ph]=IU(dh),NS=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c=!1,l]=Z1({prop:r,defaultProp:i,onChange:o});return O.jsx(RU,{scope:n,disabled:a,contentId:Zc(),open:c,onOpenToggle:x.useCallback(()=>l(u=>!u),[l]),children:O.jsx(er.div,{"data-state":mh(c),"data-disabled":a?"":void 0,...s,ref:t})})});NS.displayName=dh;var MS="CollapsibleTrigger",FS=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ph(MS,n);return O.jsx(er.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":mh(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Vr(e.onClick,i.onOpenToggle)})});FS.displayName=MS;var hh="CollapsibleContent",LS=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ph(hh,e.__scopeCollapsible);return O.jsx(Kc,{present:n||i.open,children:({present:a})=>O.jsx(AU,{...r,ref:t,present:a})})});LS.displayName=hh;var AU=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ph(hh,n),[s,c]=x.useState(r),l=x.useRef(null),u=vi(t,l),f=x.useRef(0),d=f.current,p=x.useRef(0),m=p.current,h=o.open||s,y=x.useRef(h),v=x.useRef(void 0);return x.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),ua(()=>{const b=l.current;if(b){v.current=v.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,p.current=w.width,y.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),c(r)}},[o.open,r]),O.jsx(er.div,{"data-state":mh(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function mh(e){return e?"open":"closed"}var PU=NS,DU=LS;const BS=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=lt,{showModal:i}=W0(),a=c=>{var l,u,f,d;c.stopPropagation(),i({title:"Restart Conversation",content:O.jsxs(O.Fragment,{children:[O.jsx("p",{...(u=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),O.jsx(gi.Close,{asChild:!0,children:O.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:e,children:"Restart"})})]})})};return O.jsx(jF,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:c=>{c.key==="Enter"&&a(c)}})},jU=({onClick:e,...t})=>{const{header:n}=lt,r=i=>{i.stopPropagation(),e==null||e()};return O.jsx(w0,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},gs=({icon:e,title:t,link:n,...r})=>{var o,s,c,l,u,f,d,p,m,h,y,v;const{header:i}=lt,a=e??EL;return t?n?O.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[O.jsx(a,{...(l=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),O.jsx("p",{...(f=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):O.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[O.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),O.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},US=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var u,f,d,p,m,h,y,v,b,w,T,E,_,$,U,z,k,j,W,B,I,A;const{header:a}=lt,[o,s]=D.useState(!!e),c=!!((u=n.email)!=null&&u.title)||!!((f=n.phone)!=null&&f.title)||!!((d=n.website)!=null&&d.title)||!!((p=n.termsOfService)!=null&&p.link)||!!((m=n.privacyPolicy)!=null&&m.link),l=c||!!n.botDescription;return O.jsxs(PU,{open:l?o:!1,onOpenChange:s,"data-disabled":l?void 0:"",...a.container,...i,children:[O.jsxs(FS,{...a.content.container,children:[O.jsx(Zl,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),O.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&O.jsx("p",{...a.content.description,children:n.botDescription}),O.jsxs("div",{...a.content.actions.container,children:[r&&O.jsx(BS,{onClick:r}),t&&O.jsx(jU,{onClick:t})]})]}),c&&O.jsxs(DU,{...a.expandedContent.container,children:[O.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[O.jsx(gs,{"data-email":"",icon:PL,title:(h=n.email)==null?void 0:h.title,link:(v=(y=n.email)==null?void 0:y.link)!=null&&v.startsWith("mailto:")?(b=n.email)==null?void 0:b.link:`mailto:${(w=n.email)==null?void 0:w.link}`}),O.jsx(gs,{"data-phone":"",icon:LL,title:(T=n.phone)==null?void 0:T.title,link:(_=(E=n.phone)==null?void 0:E.link)!=null&&_.startsWith("tel:")?($=n.phone)==null?void 0:$.link:`tel:${(U=n.phone)==null?void 0:U.link}`}),O.jsx(gs,{"data-website":"",link:(z=n.website)==null?void 0:z.link,icon:jL,title:(k=n.website)==null?void 0:k.title})]}),O.jsxs("div",{"data-legal":"",...(j=a.expandedContent)==null?void 0:j.group,children:[O.jsx(gs,{"data-terms":"",link:(W=n.termsOfService)==null?void 0:W.link,icon:RL,title:(B=n.termsOfService)==null?void 0:B.title}),O.jsx(gs,{"data-privacy":"",link:(I=n.privacyPolicy)==null?void 0:I.link,icon:ML,title:(A=n.privacyPolicy)==null?void 0:A.title})]})]})]})},zS=D.memo(({...e})=>{const{typingIndicator:t}=lt;return O.jsx("div",{...e,...t==null?void 0:t.container,children:O.jsx("div",{...t==null?void 0:t.loader})})}),vh=D.memo(D.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,authorId:o,renderers:s,sendMessage:c,isReadOnly:l,timestamp:u},f)=>{var b,w,T;const[d,p]=D.useState([]),{message:m}=lt,h=Ug(o??"",15),[y,v]=D.useState("idle");return O.jsx(z0.Provider,{value:{isLoading:d,setIsLoading:p},children:O.jsxs("div",{...m==null?void 0:m.container,"data-loaded":d.length===0,"data-disable-input":!!n,"data-direction":e,ref:f,children:[O.jsxs(Kf,{"data-color":h,"data-loading-status":y,...(b=m==null?void 0:m.avatar)==null?void 0:b.container,children:[O.jsx(Gf,{...(w=m==null?void 0:m.avatar)==null?void 0:w.image,onLoadingStatusChange:v,src:i==null?void 0:i.avatar}),O.jsxs(Yf,{...(T=m==null?void 0:m.avatar)==null?void 0:T.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&O.jsx(Pa,{block:{...t,isReadOnly:l,direction:e,timestamp:u,sender:i,messageId:a,sendMessage:c},renderers:s}),r]})})}));function NU({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=lt;return O.jsxs("li",{...r.container,children:[O.jsx(Zl,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),O.jsxs("div",{...r.content,children:[O.jsx("h1",{...r.title,children:n||"Bot"}),O.jsx("p",{...r.description,children:t})]})]})}function MU(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 FU(){MU("react-scroll-to-bottom:version","4.2.0")}var bs=function(e){return e&&e.Math===Math&&e},Vt=bs(typeof globalThis=="object"&&globalThis)||bs(typeof window=="object"&&window)||bs(typeof self=="object"&&self)||bs(typeof vt=="object"&&vt)||bs(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")(),Ht=function(e){try{return!!e()}catch{return!0}},LU=Ht,iu=!LU(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),BU=iu,qS=Function.prototype,WS=qS.apply,VS=qS.call,yh=typeof Reflect=="object"&&Reflect.apply||(BU?VS.bind(WS):function(){return VS.apply(WS,arguments)}),HS=iu,ZS=Function.prototype,gh=ZS.call,UU=HS&&ZS.bind.bind(gh,gh),Bt=HS?UU:function(e){return function(){return gh.apply(e,arguments)}},KS=Bt,zU=KS({}.toString),qU=KS("".slice),Hi=function(e){return qU(zU(e),8,-1)},WU=Hi,VU=Bt,bh=function(e){if(WU(e)==="Function")return VU(e)},wh=typeof document=="object"&&document.all,un=typeof wh>"u"&&wh!==void 0?function(e){return typeof e=="function"||e===wh}:function(e){return typeof e=="function"},ws={},HU=Ht,En=!HU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZU=iu,au=Function.prototype.call,Sr=ZU?au.bind(au):function(){return au.apply(au,arguments)},xh={},GS={}.propertyIsEnumerable,YS=Object.getOwnPropertyDescriptor,KU=YS&&!GS.call({1:2},1);xh.f=KU?function(t){var n=YS(this,t);return!!n&&n.enumerable}:GS;var xs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},GU=Bt,YU=Ht,JU=Hi,Sh=Object,XU=GU("".split),JS=YU(function(){return!Sh("z").propertyIsEnumerable(0)})?function(e){return JU(e)==="String"?XU(e,""):Sh(e)}:Sh,Eh=function(e){return e==null},QU=Eh,e7=TypeError,ou=function(e){if(QU(e))throw new e7("Can't call method on "+e);return e},t7=JS,n7=ou,Er=function(e){return t7(n7(e))},r7=un,tr=function(e){return typeof e=="object"?e!==null:r7(e)},rn={},_h=rn,kh=Vt,i7=un,XS=function(e){return i7(e)?e:void 0},_r=function(e,t){return arguments.length<2?XS(_h[e])||XS(kh[e]):_h[e]&&_h[e][t]||kh[e]&&kh[e][t]},a7=Bt,Hr=a7({}.isPrototypeOf),o7=Vt,QS=o7.navigator,eE=QS&&QS.userAgent,Th=eE?String(eE):"",tE=Vt,Ch=Th,nE=tE.process,rE=tE.Deno,iE=nE&&nE.versions||rE&&rE.version,aE=iE&&iE.v8,nr,su;aE&&(nr=aE.split("."),su=nr[0]>0&&nr[0]<4?1:+(nr[0]+nr[1])),!su&&Ch&&(nr=Ch.match(/Edge\/(\d+)/),(!nr||nr[1]>=74)&&(nr=Ch.match(/Chrome\/(\d+)/),nr&&(su=+nr[1])));var Oh=su,oE=Oh,s7=Ht,l7=Vt,c7=l7.String,Fa=!!Object.getOwnPropertySymbols&&!s7(function(){var e=Symbol("symbol detection");return!c7(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oE&&oE<41}),u7=Fa,sE=u7&&!Symbol.sham&&typeof Symbol.iterator=="symbol",f7=_r,d7=un,p7=Hr,h7=sE,m7=Object,Ss=h7?function(e){return typeof e=="symbol"}:function(e){var t=f7("Symbol");return d7(t)&&p7(t.prototype,m7(e))},v7=String,lu=function(e){try{return v7(e)}catch{return"Object"}},y7=un,g7=lu,b7=TypeError,cu=function(e){if(y7(e))return e;throw new b7(g7(e)+" is not a function")},w7=cu,x7=Eh,$h=function(e,t){var n=e[t];return x7(n)?void 0:w7(n)},Ih=Sr,Rh=un,Ah=tr,S7=TypeError,E7=function(e,t){var n,r;if(t==="string"&&Rh(n=e.toString)&&!Ah(r=Ih(n,e))||Rh(n=e.valueOf)&&!Ah(r=Ih(n,e))||t!=="string"&&Rh(n=e.toString)&&!Ah(r=Ih(n,e)))return r;throw new S7("Can't convert object to primitive value")},lE={exports:{}},cE=Vt,_7=Object.defineProperty,k7=function(e,t){try{_7(cE,e,{value:t,configurable:!0,writable:!0})}catch{cE[e]=t}return t},T7=Vt,C7=k7,uE="__core-js_shared__",fE=lE.exports=T7[uE]||C7(uE,{});(fE.versions||(fE.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 Ph=lE.exports,dE=Ph,La=function(e,t){return dE[e]||(dE[e]=t||{})},O7=ou,$7=Object,Zr=function(e){return $7(O7(e))},I7=Bt,R7=Zr,A7=I7({}.hasOwnProperty),An=Object.hasOwn||function(t,n){return A7(R7(t),n)},P7=Bt,D7=0,j7=Math.random(),N7=P7(1 .toString),Dh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+N7(++D7+j7,36)},M7=Vt,F7=La,pE=An,L7=Dh,B7=Fa,U7=sE,Ba=M7.Symbol,jh=F7("wks"),z7=U7?Ba.for||Ba:Ba&&Ba.withoutSetter||L7,Xt=function(e){return pE(jh,e)||(jh[e]=B7&&pE(Ba,e)?Ba[e]:z7("Symbol."+e)),jh[e]},q7=Sr,hE=tr,mE=Ss,W7=$h,V7=E7,H7=Xt,Z7=TypeError,K7=H7("toPrimitive"),G7=function(e,t){if(!hE(e)||mE(e))return e;var n=W7(e,K7),r;if(n){if(t===void 0&&(t="default"),r=q7(n,e,t),!hE(r)||mE(r))return r;throw new Z7("Can't convert object to primitive value")}return t===void 0&&(t="number"),V7(e,t)},Y7=G7,J7=Ss,Nh=function(e){var t=Y7(e,"string");return J7(t)?t:t+""},X7=Vt,vE=tr,Mh=X7.document,Q7=vE(Mh)&&vE(Mh.createElement),yE=function(e){return Q7?Mh.createElement(e):{}},e6=En,t6=Ht,n6=yE,gE=!e6&&!t6(function(){return Object.defineProperty(n6("div"),"a",{get:function(){return 7}}).a!==7}),r6=En,i6=Sr,a6=xh,o6=xs,s6=Er,l6=Nh,c6=An,u6=gE,bE=Object.getOwnPropertyDescriptor;ws.f=r6?bE:function(t,n){if(t=s6(t),n=l6(n),u6)try{return bE(t,n)}catch{}if(c6(t,n))return o6(!i6(a6.f,t,n),t[n])};var f6=Ht,d6=un,p6=/#|\.prototype\./,Es=function(e,t){var n=m6[h6(e)];return n===y6?!0:n===v6?!1:d6(t)?f6(t):!!t},h6=Es.normalize=function(e){return String(e).replace(p6,".").toLowerCase()},m6=Es.data={},v6=Es.NATIVE="N",y6=Es.POLYFILL="P",g6=Es,wE=bh,b6=cu,w6=iu,x6=wE(wE.bind),Fh=function(e,t){return b6(e),t===void 0?e:w6?x6(e,t):function(){return e.apply(t,arguments)}},rr={},S6=En,E6=Ht,xE=S6&&E6(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_6=tr,k6=String,T6=TypeError,bi=function(e){if(_6(e))return e;throw new T6(k6(e)+" is not an object")},C6=En,O6=gE,$6=xE,uu=bi,SE=Nh,I6=TypeError,Lh=Object.defineProperty,R6=Object.getOwnPropertyDescriptor,Bh="enumerable",Uh="configurable",zh="writable";rr.f=C6?$6?function(t,n,r){if(uu(t),n=SE(n),uu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&zh in r&&!r[zh]){var i=R6(t,n);i&&i[zh]&&(t[n]=r.value,r={configurable:Uh in r?r[Uh]:i[Uh],enumerable:Bh in r?r[Bh]:i[Bh],writable:!1})}return Lh(t,n,r)}:Lh:function(t,n,r){if(uu(t),n=SE(n),uu(r),O6)try{return Lh(t,n,r)}catch{}if("get"in r||"set"in r)throw new I6("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var A6=En,P6=rr,D6=xs,fu=A6?function(e,t,n){return P6.f(e,t,D6(1,n))}:function(e,t,n){return e[t]=n,e},_s=Vt,j6=yh,N6=bh,M6=un,F6=ws.f,L6=g6,Ua=rn,B6=Fh,za=fu,EE=An,U6=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 j6(e,this,arguments)};return t.prototype=e.prototype,t},yt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?_s:i?_s[n]:_s[n]&&_s[n].prototype,s=r?Ua:Ua[n]||za(Ua,n,{})[n],c=s.prototype,l,u,f,d,p,m,h,y,v;for(d in t)l=L6(r?d:n+(i?".":"#")+d,e.forced),u=!l&&o&&EE(o,d),m=s[d],u&&(e.dontCallGetSet?(v=F6(o,d),h=v&&v.value):h=o[d]),p=u&&h?h:t[d],!(!l&&!a&&typeof m==typeof p)&&(e.bind&&u?y=B6(p,_s):e.wrap&&u?y=U6(p):a&&M6(p)?y=N6(p):y=p,(e.sham||p&&p.sham||m&&m.sham)&&za(y,"sham",!0),za(s,d,y),a&&(f=n+"Prototype",EE(Ua,f)||za(Ua,f,{}),za(Ua[f],d,p),e.real&&c&&(l||!c[d])&&za(c,d,p)))},z6=Hi,qa=Array.isArray||function(t){return z6(t)==="Array"},q6=yt,W6=qa;q6({target:"Array",stat:!0},{isArray:W6});var V6=rn,H6=V6.Array.isArray,Z6=H6,_E=Z6,K6=_E,G6=K6,Y6=G6,J6=Y6,X6=J6;const kE=Ge(X6);function Q6(e){if(kE(e))return e}var ez=Math.ceil,tz=Math.floor,nz=Math.trunc||function(t){var n=+t;return(n>0?tz:ez)(n)},rz=nz,du=function(e){var t=+e;return t!==t||t===0?0:rz(t)},iz=du,az=Math.min,oz=function(e){var t=iz(e);return t>0?az(t,9007199254740991):0},sz=oz,Zi=function(e){return sz(e.length)},lz=TypeError,cz=9007199254740991,qh=function(e){if(e>cz)throw lz("Maximum allowed index exceeded");return e},uz=En,fz=rr,dz=xs,ks=function(e,t,n){uz?fz.f(e,t,dz(0,n)):e[t]=n},pz=Xt,hz=pz("toStringTag"),TE={};TE[hz]="z";var Wh=String(TE)==="[object z]",mz=Wh,vz=un,pu=Hi,yz=Xt,gz=yz("toStringTag"),bz=Object,wz=pu(function(){return arguments}())==="Arguments",xz=function(e,t){try{return e[t]}catch{}},Ts=mz?pu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=xz(t=bz(e),gz))=="string"?n:wz?pu(t):(r=pu(t))==="Object"&&vz(t.callee)?"Arguments":r},Sz=Bt,Ez=un,Vh=Ph,_z=Sz(Function.toString);Ez(Vh.inspectSource)||(Vh.inspectSource=function(e){return _z(e)});var kz=Vh.inspectSource,Tz=Bt,Cz=Ht,CE=un,Oz=Ts,$z=_r,Iz=kz,OE=function(){},$E=$z("Reflect","construct"),Hh=/^\s*(?:class|function)\b/,Rz=Tz(Hh.exec),Az=!Hh.test(OE),Cs=function(t){if(!CE(t))return!1;try{return $E(OE,[],t),!0}catch{return!1}},IE=function(t){if(!CE(t))return!1;switch(Oz(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Az||!!Rz(Hh,Iz(t))}catch{return!0}};IE.sham=!0;var Zh=!$E||Cz(function(){var e;return Cs(Cs.call)||!Cs(Object)||!Cs(function(){e=!0})||e})?IE:Cs,RE=qa,Pz=Zh,Dz=tr,jz=Xt,Nz=jz("species"),AE=Array,Mz=function(e){var t;return RE(e)&&(t=e.constructor,Pz(t)&&(t===AE||RE(t.prototype))?t=void 0:Dz(t)&&(t=t[Nz],t===null&&(t=void 0))),t===void 0?AE:t},Fz=Mz,Kh=function(e,t){return new(Fz(e))(t===0?0:t)},Lz=Ht,Bz=Xt,Uz=Oh,zz=Bz("species"),hu=function(e){return Uz>=51||!Lz(function(){var t=[],n=t.constructor={};return n[zz]=function(){return{foo:1}},t[e](Boolean).foo!==1})},qz=yt,Wz=Ht,Vz=qa,Hz=tr,Zz=Zr,Kz=Zi,PE=qh,DE=ks,Gz=Kh,Yz=hu,Jz=Xt,Xz=Oh,jE=Jz("isConcatSpreadable"),Qz=Xz>=51||!Wz(function(){var e=[];return e[jE]=!1,e.concat()[0]!==e}),e9=function(e){if(!Hz(e))return!1;var t=e[jE];return t!==void 0?!!t:Vz(e)},t9=!Qz||!Yz("concat");qz({target:"Array",proto:!0,arity:1,forced:t9},{concat:function(t){var n=Zz(this),r=Gz(n,0),i=0,a,o,s,c,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],e9(l))for(c=Kz(l),PE(i+c),o=0;o<c;o++,i++)o in l&&DE(r,i,l[o]);else PE(i+1),DE(r,i++,l);return r.length=i,r}});var n9=Ts,r9=String,Os=function(e){if(n9(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return r9(e)},mu={},i9=du,a9=Math.max,o9=Math.min,Gh=function(e,t){var n=i9(e);return n<0?a9(n+t,0):o9(n,t)},s9=Er,l9=Gh,c9=Zi,NE=function(e){return function(t,n,r){var i=s9(t),a=c9(i);if(a===0)return!e&&-1;var o=l9(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},ME={includes:NE(!0),indexOf:NE(!1)},vu={},u9=Bt,Yh=An,f9=Er,d9=ME.indexOf,p9=vu,FE=u9([].push),LE=function(e,t){var n=f9(e),r=0,i=[],a;for(a in n)!Yh(p9,a)&&Yh(n,a)&&FE(i,a);for(;t.length>r;)Yh(n,a=t[r++])&&(~d9(i,a)||FE(i,a));return i},Jh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],h9=LE,m9=Jh,Xh=Object.keys||function(t){return h9(t,m9)},v9=En,y9=xE,g9=rr,b9=bi,w9=Er,x9=Xh;mu.f=v9&&!y9?Object.defineProperties:function(t,n){b9(t);for(var r=w9(n),i=x9(n),a=i.length,o=0,s;a>o;)g9.f(t,s=i[o++],r[s]);return t};var S9=_r,E9=S9("document","documentElement"),_9=La,k9=Dh,BE=_9("keys"),yu=function(e){return BE[e]||(BE[e]=k9(e))},T9=bi,C9=mu,UE=Jh,O9=vu,$9=E9,I9=yE,R9=yu,zE=">",qE="<",Qh="prototype",em="script",WE=R9("IE_PROTO"),tm=function(){},VE=function(e){return qE+em+zE+e+qE+"/"+em+zE},HE=function(e){e.write(VE("")),e.close();var t=e.parentWindow.Object;return e=null,t},A9=function(){var e=I9("iframe"),t="java"+em+":",n;return e.style.display="none",$9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(VE("document.F=Object")),n.close(),n.F},gu,bu=function(){try{gu=new ActiveXObject("htmlfile")}catch{}bu=typeof document<"u"?document.domain&&gu?HE(gu):A9():HE(gu);for(var e=UE.length;e--;)delete bu[Qh][UE[e]];return bu()};O9[WE]=!0;var nm=Object.create||function(t,n){var r;return t!==null?(tm[Qh]=T9(t),r=new tm,tm[Qh]=null,r[WE]=t):r=bu(),n===void 0?r:C9.f(r,n)},wu={},P9=LE,D9=Jh,j9=D9.concat("length","prototype");wu.f=Object.getOwnPropertyNames||function(t){return P9(t,j9)};var ZE={},N9=Bt,xu=N9([].slice),M9=Hi,F9=Er,KE=wu.f,L9=xu,GE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],B9=function(e){try{return KE(e)}catch{return L9(GE)}};ZE.f=function(t){return GE&&M9(t)==="Window"?B9(t):KE(F9(t))};var Su={};Su.f=Object.getOwnPropertySymbols;var U9=fu,Eu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:U9(e,t,n),e},z9=rr,q9=function(e,t,n){return z9.f(e,t,n)},$s={},W9=Xt;$s.f=W9;var YE=rn,V9=An,H9=$s,Z9=rr.f,$t=function(e){var t=YE.Symbol||(YE.Symbol={});V9(t,e)||Z9(t,e,{value:H9.f(e)})},K9=Sr,G9=_r,Y9=Xt,J9=Eu,JE=function(){var e=G9("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Y9("toPrimitive");t&&!t[r]&&J9(t,r,function(i){return K9(n,this)},{arity:1})},X9=Wh,Q9=Ts,eq=X9?{}.toString:function(){return"[object "+Q9(this)+"]"},tq=Wh,nq=rr.f,rq=fu,iq=An,aq=eq,oq=Xt,XE=oq("toStringTag"),Wa=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(iq(i,XE)||nq(i,XE,{configurable:!0,value:t}),r&&!tq&&rq(i,"toString",aq))},sq=Vt,lq=un,QE=sq.WeakMap,cq=lq(QE)&&/native code/.test(String(QE)),uq=cq,e_=Vt,fq=tr,dq=fu,rm=An,im=Ph,pq=yu,hq=vu,t_="Object already initialized",am=e_.TypeError,mq=e_.WeakMap,_u,Is,ku,vq=function(e){return ku(e)?Is(e):_u(e,{})},yq=function(e){return function(t){var n;if(!fq(t)||(n=Is(t)).type!==e)throw new am("Incompatible receiver, "+e+" required");return n}};if(uq||im.state){var kr=im.state||(im.state=new mq);kr.get=kr.get,kr.has=kr.has,kr.set=kr.set,_u=function(e,t){if(kr.has(e))throw new am(t_);return t.facade=e,kr.set(e,t),t},Is=function(e){return kr.get(e)||{}},ku=function(e){return kr.has(e)}}else{var Va=pq("state");hq[Va]=!0,_u=function(e,t){if(rm(e,Va))throw new am(t_);return t.facade=e,dq(e,Va,t),t},Is=function(e){return rm(e,Va)?e[Va]:{}},ku=function(e){return rm(e,Va)}}var om={set:_u,get:Is,has:ku,enforce:vq,getterFor:yq},gq=Fh,bq=Bt,wq=JS,xq=Zr,Sq=Zi,Eq=Kh,n_=bq([].push),wi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,f){for(var d=xq(c),p=wq(d),m=Sq(p),h=gq(l,u),y=0,v=f||Eq,b=t?v(c,m):n||o?v(c,0):void 0,w,T;m>y;y++)if((s||y in p)&&(w=p[y],T=h(w,y,d),e))if(t)b[y]=T;else if(T)switch(e){case 3:return!0;case 5:return w;case 6:return y;case 2:n_(b,w)}else switch(e){case 4:return!1;case 7:n_(b,w)}return a?-1:r||i?i:b}},sm={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterReject:wi(7)},Tu=yt,Rs=Vt,lm=Sr,_q=Bt,Ha=En,Za=Fa,kq=Ht,Qt=An,Tq=Hr,cm=bi,Cu=Er,um=Nh,Cq=Os,fm=xs,Ka=nm,r_=Xh,Oq=wu,i_=ZE,$q=Su,a_=ws,o_=rr,Iq=mu,s_=xh,l_=Eu,Rq=q9,dm=La,Aq=yu,c_=vu,u_=Dh,Pq=Xt,Dq=$s,jq=$t,Nq=JE,Mq=Wa,f_=om,Ou=sm.forEach,_n=Aq("hidden"),$u="Symbol",As="prototype",Fq=f_.set,d_=f_.getterFor($u),ir=Object[As],Ki=Rs.Symbol,Ps=Ki&&Ki[As],Lq=Rs.RangeError,Bq=Rs.TypeError,pm=Rs.QObject,p_=a_.f,Gi=o_.f,h_=i_.f,Uq=s_.f,m_=_q([].push),Kr=dm("symbols"),Ds=dm("op-symbols"),zq=dm("wks"),hm=!pm||!pm[As]||!pm[As].findChild,v_=function(e,t,n){var r=p_(ir,t);r&&delete ir[t],Gi(e,t,n),r&&e!==ir&&Gi(ir,t,r)},mm=Ha&&kq(function(){return Ka(Gi({},"a",{get:function(){return Gi(this,"a",{value:7}).a}})).a!==7})?v_:Gi,vm=function(e,t){var n=Kr[e]=Ka(Ps);return Fq(n,{type:$u,tag:e,description:t}),Ha||(n.description=t),n},Iu=function(t,n,r){t===ir&&Iu(Ds,n,r),cm(t);var i=um(n);return cm(r),Qt(Kr,i)?(r.enumerable?(Qt(t,_n)&&t[_n][i]&&(t[_n][i]=!1),r=Ka(r,{enumerable:fm(0,!1)})):(Qt(t,_n)||Gi(t,_n,fm(1,Ka(null))),t[_n][i]=!0),mm(t,i,r)):Gi(t,i,r)},ym=function(t,n){cm(t);var r=Cu(n),i=r_(r).concat(w_(r));return Ou(i,function(a){(!Ha||lm(y_,r,a))&&Iu(t,a,r[a])}),t},qq=function(t,n){return n===void 0?Ka(t):ym(Ka(t),n)},y_=function(t){var n=um(t),r=lm(Uq,this,n);return this===ir&&Qt(Kr,n)&&!Qt(Ds,n)?!1:r||!Qt(this,n)||!Qt(Kr,n)||Qt(this,_n)&&this[_n][n]?r:!0},g_=function(t,n){var r=Cu(t),i=um(n);if(!(r===ir&&Qt(Kr,i)&&!Qt(Ds,i))){var a=p_(r,i);return a&&Qt(Kr,i)&&!(Qt(r,_n)&&r[_n][i])&&(a.enumerable=!0),a}},b_=function(t){var n=h_(Cu(t)),r=[];return Ou(n,function(i){!Qt(Kr,i)&&!Qt(c_,i)&&m_(r,i)}),r},w_=function(e){var t=e===ir,n=h_(t?Ds:Cu(e)),r=[];return Ou(n,function(i){Qt(Kr,i)&&(!t||Qt(ir,i))&&m_(r,Kr[i])}),r};Za||(Ki=function(){if(Tq(Ps,this))throw new Bq("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:Cq(arguments[0]),n=u_(t),r=function(i){var a=this===void 0?Rs:this;a===ir&&lm(r,Ds,i),Qt(a,_n)&&Qt(a[_n],n)&&(a[_n][n]=!1);var o=fm(1,i);try{mm(a,n,o)}catch(s){if(!(s instanceof Lq))throw s;v_(a,n,o)}};return Ha&&hm&&mm(ir,n,{configurable:!0,set:r}),vm(n,t)},Ps=Ki[As],l_(Ps,"toString",function(){return d_(this).tag}),l_(Ki,"withoutSetter",function(e){return vm(u_(e),e)}),s_.f=y_,o_.f=Iu,Iq.f=ym,a_.f=g_,Oq.f=i_.f=b_,$q.f=w_,Dq.f=function(e){return vm(Pq(e),e)},Ha&&Rq(Ps,"description",{configurable:!0,get:function(){return d_(this).description}})),Tu({global:!0,constructor:!0,wrap:!0,forced:!Za,sham:!Za},{Symbol:Ki}),Ou(r_(zq),function(e){jq(e)}),Tu({target:$u,stat:!0,forced:!Za},{useSetter:function(){hm=!0},useSimple:function(){hm=!1}}),Tu({target:"Object",stat:!0,forced:!Za,sham:!Ha},{create:qq,defineProperty:Iu,defineProperties:ym,getOwnPropertyDescriptor:g_}),Tu({target:"Object",stat:!0,forced:!Za},{getOwnPropertyNames:b_}),Nq(),Mq(Ki,$u),c_[_n]=!0;var Wq=Fa,x_=Wq&&!!Symbol.for&&!!Symbol.keyFor,Vq=yt,Hq=_r,Zq=An,Kq=Os,S_=La,Gq=x_,gm=S_("string-to-symbol-registry"),Yq=S_("symbol-to-string-registry");Vq({target:"Symbol",stat:!0,forced:!Gq},{for:function(e){var t=Kq(e);if(Zq(gm,t))return gm[t];var n=Hq("Symbol")(t);return gm[t]=n,Yq[n]=t,n}});var Jq=yt,Xq=An,Qq=Ss,eW=lu,tW=La,nW=x_,E_=tW("symbol-to-string-registry");Jq({target:"Symbol",stat:!0,forced:!nW},{keyFor:function(t){if(!Qq(t))throw new TypeError(eW(t)+" is not a symbol");if(Xq(E_,t))return E_[t]}});var rW=Bt,__=qa,iW=un,k_=Hi,aW=Os,T_=rW([].push),oW=function(e){if(iW(e))return e;if(__(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?T_(n,i):(typeof i=="number"||k_(i)==="Number"||k_(i)==="String")&&T_(n,aW(i))}var a=n.length,o=!0;return function(s,c){if(o)return o=!1,c;if(__(this))return c;for(var l=0;l<a;l++)if(n[l]===s)return c}}},sW=yt,C_=_r,O_=yh,lW=Sr,js=Bt,$_=Ht,I_=un,R_=Ss,A_=xu,cW=oW,uW=Fa,fW=String,xi=C_("JSON","stringify"),Ru=js(/./.exec),P_=js("".charAt),dW=js("".charCodeAt),pW=js("".replace),hW=js(1 .toString),mW=/[\uD800-\uDFFF]/g,D_=/^[\uD800-\uDBFF]$/,j_=/^[\uDC00-\uDFFF]$/,N_=!uW||$_(function(){var e=C_("Symbol")("stringify detection");return xi([e])!=="[null]"||xi({a:e})!=="{}"||xi(Object(e))!=="{}"}),M_=$_(function(){return xi("\uDF06\uD834")!=='"\\udf06\\ud834"'||xi("\uDEAD")!=='"\\udead"'}),vW=function(e,t){var n=A_(arguments),r=cW(t);if(!(!I_(r)&&(e===void 0||R_(e))))return n[1]=function(i,a){if(I_(r)&&(a=lW(r,this,fW(i),a)),!R_(a))return a},O_(xi,null,n)},yW=function(e,t,n){var r=P_(n,t-1),i=P_(n,t+1);return Ru(D_,e)&&!Ru(j_,i)||Ru(j_,e)&&!Ru(D_,r)?"\\u"+hW(dW(e,0),16):e};xi&&sW({target:"JSON",stat:!0,arity:3,forced:N_||M_},{stringify:function(t,n,r){var i=A_(arguments),a=O_(N_?vW:xi,null,i);return M_&&typeof a=="string"?pW(a,mW,yW):a}});var gW=yt,bW=Fa,wW=Ht,F_=Su,xW=Zr,SW=!bW||wW(function(){F_.f(1)});gW({target:"Object",stat:!0,forced:SW},{getOwnPropertySymbols:function(t){var n=F_.f;return n?n(xW(t)):[]}});var EW=$t;EW("asyncIterator");var _W=$t;_W("hasInstance");var kW=$t;kW("isConcatSpreadable");var TW=$t;TW("iterator");var CW=$t;CW("match");var OW=$t;OW("matchAll");var $W=$t;$W("replace");var IW=$t;IW("search");var RW=$t;RW("species");var AW=$t;AW("split");var PW=$t,DW=JE;PW("toPrimitive"),DW();var jW=_r,NW=$t,MW=Wa;NW("toStringTag"),MW(jW("Symbol"),"Symbol");var FW=$t;FW("unscopables");var LW=Vt,BW=Wa;BW(LW.JSON,"JSON",!0);var UW=rn,zW=UW.Symbol,Ga={},bm=En,qW=An,L_=Function.prototype,WW=bm&&Object.getOwnPropertyDescriptor,wm=qW(L_,"name"),VW=wm&&(function(){}).name==="something",HW=wm&&(!bm||bm&&WW(L_,"name").configurable),ZW={EXISTS:wm,PROPER:VW,CONFIGURABLE:HW},KW=Ht,GW=!KW(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),YW=An,JW=un,XW=Zr,QW=yu,eV=GW,B_=QW("IE_PROTO"),xm=Object,tV=xm.prototype,U_=eV?xm.getPrototypeOf:function(e){var t=XW(e);if(YW(t,B_))return t[B_];var n=t.constructor;return JW(n)&&t instanceof n?n.prototype:t instanceof xm?tV:null},nV=Ht,rV=un,iV=tr,aV=nm,z_=U_,oV=Eu,sV=Xt,Sm=sV("iterator"),q_=!1,Gr,Em,_m;[].keys&&(_m=[].keys(),"next"in _m?(Em=z_(z_(_m)),Em!==Object.prototype&&(Gr=Em)):q_=!0);var lV=!iV(Gr)||nV(function(){var e={};return Gr[Sm].call(e)!==e});lV?Gr={}:Gr=aV(Gr),rV(Gr[Sm])||oV(Gr,Sm,function(){return this});var W_={IteratorPrototype:Gr,BUGGY_SAFARI_ITERATORS:q_},cV=W_.IteratorPrototype,uV=nm,fV=xs,dV=Wa,pV=Ga,hV=function(){return this},mV=function(e,t,n,r){var i=t+" Iterator";return e.prototype=uV(cV,{next:fV(+!r,n)}),dV(e,i,!1,!0),pV[i]=hV,e},vV=Bt,yV=cu,gV=function(e,t,n){try{return vV(yV(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},bV=tr,wV=function(e){return bV(e)||e===null},xV=wV,SV=String,EV=TypeError,_V=function(e){if(xV(e))return e;throw new EV("Can't set "+SV(e)+" as a prototype")},kV=gV,TV=tr,CV=ou,OV=_V;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=kV(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return CV(i),OV(a),TV(i)&&(e?n(i,a):i.__proto__=a),i}}();var $V=yt,IV=Sr,V_=ZW,RV=mV,AV=U_,PV=Wa,H_=Eu,DV=Xt,Z_=Ga,K_=W_,jV=V_.PROPER;V_.CONFIGURABLE,K_.IteratorPrototype;var Au=K_.BUGGY_SAFARI_ITERATORS,km=DV("iterator"),G_="keys",Pu="values",Y_="entries",NV=function(){return this},J_=function(e,t,n,r,i,a,o){RV(n,t,r);var s=function(v){if(v===i&&d)return d;if(!Au&&v&&v in u)return u[v];switch(v){case G_:return function(){return new n(this,v)};case Pu:return function(){return new n(this,v)};case Y_:return function(){return new n(this,v)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[km]||u["@@iterator"]||i&&u[i],d=!Au&&f||s(i),p=t==="Array"&&u.entries||f,m,h,y;if(p&&(m=AV(p.call(new e)),m!==Object.prototype&&m.next&&(PV(m,c,!0,!0),Z_[c]=NV)),jV&&i===Pu&&f&&f.name!==Pu&&(l=!0,d=function(){return IV(f,this)}),i)if(h={values:s(Pu),keys:a?d:s(G_),entries:s(Y_)},o)for(y in h)(Au||l||!(y in u))&&H_(u,y,h[y]);else $V({target:t,proto:!0,forced:Au||l},h);return o&&u[km]!==d&&H_(u,km,d,{name:i}),Z_[t]=d,h},X_=function(e,t){return{value:e,done:t}},MV=Er,Q_=Ga,ek=om;rr.f;var FV=J_,Du=X_,tk="Array Iterator",LV=ek.set,BV=ek.getterFor(tk);FV(Array,"Array",function(e,t){LV(this,{type:tk,target:MV(e),index:0,kind:t})},function(){var e=BV(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Du(void 0,!0);switch(e.kind){case"keys":return Du(n,!1);case"values":return Du(t[n],!1)}return Du([n,t[n]],!1)},"values"),Q_.Arguments=Q_.Array;var UV={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},zV=UV,qV=Vt,WV=Wa,nk=Ga;for(var Tm in zV)WV(qV[Tm],Tm),nk[Tm]=nk.Array;var VV=zW,HV=VV,ZV=Xt,KV=rr.f,rk=ZV("metadata"),ik=Function.prototype;ik[rk]===void 0&&KV(ik,rk,{value:null});var GV=$t;GV("asyncDispose");var YV=$t;YV("dispose");var JV=$t;JV("metadata");var XV=HV,QV=XV,e8=_r,t8=Bt,Cm=e8("Symbol"),n8=Cm.keyFor,r8=t8(Cm.prototype.valueOf),ak=Cm.isRegisteredSymbol||function(t){try{return n8(r8(t))!==void 0}catch{return!1}},i8=yt,a8=ak;i8({target:"Symbol",stat:!0},{isRegisteredSymbol:a8});for(var o8=La,ok=_r,s8=Bt,l8=Ss,c8=Xt,ju=ok("Symbol"),sk=ju.isWellKnownSymbol,lk=ok("Object","getOwnPropertyNames"),u8=s8(ju.prototype.valueOf),ck=o8("wks"),Om=0,uk=lk(ju),f8=uk.length;Om<f8;Om++)try{var fk=uk[Om];l8(ju[fk])&&c8(fk)}catch{}var dk=function(t){if(sk&&sk(t))return!0;try{for(var n=u8(t),r=0,i=lk(ck),a=i.length;r<a;r++)if(ck[i[r]]==n)return!0}catch{}return!1},d8=yt,p8=dk;d8({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:p8});var h8=$t;h8("customMatcher");var m8=$t;m8("observable");var v8=yt,y8=ak;v8({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:y8});var g8=yt,b8=dk;g8({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:b8});var w8=$t;w8("matcher");var x8=$t;x8("metadataKey");var S8=$t;S8("patternMatch");var E8=$t;E8("replaceAll");var _8=QV,k8=_8,T8=k8;const Ya=Ge(T8);var $m=Bt,C8=du,O8=Os,$8=ou,I8=$m("".charAt),pk=$m("".charCodeAt),R8=$m("".slice),hk=function(e){return function(t,n){var r=O8($8(t)),i=C8(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=pk(r,i),o<55296||o>56319||i+1===a||(s=pk(r,i+1))<56320||s>57343?e?I8(r,i):o:e?R8(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},A8={codeAt:hk(!1),charAt:hk(!0)},P8=A8.charAt,D8=Os,mk=om,j8=J_,vk=X_,yk="String Iterator",N8=mk.set,M8=mk.getterFor(yk);j8(String,"String",function(e){N8(this,{type:yk,string:D8(e),index:0})},function(){var t=M8(this),n=t.string,r=t.index,i;return r>=n.length?vk(void 0,!0):(i=P8(n,r),t.index+=i.length,vk(i,!1))});var F8=Ts,gk=$h,L8=Eh,B8=Ga,U8=Xt,z8=U8("iterator"),Im=function(e){if(!L8(e))return gk(e,z8)||gk(e,"@@iterator")||B8[F8(e)]},q8=Im,W8=q8,V8=W8,H8=V8,Z8=H8,K8=Z8,G8=K8,Y8=G8,J8=Y8;const bk=Ge(J8);var X8=En,Q8=qa,eH=TypeError,tH=Object.getOwnPropertyDescriptor,nH=X8&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),wk=nH?function(e,t){if(Q8(e)&&!tH(e,"length").writable)throw new eH("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},rH=yt,iH=Zr,aH=Zi,oH=wk,sH=qh,lH=Ht,cH=lH(function(){return[].push.call({length:4294967296},1)!==4294967297}),uH=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},fH=cH||!uH();rH({target:"Array",proto:!0,arity:1,forced:fH},{push:function(t){var n=iH(this),r=aH(n),i=arguments.length;sH(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return oH(n,r),r}});var dH=Vt,pH=rn,Yi=function(e,t){var n=pH[e+"Prototype"],r=n&&n[t];if(r)return r;var i=dH[e],a=i&&i.prototype;return a&&a[t]},hH=Yi,mH=hH("Array","push"),vH=Hr,yH=mH,Rm=Array.prototype,gH=function(e){var t=e.push;return e===Rm||vH(Rm,e)&&t===Rm.push?yH:t},bH=gH,wH=bH,xH=wH,SH=xH,EH=SH,_H=EH,kH=_H;const TH=Ge(kH);function CH(e,t){var n=e==null?null:typeof Ya<"u"&&bk(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(TH(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,i=u}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var OH=yt,xk=qa,$H=Zh,IH=tr,Sk=Gh,RH=Zi,AH=Er,PH=ks,DH=Xt,jH=hu,NH=xu,MH=jH("slice"),FH=DH("species"),Am=Array,LH=Math.max;OH({target:"Array",proto:!0,forced:!MH},{slice:function(t,n){var r=AH(this),i=RH(r),a=Sk(t,i),o=Sk(n===void 0?i:n,i),s,c,l;if(xk(r)&&(s=r.constructor,$H(s)&&(s===Am||xk(s.prototype))?s=void 0:IH(s)&&(s=s[FH],s===null&&(s=void 0)),s===Am||s===void 0))return NH(r,a,o);for(c=new(s===void 0?Am:s)(LH(o-a,0)),l=0;a<o;a++,l++)a in r&&PH(c,l,r[a]);return c.length=l,c}});var BH=Yi,UH=BH("Array","slice"),zH=Hr,qH=UH,Pm=Array.prototype,WH=function(e){var t=e.slice;return e===Pm||zH(Pm,e)&&t===Pm.slice?qH:t},VH=WH,HH=VH,ZH=HH,KH=ZH,GH=KH,YH=GH,JH=YH;const XH=Ge(JH);var QH=Sr,Ek=bi,eZ=$h,tZ=function(e,t,n){var r,i;Ek(e);try{if(r=eZ(e,"return"),!r){if(t==="throw")throw n;return n}r=QH(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return Ek(r),n},nZ=bi,rZ=tZ,iZ=function(e,t,n,r){try{return r?t(nZ(n)[0],n[1]):t(n)}catch(i){rZ(e,"throw",i)}},aZ=Xt,oZ=Ga,sZ=aZ("iterator"),lZ=Array.prototype,cZ=function(e){return e!==void 0&&(oZ.Array===e||lZ[sZ]===e)},uZ=Sr,fZ=cu,dZ=bi,pZ=lu,hZ=Im,mZ=TypeError,vZ=function(e,t){var n=arguments.length<2?hZ(e):t;if(fZ(n))return dZ(uZ(n,e));throw new mZ(pZ(e)+" is not iterable")},yZ=Fh,gZ=Sr,bZ=Zr,wZ=iZ,xZ=cZ,SZ=Zh,EZ=Zi,_k=ks,_Z=vZ,kZ=Im,kk=Array,TZ=function(t){var n=bZ(t),r=SZ(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=yZ(a,i>2?arguments[2]:void 0));var s=kZ(n),c=0,l,u,f,d,p,m;if(s&&!(this===kk&&xZ(s)))for(u=r?new this:[],d=_Z(n,s),p=d.next;!(f=gZ(p,d)).done;c++)m=o?wZ(d,a,[f.value,c],!0):f.value,_k(u,c,m);else for(l=EZ(n),u=r?new this(l):kk(l);l>c;c++)m=o?a(n[c],c):n[c],_k(u,c,m);return u.length=c,u},CZ=Xt,Tk=CZ("iterator"),Ck=!1;try{var OZ=0,Ok={next:function(){return{done:!!OZ++}},return:function(){Ck=!0}};Ok[Tk]=function(){return this},Array.from(Ok,function(){throw 2})}catch{}var $Z=function(e,t){try{if(!t&&!Ck)return!1}catch{return!1}var n=!1;try{var r={};r[Tk]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},IZ=yt,RZ=TZ,AZ=$Z,PZ=!AZ(function(e){Array.from(e)});IZ({target:"Array",stat:!0,forced:PZ},{from:RZ});var DZ=rn,jZ=DZ.Array.from,NZ=jZ,MZ=NZ,FZ=MZ,LZ=FZ,BZ=LZ,UZ=BZ,zZ=UZ;const $k=Ge(zZ);function Dm(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 Ik(e,t){if(e){var n;if(typeof e=="string")return Dm(e,t);var r=XH(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?$k(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dm(e,t):void 0}}function qZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
165
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tr(e,t){return Q6(e)||CH(e,t)||Ik(e,t)||qZ()}var Rk={exports:{}};/*!
|
|
166
|
-
Copyright (c) 2018 Jed Watson.
|
|
167
|
-
Licensed under the MIT License (MIT), see
|
|
168
|
-
http://jedwatson.github.io/classnames
|
|
169
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var c in a)t.call(a,c)&&a[c]&&r.push(c);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Rk);var WZ=Rk.exports;const jm=Ge(WZ);var Nm={exports:{}},Mm,Ak;function Fm(){if(Ak)return Mm;Ak=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mm=e,Mm}var Lm,Pk;function VZ(){if(Pk)return Lm;Pk=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fm(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var f;try{if(typeof a[u]!="function"){var d=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.");throw d.name="Invariant Violation",d}f=a[u](o,u,c,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` 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 p=l?l():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Lm=i,Lm}var Bm,Dk;function HZ(){if(Dk)return Bm;Dk=1;var e=Uc(),t=v1(),n=Fm(),r=VZ(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return Bm=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(R){var g=R&&(l&&R[l]||R[u]);if(typeof g=="function")return g}var d="<<anonymous>>",p={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:T(),elementType:E(),instanceOf:_,node:k(),objectOf:U,oneOf:$,oneOfType:z,shape:j,exact:W};function m(R,g){return R===g?R!==0||1/R===1/g:R!==R&&g!==g}function h(R){this.message=R,this.stack=""}h.prototype=Error.prototype;function y(R){if(process.env.NODE_ENV!=="production")var g={},N=0;function V(K,J,Y,Q,ae,oe,X){if(Q=Q||d,oe=oe||Y,X!==n){if(c){var ee=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 ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=Q+":"+Y;!g[G]&&N<3&&(a("You are manually calling a React.PropTypes validation function for the `"+oe+"` 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."),g[G]=!0,N++)}}return J[Y]==null?K?J[Y]===null?new h("The "+ae+" `"+oe+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+ae+" `"+oe+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:R(J,Y,Q,ae,oe)}var S=V.bind(null,!1);return S.isRequired=V.bind(null,!0),S}function v(R){function g(N,V,S,K,J,Y){var Q=N[V],ae=A(Q);if(ae!==R){var oe=L(Q);return new h("Invalid "+K+" `"+J+"` of type "+("`"+oe+"` supplied to `"+S+"`, expected ")+("`"+R+"`."))}return null}return y(g)}function b(){return y(o)}function w(R){function g(N,V,S,K,J){if(typeof R!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var Y=N[V];if(!Array.isArray(Y)){var Q=A(Y);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an array."))}for(var ae=0;ae<Y.length;ae++){var oe=R(Y,ae,S,K,J+"["+ae+"]",n);if(oe instanceof Error)return oe}return null}return y(g)}function T(){function R(g,N,V,S,K){var J=g[N];if(!s(J)){var Y=A(J);return new h("Invalid "+S+" `"+K+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(R)}function E(){function R(g,N,V,S,K){var J=g[N];if(!e.isValidElementType(J)){var Y=A(J);return new h("Invalid "+S+" `"+K+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(R)}function _(R){function g(N,V,S,K,J){if(!(N[V]instanceof R)){var Y=R.name||d,Q=H(N[V]);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected ")+("instance of `"+Y+"`."))}return null}return y(g)}function $(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function g(N,V,S,K,J){for(var Y=N[V],Q=0;Q<R.length;Q++)if(m(Y,R[Q]))return null;var ae=JSON.stringify(R,function(X,ee){var G=L(ee);return G==="symbol"?String(ee):ee});return new h("Invalid "+K+" `"+J+"` of value `"+String(Y)+"` "+("supplied to `"+S+"`, expected one of "+ae+"."))}return y(g)}function U(R){function g(N,V,S,K,J){if(typeof R!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an object."));for(var ae in Y)if(i(Y,ae)){var oe=R(Y,ae,S,K,J+"."+ae,n);if(oe instanceof Error)return oe}return null}return y(g)}function z(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var g=0;g<R.length;g++){var N=R[g];if(typeof N!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(N)+" at index "+g+"."),o}function V(S,K,J,Y,Q){for(var ae=0;ae<R.length;ae++){var oe=R[ae];if(oe(S,K,J,Y,Q,n)==null)return null}return new h("Invalid "+Y+" `"+Q+"` supplied to "+("`"+J+"`."))}return y(V)}function k(){function R(g,N,V,S,K){return B(g[N])?null:new h("Invalid "+S+" `"+K+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(R)}function j(R){function g(N,V,S,K,J){var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));for(var ae in R){var oe=R[ae];if(oe){var X=oe(Y,ae,S,K,J+"."+ae,n);if(X)return X}}return null}return y(g)}function W(R){function g(N,V,S,K,J){var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));var ae=t({},N[V],R);for(var oe in ae){var X=R[oe];if(!X)return new h("Invalid "+K+" `"+J+"` key `"+oe+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(N[V],null," ")+`
|
|
170
|
-
Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=X(Y,oe,S,K,J+"."+oe,n);if(ee)return ee}return null}return y(g)}function B(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(B);if(R===null||s(R))return!0;var g=f(R);if(g){var N=g.call(R),V;if(g!==R.entries){for(;!(V=N.next()).done;)if(!B(V.value))return!1}else for(;!(V=N.next()).done;){var S=V.value;if(S&&!B(S[1]))return!1}}else return!1;return!0;default:return!1}}function I(R,g){return R==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function A(R){var g=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":I(g,R)?"symbol":g}function L(R){if(typeof R>"u"||R===null)return""+R;var g=A(R);if(g==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return g}function Z(R){var g=L(R);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function H(R){return!R.constructor||!R.constructor.name?d:R.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Bm}var Um,jk;function ZZ(){if(jk)return Um;jk=1;var e=Fm();function t(){}function n(){}return n.resetWarningCache=t,Um=function(){function r(o,s,c,l,u,f){if(f!==e){var d=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 d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={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 a.PropTypes=a,a},Um}if(process.env.NODE_ENV!=="production"){var KZ=Uc(),GZ=!0;Nm.exports=HZ()(KZ.isElement,GZ)}else Nm.exports=ZZ()();var YZ=Nm.exports;const at=Ge(YZ);var zm=D.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});zm.displayName="ScrollToBottomFunctionContext";function JZ(){return D.useContext(zm)}function XZ(){var e=JZ(),t=e.scrollToEnd;return t}var qm=D.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});qm.displayName="ScrollToBottomState1Context";var Wm=D.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Wm.displayName="ScrollToBottomState2Context";var Vm=D.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Vm.displayName="ScrollToBottomStateContext";var Nk=[Vm,qm,Wm];function QZ(e){return D.useContext(Nk[e]||Nk[0])}function eK(){var e=QZ(2),t=e.sticky;return[t]}var Nu=D.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Nu.displayName="ScrollToBottomInternalContext";function tK(){return D.useContext(Nu)}function Hm(){var e=tK(),t=e.styleToClassName;return t}var nK={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)"}},Zm=function(t){var n=t.children,r=t.className,i=eK(),a=Tr(i,1),o=a[0],s=Hm()(nK),c=XZ();return!o&&D.createElement("button",{className:jm(s,(r||"")+""),onClick:c,type:"button"},n)};Zm.defaultProps={children:void 0,className:""},Zm.propTypes={children:at.any,className:at.string};var Mk={exports:{}},rK=yt,iK=En,Fk=rr.f;rK({target:"Object",stat:!0,forced:Object.defineProperty!==Fk,sham:!iK},{defineProperty:Fk});var aK=rn,Lk=aK.Object,oK=Mk.exports=function(t,n,r){return Lk.defineProperty(t,n,r)};Lk.defineProperty.sham&&(oK.sham=!0);var sK=Mk.exports,lK=sK,Bk=lK,cK=Bk,uK=cK,fK=uK,dK=fK,pK=dK;const hK=Ge(pK);var mK=$s,vK=mK.f("iterator"),yK=vK,gK=yK,bK=gK,wK=bK,xK=wK,SK=xK,EK=SK;const _K=Ge(EK);function Ns(e){"@babel/helpers - typeof";return Ns=typeof Ya=="function"&&typeof _K=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ya=="function"&&t.constructor===Ya&&t!==Ya.prototype?"symbol":typeof t},Ns(e)}var kK=$s,TK=kK.f("toPrimitive"),CK=TK,OK=CK,$K=OK,IK=$K,RK=IK,AK=RK,PK=AK;const DK=Ge(PK);function jK(e,t){if(Ns(e)!="object"||!e)return e;var n=e[DK];if(n!==void 0){var r=n.call(e,t||"default");if(Ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NK(e){var t=jK(e,"string");return Ns(t)=="symbol"?t:t+""}function MK(e,t,n){return(t=NK(t))in e?hK(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FK(e){if(kE(e))return Dm(e)}function LK(e){if(typeof Ya<"u"&&bk(e)!=null||e["@@iterator"]!=null)return $k(e)}function BK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
171
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(e){return FK(e)||LK(e)||Ik(e)||BK()}var Mu=function(e){return e&&e.Math==Math&&e},Pn=Mu(typeof globalThis=="object"&&globalThis)||Mu(typeof window=="object"&&window)||Mu(typeof self=="object"&&self)||Mu(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")(),Km={},ar=function(e){try{return!!e()}catch{return!0}},UK=ar,Ji=!UK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Uk={},zk={}.propertyIsEnumerable,qk=Object.getOwnPropertyDescriptor,zK=qk&&!zk.call({1:2},1);Uk.f=zK?function(t){var n=qk(this,t);return!!n&&n.enumerable}:zk;var Wk=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},qK={}.toString,Gm=function(e){return qK.call(e).slice(8,-1)},WK=ar,VK=Gm,HK="".split,ZK=WK(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return VK(e)=="String"?HK.call(e,""):Object(e)}:Object,Fu=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},KK=ZK,GK=Fu,Ym=function(e){return KK(GK(e))},qn=function(e){return typeof e=="function"},YK=qn,Ms=function(e){return typeof e=="object"?e!==null:YK(e)},Jm=Pn,JK=qn,XK=function(e){return JK(e)?e:void 0},Lu=function(e,t){return arguments.length<2?XK(Jm[e]):Jm[e]&&Jm[e][t]},QK=Lu,eG=QK("navigator","userAgent")||"",Vk=Pn,Xm=eG,Hk=Vk.process,Zk=Vk.Deno,Kk=Hk&&Hk.versions||Zk&&Zk.version,Gk=Kk&&Kk.v8,Cr,Bu;Gk?(Cr=Gk.split("."),Bu=Cr[0]<4?1:Cr[0]+Cr[1]):Xm&&(Cr=Xm.match(/Edge\/(\d+)/),(!Cr||Cr[1]>=74)&&(Cr=Xm.match(/Chrome\/(\d+)/),Cr&&(Bu=Cr[1])));var tG=Bu&&+Bu,Yk=tG,nG=ar,Jk=!!Object.getOwnPropertySymbols&&!nG(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Yk&&Yk<41}),rG=Jk,Xk=rG&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iG=qn,aG=Lu,oG=Xk,Qk=oG?function(e){return typeof e=="symbol"}:function(e){var t=aG("Symbol");return iG(t)&&Object(e)instanceof t},sG=function(e){try{return String(e)}catch{return"Object"}},lG=qn,cG=sG,uG=function(e){if(lG(e))return e;throw TypeError(cG(e)+" is not a function")},fG=uG,eT=function(e,t){var n=e[t];return n==null?void 0:fG(n)},Qm=qn,ev=Ms,dG=function(e,t){var n,r;if(t==="string"&&Qm(n=e.toString)&&!ev(r=n.call(e))||Qm(n=e.valueOf)&&!ev(r=n.call(e))||t!=="string"&&Qm(n=e.toString)&&!ev(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},tT={exports:{}},nT=Pn,tv=function(e,t){try{Object.defineProperty(nT,e,{value:t,configurable:!0,writable:!0})}catch{nT[e]=t}return t},pG=Pn,hG=tv,rT="__core-js_shared__",mG=pG[rT]||hG(rT,{}),nv=mG,iT=nv;(tT.exports=function(e,t){return iT[e]||(iT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var rv=tT.exports,vG=Fu,aT=function(e){return Object(vG(e))},yG=aT,gG={}.hasOwnProperty,Xi=Object.hasOwn||function(t,n){return gG.call(yG(t),n)},bG=0,wG=Math.random(),oT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++bG+wG).toString(36)},xG=Pn,SG=rv,sT=Xi,EG=oT,lT=Jk,_G=Xk,Fs=SG("wks"),Ls=xG.Symbol,kG=_G?Ls:Ls&&Ls.withoutSetter||EG,Bs=function(e){return(!sT(Fs,e)||!(lT||typeof Fs[e]=="string"))&&(lT&&sT(Ls,e)?Fs[e]=Ls[e]:Fs[e]=kG("Symbol."+e)),Fs[e]},cT=Ms,uT=Qk,TG=eT,CG=dG,OG=Bs,$G=OG("toPrimitive"),IG=function(e,t){if(!cT(e)||uT(e))return e;var n=TG(e,$G),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!cT(r)||uT(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),CG(e,t)},RG=IG,AG=Qk,fT=function(e){var t=RG(e,"string");return AG(t)?t:String(t)},PG=Pn,dT=Ms,iv=PG.document,DG=dT(iv)&&dT(iv.createElement),pT=function(e){return DG?iv.createElement(e):{}},jG=Ji,NG=ar,MG=pT,hT=!jG&&!NG(function(){return Object.defineProperty(MG("div"),"a",{get:function(){return 7}}).a!=7}),FG=Ji,LG=Uk,BG=Wk,UG=Ym,zG=fT,qG=Xi,WG=hT,mT=Object.getOwnPropertyDescriptor;Km.f=FG?mT:function(t,n){if(t=UG(t),n=zG(n),WG)try{return mT(t,n)}catch{}if(qG(t,n))return BG(!LG.f.call(t,n),t[n])};var Us={},VG=Ms,Si=function(e){if(VG(e))return e;throw TypeError(String(e)+" is not an object")},HG=Ji,ZG=hT,vT=Si,KG=fT,yT=Object.defineProperty;Us.f=HG?yT:function(t,n,r){if(vT(t),n=KG(n),vT(r),ZG)try{return yT(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 GG=Ji,YG=Us,JG=Wk,Uu=GG?function(e,t,n){return YG.f(e,t,JG(1,n))}:function(e,t,n){return e[t]=n,e},gT={exports:{}},XG=qn,av=nv,QG=Function.toString;XG(av.inspectSource)||(av.inspectSource=function(e){return QG.call(e)});var bT=av.inspectSource,eY=Pn,tY=qn,nY=bT,wT=eY.WeakMap,rY=tY(wT)&&/native code/.test(nY(wT)),iY=rv,aY=oT,xT=iY("keys"),ST=function(e){return xT[e]||(xT[e]=aY(e))},ov={},oY=rY,sY=Pn,lY=Ms,cY=Uu,sv=Xi,lv=nv,uY=ST,fY=ov,ET="Object already initialized",dY=sY.WeakMap,zu,zs,qu,pY=function(e){return qu(e)?zs(e):zu(e,{})},hY=function(e){return function(t){var n;if(!lY(t)||(n=zs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(oY||lv.state){var Qi=lv.state||(lv.state=new dY),mY=Qi.get,_T=Qi.has,vY=Qi.set;zu=function(e,t){if(_T.call(Qi,e))throw new TypeError(ET);return t.facade=e,vY.call(Qi,e,t),t},zs=function(e){return mY.call(Qi,e)||{}},qu=function(e){return _T.call(Qi,e)}}else{var Ja=uY("state");fY[Ja]=!0,zu=function(e,t){if(sv(e,Ja))throw new TypeError(ET);return t.facade=e,cY(e,Ja,t),t},zs=function(e){return sv(e,Ja)?e[Ja]:{}},qu=function(e){return sv(e,Ja)}}var kT={set:zu,get:zs,has:qu,enforce:pY,getterFor:hY},cv=Ji,yY=Xi,TT=Function.prototype,gY=cv&&Object.getOwnPropertyDescriptor,uv=yY(TT,"name"),bY=uv&&(function(){}).name==="something",wY=uv&&(!cv||cv&&gY(TT,"name").configurable),fv={EXISTS:uv,PROPER:bY,CONFIGURABLE:wY},xY=Pn,CT=qn,SY=Xi,OT=Uu,EY=tv,_Y=bT,$T=kT,kY=fv.CONFIGURABLE,TY=$T.get,CY=$T.enforce,OY=String(String).split("String");(gT.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,c;if(CT(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!SY(n,"name")||kY&&n.name!==s)&&OT(n,"name",s),c=CY(n),c.source||(c.source=OY.join(typeof s=="string"?s:""))),e===xY){a?e[t]=n:EY(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:OT(e,t,n)})(Function.prototype,"toString",function(){return CT(this)&&TY(this).source||_Y(this)});var qs=gT.exports,IT={},$Y=Math.ceil,IY=Math.floor,Wu=function(e){var t=+e;return t!==t||t===0?0:(t>0?IY:$Y)(t)},RY=Wu,AY=Math.max,PY=Math.min,DY=function(e,t){var n=RY(e);return n<0?AY(n+t,0):PY(n,t)},jY=Wu,NY=Math.min,RT=function(e){return e>0?NY(jY(e),9007199254740991):0},MY=RT,FY=function(e){return MY(e.length)},LY=Ym,BY=DY,UY=FY,AT=function(e){return function(t,n,r){var i=LY(t),a=UY(i),o=BY(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},zY={includes:AT(!0),indexOf:AT(!1)},dv=Xi,qY=Ym,WY=zY.indexOf,VY=ov,PT=function(e,t){var n=qY(e),r=0,i=[],a;for(a in n)!dv(VY,a)&&dv(n,a)&&i.push(a);for(;t.length>r;)dv(n,a=t[r++])&&(~WY(i,a)||i.push(a));return i},pv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],HY=PT,ZY=pv,KY=ZY.concat("length","prototype");IT.f=Object.getOwnPropertyNames||function(t){return HY(t,KY)};var DT={};DT.f=Object.getOwnPropertySymbols;var GY=Lu,YY=IT,JY=DT,XY=Si,QY=GY("Reflect","ownKeys")||function(t){var n=YY.f(XY(t)),r=JY.f;return r?n.concat(r(t)):n},eJ=Xi,tJ=QY,nJ=Km,rJ=Us,iJ=function(e,t){for(var n=tJ(t),r=rJ.f,i=nJ.f,a=0;a<n.length;a++){var o=n[a];eJ(e,o)||r(e,o,i(t,o))}},aJ=ar,oJ=qn,sJ=/#|\.prototype\./,Ws=function(e,t){var n=cJ[lJ(e)];return n==fJ?!0:n==uJ?!1:oJ(t)?aJ(t):!!t},lJ=Ws.normalize=function(e){return String(e).replace(sJ,".").toLowerCase()},cJ=Ws.data={},uJ=Ws.NATIVE="N",fJ=Ws.POLYFILL="P",dJ=Ws,hv=Pn,pJ=Km.f,hJ=Uu,mJ=qs,vJ=tv,yJ=iJ,gJ=dJ,bJ=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,c,l,u;if(r?o=hv:i?o=hv[n]||vJ(n,{}):o=(hv[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(u=pJ(o,s),c=u&&u.value):c=o[s],a=gJ(r?s:n+(i?".":"#")+s,e.forced),!a&&c!==void 0){if(typeof l==typeof c)continue;yJ(l,c)}(e.sham||c&&c.sham)&&hJ(l,"sham",!0),mJ(o,s,l,e)}},wJ=Bs,xJ=wJ("toStringTag"),jT={};jT[xJ]="z";var mv=String(jT)==="[object z]",SJ=mv,EJ=qn,Vu=Gm,_J=Bs,kJ=_J("toStringTag"),TJ=Vu(function(){return arguments}())=="Arguments",CJ=function(e,t){try{return e[t]}catch{}},NT=SJ?Vu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=CJ(t=Object(e),kJ))=="string"?n:TJ?Vu(t):(r=Vu(t))=="Object"&&EJ(t.callee)?"Arguments":r},OJ=NT,Hu=function(e){if(OJ(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},$J=Si,MT=function(){var e=$J(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},vv={},FT=ar,IJ=Pn,LT=IJ.RegExp;vv.UNSUPPORTED_Y=FT(function(){var e=LT("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),vv.BROKEN_CARET=FT(function(){var e=LT("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var RJ=PT,AJ=pv,PJ=Object.keys||function(t){return RJ(t,AJ)},DJ=Ji,jJ=Us,NJ=Si,MJ=PJ,FJ=DJ?Object.defineProperties:function(t,n){NJ(t);for(var r=MJ(n),i=r.length,a=0,o;i>a;)jJ.f(t,o=r[a++],n[o]);return t},LJ=Lu,BJ=LJ("document","documentElement"),UJ=Si,zJ=FJ,BT=pv,qJ=ov,WJ=BJ,VJ=pT,HJ=ST,UT=">",zT="<",yv="prototype",gv="script",qT=HJ("IE_PROTO"),bv=function(){},WT=function(e){return zT+gv+UT+e+zT+"/"+gv+UT},VT=function(e){e.write(WT("")),e.close();var t=e.parentWindow.Object;return e=null,t},ZJ=function(){var e=VJ("iframe"),t="java"+gv+":",n;return e.style.display="none",WJ.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(WT("document.F=Object")),n.close(),n.F},Zu,Ku=function(){try{Zu=new ActiveXObject("htmlfile")}catch{}Ku=typeof document<"u"?document.domain&&Zu?VT(Zu):ZJ():VT(Zu);for(var e=BT.length;e--;)delete Ku[yv][BT[e]];return Ku()};qJ[qT]=!0;var KJ=Object.create||function(t,n){var r;return t!==null?(bv[yv]=UJ(t),r=new bv,bv[yv]=null,r[qT]=t):r=Ku(),n===void 0?r:zJ(r,n)},GJ=ar,YJ=Pn,JJ=YJ.RegExp,XJ=GJ(function(){var e=JJ(".","s");return!(e.dotAll&&e.exec(`
|
|
172
|
-
`)&&e.flags==="s")}),QJ=ar,eX=Pn,tX=eX.RegExp,nX=QJ(function(){var e=tX("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),rX=Hu,iX=MT,HT=vv,aX=rv,oX=KJ,sX=kT.get,lX=XJ,cX=nX,Gu=RegExp.prototype.exec,uX=aX("native-string-replace",String.prototype.replace),wv=Gu,xv=function(){var e=/a/,t=/b*/g;return Gu.call(e,"a"),Gu.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),ZT=HT.UNSUPPORTED_Y||HT.BROKEN_CARET,Sv=/()??/.exec("")[1]!==void 0,fX=xv||Sv||ZT||lX||cX;fX&&(wv=function(t){var n=this,r=sX(n),i=rX(t),a=r.raw,o,s,c,l,u,f,d;if(a)return a.lastIndex=n.lastIndex,o=wv.call(a,i),n.lastIndex=a.lastIndex,o;var p=r.groups,m=ZT&&n.sticky,h=iX.call(n),y=n.source,v=0,b=i;if(m&&(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)!==`
|
|
173
|
-
`)&&(y="(?: "+y+")",b=" "+b,v++),s=new RegExp("^(?:"+y+")",h)),Sv&&(s=new RegExp("^"+y+"$(?!\\s)",h)),xv&&(c=n.lastIndex),l=Gu.call(m?s:n,b),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:xv&&l&&(n.lastIndex=n.global?l.index+l[0].length:c),Sv&&l&&l.length>1&&uX.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&p)for(l.groups=f=oX(null),u=0;u<p.length;u++)d=p[u],f[d[0]]=l[d[1]];return l});var Ev=wv,dX=bJ,KT=Ev;dX({target:"RegExp",proto:!0,forced:/./.exec!==KT},{exec:KT});var GT=qs,pX=Ev,YT=ar,JT=Bs,hX=Uu,mX=JT("species"),_v=RegExp.prototype,vX=function(e,t,n,r){var i=JT(e),a=!YT(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!YT(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[mX]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||n){var s=/./[i],c=t(i,""[e],function(l,u,f,d,p){var m=u.exec;return m===pX||m===_v.exec?a&&!p?{done:!0,value:s.call(u,f,d)}:{done:!0,value:l.call(f,u,d)}:{done:!1}});GT(String.prototype,e,c[0]),GT(_v,i,c[1])}r&&hX(_v[i],"sham",!0)},yX=Wu,gX=Hu,bX=Fu,XT=function(e){return function(t,n){var r=gX(bX(t)),i=yX(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},wX={codeAt:XT(!1),charAt:XT(!0)},xX=wX.charAt,SX=function(e,t,n){return t+(n?xX(e,t).length:1)},EX=aT,_X=Math.floor,kX="".replace,TX=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,CX=/\$([$&'`]|\d{1,2})/g,OX=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=CX;return i!==void 0&&(i=EX(i),c=TX),kX.call(a,c,function(l,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[u.slice(1,-1)];break;default:var d=+u;if(d===0)return l;if(d>s){var p=_X(d/10);return p===0?l:p<=s?r[p-1]===void 0?u.charAt(1):r[p-1]+u.charAt(1):l}f=r[d-1]}return f===void 0?"":f})},$X=Si,IX=qn,RX=Gm,AX=Ev,PX=function(e,t){var n=e.exec;if(IX(n)){var r=n.call(e,t);return r!==null&&$X(r),r}if(RX(e)==="RegExp")return AX.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},DX=vX,jX=ar,NX=Si,MX=qn,FX=Wu,LX=RT,Xa=Hu,BX=Fu,UX=SX,zX=eT,qX=OX,WX=PX,VX=Bs,kv=VX("replace"),HX=Math.max,ZX=Math.min,KX=function(e){return e===void 0?e:String(e)},GX=function(){return"a".replace(/./,"$0")==="$0"}(),QT=function(){return/./[kv]?/./[kv]("a","$0")==="":!1}(),YX=!jX(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});DX("replace",function(e,t,n){var r=QT?"$":"$0";return[function(a,o){var s=BX(this),c=a==null?void 0:zX(a,kv);return c?c.call(a,s,o):t.call(Xa(s),a,o)},function(i,a){var o=NX(this),s=Xa(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var c=n(t,o,s,a);if(c.done)return c.value}var l=MX(a);l||(a=Xa(a));var u=o.global;if(u){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=WX(o,s);if(p===null||(d.push(p),!u))break;var m=Xa(p[0]);m===""&&(o.lastIndex=UX(s,LX(o.lastIndex),f))}for(var h="",y=0,v=0;v<d.length;v++){p=d[v];for(var b=Xa(p[0]),w=HX(ZX(FX(p.index),s.length),0),T=[],E=1;E<p.length;E++)T.push(KX(p[E]));var _=p.groups;if(l){var $=[b].concat(T,w,s);_!==void 0&&$.push(_);var U=Xa(a.apply(void 0,$))}else U=qX(b,s,w,T,_,a);w>=y&&(h+=s.slice(y,w)+U,y=w+b.length)}return h+s.slice(y)}]},!YX||!GX||QT);var Vs=Vt,JX=Th,XX=Hi,Yu=function(e){return JX.slice(0,e.length)===e},QX=function(){return Yu("Bun/")?"BUN":Yu("Cloudflare-Workers")?"CLOUDFLARE":Yu("Deno/")?"DENO":Yu("Node.js/")?"NODE":Vs.Bun&&typeof Bun.version=="string"?"BUN":Vs.Deno&&typeof Deno.version=="object"?"DENO":XX(Vs.process)==="process"?"NODE":Vs.window&&Vs.document?"BROWSER":"REST"}(),eQ=TypeError,tQ=function(e,t){if(e<t)throw new eQ("Not enough arguments");return e},eC=Vt,nQ=yh,rQ=un,iQ=QX,aQ=Th,oQ=xu,sQ=tQ,lQ=eC.Function,cQ=/MSIE .\./.test(aQ)||iQ==="BUN"&&function(){var e=eC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),tC=function(e,t){var n=t?2:1;return cQ?function(r,i){var a=sQ(arguments.length,1)>n,o=rQ(r)?r:lQ(r),s=a?oQ(arguments,n):[],c=a?function(){nQ(o,this,s)}:o;return t?e(c,i):e(c)}:e},uQ=yt,nC=Vt,fQ=tC,rC=fQ(nC.setInterval,!0);uQ({global:!0,bind:!0,forced:nC.setInterval!==rC},{setInterval:rC});var dQ=yt,iC=Vt,pQ=tC,aC=pQ(iC.setTimeout,!0);dQ({global:!0,bind:!0,forced:iC.setTimeout!==aC},{setTimeout:aC});var hQ=rn,mQ=hQ.setInterval,vQ=mQ;const yQ=Ge(vQ);var gQ=Ht,oC=function(e,t){var n=[][e];return!!n&&gQ(function(){n.call(null,t||function(){return 1},1)})},bQ=yt,wQ=bh,xQ=ME.indexOf,SQ=oC,Tv=wQ([].indexOf),sC=!!Tv&&1/Tv([1],1,-0)<0,EQ=sC||!SQ("indexOf");bQ({target:"Array",proto:!0,forced:EQ},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return sC?Tv(this,t,n)||0:xQ(this,t,n)}});var _Q=Yi,kQ=_Q("Array","indexOf"),TQ=Hr,CQ=kQ,Cv=Array.prototype,OQ=function(e){var t=e.indexOf;return e===Cv||TQ(Cv,e)&&t===Cv.indexOf?CQ:t},$Q=OQ,IQ=$Q,RQ=IQ;const AQ=Ge(RQ);var lC=lu,PQ=TypeError,DQ=function(e,t){if(!delete e[t])throw new PQ("Cannot delete property "+lC(t)+" of "+lC(e))},jQ=yt,NQ=Zr,MQ=Gh,FQ=du,LQ=Zi,BQ=wk,UQ=qh,zQ=Kh,qQ=ks,Ov=DQ,WQ=hu,VQ=WQ("splice"),HQ=Math.max,ZQ=Math.min;jQ({target:"Array",proto:!0,forced:!VQ},{splice:function(t,n){var r=NQ(this),i=LQ(r),a=MQ(t,i),o=arguments.length,s,c,l,u,f,d;for(o===0?s=c=0:o===1?(s=0,c=i-a):(s=o-2,c=ZQ(HQ(FQ(n),0),i-a)),UQ(i+s-c),l=zQ(r,c),u=0;u<c;u++)f=a+u,f in r&&qQ(l,u,r[f]);if(l.length=c,s<c){for(u=a;u<i-c;u++)f=u+c,d=u+s,f in r?r[d]=r[f]:Ov(r,d);for(u=i;u>i-c+s;u--)Ov(r,u-1)}else if(s>c)for(u=i-c;u>a;u--)f=u+c-1,d=u+s-1,f in r?r[d]=r[f]:Ov(r,d);for(u=0;u<s;u++)r[u+a]=arguments[u+2];return BQ(r,i-c+s),l}});var KQ=Yi,GQ=KQ("Array","splice"),YQ=Hr,JQ=GQ,$v=Array.prototype,XQ=function(e){var t=e.splice;return e===$v||YQ($v,e)&&t===$v.splice?JQ:t},QQ=XQ,eee=QQ,tee=eee;const nee=Ge(tee);var ree=Yi,iee=ree("Array","concat"),aee=Hr,oee=iee,Iv=Array.prototype,see=function(e){var t=e.concat;return e===Iv||aee(Iv,e)&&t===Iv.concat?oee:t},lee=see,cee=lee,uee=cee;const It=Ge(uee);var fee=yt,dee=Bt,cC=Date,pee=dee(cC.prototype.getTime);fee({target:"Date",stat:!0},{now:function(){return pee(new cC)}});var hee=rn,mee=hee.Date.now,vee=mee,yee=vee,gee=yee;const Ei=Ge(gee);var bee=sm.forEach,wee=oC,xee=wee("forEach"),See=xee?[].forEach:function(t){return bee(this,t,arguments.length>1?arguments[1]:void 0)},Eee=yt,uC=See;Eee({target:"Array",proto:!0,forced:[].forEach!==uC},{forEach:uC});var _ee=Yi,kee=_ee("Array","forEach"),Tee=kee,Cee=Tee,Oee=Ts,$ee=An,Iee=Hr,Ree=Cee,Rv=Array.prototype,Aee={DOMTokenList:!0,NodeList:!0},Pee=function(e){var t=e.forEach;return e===Rv||Iee(Rv,e)&&t===Rv.forEach||$ee(Aee,Oee(e))?Ree:t},Dee=Pee;const Ju=Ge(Dee);var jee=yt,Nee=Zr,fC=Xh,Mee=Ht,Fee=Mee(function(){fC(1)});jee({target:"Object",stat:!0,forced:Fee},{keys:function(t){return fC(Nee(t))}});var Lee=rn,Bee=Lee.Object.keys,Uee=Bee,zee=Uee,qee=zee;const Wee=Ge(qee);var Vee=rn,Hee=Vee.Object.getOwnPropertySymbols,Zee=Hee,Kee=Zee,Gee=Kee;const dC=Ge(Gee);var Yee=yt,Jee=sm.filter,Xee=hu,Qee=Xee("filter");Yee({target:"Array",proto:!0,forced:!Qee},{filter:function(t){return Jee(this,t,arguments.length>1?arguments[1]:void 0)}});var ete=Yi,tte=ete("Array","filter"),nte=Hr,rte=tte,Av=Array.prototype,ite=function(e){var t=e.filter;return e===Av||nte(Av,e)&&t===Av.filter?rte:t},ate=ite,ote=ate,ste=ote;const lte=Ge(ste);var pC={exports:{}},cte=yt,ute=Ht,fte=Er,hC=ws.f,mC=En,dte=!mC||ute(function(){hC(1)});cte({target:"Object",stat:!0,forced:dte,sham:!mC},{getOwnPropertyDescriptor:function(t,n){return hC(fte(t),n)}});var pte=rn,vC=pte.Object,hte=pC.exports=function(t,n){return vC.getOwnPropertyDescriptor(t,n)};vC.getOwnPropertyDescriptor.sham&&(hte.sham=!0);var mte=pC.exports,vte=mte,yte=vte,gte=yte;const yC=Ge(gte);var bte=_r,wte=Bt,xte=wu,Ste=Su,Ete=bi,_te=wte([].concat),kte=bte("Reflect","ownKeys")||function(t){var n=xte.f(Ete(t)),r=Ste.f;return r?_te(n,r(t)):n},Tte=yt,Cte=En,Ote=kte,$te=Er,Ite=ws,Rte=ks;Tte({target:"Object",stat:!0,sham:!Cte},{getOwnPropertyDescriptors:function(t){for(var n=$te(t),r=Ite.f,i=Ote(n),a={},o=0,s,c;i.length>o;)c=r(n,s=i[o++]),c!==void 0&&Rte(a,s,c);return a}});var Ate=rn,Pte=Ate.Object.getOwnPropertyDescriptors,Dte=Pte,jte=Dte,Nte=jte;const gC=Ge(Nte);var bC={exports:{}},Mte=yt,Fte=En,wC=mu.f;Mte({target:"Object",stat:!0,forced:Object.defineProperties!==wC,sham:!Fte},{defineProperties:wC});var Lte=rn,xC=Lte.Object,Bte=bC.exports=function(t,n){return xC.defineProperties(t,n)};xC.defineProperties.sham&&(Bte.sham=!0);var Ute=bC.exports,zte=Ute,qte=zte,Wte=qte;const Vte=Ge(Wte);var Hte=Bk;const Zte=Ge(Hte);var Kte=!1;function Gte(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 Yte(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 Jte=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!Kte: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(Yte(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=Gte(i);try{a.insertRule(r,a.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}(),fn="-ms-",Xu="-moz-",ct="-webkit-",SC="comm",Pv="rule",Dv="decl",Xte="@import",EC="@keyframes",Qte="@layer",ene=Math.abs,Qu=String.fromCharCode,tne=Object.assign;function nne(e,t){return an(e,0)^45?(((t<<2^an(e,0))<<2^an(e,1))<<2^an(e,2))<<2^an(e,3):0}function _C(e){return e.trim()}function rne(e,t){return(e=t.exec(e))?e[0]:e}function ut(e,t,n){return e.replace(t,n)}function jv(e,t){return e.indexOf(t)}function an(e,t){return e.charCodeAt(t)|0}function Hs(e,t,n){return e.slice(t,n)}function Or(e){return e.length}function Nv(e){return e.length}function ef(e,t){return t.push(e),e}function ine(e,t){return e.map(t).join("")}var tf=1,Qa=1,kC=0,kn=0,Ut=0,eo="";function nf(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:tf,column:Qa,length:o,return:""}}function Zs(e,t){return tne(nf("",null,null,"",null,null,0),e,{length:-e.length},t)}function ane(){return Ut}function one(){return Ut=kn>0?an(eo,--kn):0,Qa--,Ut===10&&(Qa=1,tf--),Ut}function Dn(){return Ut=kn<kC?an(eo,kn++):0,Qa++,Ut===10&&(Qa=1,tf++),Ut}function $r(){return an(eo,kn)}function rf(){return kn}function Ks(e,t){return Hs(eo,e,t)}function Gs(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 TC(e){return tf=Qa=1,kC=Or(eo=e),kn=0,[]}function CC(e){return eo="",e}function af(e){return _C(Ks(kn-1,Mv(e===91?e+2:e===40?e+1:e)))}function sne(e){for(;(Ut=$r())&&Ut<33;)Dn();return Gs(e)>2||Gs(Ut)>3?"":" "}function lne(e,t){for(;--t&&Dn()&&!(Ut<48||Ut>102||Ut>57&&Ut<65||Ut>70&&Ut<97););return Ks(e,rf()+(t<6&&$r()==32&&Dn()==32))}function Mv(e){for(;Dn();)switch(Ut){case e:return kn;case 34:case 39:e!==34&&e!==39&&Mv(Ut);break;case 40:e===41&&Mv(e);break;case 92:Dn();break}return kn}function cne(e,t){for(;Dn()&&e+Ut!==57;)if(e+Ut===84&&$r()===47)break;return"/*"+Ks(t,kn-1)+"*"+Qu(e===47?e:Dn())}function une(e){for(;!Gs($r());)Dn();return Ks(e,kn)}function fne(e){return CC(of("",null,null,null,[""],e=TC(e),0,[0],e))}function of(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,f=o,d=0,p=0,m=0,h=1,y=1,v=1,b=0,w="",T=i,E=a,_=r,$=w;y;)switch(m=b,b=Dn()){case 40:if(m!=108&&an($,f-1)==58){jv($+=ut(af(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:$+=af(b);break;case 9:case 10:case 13:case 32:$+=sne(m);break;case 92:$+=lne(rf()-1,7);continue;case 47:switch($r()){case 42:case 47:ef(dne(cne(Dn(),rf()),t,n),c);break;default:$+="/"}break;case 123*h:s[l++]=Or($)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:v==-1&&($=ut($,/\f/g,"")),p>0&&Or($)-f&&ef(p>32?$C($+";",r,n,f-1):$C(ut($," ","")+";",r,n,f-2),c);break;case 59:$+=";";default:if(ef(_=OC($,t,n,l,u,i,s,w,T=[],E=[],f),a),b===123)if(u===0)of($,t,_,_,T,a,f,s,E);else switch(d===99&&an($,3)===110?100:d){case 100:case 108:case 109:case 115:of(e,_,_,r&&ef(OC(e,_,_,0,0,i,s,w,i,T=[],f),E),i,E,f,s,r?T:E);break;default:of($,_,_,_,[""],E,0,s,E)}}l=u=p=0,h=v=1,w=$="",f=o;break;case 58:f=1+Or($),p=m;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&one()==125)continue}switch($+=Qu(b),b*h){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[l++]=(Or($)-1)*v,v=1;break;case 64:$r()===45&&($+=af(Dn())),d=$r(),u=f=Or(w=$+=une(rf())),b++;break;case 45:m===45&&Or($)==2&&(h=0)}}return a}function OC(e,t,n,r,i,a,o,s,c,l,u){for(var f=i-1,d=i===0?a:[""],p=Nv(d),m=0,h=0,y=0;m<r;++m)for(var v=0,b=Hs(e,f+1,f=ene(h=o[m])),w=e;v<p;++v)(w=_C(h>0?d[v]+" "+b:ut(b,/&\f/g,d[v])))&&(c[y++]=w);return nf(e,t,n,i===0?Pv:s,c,l,u)}function dne(e,t,n){return nf(e,t,n,SC,Qu(ane()),Hs(e,2,-2),0)}function $C(e,t,n,r){return nf(e,t,n,Dv,Hs(e,0,r),Hs(e,r+1,-1),r)}function to(e,t){for(var n="",r=Nv(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function pne(e,t,n,r){switch(e.type){case Qte:if(e.children.length)break;case Xte:case Dv:return e.return=e.return||e.value;case SC:return"";case EC:return e.return=e.value+"{"+to(e.children,r)+"}";case Pv:e.value=e.props.join(",")}return Or(n=to(e.children,r))?e.return=e.value+"{"+n+"}":""}function hne(e){var t=Nv(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function mne(e){return function(t){t.root||(t=t.return)&&e(t)}}function vne(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var yne=function(t,n,r){for(var i=0,a=0;i=a,a=$r(),i===38&&a===12&&(n[r]=1),!Gs(a);)Dn();return Ks(t,kn)},gne=function(t,n){var r=-1,i=44;do switch(Gs(i)){case 0:i===38&&$r()===12&&(n[r]=1),t[r]+=yne(kn-1,n,r);break;case 2:t[r]+=af(i);break;case 4:if(i===44){t[++r]=$r()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qu(i)}while(i=Dn());return t},bne=function(t,n){return CC(gne(TC(t),n))},IC=new WeakMap,wne=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&&!IC.get(r))&&!i){IC.set(t,!0);for(var a=[],o=bne(n,a),s=r.props,c=0,l=0;c<o.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=a[c]?o[c].replace(/&\f/g,s[u]):s[u]+" "+o[c]}}},xne=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function RC(e,t){switch(nne(e,t)){case 5103:return ct+"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 ct+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ct+e+Xu+e+fn+e+e;case 6828:case 4268:return ct+e+fn+e+e;case 6165:return ct+e+fn+"flex-"+e+e;case 5187:return ct+e+ut(e,/(\w+).+(:[^]+)/,ct+"box-$1$2"+fn+"flex-$1$2")+e;case 5443:return ct+e+fn+"flex-item-"+ut(e,/flex-|-self/,"")+e;case 4675:return ct+e+fn+"flex-line-pack"+ut(e,/align-content|flex-|-self/,"")+e;case 5548:return ct+e+fn+ut(e,"shrink","negative")+e;case 5292:return ct+e+fn+ut(e,"basis","preferred-size")+e;case 6060:return ct+"box-"+ut(e,"-grow","")+ct+e+fn+ut(e,"grow","positive")+e;case 4554:return ct+ut(e,/([^-])(transform)/g,"$1"+ct+"$2")+e;case 6187:return ut(ut(ut(e,/(zoom-|grab)/,ct+"$1"),/(image-set)/,ct+"$1"),e,"")+e;case 5495:case 3959:return ut(e,/(image-set\([^]*)/,ct+"$1$`$1");case 4968:return ut(ut(e,/(.+:)(flex-)?(.*)/,ct+"box-pack:$3"+fn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ct+e+e;case 4095:case 3583:case 4068:case 2532:return ut(e,/(.+)-inline(.+)/,ct+"$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(Or(e)-1-t>6)switch(an(e,t+1)){case 109:if(an(e,t+4)!==45)break;case 102:return ut(e,/(.+:)(.+)-([^]+)/,"$1"+ct+"$2-$3$1"+Xu+(an(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jv(e,"stretch")?RC(ut(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(an(e,t+1)!==115)break;case 6444:switch(an(e,Or(e)-3-(~jv(e,"!important")&&10))){case 107:return ut(e,":",":"+ct)+e;case 101:return ut(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ct+(an(e,14)===45?"inline-":"")+"box$3$1"+ct+"$2$3$1"+fn+"$2box$3")+e}break;case 5936:switch(an(e,t+11)){case 114:return ct+e+fn+ut(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ct+e+fn+ut(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ct+e+fn+ut(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ct+e+fn+e+e}return e}var Sne=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Dv:t.return=RC(t.value,t.length);break;case EC:return to([Zs(t,{value:ut(t.value,"@","@"+ct)})],i);case Pv:if(t.length)return ine(t.props,function(a){switch(rne(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return to([Zs(t,{props:[ut(a,/:(read-\w+)/,":"+Xu+"$1")]})],i);case"::placeholder":return to([Zs(t,{props:[ut(a,/:(plac\w+)/,":"+ct+"input-$1")]}),Zs(t,{props:[ut(a,/:(plac\w+)/,":"+Xu+"$1")]}),Zs(t,{props:[ut(a,/:(plac\w+)/,fn+"input-$1")]})],i)}return""})}},Ene=[Sne],_ne=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 y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||Ene,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var c,l=[wne,xne];{var u,f=[pne,mne(function(h){u.insert(h)})],d=hne(l.concat(i,f)),p=function(y){return to(fne(y),d)};c=function(y,v,b,w){u=b,p(y?y+"{"+v.styles+"}":v.styles),w&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new Jte({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:c};return m.sheet.hydrate(s),m};function kne(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 Tne={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},Cne=!1,One=/[A-Z]|^ms/g,$ne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,AC=function(t){return t.charCodeAt(1)===45},PC=function(t){return t!=null&&typeof t!="boolean"},Fv=vne(function(e){return AC(e)?e:e.replace(One,"-$&").toLowerCase()}),DC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace($ne,function(r,i,a){return _i={name:i,styles:a,next:_i},i})}return Tne[t]!==1&&!AC(t)&&typeof n=="number"&&n!==0?n+"px":n},Ine="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function sf(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 _i={name:i.name,styles:i.styles,next:_i},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)_i={name:o.name,styles:o.styles,next:_i},o=o.next;var s=a.styles+";";return s}return Rne(e,t,n)}}var c=n;if(t==null)return c;var l=t[c];return l!==void 0?l:c}function Rne(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=sf(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":PC(s)&&(r+=Fv(a)+":"+DC(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Cne)throw new Error(Ine);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)PC(o[c])&&(r+=Fv(a)+":"+DC(a,o[c])+";");else{var l=sf(e,t,o);switch(a){case"animation":case"animationName":{r+=Fv(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var jC=/label:\s*([^\s;{]+)\s*(;|$)/g,_i;function Lv(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="";_i=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=sf(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=sf(n,t,e[s]),r){var c=a;i+=c[s]}jC.lastIndex=0;for(var l="",u;(u=jC.exec(i))!==null;)l+="-"+u[1];var f=kne(i)+l;return{name:f,styles:i,next:_i}}function NC(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Ane=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Pne=function(t,n,r){Ane(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function MC(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function FC(e,t,n){var r=[],i=NC(e,r,n);return r.length<2?n:i+t(r)}var Dne=function(t){var n=_ne(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 c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Lv(l,n.registered,void 0);return Pne(n,f),n.key+"-"+f.name},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Lv(l,n.registered),d="animation-"+f.name;return MC(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Lv(l,n.registered);MC(n,f)},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return FC(n.registered,r,jne(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:NC.bind(null,n.registered),merge:FC.bind(null,n.registered,r)}},jne=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},Nne=qs,Bv=Date.prototype,LC="Invalid Date",BC="toString",Mne=Bv[BC],Fne=Bv.getTime;String(new Date(NaN))!=LC&&Nne(Bv,BC,function(){var t=Fne.call(this);return t===t?Mne.call(this):LC});var Lne=mv,Bne=NT,Une=Lne?{}.toString:function(){return"[object "+Bne(this)+"]"},zne=mv,qne=qs,Wne=Une;zne||qne(Object.prototype,"toString",Wne,{unsafe:!0});var Vne=fv.PROPER,Hne=qs,Zne=Si,UC=Hu,Kne=ar,Gne=MT,Uv="toString",zC=RegExp.prototype,qC=zC[Uv],Yne=Kne(function(){return qC.call({source:"a",flags:"b"})!="/a/b"}),Jne=Vne&&qC.name!=Uv;(Yne||Jne)&&Hne(RegExp.prototype,Uv,function(){var t=Zne(this),n=UC(t.source),r=t.flags,i=UC(r===void 0&&t instanceof RegExp&&!("flags"in zC)?Gne.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var WC=typeof window<"u"?window:self,Xne=WC.crypto||WC.msCrypto,Qne=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}}(Xne);const ere=Ge(Qne);function tre(){return ere().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var nre=_E;const VC=Ge(nre);function ht(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 HC(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return It(n=[It(r="%c".concat(e,"%c ")).call(r,t)]).call(n,nt(ht("green","white")),a)}function rre(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,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,c=Tr(s,1),l=c[0];typeof l=="function"&&(a=l());var u=VC(a[0])?a:[a],f=u.length===1;Ju(u).call(u,function(d,p){if(f){var m,h;(m=console).log.apply(m,nt(HC.apply(void 0,It(h=[e]).call(h,nt(d)))))}else if(p){var y;(y=console).log.apply(y,nt(VC(d)?d:[d]))}else{var v,b;(v=console).groupCollapsed.apply(v,nt(HC.apply(void 0,It(b=[e]).call(b,nt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var ire=Ji,are=fv.EXISTS,ore=Us.f,ZC=Function.prototype,sre=ZC.toString,lre=/^\s*function ([^ (]*)/,cre="name";ire&&!are&&ore(ZC,cre,{configurable:!0,get:function(){try{return sre.call(this).match(lre)[1]}catch{return""}}});var ure=rn,fre=ure.setTimeout,dre=fre;const pre=Ge(dre);function hre(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Ei();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=pre(function(){e.apply(void 0,a),n=Ei()},Math.max(0,t-s+n)))}}var KC=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=D.useRef();o.current=i;var s=D.useMemo(function(){return hre(function(l){var u=o.current;u&&u(l)},n)},[n,o]),c=D.useCallback(function(l){l.timeStampLow=Ei(),s(l)},[s]);return D.useLayoutEffect(function(){return a.addEventListener(r,c,{passive:!0}),c({target:a,type:r}),function(){return a.removeEventListener(r,c)}},[r,c,a]),!1};KC.defaultProps={debounce:200};var mre=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},vre=yt,yre=mre;vre({target:"Math",stat:!0},{sign:yre});var gre=rn,bre=gre.Math.sign,wre=bre,xre=wre,Sre=xre;const Ere=Ge(Sre);function _re(e,t){var n=Ere(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 kre(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var GC=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=D.useRef(),s=D.useCallback(function(l,u,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Ei();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=kre(u,m,_re,(Ei()-p)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,u,f,d+1,p)}}))},[o,r,i]),c=D.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return D.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",c,{passive:!0}),i.addEventListener("wheel",c,{passive:!0}),function(){i.removeEventListener("pointerdown",c),i.removeEventListener("wheel",c),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,c,n,i,a]),!1};GC.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function zv(e){var t=D.useState(e),n=Tr(t,2),r=n[0],i=n[1],a=D.useRef(),o=D.useCallback(function(s){typeof s=="function"?o(function(c){return s=s(c),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function YC(e,t){var n=Wee(e);if(dC){var r=dC(e);t&&(r=lte(r).call(r,function(i){return yC(e,i).enumerable})),n.push.apply(n,r)}return n}function JC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ju(r=YC(Object(n),!0)).call(r,function(a){MK(e,a,n[a])})}else if(gC)Vte(e,gC(n));else{var i;Ju(i=YC(Object(n))).call(i,function(a){Zte(e,a,yC(n,a))})}}return e}var Tre=function(){return 1/0},XC=17,Cre="bottom",or="top",QC=1,Ore=34,eO={};function $re(e,t){return e(),yQ(e,t)}function tO(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<QC,s=a<QC,c=t===or?s:o,l=t!==or?s:o;return{atBottom:o,atEnd:c,atStart:l,atTop:s}}function Ys(e,t){return e===(t===or?0:"100%")}var qv=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=D.useMemo(function(){return rre("<ScrollToBottom>",{force:a})},[a]);s=s===or?or:Cre;var f=D.useRef(0),d=D.useRef(o),p=zv(s===or?0:"100%"),m=Tr(p,3),h=m[0],y=m[1],v=m[2],b=zv(null),w=Tr(b,3),T=w[0],E=w[1],_=w[2],$=D.useRef(0),U=D.useRef(0),z=D.useRef(0),k=D.useState(!0),j=Tr(k,2),W=j[0],B=j[1],I=D.useState(!0),A=Tr(I,2),L=A[0],Z=A[1],H=D.useState(!0),R=Tr(H,2),g=R[0],N=R[1],V=D.useState(!1),S=Tr(V,2),K=S[0],J=S[1],Y=zv(!0),Q=Tr(Y,3),ae=Q[0],oe=Q[1],X=Q[2],ee=D.useRef([]),G=D.useCallback(function(M){var ne=_.current;return ee.current.push(M),ne&&M({scrollTop:ne.scrollTop}),function(){var he=ee.current,Se=AQ(he).call(he,M);~Se&&nee(he).call(he,Se,1)}},[ee,_]),pe=D.useCallback(function(){var M=v.current;u(function(){var ne;return It(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,nt(ht("magenta")),nt(ht("orange")),[{animateTo:M}])}),f.current=Ei(),Ys(M,s)||oe(!1),y(null)},[v,u,f,s,y,oe]),ge=D.useCallback(function(M){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},he=ne.behavior,Se=_.current;if(typeof M!="number"&&M!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var $e;return[It($e=["%cscrollTo%c: Will scroll to %c".concat(typeof M=="number"?M+"px":M.replace(/%/g,"%%"),"%c")]).call($e,nt(ht("lime","")),nt(ht("purple"))),{behavior:he,nextAnimateTo:M,target:Se}]}),he==="auto"?(pe(),Se&&(Se.scrollTop=M==="100%"?Se.scrollHeight-Se.offsetHeight:M)):(he!=="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.'),y(M)),Ys(M,s)&&(u(function(){var $e;return[It($e=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call($e,nt(ht("lime","")),nt(ht("purple"))),[{mode:s,nextAnimateTo:M}]]}),oe(!0))},[u,pe,s,y,oe,_]),Ie=D.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;u(function(){var he;return It(he=["%cscrollToBottom%c: Called"]).call(he,nt(ht("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.'),ge("100%",{behavior:ne||"smooth"})},[u,ge]),F=D.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;u(function(){var he;return It(he=["%cscrollToTop%c: Called"]).call(he,nt(ht("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.'),ge(0,{behavior:ne||"smooth"})},[u,ge]),ie=D.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;u(function(){var Se;return It(Se=["%cscrollToEnd%c: Called"]).call(Se,nt(ht("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 he={behavior:ne||"smooth"};s===or?F(he):Ie(he)},[u,s,Ie,F]),ue=D.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;u(function(){var Se;return It(Se=["%cscrollToStart%c: Called"]).call(Se,nt(ht("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 he={behavior:ne||"smooth"};s===or?Ie(he):F(he)},[u,s,Ie,F]),se=D.useCallback(function(){var M=_.current;if(M){if(d.current==="auto"){u(function(){var _t;return It(_t=["%ctarget changed%c: Initial scroll"]).call(_t,nt(ht("blue")))}),M.scrollTop=s===or?0:M.scrollHeight-M.offsetHeight,d.current=!1;return}var ne=$.current,he=M.offsetHeight,Se=M.scrollHeight,$e=M.scrollTop,Ze=s===or?0:Math.max(0,Se-he-$e),et=Math.max(0,ne-$e),Tt=l({maxValue:Ze,minValue:et,offsetHeight:he,scrollHeight:Se,scrollTop:$e}),Et=Math.max(0,Math.min(Ze,Tt)),qe;s===or||Et!==Ze?qe=$e+Et:qe="100%",u(function(){var _t,Ke,hn;return[It(_t=[It(Ke=It(hn="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(hn,typeof qe=="number"?qe+"px":qe.replace(/%/g,"%%"),"%c (%c")).call(Ke,(qe==="100%"?Ze:qe)+ne,"px%c)")]).call(_t,nt(ht("orange")),nt(ht("purple")),nt(ht("purple")),nt(ht("purple"))),{animateFrom:ne,maxValue:Ze,minValue:et,nextAnimateTo:qe,nextValue:Et,offsetHeight:he,rawNextValue:Tt,scrollHeight:Se,scrollTop:$e}]}),ge(qe,{behavior:"smooth"})}},[$,u,s,l,ge,_]),Ce=D.useCallback(function(M){var ne,he=M.timeStampLow,Se=v.current,$e=_.current,Ze=Se!==null;if(!(he<=f.current||!$e)){var et=tO({mode:s,target:$e}),Tt=et.atBottom,Et=et.atEnd,qe=et.atStart,_t=et.atTop;B(Tt),Z(Et),J(qe),N(_t);var Ke=$e.offsetHeight,hn=$e.scrollHeight,Nn=U.current,fr=z.current,ti=Ke!==Nn,Lr=hn!==fr;if(ti&&(U.current=Ke),Lr&&(z.current=hn),!ti&&!Lr){var dr=Ze&&Ys(Se,s)||Et;X.current!==dr&&(u(function(){var mt,Ct,Gt,Yt;return[It(mt=["%conScroll%c: %csetSticky%c(%c".concat(dr,"%c)")]).call(mt,nt(ht("red")),nt(ht("red")),nt(ht("purple"))),It(Ct=[It(Gt=It(Yt="(animating = %c".concat(Ze,"%c && isEnd = %c")).call(Yt,Ys(Se,s),"%c) || atEnd = %c")).call(Gt,Et,"%c")]).call(Ct,nt(ht("purple")),nt(ht("purple")),nt(ht("purple")),[{animating:Ze,animateTo:Se,atEnd:Et,mode:s,offsetHeight:$e.offsetHeight,scrollHeight:$e.scrollHeight,sticky:X.current,nextSticky:dr}])]}),oe(dr))}else X.current&&(u(function(){var mt;return[It(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,nt(ht("red")),nt(ht("orange")),[{offsetHeightChanged:ti,scrollHeightChanged:Lr}]),{nextOffsetHeight:Ke,prevOffsetHeight:Nn,nextScrollHeight:hn,prevScrollHeight:fr}]}),se());var ni=$e.scrollTop;Ju(ne=ee.current).call(ne,function(mt){return mt({scrollTop:ni})})}},[v,u,f,s,U,z,ee,se,B,Z,J,N,oe,X,_]);D.useEffect(function(){if(T){var M=!1,ne=$re(function(){var he=_.current,Se=v.current!==null;X.current?tO({mode:s,target:he}).atEnd?M=!1:M?Ei()-M>Ore&&(Se||($.current=he.scrollTop,u(function(){var $e;return It($e=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call($e,nt(ht("navy")),nt(ht("orange")))}),se()),M=!1):M=Ei():he.scrollHeight<=he.offsetHeight&&!X.current&&(u(function(){var $e;return[It($e=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call($e,nt(ht("navy")),nt(ht("purple"))),[{offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:X.current}]]}),oe(!0))},Math.max(XC,n)||XC);return function(){return clearInterval(ne)}}},[v,n,u,s,se,oe,X,T,_]);var Ee=D.useMemo(function(){var M=eO[c]||(eO[c]=Dne({key:"react-scroll-to-bottom--css-"+tre(),nonce:c}));return function(ne){return M.css(ne)+""}},[c]),Ae=D.useMemo(function(){return{observeScrollPosition:G,setTarget:E,styleToClassName:Ee}},[G,E,Ee]),He=D.useMemo(function(){return{atBottom:W,atEnd:L,atStart:K,atTop:g,mode:s}},[W,L,K,g,s]),te=D.useMemo(function(){var M=h!==null;return{animating:M,animatingToEnd:M&&Ys(h,s),sticky:ae}},[h,s,ae]),fe=D.useMemo(function(){return JC(JC({},He),te)},[He,te]),q=D.useMemo(function(){return{scrollTo:ge,scrollToBottom:Ie,scrollToEnd:ie,scrollToStart:ue,scrollToTop:F}},[ge,Ie,ie,ue,F]);return D.useEffect(function(){if(T){var M=function(){z.current=T.scrollHeight};return T.addEventListener("focus",M,{capture:!0,passive:!0}),function(){return T.removeEventListener("focus",M)}}},[T]),u(function(){var M;return[It(M=["%cRender%c: Render"]).call(M,nt(ht("cyan",""))),{animateTo:h,animating:h!==null,sticky:ae,target:T}]}),D.createElement(Nu.Provider,{value:Ae},D.createElement(zm.Provider,{value:q},D.createElement(Vm.Provider,{value:fe},D.createElement(qm.Provider,{value:He},D.createElement(Wm.Provider,{value:te},r,T&&D.createElement(KC,{debounce:i,name:"scroll",onEvent:Ce,target:T}),T&&h!==null&&D.createElement(GC,{name:"scrollTop",onEnd:pe,target:T,value:h}))))))};qv.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Tre},qv.propTypes={checkInterval:at.number,children:at.any,debounce:at.number,debug:at.bool,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func};var Ire={height:"100%",overflowY:"auto",width:"100%"},Wv=function(t){var n=t.children,r=t.className,i=D.useContext(Nu),a=i.setTarget,o=Hm()(Ire);return D.createElement("div",{className:jm(o,(r||"")+""),ref:a},n)};Wv.defaultProps={children:void 0,className:void 0},Wv.propTypes={children:at.any,className:at.string};var Rre={position:"relative"},Vv=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=Hm()(Rre);return D.createElement("div",{className:jm(o,(r||"")+"")},D.createElement(Wv,{className:(a||"")+""},n),D.createElement(Zm,{className:(i||"")+""}))};Vv.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Vv.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var Hv=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,f=t.scroller,d=t.scrollViewClassName;return D.createElement(qv,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:c,mode:l,nonce:u,scroller:f},D.createElement(Vv,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};Hv.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},Hv.propTypes={checkInterval:at.number,children:at.any,className:at.string,debounce:at.number,debug:at.bool,followButtonClassName:at.string,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func,scrollViewClassName:at.string},FU();let Zv=(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 Kv=D.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:c,showMarquee:l=!0,...u})=>{const{messageList:f}=lt,d=D.useMemo(()=>yR(t),[t.length]);return O.jsxs(Hv,{...u,className:ms(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&O.jsx("span",{...f.headerMessage,children:r}),l&&O.jsx(NU,{botAvatar:a,botDescription:o,botName:s}),d.map(p=>O.jsx(vh,{renderers:i,sendMessage:c,...p},p.id)),n&&O.jsx(vh,{id:Zv(),renderers:i,sendMessage:c,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:O.jsx(zS,{})})]})});Kv.displayName="MessageList";const Are=({className:e,...t})=>{const{className:n}=lt.loader;return O.jsx("div",{...t,className:ms(e,n)})},nO=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:c,renderers:l,isReadOnly:u,disableComposer:f,restartConversation:d,allowFileUpload:p,...m})=>{const{color:h,fontFamily:y,radius:v,themeMode:b,variant:w,botAvatar:T,botDescription:E,botName:_,composerPlaceholder:$,showPoweredBy:U}=t,z={color:h,fontFamily:y,radius:v,themeMode:b,variant:w},k=D.useMemo(()=>i.map(j=>{const{authorId:W}=j,B=W===(a==null?void 0:a.id)?"outgoing":"incoming";return{...j,direction:B,sender:B==="outgoing"?{name:"You"}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i.length,a==null?void 0:a.id]);return O.jsxs(O.Fragment,{children:[O.jsx(q1,{...z}),O.jsxs(fh,{connected:e,allowFileUpload:p,uploadFile:s,...m,children:[O.jsx(US,{closeWindow:n,configuration:t,restartConversation:d}),c?O.jsx(Are,{}):O.jsx(O.Fragment,{children:O.jsx(Kv,{botAvatar:T,botDescription:E,botName:_,renderers:l,isTyping:r,sendMessage:o,messages:k})}),O.jsx(f1,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:u,disableComposer:f,showPoweredBy:U,composerPlaceholder:$,allowFileUpload:p})]})]})};function rO(e,t){return function(){return e.apply(t,arguments)}}const{toString:iO}=Object.prototype,{getPrototypeOf:Gv}=Object,Yv=(e=>t=>{const n=iO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Yr=e=>(e=e.toLowerCase(),t=>Yv(t)===e),lf=e=>t=>typeof t===e,{isArray:no}=Array,Js=lf("undefined");function Pre(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&ea(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const aO=Yr("ArrayBuffer");function Dre(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&aO(e.buffer),t}const jre=lf("string"),ea=lf("function"),oO=lf("number"),Jv=e=>e!==null&&typeof e=="object",Nre=e=>e===!0||e===!1,cf=e=>{if(Yv(e)!=="object")return!1;const t=Gv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mre=Yr("Date"),Fre=Yr("File"),Lre=Yr("Blob"),Bre=Yr("FileList"),Ure=e=>Jv(e)&&ea(e.pipe),zre=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||iO.call(e)===t||ea(e.toString)&&e.toString()===t)},qre=Yr("URLSearchParams"),Wre=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),no(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function sO(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const lO=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cO=e=>!Js(e)&&e!==lO;function Xv(){const{caseless:e}=cO(this)&&this||{},t={},n=(r,i)=>{const a=e&&sO(t,i)||i;cf(t[a])&&cf(r)?t[a]=Xv(t[a],r):cf(r)?t[a]=Xv({},r):no(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Xs(arguments[r],n);return t}const Vre=(e,t,n,{allOwnKeys:r}={})=>(Xs(t,(i,a)=>{n&&ea(i)?e[a]=rO(i,n):e[a]=i},{allOwnKeys:r}),e),Hre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zre=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Kre=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Gv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gre=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Yre=e=>{if(!e)return null;if(no(e))return e;let t=e.length;if(!oO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gv(Uint8Array)),Xre=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Qre=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},eie=Yr("HTMLFormElement"),tie=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),uO=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nie=Yr("RegExp"),fO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xs(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},re={isArray:no,isArrayBuffer:aO,isBuffer:Pre,isFormData:zre,isArrayBufferView:Dre,isString:jre,isNumber:oO,isBoolean:Nre,isObject:Jv,isPlainObject:cf,isUndefined:Js,isDate:Mre,isFile:Fre,isBlob:Lre,isRegExp:nie,isFunction:ea,isStream:Ure,isURLSearchParams:qre,isTypedArray:Jre,isFileList:Bre,forEach:Xs,merge:Xv,extend:Vre,trim:Wre,stripBOM:Hre,inherits:Zre,toFlatObject:Kre,kindOf:Yv,kindOfTest:Yr,endsWith:Gre,toArray:Yre,forEachEntry:Xre,matchAll:Qre,isHTMLForm:eie,hasOwnProperty:uO,hasOwnProp:uO,reduceDescriptors:fO,freezeMethods:e=>{fO(e,(t,n)=>{if(ea(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ea(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return no(e)?r(e):r(String(e).split(t)),n},toCamelCase:tie,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:sO,global:lO,isContextDefined:cO,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(Jv(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=no(r)?[]:{};return Xs(r,(o,s)=>{const c=n(o,i+1);!Js(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)}};function ot(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}re.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const dO=ot.prototype,pO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pO[e]={value:e}}),Object.defineProperties(ot,pO),Object.defineProperty(dO,"isAxiosError",{value:!0}),ot.from=(e,t,n,r,i,a)=>{const o=Object.create(dO);return re.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ot.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var rie=typeof self=="object"?self.FormData:window.FormData;const iie=Ge(rie);function Qv(e){return re.isPlainObject(e)||re.isArray(e)}function hO(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function mO(e,t,n){return e?e.concat(t).map(function(i,a){return i=hO(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function aie(e){return re.isArray(e)&&!e.some(Qv)}const oie=re.toFlatObject(re,{},null,function(t){return/^is[A-Z]/.test(t)});function sie(e){return e&&re.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function uf(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new(iie||FormData),n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!re.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&sie(t);if(!re.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(re.isDate(m))return m.toISOString();if(!c&&re.isBlob(m))throw new ot("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(m)||re.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(re.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(re.isArray(m)&&aie(m)||re.isFileList(m)||re.endsWith(h,"[]")&&(v=re.toArray(m)))return h=hO(h),v.forEach(function(w,T){!(re.isUndefined(w)||w===null)&&t.append(o===!0?mO([h],T,a):o===null?h:h+"[]",l(w))}),!1}return Qv(m)?!0:(t.append(mO(y,h,a),l(m)),!1)}const f=[],d=Object.assign(oie,{defaultVisitor:u,convertValue:l,isVisitable:Qv});function p(m,h){if(!re.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),re.forEach(m,function(v,b){(!(re.isUndefined(v)||v===null)&&i.call(t,v,re.isString(b)?b.trim():b,h,d))===!0&&p(v,h?h.concat(b):[b])}),f.pop()}}if(!re.isObject(e))throw new TypeError("data must be an object");return p(e),t}function vO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ey(e,t){this._pairs=[],e&&uf(e,this,t)}const yO=ey.prototype;yO.append=function(t,n){this._pairs.push([t,n])},yO.toString=function(t){const n=t?function(r){return t.call(this,r,vO)}:vO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function lie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gO(e,t,n){if(!t)return e;const r=n&&n.encode||lie,i=n&&n.serialize;let a;if(i?a=i(t,n):a=re.isURLSearchParams(t)?t.toString():new ey(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class bO{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const wO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cie=typeof URLSearchParams<"u"?URLSearchParams:ey,uie=FormData,fie=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),die=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ir={isBrowser:!0,classes:{URLSearchParams:cie,FormData:uie,Blob},isStandardBrowserEnv:fie,isStandardBrowserWebWorkerEnv:die,protocols:["http","https","file","blob","url","data"]};function pie(e,t){return uf(e,new Ir.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Ir.isNode&&re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function hie(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mie(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function xO(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),c=a>=n.length;return o=!o&&re.isArray(i)?i.length:o,c?(re.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!re.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&re.isArray(i[o])&&(i[o]=mie(i[o])),!s)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(r,i)=>{t(hie(r),i,n,0)}),n}return null}const vie={"Content-Type":void 0};function yie(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ro={transitional:wO,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=re.isObject(t);if(a&&re.isHTMLForm(t)&&(t=new FormData(t)),re.isFormData(t))return i&&i?JSON.stringify(xO(t)):t;if(re.isArrayBuffer(t)||re.isBuffer(t)||re.isStream(t)||re.isFile(t)||re.isBlob(t))return t;if(re.isArrayBufferView(t))return t.buffer;if(re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pie(t,this.formSerializer).toString();if((s=re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return uf(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),yie(t)):t}],transformResponse:[function(t){const n=this.transitional||ro.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&re.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?ot.from(s,ot.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ir.classes.FormData,Blob:Ir.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};re.forEach(["delete","get","head"],function(t){ro.headers[t]={}}),re.forEach(["post","put","patch"],function(t){ro.headers[t]=re.merge(vie)});const gie=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bie=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
174
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&gie[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},SO=Symbol("internals");function Qs(e){return e&&String(e).trim().toLowerCase()}function ff(e){return e===!1||e==null?e:re.isArray(e)?e.map(ff):String(e)}function wie(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function xie(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function EO(e,t,n,r){if(re.isFunction(r))return r.call(this,t,n);if(re.isString(t)){if(re.isString(r))return t.indexOf(r)!==-1;if(re.isRegExp(r))return r.test(t)}}function Sie(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Eie(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Wn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,c,l){const u=Qs(c);if(!u)throw new Error("header name must be a non-empty string");const f=re.findKey(i,u);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||c]=ff(s))}const o=(s,c)=>re.forEach(s,(l,u)=>a(l,u,c));return re.isPlainObject(t)||t instanceof this.constructor?o(t,n):re.isString(t)&&(t=t.trim())&&!xie(t)?o(bie(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Qs(t),t){const r=re.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return wie(i);if(re.isFunction(n))return n.call(this,i,r);if(re.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qs(t),t){const r=re.findKey(this,t);return!!(r&&(!n||EO(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Qs(o),o){const s=re.findKey(r,o);s&&(!n||EO(r,r[s],s,n))&&(delete r[s],i=!0)}}return re.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return re.forEach(this,(i,a)=>{const o=re.findKey(r,a);if(o){n[o]=ff(i),delete n[a];return}const s=t?Sie(a):String(a).trim();s!==a&&delete n[a],n[s]=ff(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return re.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
175
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[SO]=this[SO]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Qs(o);r[s]||(Eie(i,o),r[s]=!0)}return re.isArray(t)?t.forEach(a):a(t),this}}Wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),re.freezeMethods(Wn.prototype),re.freezeMethods(Wn);function ty(e,t){const n=this||ro,r=t||n,i=Wn.from(r.headers);let a=r.data;return re.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function _O(e){return!!(e&&e.__CANCEL__)}function el(e,t,n){ot.call(this,e??"canceled",ot.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(el,ot,{__CANCEL__:!0});const _ie=null;function kie(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ot("Request failed with status code "+n.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Tie=Ir.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const c=[];c.push(n+"="+encodeURIComponent(r)),re.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),re.isString(a)&&c.push("path="+a),re.isString(o)&&c.push("domain="+o),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Cie(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Oie(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function kO(e,t){return e&&!Cie(t)?Oie(e,t):t}const $ie=Ir.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=re.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Iie(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Rie(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[a];o||(o=l),n[i]=c,r[i]=l;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=u&&l-u;return p?Math.round(d*1e3/p):void 0}}function TO(e,t){let n=0;const r=Rie(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,c=r(s),l=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}const df={http:_ie,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Wn.from(e.headers).normalize(),o=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}re.isFormData(i)&&(Ir.isStandardBrowserEnv||Ir.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+m))}const u=kO(e.baseURL,e.url);l.open(e.method.toUpperCase(),gO(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const p=Wn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};kie(function(v){n(v),c()},function(v){r(v),c()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new ot("Request aborted",ot.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new ot("Network Error",ot.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||wO;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new ot(m,h.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,e,l)),l=null},Ir.isStandardBrowserEnv){const p=(e.withCredentials||$ie(u))&&e.xsrfCookieName&&Tie.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&re.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),re.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",TO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",TO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{l&&(r(!p||p.type?new el(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=Iie(u);if(d&&Ir.protocols.indexOf(d)===-1){r(new ot("Unsupported protocol "+d+":",ot.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};re.forEach(df,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Aie={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=re.isString(n)?df[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new ot(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(re.hasOwnProp(df,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!re.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:df};function ny(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new el(null,e)}function CO(e){return ny(e),e.headers=Wn.from(e.headers),e.data=ty.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Aie.getAdapter(e.adapter||ro.adapter)(e).then(function(r){return ny(e),r.data=ty.call(e,e.transformResponse,r),r.headers=Wn.from(r.headers),r},function(r){return _O(r)||(ny(e),r&&r.response&&(r.response.data=ty.call(e,e.transformResponse,r.response),r.response.headers=Wn.from(r.response.headers))),Promise.reject(r)})}const OO=e=>e instanceof Wn?e.toJSON():e;function io(e,t){t=t||{};const n={};function r(l,u,f){return re.isPlainObject(l)&&re.isPlainObject(u)?re.merge.call({caseless:f},l,u):re.isPlainObject(u)?re.merge({},u):re.isArray(u)?u.slice():u}function i(l,u,f){if(re.isUndefined(u)){if(!re.isUndefined(l))return r(void 0,l,f)}else return r(l,u,f)}function a(l,u){if(!re.isUndefined(u))return r(void 0,u)}function o(l,u){if(re.isUndefined(u)){if(!re.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,f){if(f in t)return r(l,u);if(f in e)return r(void 0,l)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,u)=>i(OO(l),OO(u),!0)};return re.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=c[u]||i,d=f(e[u],t[u],u);re.isUndefined(d)&&f!==s||(n[u]=d)}),n}const $O="1.2.5",ry={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ry[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const IO={};ry.transitional=function(t,n,r){function i(a,o){return"[Axios v"+$O+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new ot(i(o," has been removed"+(n?" in "+n:"")),ot.ERR_DEPRECATED);return n&&!IO[o]&&(IO[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function Pie(e,t,n){if(typeof e!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],c=s===void 0||o(s,a,e);if(c!==!0)throw new ot("option "+a+" must be "+c,ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ot("Unknown option "+a,ot.ERR_BAD_OPTION)}}const iy={assertOptions:Pie,validators:ry},ki=iy.validators;class ta{constructor(t){this.defaults=t,this.interceptors={request:new bO,response:new bO}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=io(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&iy.assertOptions(r,{silentJSONParsing:ki.transitional(ki.boolean),forcedJSONParsing:ki.transitional(ki.boolean),clarifyTimeoutError:ki.transitional(ki.boolean)},!1),i!==void 0&&iy.assertOptions(i,{encode:ki.function,serialize:ki.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&re.merge(a.common,a[n.method]),o&&re.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Wn.concat(o,a);const s=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let u,f=0,d;if(!c){const m=[CO.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),d=m.length,u=Promise.resolve(n);f<d;)u=u.then(m[f++],m[f++]);return u}d=s.length;let p=n;for(f=0;f<d;){const m=s[f++],h=s[f++];try{p=m(p)}catch(y){h.call(this,y);break}}try{u=CO.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,d=l.length;f<d;)u=u.then(l[f++],l[f++]);return u}getUri(t){t=io(this.defaults,t);const n=kO(t.baseURL,t.url);return gO(n,t.params,t.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(t){ta.prototype[t]=function(n,r){return this.request(io(r||{},{method:t,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(io(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}ta.prototype[t]=n(),ta.prototype[t+"Form"]=n(!0)});class ay{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new el(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ay(function(i){t=i}),cancel:t}}}function Die(e){return function(n){return e.apply(null,n)}}function jie(e){return re.isObject(e)&&e.isAxiosError===!0}const oy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oy).forEach(([e,t])=>{oy[t]=e});function RO(e){const t=new ta(e),n=rO(ta.prototype.request,t);return re.extend(n,ta.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return RO(io(e,i))},n}const zt=RO(ro);zt.Axios=ta,zt.CanceledError=el,zt.CancelToken=ay,zt.isCancel=_O,zt.VERSION=$O,zt.toFormData=uf,zt.AxiosError=ot,zt.Cancel=zt.CanceledError,zt.all=function(t){return Promise.all(t)},zt.spread=Die,zt.isAxiosError=jie,zt.mergeConfig=io,zt.AxiosHeaders=Wn,zt.formToJSON=e=>xO(re.isHTMLForm(e)?new FormData(e):e),zt.HttpStatusCode=oy,zt.default=zt;const AO={},Nie=Object.freeze(Object.defineProperty({__proto__:null,default:AO},Symbol.toStringTag,{value:"Module"}));var PO=Object,Mie=Error,Fie=EvalError,Lie=RangeError,Bie=ReferenceError,DO=SyntaxError,ao=TypeError,Uie=URIError,zie=Math.abs,qie=Math.floor,Wie=Math.max,Vie=Math.min,Hie=Math.pow,Zie=Math.round,Kie=Number.isNaN||function(t){return t!==t},Gie=Kie,Yie=function(t){return Gie(t)||t===0?t:t<0?-1:1},Jie=Object.getOwnPropertyDescriptor,pf=Jie;if(pf)try{pf([],"length")}catch{pf=null}var hf=pf,mf=Object.defineProperty||!1;if(mf)try{mf({},"a",{value:1})}catch{mf=!1}var vf=mf,sy,jO;function Xie(){return jO||(jO=1,sy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),sy}var ly,NO;function Qie(){if(NO)return ly;NO=1;var e=typeof Symbol<"u"&&Symbol,t=Xie();return ly=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ly}var cy,MO;function FO(){return MO||(MO=1,cy=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),cy}var uy,LO;function BO(){if(LO)return uy;LO=1;var e=PO;return uy=e.getPrototypeOf||null,uy}var fy,UO;function eae(){if(UO)return fy;UO=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(c,l){for(var u=[],f=0;f<c.length;f+=1)u[f]=c[f];for(var d=0;d<l.length;d+=1)u[d+c.length]=l[d];return u},a=function(c,l){for(var u=[],f=l,d=0;f<c.length;f+=1,d+=1)u[d]=c[f];return u},o=function(s,c){for(var l="",u=0;u<s.length;u+=1)l+=s[u],u+1<s.length&&(l+=c);return l};return fy=function(c){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var u=a(arguments,1),f,d=function(){if(this instanceof f){var v=l.apply(this,i(u,arguments));return Object(v)===v?v:this}return l.apply(c,i(u,arguments))},p=n(0,l.length-u.length),m=[],h=0;h<p;h++)m[h]="$"+h;if(f=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var y=function(){};y.prototype=l.prototype,f.prototype=new y,y.prototype=null}return f},fy}var dy,zO;function tl(){if(zO)return dy;zO=1;var e=eae();return dy=Function.prototype.bind||e,dy}var py,qO;function hy(){return qO||(qO=1,py=Function.prototype.call),py}var my,WO;function VO(){return WO||(WO=1,my=Function.prototype.apply),my}var vy,HO;function tae(){return HO||(HO=1,vy=typeof Reflect<"u"&&Reflect&&Reflect.apply),vy}var yy,ZO;function nae(){if(ZO)return yy;ZO=1;var e=tl(),t=VO(),n=hy(),r=tae();return yy=r||e.call(n,t),yy}var gy,KO;function rae(){if(KO)return gy;KO=1;var e=tl(),t=ao,n=hy(),r=nae();return gy=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return r(e,n,a)},gy}var by,GO;function iae(){if(GO)return by;GO=1;var e=rae(),t=hf,n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return by=r&&typeof r.get=="function"?e([r.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,by}var wy,YO;function aae(){if(YO)return wy;YO=1;var e=FO(),t=BO(),n=iae();return wy=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:n?function(i){return n(i)}:null,wy}var xy,JO;function oae(){if(JO)return xy;JO=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=tl();return xy=n.call(e,t),xy}var Xe,sae=PO,lae=Mie,cae=Fie,uae=Lie,fae=Bie,oo=DO,so=ao,dae=Uie,pae=zie,hae=qie,mae=Wie,vae=Vie,yae=Hie,gae=Zie,bae=Yie,XO=Function,Sy=function(e){try{return XO('"use strict"; return ('+e+").constructor;")()}catch{}},nl=hf,wae=vf,Ey=function(){throw new so},xae=nl?function(){try{return arguments.callee,Ey}catch{try{return nl(arguments,"callee").get}catch{return Ey}}}():Ey,lo=Qie()(),en=aae(),Sae=BO(),Eae=FO(),QO=VO(),rl=hy(),co={},_ae=typeof Uint8Array>"u"||!en?Xe:en(Uint8Array),na={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Xe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Xe:ArrayBuffer,"%ArrayIteratorPrototype%":lo&&en?en([][Symbol.iterator]()):Xe,"%AsyncFromSyncIteratorPrototype%":Xe,"%AsyncFunction%":co,"%AsyncGenerator%":co,"%AsyncGeneratorFunction%":co,"%AsyncIteratorPrototype%":co,"%Atomics%":typeof Atomics>"u"?Xe:Atomics,"%BigInt%":typeof BigInt>"u"?Xe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Xe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Xe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Xe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":lae,"%eval%":eval,"%EvalError%":cae,"%Float32Array%":typeof Float32Array>"u"?Xe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Xe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Xe:FinalizationRegistry,"%Function%":XO,"%GeneratorFunction%":co,"%Int8Array%":typeof Int8Array>"u"?Xe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Xe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Xe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lo&&en?en(en([][Symbol.iterator]())):Xe,"%JSON%":typeof JSON=="object"?JSON:Xe,"%Map%":typeof Map>"u"?Xe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!lo||!en?Xe:en(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":sae,"%Object.getOwnPropertyDescriptor%":nl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Xe:Promise,"%Proxy%":typeof Proxy>"u"?Xe:Proxy,"%RangeError%":uae,"%ReferenceError%":fae,"%Reflect%":typeof Reflect>"u"?Xe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Xe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!lo||!en?Xe:en(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Xe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lo&&en?en(""[Symbol.iterator]()):Xe,"%Symbol%":lo?Symbol:Xe,"%SyntaxError%":oo,"%ThrowTypeError%":xae,"%TypedArray%":_ae,"%TypeError%":so,"%Uint8Array%":typeof Uint8Array>"u"?Xe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Xe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Xe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Xe:Uint32Array,"%URIError%":dae,"%WeakMap%":typeof WeakMap>"u"?Xe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Xe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Xe:WeakSet,"%Function.prototype.call%":rl,"%Function.prototype.apply%":QO,"%Object.defineProperty%":wae,"%Object.getPrototypeOf%":Sae,"%Math.abs%":pae,"%Math.floor%":hae,"%Math.max%":mae,"%Math.min%":vae,"%Math.pow%":yae,"%Math.round%":gae,"%Math.sign%":bae,"%Reflect.getPrototypeOf%":Eae};if(en)try{null.error}catch(e){var kae=en(en(e));na["%Error.prototype%"]=kae}var Tae=function e(t){var n;if(t==="%AsyncFunction%")n=Sy("async function () {}");else if(t==="%GeneratorFunction%")n=Sy("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Sy("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&en&&(n=en(i.prototype))}return na[t]=n,n},e$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},il=tl(),yf=oae(),Cae=il.call(rl,Array.prototype.concat),Oae=il.call(QO,Array.prototype.splice),t$=il.call(rl,String.prototype.replace),gf=il.call(rl,String.prototype.slice),$ae=il.call(rl,RegExp.prototype.exec),Iae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rae=/\\(\\)?/g,Aae=function(t){var n=gf(t,0,1),r=gf(t,-1);if(n==="%"&&r!=="%")throw new oo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new oo("invalid intrinsic syntax, expected opening `%`");var i=[];return t$(t,Iae,function(a,o,s,c){i[i.length]=s?t$(c,Rae,"$1"):o||a}),i},Pae=function(t,n){var r=t,i;if(yf(e$,r)&&(i=e$[r],r="%"+i[0]+"%"),yf(na,r)){var a=na[r];if(a===co&&(a=Tae(r)),typeof a>"u"&&!n)throw new so("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new oo("intrinsic "+t+" does not exist!")},bf=function(t,n){if(typeof t!="string"||t.length===0)throw new so("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new so('"allowMissing" argument must be a boolean');if($ae(/^%?[^%]*%?$/,t)===null)throw new oo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Aae(t),i=r.length>0?r[0]:"",a=Pae("%"+i+"%",n),o=a.name,s=a.value,c=!1,l=a.alias;l&&(i=l[0],Oae(r,Cae([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],p=gf(d,0,1),m=gf(d,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new oo("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(c=!0),i+="."+d,o="%"+i+"%",yf(na,o))s=na[o];else if(s!=null){if(!(d in s)){if(!n)throw new so("base intrinsic for "+t+" exists, but the property is not available.");return}if(nl&&u+1>=r.length){var h=nl(s,d);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[d]}else f=yf(s,d),s=s[d];f&&!c&&(na[o]=s)}}return s},n$={exports:{}},r$=vf,Dae=DO,uo=ao,i$=hf,jae=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new uo("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new uo("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new uo("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new uo("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new uo("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new uo("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!i$&&i$(t,n);if(r$)r$(t,n,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:r,writable:a===null&&c?c.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new Dae("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_y=vf,a$=function(){return!!_y};a$.hasArrayLengthDefineBug=function(){if(!_y)return null;try{return _y([],"length",{value:1}).length!==1}catch{return!0}};var Nae=a$,Mae=bf,o$=jae,Fae=Nae(),s$=hf,l$=ao,Lae=Mae("%Math.floor%"),Bae=function(t,n){if(typeof t!="function")throw new l$("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Lae(n)!==n)throw new l$("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&s$){var o=s$(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(Fae?o$(t,"length",n,!0,!0):o$(t,"length",n)),t};(function(e){var t=tl(),n=bf,r=Bae,i=ao,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),c=vf,l=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+l(0,d.length-(arguments.length-1)),!0)};var u=function(){return s(t,a,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u})(n$);var Uae=n$.exports,c$=bf,u$=Uae,zae=u$(c$("String.prototype.indexOf")),qae=function(t,n){var r=c$(t,!!n);return typeof r=="function"&&zae(t,".prototype.")>-1?u$(r):r};const Wae=II(Nie);var ky=typeof Map=="function"&&Map.prototype,Ty=Object.getOwnPropertyDescriptor&&ky?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wf=ky&&Ty&&typeof Ty.get=="function"?Ty.get:null,f$=ky&&Map.prototype.forEach,Cy=typeof Set=="function"&&Set.prototype,Oy=Object.getOwnPropertyDescriptor&&Cy?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xf=Cy&&Oy&&typeof Oy.get=="function"?Oy.get:null,d$=Cy&&Set.prototype.forEach,Vae=typeof WeakMap=="function"&&WeakMap.prototype,al=Vae?WeakMap.prototype.has:null,Hae=typeof WeakSet=="function"&&WeakSet.prototype,ol=Hae?WeakSet.prototype.has:null,Zae=typeof WeakRef=="function"&&WeakRef.prototype,p$=Zae?WeakRef.prototype.deref:null,Kae=Boolean.prototype.valueOf,Gae=Object.prototype.toString,Yae=Function.prototype.toString,Jae=String.prototype.match,$y=String.prototype.slice,Ti=String.prototype.replace,Xae=String.prototype.toUpperCase,h$=String.prototype.toLowerCase,m$=RegExp.prototype.test,v$=Array.prototype.concat,Rr=Array.prototype.join,Qae=Array.prototype.slice,y$=Math.floor,Iy=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ry=Object.getOwnPropertySymbols,Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,fo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",dn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===fo||!0)?Symbol.toStringTag:null,g$=Object.prototype.propertyIsEnumerable,b$=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function w$(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||m$.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-y$(-e):y$(e);if(r!==e){var i=String(r),a=$y.call(t,i.length+1);return Ti.call(i,n,"$&_")+"."+Ti.call(Ti.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ti.call(t,n,"$&_")}var Py=Wae,x$=Py.custom,S$=k$(x$)?x$:null,eoe=function e(t,n,r,i){var a=n||{};if(Ci(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ci(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ci(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ci(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ci(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return C$(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?w$(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?w$(t,l):l}var u=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Dy(t)?"[Array]":"[Object]";var f=goe(a,r);if(typeof i>"u")i=[];else if(T$(i,t)>=0)return"[Circular]";function d(B,I,A){if(I&&(i=Qae.call(i),i.push(I)),A){var L={depth:a.depth};return Ci(a,"quoteStyle")&&(L.quoteStyle=a.quoteStyle),e(B,L,r+1,i)}return e(B,a,r+1,i)}if(typeof t=="function"&&!_$(t)){var p=coe(t),m=Sf(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(m.length>0?" { "+Rr.call(m,", ")+" }":"")}if(k$(t)){var h=fo?Ti.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ay.call(t);return typeof t=="object"&&!fo?sl(h):h}if(moe(t)){for(var y="<"+h$.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+E$(toe(v[b].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+h$.call(String(t.nodeName))+">",y}if(Dy(t)){if(t.length===0)return"[]";var w=Sf(t,d);return f&&!yoe(w)?"["+Ny(w,f)+"]":"[ "+Rr.call(w,", ")+" ]"}if(roe(t)){var T=Sf(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!g$.call(t,"cause")?"{ ["+String(t)+"] "+Rr.call(v$.call("[cause]: "+d(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Rr.call(T,", ")+" }"}if(typeof t=="object"&&o){if(S$&&typeof t[S$]=="function"&&Py)return Py(t,{depth:u-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(uoe(t)){var E=[];return f$&&f$.call(t,function(B,I){E.push(d(I,t,!0)+" => "+d(B,t))}),O$("Map",wf.call(t),E,f)}if(poe(t)){var _=[];return d$&&d$.call(t,function(B){_.push(d(B,t))}),O$("Set",xf.call(t),_,f)}if(foe(t))return jy("WeakMap");if(hoe(t))return jy("WeakSet");if(doe(t))return jy("WeakRef");if(aoe(t))return sl(d(Number(t)));if(soe(t))return sl(d(Iy.call(t)));if(ooe(t))return sl(Kae.call(t));if(ioe(t))return sl(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof vt<"u"&&t===vt)return"{ [object globalThis] }";if(!noe(t)&&!_$(t)){var $=Sf(t,d),U=b$?b$(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",k=!U&&dn&&Object(t)===t&&dn in t?$y.call(Oi(t),8,-1):z?"Object":"",j=U||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=j+(k||z?"["+Rr.call(v$.call([],k||[],z||[]),": ")+"] ":"");return $.length===0?W+"{}":f?W+"{"+Ny($,f)+"}":W+"{ "+Rr.call($,", ")+" }"}return String(t)};function E$(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function toe(e){return Ti.call(String(e),/"/g,""")}function Dy(e){return Oi(e)==="[object Array]"&&(!dn||!(typeof e=="object"&&dn in e))}function noe(e){return Oi(e)==="[object Date]"&&(!dn||!(typeof e=="object"&&dn in e))}function _$(e){return Oi(e)==="[object RegExp]"&&(!dn||!(typeof e=="object"&&dn in e))}function roe(e){return Oi(e)==="[object Error]"&&(!dn||!(typeof e=="object"&&dn in e))}function ioe(e){return Oi(e)==="[object String]"&&(!dn||!(typeof e=="object"&&dn in e))}function aoe(e){return Oi(e)==="[object Number]"&&(!dn||!(typeof e=="object"&&dn in e))}function ooe(e){return Oi(e)==="[object Boolean]"&&(!dn||!(typeof e=="object"&&dn in e))}function k$(e){if(fo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ay)return!1;try{return Ay.call(e),!0}catch{}return!1}function soe(e){if(!e||typeof e!="object"||!Iy)return!1;try{return Iy.call(e),!0}catch{}return!1}var loe=Object.prototype.hasOwnProperty||function(e){return e in this};function Ci(e,t){return loe.call(e,t)}function Oi(e){return Gae.call(e)}function coe(e){if(e.name)return e.name;var t=Jae.call(Yae.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function T$(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function uoe(e){if(!wf||!e||typeof e!="object")return!1;try{wf.call(e);try{xf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function foe(e){if(!al||!e||typeof e!="object")return!1;try{al.call(e,al);try{ol.call(e,ol)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function doe(e){if(!p$||!e||typeof e!="object")return!1;try{return p$.call(e),!0}catch{}return!1}function poe(e){if(!xf||!e||typeof e!="object")return!1;try{xf.call(e);try{wf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function hoe(e){if(!ol||!e||typeof e!="object")return!1;try{ol.call(e,ol);try{al.call(e,al)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function moe(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function C$(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return C$($y.call(e,0,t.maxStringLength),t)+r}var i=Ti.call(Ti.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,voe);return E$(i,"single",t)}function voe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Xae.call(t.toString(16))}function sl(e){return"Object("+e+")"}function jy(e){return e+" { ? }"}function O$(e,t,n,r){var i=r?Ny(n,r):Rr.call(n,", ");return e+" ("+t+") {"+i+"}"}function yoe(e){for(var t=0;t<e.length;t++)if(T$(e[t],`
|
|
176
|
-
`)>=0)return!1;return!0}function goe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Rr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Rr.call(Array(t+1),n)}}function Ny(e,t){if(e.length===0)return"";var n=`
|
|
177
|
-
`+t.prev+t.base;return n+Rr.call(e,","+n)+`
|
|
178
|
-
`+t.prev}function Sf(e,t){var n=Dy(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Ci(e,i)?t(e[i],e):""}var a=typeof Ry=="function"?Ry(e):[],o;if(fo){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var c in e)Ci(e,c)&&(n&&String(Number(c))===c&&c<e.length||fo&&o["$"+c]instanceof Symbol||(m$.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof Ry=="function")for(var l=0;l<a.length;l++)g$.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var $$=bf,po=qae,boe=eoe,woe=ao,Ef=$$("%WeakMap%",!0),_f=$$("%Map%",!0),xoe=po("WeakMap.prototype.get",!0),Soe=po("WeakMap.prototype.set",!0),Eoe=po("WeakMap.prototype.has",!0),_oe=po("Map.prototype.get",!0),koe=po("Map.prototype.set",!0),Toe=po("Map.prototype.has",!0),My=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Coe=function(e,t){var n=My(e,t);return n&&n.value},Ooe=function(e,t,n){var r=My(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},$oe=function(e,t){return!!My(e,t)},Ioe=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new woe("Side channel does not contain "+boe(a))},get:function(a){if(Ef&&a&&(typeof a=="object"||typeof a=="function")){if(t)return xoe(t,a)}else if(_f){if(n)return _oe(n,a)}else if(r)return Coe(r,a)},has:function(a){if(Ef&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Eoe(t,a)}else if(_f){if(n)return Toe(n,a)}else if(r)return $oe(r,a);return!1},set:function(a,o){Ef&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Ef),Soe(t,a,o)):_f?(n||(n=new _f),koe(n,a,o)):(r||(r={key:{},next:null}),Ooe(r,a,o))}};return i},Roe=String.prototype.replace,Aoe=/%20/g,Fy={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ly={default:Fy.RFC3986,formatters:{RFC1738:function(e){return Roe.call(e,Aoe,"+")},RFC3986:function(e){return String(e)}},RFC1738:Fy.RFC1738,RFC3986:Fy.RFC3986},Poe=Ly,By=Object.prototype.hasOwnProperty,ra=Array.isArray,Ar=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Doe=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ra(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},I$=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},joe=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ra(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!By.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return ra(t)&&!ra(n)&&(i=I$(t,r)),ra(t)&&ra(n)?(n.forEach(function(a,o){if(By.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return By.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},Noe=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Moe=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Uy=1024,Foe=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",c=0;c<o.length;c+=Uy){for(var l=o.length>=Uy?o.slice(c,c+Uy):o,u=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===Poe.RFC1738&&(d===40||d===41)){u[u.length]=l.charAt(f);continue}if(d<128){u[u.length]=Ar[d];continue}if(d<2048){u[u.length]=Ar[192|d>>6]+Ar[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Ar[224|d>>12]+Ar[128|d>>6&63]+Ar[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|l.charCodeAt(f)&1023),u[u.length]=Ar[240|d>>18]+Ar[128|d>>12&63]+Ar[128|d>>6&63]+Ar[128|d&63]}s+=u.join("")}return s},Loe=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:o,prop:l}),r.push(u))}return Doe(n),t},Boe=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Uoe=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},zoe=function(t,n){return[].concat(t,n)},qoe=function(t,n){if(ra(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},R$={arrayToObject:I$,assign:Noe,combine:zoe,compact:Loe,decode:Moe,encode:Foe,isBuffer:Uoe,isRegExp:Boe,maybeMap:qoe,merge:joe},A$=Ioe,kf=R$,ll=Ly,Woe=Object.prototype.hasOwnProperty,P$={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Pr=Array.isArray,Voe=Array.prototype.push,D$=function(e,t){Voe.apply(e,Pr(t)?t:[t])},Hoe=Date.prototype.toISOString,j$=ll.default,Zt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:kf.encode,encodeValuesOnly:!1,format:j$,formatter:ll.formatters[j$],indices:!1,serializeDate:function(t){return Hoe.call(t)},skipNulls:!1,strictNullHandling:!1},Zoe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},zy={},Koe=function e(t,n,r,i,a,o,s,c,l,u,f,d,p,m,h,y,v,b){for(var w=t,T=b,E=0,_=!1;(T=T.get(zy))!==void 0&&!_;){var $=T.get(t);if(E+=1,typeof $<"u"){if($===E)throw new RangeError("Cyclic object value");_=!0}typeof T.get(zy)>"u"&&(E=0)}if(typeof u=="function"?w=u(n,w):w instanceof Date?w=p(w):r==="comma"&&Pr(w)&&(w=kf.maybeMap(w,function(g){return g instanceof Date?p(g):g})),w===null){if(o)return l&&!y?l(n,Zt.encoder,v,"key",m):n;w=""}if(Zoe(w)||kf.isBuffer(w)){if(l){var U=y?n:l(n,Zt.encoder,v,"key",m);return[h(U)+"="+h(l(w,Zt.encoder,v,"value",m))]}return[h(n)+"="+h(String(w))]}var z=[];if(typeof w>"u")return z;var k;if(r==="comma"&&Pr(w))y&&l&&(w=kf.maybeMap(w,l)),k=[{value:w.length>0?w.join(",")||null:void 0}];else if(Pr(u))k=u;else{var j=Object.keys(w);k=f?j.sort(f):j}var W=c?n.replace(/\./g,"%2E"):n,B=i&&Pr(w)&&w.length===1?W+"[]":W;if(a&&Pr(w)&&w.length===0)return B+"[]";for(var I=0;I<k.length;++I){var A=k[I],L=typeof A=="object"&&typeof A.value<"u"?A.value:w[A];if(!(s&&L===null)){var Z=d&&c?A.replace(/\./g,"%2E"):A,H=Pr(w)?typeof r=="function"?r(B,Z):B:B+(d?"."+Z:"["+Z+"]");b.set(t,E);var R=A$();R.set(zy,b),D$(z,e(L,H,r,i,a,o,s,c,r==="comma"&&y&&Pr(w)?null:l,u,f,d,p,m,h,y,v,R))}}return z},Goe=function(t){if(!t)return Zt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Zt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ll.default;if(typeof t.format<"u"){if(!Woe.call(ll.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=ll.formatters[r],a=Zt.filter;(typeof t.filter=="function"||Pr(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in P$?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Zt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Zt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Zt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Zt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Zt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Zt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Zt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Zt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Zt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Zt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Zt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Zt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Zt.strictNullHandling}},Yoe=function(e,t){var n=e,r=Goe(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):Pr(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=P$[r.arrayFormat],c=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=A$(),u=0;u<i.length;++u){var f=i[u];r.skipNulls&&n[f]===null||D$(o,Koe(n[f],f,s,c,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},ho=R$,qy=Object.prototype.hasOwnProperty,Joe=Array.isArray,Pt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ho.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Xoe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},N$=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Qoe="utf8=%26%2310003%3B",ese="utf8=%E2%9C%93",tse=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===ese?l="utf-8":o[c]===Qoe&&(l="iso-8859-1"),s=c,c=o.length);for(c=0;c<o.length;++c)if(c!==s){var u=o[c],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,p,m;d===-1?(p=n.decoder(u,Pt.decoder,l,"key"),m=n.strictNullHandling?null:""):(p=n.decoder(u.slice(0,d),Pt.decoder,l,"key"),m=ho.maybeMap(N$(u.slice(d+1),n),function(y){return n.decoder(y,Pt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=Xoe(m)),u.indexOf("[]=")>-1&&(m=Joe(m)?[m]:m);var h=qy.call(r,p);h&&n.duplicates==="combine"?r[p]=ho.combine(r[p],m):(!h||n.duplicates==="last")&&(r[p]=m)}return r},nse=function(e,t,n,r){for(var i=r?t:N$(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[],o[u]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},rse=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=r.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!r.plainObjects&&qy.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&qy.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}if(c){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+a.slice(c.index)+"]")}return nse(u,n,r,i)}},ise=function(t){if(!t)return Pt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Pt.charset:t.charset,r=typeof t.duplicates>"u"?Pt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Pt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Pt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Pt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Pt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Pt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Pt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Pt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Pt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Pt.decoder,delimiter:typeof t.delimiter=="string"||ho.isRegExp(t.delimiter)?t.delimiter:Pt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Pt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Pt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Pt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Pt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Pt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Pt.strictNullHandling}},ase=function(e,t){var n=ise(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?tse(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],c=rse(s,r[s],n,typeof e=="string");i=ho.merge(i,c,n)}return n.allowSparse===!0?i:ho.compact(i)},ose=Yoe,sse=ase,lse=Ly,cse={formats:lse,parse:sse,stringify:ose};const use=Ge(cse);var Wy={exports:{}};/** @license
|
|
179
|
-
* eventsource.js
|
|
180
|
-
* Available under MIT License (MIT)
|
|
181
|
-
* https://github.com/Yaffle/EventSource/
|
|
182
|
-
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,d=n.Response,p=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(F){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(F){function ie(){}return ie.prototype=F,new ie}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var y=f;f=function(F,ie){var ue=ie.signal;return y(F,{headers:ie.headers,credentials:ie.credentials,cache:ie.cache}).then(function(se){var Ce=se.body.getReader();return ue._reader=Ce,ue._aborted&&ue._reader.cancel(),{status:se.status,statusText:se.statusText,headers:se.headers,body:{getReader:function(){return Ce}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(F){function ie(fe,q,M){if(M===1)return fe>=128>>q&&fe<<q<=2047;if(M===2)return fe>=2048>>q&&fe<<q<=55295||fe>=57344>>q&&fe<<q<=65535;if(M===3)return fe>=65536>>q&&fe<<q<=1114111;throw new Error}function ue(fe,q){if(fe===6*1)return q>>6>15?3:q>31?2:1;if(fe===6*2)return q>15?3:2;if(fe===6*3)return 3;throw new Error}for(var se=65533,Ce="",Ee=this.bitsNeeded,Ae=this.codePoint,He=0;He<F.length;He+=1){var te=F[He];Ee!==0&&(te<128||te>191||!ie(Ae<<6|te&63,Ee-6,ue(Ee,Ae)))&&(Ee=0,Ae=se,Ce+=String.fromCharCode(Ae)),Ee===0?(te>=0&&te<=127?(Ee=0,Ae=te):te>=192&&te<=223?(Ee=6*1,Ae=te&31):te>=224&&te<=239?(Ee=6*2,Ae=te&15):te>=240&&te<=247?(Ee=6*3,Ae=te&7):(Ee=0,Ae=se),Ee!==0&&!ie(Ae,Ee,ue(Ee,Ae))&&(Ee=0,Ae=se)):(Ee-=6,Ae=Ae<<6|te&63),Ee===0&&(Ae<=65535?Ce+=String.fromCharCode(Ae):(Ce+=String.fromCharCode(55296+(Ae-65535-1>>10)),Ce+=String.fromCharCode(56320+(Ae-65535-1&1023))))}return this.bitsNeeded=Ee,this.codePoint=Ae,Ce};var b=function(){try{return new p().decode(new m().encode("test"),{stream:!0})==="test"}catch(F){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+F)}return!1};(p==null||m==null||!b())&&(p=v);var w=function(){};function T(F){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=F,this._sendTimeout=0,this._abort=w}T.prototype.open=function(F,ie){this._abort(!0);var ue=this,se=this._xhr,Ce=1,Ee=0;this._abort=function(M){ue._sendTimeout!==0&&(i(ue._sendTimeout),ue._sendTimeout=0),(Ce===1||Ce===2||Ce===3)&&(Ce=4,se.onload=w,se.onerror=w,se.onabort=w,se.onprogress=w,se.onreadystatechange=w,se.abort(),Ee!==0&&(i(Ee),Ee=0),M||(ue.readyState=4,ue.onabort(null),ue.onreadystatechange())),Ce=0};var Ae=function(){if(Ce===1){var M=0,ne="",he=void 0;if("contentType"in se)M=200,ne="OK",he=se.contentType;else try{M=se.status,ne=se.statusText,he=se.getResponseHeader("Content-Type")}catch{M=0,ne="",he=void 0}M!==0&&(Ce=2,ue.readyState=2,ue.status=M,ue.statusText=ne,ue._contentType=he,ue.onreadystatechange())}},He=function(){if(Ae(),Ce===2||Ce===3){Ce=3;var M="";try{M=se.responseText}catch{}ue.readyState=3,ue.responseText=M,ue.onprogress()}},te=function(M,ne){if((ne==null||ne.preventDefault==null)&&(ne={preventDefault:w}),He(),Ce===1||Ce===2||Ce===3){if(Ce=4,Ee!==0&&(i(Ee),Ee=0),ue.readyState=4,M==="load")ue.onload(ne);else if(M==="error")ue.onerror(ne);else if(M==="abort")ue.onabort(ne);else throw new TypeError;ue.onreadystatechange()}},fe=function(M){se!=null&&(se.readyState===4?(!("onload"in se)||!("onerror"in se)||!("onabort"in se))&&te(se.responseText===""?"error":"load",M):se.readyState===3?"onprogress"in se||He():se.readyState===2&&Ae())},q=function(){Ee=r(function(){q()},500),se.readyState===3&&He()};"onload"in se&&(se.onload=function(M){te("load",M)}),"onerror"in se&&(se.onerror=function(M){te("error",M)}),"onabort"in se&&(se.onabort=function(M){te("abort",M)}),"onprogress"in se&&(se.onprogress=He),"onreadystatechange"in se&&(se.onreadystatechange=function(M){fe(M)}),("contentType"in se||!("ontimeout"in a.prototype))&&(ie+=(ie.indexOf("?")===-1?"?":"&")+"padding=true"),se.open(F,ie,!0),"readyState"in se&&(Ee=r(function(){q()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(F){return this._contentType},T.prototype.setRequestHeader=function(F,ie){var ue=this._xhr;"setRequestHeader"in ue&&ue.setRequestHeader(F,ie)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var F=this;F._sendTimeout=r(function(){F._sendTimeout=0,F.send()},4);return}var ie=this._xhr;"withCredentials"in ie&&(ie.withCredentials=this.withCredentials);try{ie.send(void 0)}catch(ue){throw ue}};function E(F){return F.replace(/[A-Z]/g,function(ie){return String.fromCharCode(ie.charCodeAt(0)+32)})}function _(F){for(var ie=Object.create(null),ue=F.split(`\r
|
|
183
|
-
`),se=0;se<ue.length;se+=1){var Ce=ue[se],Ee=Ce.split(": "),Ae=Ee.shift(),He=Ee.join(": ");ie[E(Ae)]=He}this._map=ie}_.prototype.get=function(F){return this._map[E(F)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function $(){}$.prototype.open=function(F,ie,ue,se,Ce,Ee,Ae){F.open("GET",Ce);var He=0;F.onprogress=function(){var fe=F.responseText,q=fe.slice(He);He+=q.length,ue(q)},F.onerror=function(fe){fe.preventDefault(),se(new Error("NetworkError"))},F.onload=function(){se(null)},F.onabort=function(){se(null)},F.onreadystatechange=function(){if(F.readyState===a.HEADERS_RECEIVED){var fe=F.status,q=F.statusText,M=F.getResponseHeader("Content-Type"),ne=F.getAllResponseHeaders();ie(fe,q,M,new _(ne))}},F.withCredentials=Ee;for(var te in Ae)Object.prototype.hasOwnProperty.call(Ae,te)&&F.setRequestHeader(te,Ae[te]);return F.send(),F};function U(F){this._headers=F}U.prototype.get=function(F){return this._headers.get(F)};function z(){}z.prototype.open=function(F,ie,ue,se,Ce,Ee,Ae){var He=null,te=new h,fe=te.signal,q=new p;return f(Ce,{headers:Ae,credentials:Ee?"include":"same-origin",signal:fe,cache:"no-store"}).then(function(M){return He=M.body.getReader(),ie(M.status,M.statusText,M.headers.get("Content-Type"),new U(M.headers)),new u(function(ne,he){var Se=function(){He.read().then(function($e){if($e.done)ne(void 0);else{var Ze=q.decode($e.value,{stream:!0});ue(Ze),Se()}}).catch(function($e){he($e)})};Se()})}).catch(function(M){if(M.name!=="AbortError")return M}).then(function(M){se(M)}),{abort:function(){He!=null&&He.cancel(),te.abort()}}};function k(){this._listeners=Object.create(null)}function j(F){r(function(){throw F},0)}k.prototype.dispatchEvent=function(F){F.target=this;var ie=this._listeners[F.type];if(ie!=null)for(var ue=ie.length,se=0;se<ue;se+=1){var Ce=ie[se];try{typeof Ce.handleEvent=="function"?Ce.handleEvent(F):Ce.call(this,F)}catch(Ee){j(Ee)}}},k.prototype.addEventListener=function(F,ie){F=String(F);var ue=this._listeners,se=ue[F];se==null&&(se=[],ue[F]=se);for(var Ce=!1,Ee=0;Ee<se.length;Ee+=1)se[Ee]===ie&&(Ce=!0);Ce||se.push(ie)},k.prototype.removeEventListener=function(F,ie){F=String(F);var ue=this._listeners,se=ue[F];if(se!=null){for(var Ce=[],Ee=0;Ee<se.length;Ee+=1)se[Ee]!==ie&&Ce.push(se[Ee]);Ce.length===0?delete ue[F]:ue[F]=Ce}};function W(F){this.type=F,this.target=void 0}function B(F,ie){W.call(this,F),this.data=ie.data,this.lastEventId=ie.lastEventId}B.prototype=Object.create(W.prototype);function I(F,ie){W.call(this,F),this.status=ie.status,this.statusText=ie.statusText,this.headers=ie.headers}I.prototype=Object.create(W.prototype);function A(F,ie){W.call(this,F),this.error=ie.error}A.prototype=Object.create(W.prototype);var L=-1,Z=0,H=1,R=2,g=-1,N=0,V=1,S=2,K=3,J=/^text\/event\-stream(;.*)?$/i,Y=1e3,Q=18e6,ae=function(F,ie){var ue=F==null?ie:parseInt(F,10);return ue!==ue&&(ue=ie),oe(ue)},oe=function(F){return Math.min(Math.max(F,Y),Q)},X=function(F,ie,ue){try{typeof ie=="function"&&ie.call(F,ue)}catch(se){j(se)}};function ee(F,ie){k.call(this),ie=ie||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ge(this,F,ie)}function G(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var pe=f!=null&&d!=null&&"body"in d.prototype;function ge(F,ie,ue){ie=String(ie);var se=!!ue.withCredentials,Ce=ue.lastEventIdQueryParameterName||"lastEventId",Ee=oe(1e3),Ae=ae(ue.heartbeatTimeout,45e3),He="",te=Ee,fe=!1,q=0,M=ue.headers||{},ne=ue.Transport,he=pe&&ne==null?void 0:new T(ne!=null?new ne:G()),Se=ne!=null&&typeof ne!="string"?new ne:he==null?new z:new $,$e=void 0,Ze=0,et=L,Tt="",Et="",qe="",_t="",Ke=N,hn=0,Nn=0,fr=function(mt,Ct,Gt,Yt){if(et===Z)if(mt===200&&Gt!=null&&J.test(Gt)){et=H,fe=Date.now(),te=Ee,F.readyState=H;var on=new I("open",{status:mt,statusText:Ct,headers:Yt});F.dispatchEvent(on),X(F,F.onopen,on)}else{var Jt="";mt!==200?(Ct&&(Ct=Ct.replace(/\s+/g," ")),Jt="EventSource's response has a status "+mt+" "+Ct+" that is not 200. Aborting the connection."):Jt="EventSource's response has a Content-Type specifying an unsupported type: "+(Gt==null?"-":Gt.replace(/\s+/g," "))+". Aborting the connection.",dr();var on=new I("error",{status:mt,statusText:Ct,headers:Yt});F.dispatchEvent(on),X(F,F.onerror,on),console.error(Jt)}},ti=function(mt){if(et===H){for(var Ct=-1,Gt=0;Gt<mt.length;Gt+=1){var Yt=mt.charCodeAt(Gt);(Yt===10||Yt===13)&&(Ct=Gt)}var on=(Ct!==-1?_t:"")+mt.slice(0,Ct+1);_t=(Ct===-1?_t:"")+mt.slice(Ct+1),mt!==""&&(fe=Date.now(),q+=mt.length);for(var Jt=0;Jt<on.length;Jt+=1){var Yt=on.charCodeAt(Jt);if(Ke===g&&Yt===10)Ke=N;else if(Ke===g&&(Ke=N),Yt===13||Yt===10){if(Ke!==N){Ke===V&&(Nn=Jt+1);var Vn=on.slice(hn,Nn-1),Hn=on.slice(Nn+(Nn<Jt&&on.charCodeAt(Nn)===32?1:0),Jt);Vn==="data"?(Tt+=`
|
|
184
|
-
`,Tt+=Hn):Vn==="id"?Et=Hn:Vn==="event"?qe=Hn:Vn==="retry"?(Ee=ae(Hn,Ee),te=Ee):Vn==="heartbeatTimeout"&&(Ae=ae(Hn,Ae),Ze!==0&&(i(Ze),Ze=r(function(){ni()},Ae)))}if(Ke===N){if(Tt!==""){He=Et,qe===""&&(qe="message");var Di=new B(qe,{data:Tt.slice(1),lastEventId:Et});if(F.dispatchEvent(Di),qe==="open"?X(F,F.onopen,Di):qe==="message"?X(F,F.onmessage,Di):qe==="error"&&X(F,F.onerror,Di),et===R)return}Tt="",qe=""}Ke=Yt===13?g:N}else Ke===N&&(hn=Jt,Ke=V),Ke===V?Yt===58&&(Nn=Jt+1,Ke=S):Ke===S&&(Ke=K)}}},Lr=function(mt){if(et===H||et===Z){et=L,Ze!==0&&(i(Ze),Ze=0),Ze=r(function(){ni()},te),te=oe(Math.min(Ee*16,te*2)),F.readyState=Z;var Ct=new A("error",{error:mt});F.dispatchEvent(Ct),X(F,F.onerror,Ct),mt!=null&&console.error(mt)}},dr=function(){et=R,$e!=null&&($e.abort(),$e=void 0),Ze!==0&&(i(Ze),Ze=0),F.readyState=R},ni=function(){if(Ze=0,et!==L){if(!fe&&$e!=null)Lr(new Error("No activity within "+Ae+" milliseconds. "+(et===Z?"No response received.":q+" chars received.")+" Reconnecting.")),$e!=null&&($e.abort(),$e=void 0);else{var mt=Math.max((fe||Date.now())+Ae-Date.now(),1);fe=!1,Ze=r(function(){ni()},mt)}return}fe=!1,q=0,Ze=r(function(){ni()},Ae),et=Z,Tt="",qe="",Et=He,_t="",hn=0,Nn=0,Ke=N;var Ct=ie;if(ie.slice(0,5)!=="data:"&&ie.slice(0,5)!=="blob:"&&He!==""){var Gt=ie.indexOf("?");Ct=Gt===-1?ie:ie.slice(0,Gt+1)+ie.slice(Gt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Hn,Di){return Di===Ce?"":Hn}),Ct+=(ie.indexOf("?")===-1?"?":"&")+Ce+"="+encodeURIComponent(He)}var Yt=F.withCredentials,on={};on.Accept="text/event-stream";var Jt=F.headers;if(Jt!=null)for(var Vn in Jt)Object.prototype.hasOwnProperty.call(Jt,Vn)&&(on[Vn]=Jt[Vn]);try{$e=Se.open(he,fr,ti,Lr,Ct,Yt,on)}catch(Hn){throw dr(),Hn}};F.url=ie,F.readyState=Z,F.withCredentials=se,F.headers=M,F._close=dr,ni()}ee.prototype=Object.create(k.prototype),ee.prototype.CONNECTING=Z,ee.prototype.OPEN=H,ee.prototype.CLOSED=R,ee.prototype.close=function(){this._close()},ee.CONNECTING=Z,ee.OPEN=H,ee.CLOSED=R,ee.prototype.withCredentials=void 0;var Ie=c;a!=null&&(c==null||!("withCredentials"in c.prototype))&&(Ie=ee),function(F){{var ie=F(t);ie!==void 0&&(e.exports=ie)}}(function(F){F.EventSourcePolyfill=ee,F.NativeEventSource=c,F.EventSource=Ie})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:vt:globalThis)})(Wy,Wy.exports);var fse=Wy.exports;const dse=Ge(fse);var rt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(rt||(rt={}));var Vy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Vy||(Vy={}));const xe=rt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},ce=rt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),pse=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class jn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof jn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,rt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jn.create=e=>new jn(e);const mo=(e,t)=>{let n;switch(e.code){case ce.invalid_type:e.received===xe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ce.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,rt.jsonStringifyReplacer)}`;break;case ce.unrecognized_keys:n=`Unrecognized key(s) in object: ${rt.joinValues(e.keys,", ")}`;break;case ce.invalid_union:n="Invalid input";break;case ce.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${rt.joinValues(e.options)}`;break;case ce.invalid_enum_value:n=`Invalid enum value. Expected ${rt.joinValues(e.options)}, received '${e.received}'`;break;case ce.invalid_arguments:n="Invalid function arguments";break;case ce.invalid_return_type:n="Invalid function return type";break;case ce.invalid_date:n="Invalid date";break;case ce.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:rt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ce.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ce.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ce.custom:n="Invalid input";break;case ce.invalid_intersection_types:n="Intersection results could not be merged";break;case ce.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ce.not_finite:n="Number must be finite";break;default:n=t.defaultError,rt.assertNever(e)}return{message:n}};let M$=mo;function hse(e){M$=e}function Tf(){return M$}const Cf=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},mse=[];function ye(e,t){const n=Tf(),r=Cf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mo?void 0:mo].filter(i=>!!i)});e.common.issues.push(r)}class pn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return pn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),vo=e=>({status:"dirty",value:e}),gn=e=>({status:"valid",value:e}),Hy=e=>e.status==="aborted",Zy=e=>e.status==="dirty",ia=e=>e.status==="valid",cl=e=>typeof Promise<"u"&&e instanceof Promise;function Of(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function F$(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var ul,fl;class Dr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const L$=(e,t)=>{if(ia(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new jn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{get description(){return this._def.description}_getType(t){return Jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(cl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return L$(i,a)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:i});return ia(a)?{value:a.value}:{issues:i.common.issues}}catch(a){!((r=(n=a==null?void 0:a.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(a=>ia(a)?{value:a.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(cl(i)?i:Promise.resolve(i));return L$(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ce.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new cr({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Nr.create(this,this._def)}nullable(){return Ai.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return wo.create(this,this._def)}or(t){return ml.create([this,t],this._def)}and(t){return vl.create(this,t,this._def)}transform(t){return new cr({...ze(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new xl({...ze(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new Yy({typeName:Ne.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Sl({...ze(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return El.create(this,t)}readonly(){return _l.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vse=/^c[^\s-]{8,}$/i,yse=/^[0-9a-z]+$/,gse=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bse=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wse=/^[a-z0-9_-]{21}$/i,xse=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Sse=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ese=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_se="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ky;const kse=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tse=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Cse=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ose=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$se=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ise=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,B$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Rse=new RegExp(`^${B$}$`);function U$(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Ase(e){return new RegExp(`^${U$(e)}$`)}function z$(e){let t=`${B$}T${U$(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Pse(e,t){return!!((t==="v4"||!t)&&kse.test(e)||(t==="v6"||!t)&&Cse.test(e))}function Dse(e,t){if(!xse.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function jse(e,t){return!!((t==="v4"||!t)&&Tse.test(e)||(t==="v6"||!t)&&Ose.test(e))}class sr extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const a=this._getOrReturnCtx(t);return ye(a,{code:ce.invalid_type,expected:xe.string,received:a.parsedType}),Me}const r=new pn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?ye(i,{code:ce.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&ye(i,{code:ce.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Ese.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"email",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Ky||(Ky=new RegExp(_se,"u")),Ky.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"emoji",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")bse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"uuid",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")wse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"nanoid",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")vse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")yse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid2",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")gse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ulid",code:ce.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ye(i,{validation:"url",code:ce.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"regex",code:ce.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?z$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Rse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Ase(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Sse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"duration",code:ce.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Pse(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ip",code:ce.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Dse(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"jwt",code:ce.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?jse(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cidr",code:ce.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?$se.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64",code:ce.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?Ise.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64url",code:ce.invalid_string,message:a.message}),r.dirty()):rt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ce.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new sr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}sr.create=e=>{var t;return new sr({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function Nse(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class $i extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const a=this._getOrReturnCtx(t);return ye(a,{code:ce.invalid_type,expected:xe.number,received:a.parsedType}),Me}let r;const i=new pn;for(const a of this._def.checks)a.kind==="int"?rt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Nse(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.not_finite,message:a.message}),i.dirty()):rt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new $i({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new $i({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&rt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}$i.create=e=>new $i({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Ii extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==xe.bigint)return this._getInvalidInput(t);let r;const i=new pn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ce.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):rt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ce.invalid_type,expected:xe.bigint,received:n.parsedType}),Me}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Ii({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ii.create=e=>{var t;return new Ii({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class dl extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.boolean,received:r.parsedType}),Me}return gn(t.data)}}dl.create=e=>new dl({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class aa extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const a=this._getOrReturnCtx(t);return ye(a,{code:ce.invalid_type,expected:xe.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ye(a,{code:ce.invalid_date}),Me}const r=new pn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ce.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):rt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new aa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}aa.create=e=>new aa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...ze(e)});class $f extends Ve{_parse(t){if(this._getType(t)!==xe.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.symbol,received:r.parsedType}),Me}return gn(t.data)}}$f.create=e=>new $f({typeName:Ne.ZodSymbol,...ze(e)});class pl extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.undefined,received:r.parsedType}),Me}return gn(t.data)}}pl.create=e=>new pl({typeName:Ne.ZodUndefined,...ze(e)});class hl extends Ve{_parse(t){if(this._getType(t)!==xe.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.null,received:r.parsedType}),Me}return gn(t.data)}}hl.create=e=>new hl({typeName:Ne.ZodNull,...ze(e)});class yo extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return gn(t.data)}}yo.create=e=>new yo({typeName:Ne.ZodAny,...ze(e)});class oa extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gn(t.data)}}oa.create=e=>new oa({typeName:Ne.ZodUnknown,...ze(e)});class Xr extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ce.invalid_type,expected:xe.never,received:n.parsedType}),Me}}Xr.create=e=>new Xr({typeName:Ne.ZodNever,...ze(e)});class If extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.void,received:r.parsedType}),Me}return gn(t.data)}}If.create=e=>new If({typeName:Ne.ZodVoid,...ze(e)});class lr extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==xe.array)return ye(n,{code:ce.invalid_type,expected:xe.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(ye(n,{code:o?ce.too_big:ce.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ye(n,{code:ce.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ye(n,{code:ce.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Dr(n,o,n.path,s)))).then(o=>pn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Dr(n,o,n.path,s)));return pn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new lr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new lr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new lr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...ze(t)});function go(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Nr.create(go(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:go(e.element)}):e instanceof Nr?Nr.create(go(e.unwrap())):e instanceof Ai?Ai.create(go(e.unwrap())):e instanceof jr?jr.create(e.items.map(t=>go(t))):e}class Rt extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=rt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==xe.object){const l=this._getOrReturnCtx(t);return ye(l,{code:ce.invalid_type,expected:xe.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],f=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Dr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Xr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(ye(i,{code:ce.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Dr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key,d=await u.value;l.push({key:f,value:d,alwaysSet:u.alwaysSet})}return l}).then(l=>pn.mergeObjectSync(r,l)):pn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Oe.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};return rt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}omit(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Rt({...this._def,shape:()=>n})}required(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Nr;)a=a._def.innerType;n[r]=a}}),new Rt({...this._def,shape:()=>n})}keyof(){return q$(rt.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)}),Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)}),Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)});class ml extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new jn(s.ctx.common.issues));return ye(n,{code:ce.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new jn(c));return ye(n,{code:ce.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}ml.create=(e,t)=>new ml({options:e,typeName:Ne.ZodUnion,...ze(t)});const Qr=e=>e instanceof gl?Qr(e.schema):e instanceof cr?Qr(e.innerType()):e instanceof bl?[e.value]:e instanceof Ri?e.options:e instanceof wl?rt.objectValues(e.enum):e instanceof xl?Qr(e._def.innerType):e instanceof pl?[void 0]:e instanceof hl?[null]:e instanceof Nr?[void 0,...Qr(e.unwrap())]:e instanceof Ai?[null,...Qr(e.unwrap())]:e instanceof Yy||e instanceof _l?Qr(e.unwrap()):e instanceof Sl?Qr(e._def.innerType):[];class Rf extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return ye(n,{code:ce.invalid_type,expected:xe.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ce.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Rf({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function Gy(e,t){const n=Jr(e),r=Jr(t);if(e===t)return{valid:!0,data:e};if(n===xe.object&&r===xe.object){const i=rt.objectKeys(t),a=rt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=Gy(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===xe.array&&r===xe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=Gy(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===xe.date&&r===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class vl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Hy(a)||Hy(o))return Me;const s=Gy(a.value,o.value);return s.valid?((Zy(a)||Zy(o))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ce.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vl.create=(e,t,n)=>new vl({left:e,right:t,typeName:Ne.ZodIntersection,...ze(n)});class jr extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.array)return ye(r,{code:ce.invalid_type,expected:xe.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ye(r,{code:ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Dr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>pn.mergeArray(n,o)):pn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new jr({...this._def,rest:t})}}jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jr({items:e,typeName:Ne.ZodTuple,rest:null,...ze(t)})};class yl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return ye(r,{code:ce.invalid_type,expected:xe.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Dr(r,s,r.path,s)),value:o._parse(new Dr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?pn.mergeObjectAsync(n,i):pn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new yl({keyType:t,valueType:n,typeName:Ne.ZodRecord,...ze(r)}):new yl({keyType:sr.create(),valueType:t,typeName:Ne.ZodRecord,...ze(n)})}}class Af extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.map)return ye(r,{code:ce.invalid_type,expected:xe.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new Dr(r,s,r.path,[l,"key"])),value:a._parse(new Dr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Me;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Me;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}Af.create=(e,t,n)=>new Af({valueType:t,keyType:e,typeName:Ne.ZodMap,...ze(n)});class sa extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.set)return ye(r,{code:ce.invalid_type,expected:xe.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ye(r,{code:ce.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ye(r,{code:ce.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Me;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new Dr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new sa({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new sa({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sa.create=(e,t)=>new sa({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...ze(t)});class bo extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.function)return ye(n,{code:ce.invalid_type,expected:xe.function,received:n.parsedType}),Me;function r(s,c){return Cf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),mo].filter(l=>!!l),issueData:{code:ce.invalid_arguments,argumentsError:c}})}function i(s,c){return Cf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),mo].filter(l=>!!l),issueData:{code:ce.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof wo){const s=this;return gn(async function(...c){const l=new jn([]),u=await s._def.args.parseAsync(c,a).catch(p=>{throw l.addIssue(r(c,p)),l}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return gn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new jn([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new jn([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new bo({...this._def,args:jr.create(t).rest(oa.create())})}returns(t){return new bo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new bo({args:t||jr.create([]).rest(oa.create()),returns:n||oa.create(),typeName:Ne.ZodFunction,...ze(r)})}}class gl extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}gl.create=(e,t)=>new gl({getter:e,typeName:Ne.ZodLazy,...ze(t)});class bl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ce.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}bl.create=(e,t)=>new bl({value:e,typeName:Ne.ZodLiteral,...ze(t)});function q$(e,t){return new Ri({values:e,typeName:Ne.ZodEnum,...ze(t)})}class Ri extends Ve{constructor(){super(...arguments),ul.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:rt.joinValues(r),received:n.parsedType,code:ce.invalid_type}),Me}if(Of(this,ul)||F$(this,ul,new Set(this._def.values)),!Of(this,ul).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ce.invalid_enum_value,options:r}),Me}return gn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ri.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ri.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ul=new WeakMap,Ri.create=q$;class wl extends Ve{constructor(){super(...arguments),fl.set(this,void 0)}_parse(t){const n=rt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==xe.string&&r.parsedType!==xe.number){const i=rt.objectValues(n);return ye(r,{expected:rt.joinValues(i),received:r.parsedType,code:ce.invalid_type}),Me}if(Of(this,fl)||F$(this,fl,new Set(rt.getValidEnumValues(this._def.values))),!Of(this,fl).has(t.data)){const i=rt.objectValues(n);return ye(r,{received:r.data,code:ce.invalid_enum_value,options:i}),Me}return gn(t.data)}get enum(){return this._def.values}}fl=new WeakMap,wl.create=(e,t)=>new wl({values:e,typeName:Ne.ZodNativeEnum,...ze(t)});class wo extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.promise&&n.common.async===!1)return ye(n,{code:ce.invalid_type,expected:xe.promise,received:n.parsedType}),Me;const r=n.parsedType===xe.promise?n.data:Promise.resolve(n.data);return gn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wo.create=(e,t)=>new wo({type:e,typeName:Ne.ZodPromise,...ze(t)});class cr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ye(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Me:c.status==="dirty"||n.value==="dirty"?vo(c.value):c});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?vo(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ia(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ia(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);rt.assertNever(i)}}cr.create=(e,t,n)=>new cr({schema:e,typeName:Ne.ZodEffects,effect:t,...ze(n)}),cr.createWithPreprocess=(e,t,n)=>new cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...ze(n)});class Nr extends Ve{_parse(t){return this._getType(t)===xe.undefined?gn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Nr.create=(e,t)=>new Nr({innerType:e,typeName:Ne.ZodOptional,...ze(t)});class Ai extends Ve{_parse(t){return this._getType(t)===xe.null?gn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ai.create=(e,t)=>new Ai({innerType:e,typeName:Ne.ZodNullable,...ze(t)});class xl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===xe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class Sl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return cl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Sl.create=(e,t)=>new Sl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class Pf extends Ve{_parse(t){if(this._getType(t)!==xe.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ce.invalid_type,expected:xe.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}Pf.create=e=>new Pf({typeName:Ne.ZodNaN,...ze(e)});const Mse=Symbol("zod_brand");class Yy extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class El extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),vo(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new El({in:t,out:n,typeName:Ne.ZodPipeline})}}class _l extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ia(i)&&(i.value=Object.freeze(i.value)),i);return cl(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ne.ZodReadonly,...ze(t)});function W$(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function V$(e,t={},n){return e?yo.create().superRefine((r,i)=>{var a,o;const s=e(r);if(s instanceof Promise)return s.then(c=>{var l,u;if(!c){const f=W$(t,r),d=(u=(l=f.fatal)!==null&&l!==void 0?l:n)!==null&&u!==void 0?u:!0;i.addIssue({code:"custom",...f,fatal:d})}});if(!s){const c=W$(t,r),l=(o=(a=c.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0;i.addIssue({code:"custom",...c,fatal:l})}}):yo.create()}const Fse={object:Rt.lazycreate};var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const Lse=(e,t={message:`Input not instance of ${e.name}`})=>V$(n=>n instanceof e,t),H$=sr.create,Z$=$i.create,Bse=Pf.create,Use=Ii.create,K$=dl.create,zse=aa.create,qse=$f.create,Wse=pl.create,Vse=hl.create,Hse=yo.create,Zse=oa.create,Kse=Xr.create,Gse=If.create,Yse=lr.create,Jse=Rt.create,Xse=Rt.strictCreate,Qse=ml.create,ele=Rf.create,tle=vl.create,nle=jr.create,rle=yl.create,ile=Af.create,ale=sa.create,ole=bo.create,sle=gl.create,lle=bl.create,cle=Ri.create,ule=wl.create,fle=wo.create,G$=cr.create,dle=Nr.create,ple=Ai.create,hle=cr.createWithPreprocess,mle=El.create;var C=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:hse,getErrorMap:Tf,makeIssue:Cf,EMPTY_PATH:mse,addIssueToContext:ye,ParseStatus:pn,INVALID:Me,DIRTY:vo,OK:gn,isAborted:Hy,isDirty:Zy,isValid:ia,isAsync:cl,get util(){return rt},get objectUtil(){return Vy},ZodParsedType:xe,getParsedType:Jr,ZodType:Ve,datetimeRegex:z$,ZodString:sr,ZodNumber:$i,ZodBigInt:Ii,ZodBoolean:dl,ZodDate:aa,ZodSymbol:$f,ZodUndefined:pl,ZodNull:hl,ZodAny:yo,ZodUnknown:oa,ZodNever:Xr,ZodVoid:If,ZodArray:lr,ZodObject:Rt,ZodUnion:ml,ZodDiscriminatedUnion:Rf,ZodIntersection:vl,ZodTuple:jr,ZodRecord:yl,ZodMap:Af,ZodSet:sa,ZodFunction:bo,ZodLazy:gl,ZodLiteral:bl,ZodEnum:Ri,ZodNativeEnum:wl,ZodPromise:wo,ZodEffects:cr,ZodTransformer:cr,ZodOptional:Nr,ZodNullable:Ai,ZodDefault:xl,ZodCatch:Sl,ZodNaN:Pf,BRAND:Mse,ZodBranded:Yy,ZodPipeline:El,ZodReadonly:_l,custom:V$,Schema:Ve,ZodSchema:Ve,late:Fse,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>sr.create({...e,coerce:!0}),number:e=>$i.create({...e,coerce:!0}),boolean:e=>dl.create({...e,coerce:!0}),bigint:e=>Ii.create({...e,coerce:!0}),date:e=>aa.create({...e,coerce:!0})},any:Hse,array:Yse,bigint:Use,boolean:K$,date:zse,discriminatedUnion:ele,effect:G$,enum:cle,function:ole,instanceof:Lse,intersection:tle,lazy:sle,literal:lle,map:ile,nan:Bse,nativeEnum:ule,never:Kse,null:Vse,nullable:ple,number:Z$,object:Jse,oboolean:()=>K$().optional(),onumber:()=>Z$().optional(),optional:dle,ostring:()=>H$().optional(),pipeline:mle,preprocess:hle,promise:fle,record:rle,set:ale,strictObject:Xse,string:H$,symbol:qse,transformer:G$,tuple:nle,undefined:Wse,union:Qse,unknown:Zse,void:Gse,NEVER:Me,ZodIssueCode:ce,quotelessJson:pse,ZodError:jn}),vle=Object.defineProperty,yle=(e,t,n)=>t in e?vle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gle=(e,t,n)=>(yle(e,t+"",n),n),ble={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Jy=typeof window<"u"&&typeof window.document<"u"?window.crypto:AO;Jy.getRandomValues||(Jy=ble);var St=class extends Error{constructor(t,n,r,i,a,o,s){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.metadata=s,this.id||(this.id=St.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message,metadata:this.metadata}}static generateId(){const t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Jy.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},wle=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Xy=e=>e instanceof St||wle(e)&&e.isApiError===!0,kl=class extends St{constructor(e,t,n,r){super(500,"An unknown error occurred","Unknown",e,t,n,r)}},xle=class extends St{constructor(e,t,n,r){super(500,"An internal error occurred","Internal",e,t,n,r)}},Sle=class extends St{constructor(e,t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n,r)}},Ele=class extends St{constructor(e,t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n,r)}},_le=class extends St{constructor(e,t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n,r)}},kle=class extends St{constructor(e,t,n,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,n,r)}},Tle=class extends St{constructor(e,t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n,r)}},Cle=class extends St{constructor(e,t,n,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,n,r)}},Ole=class extends St{constructor(e,t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n,r)}},$le=class extends St{constructor(e,t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n,r)}},Ile=class extends St{constructor(e,t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n,r)}},Rle=class extends St{constructor(e,t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n,r)}},Ale=class extends St{constructor(e,t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n,r)}},Ple=class extends St{constructor(e,t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n,r)}},Dle=class extends St{constructor(e,t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n,r)}},jle=class extends St{constructor(e,t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n,r)}},Nle=class extends St{constructor(e,t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n,r)}},Mle=class extends St{constructor(e,t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n,r)}},Fle=class extends St{constructor(e,t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n,r)}},Lle=class extends St{constructor(e,t,n,r){super(429,"The request has been rate limited.","RateLimited",e,t,n,r)}},Ble=class extends St{constructor(e,t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n,r)}},Ule=class extends St{constructor(e,t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n,r)}},zle=class extends St{constructor(e,t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n,r)}},qle=class extends St{constructor(e,t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n,r)}},Wle={Unknown:kl,Internal:xle,Unauthorized:Sle,Forbidden:Ele,PayloadTooLarge:_le,InvalidPayload:kle,UnsupportedMediaType:Tle,MethodNotFound:Cle,ResourceNotFound:Ole,InvalidJsonSchema:$le,InvalidDataFormat:Ile,InvalidIdentifier:Rle,RelationConflict:Ale,ReferenceConstraint:Ple,ResourceLockedConflict:Dle,ReferenceNotFound:jle,InvalidQuery:Nle,Runtime:Mle,AlreadyExists:Fle,RateLimited:Lle,PaymentRequired:Ble,QuotaExceeded:Ule,LimitExceeded:zle,BreakingChanges:qle},Y$=e=>Xy(e)?e:e instanceof Error?new kl(e.message,e):typeof e=="string"?new kl(e):Vle(e);function Vle(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=Wle[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN",e.metadata):new kl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new kl("An invalid error occurred: "+JSON.stringify(e))}var Hle=e=>e[1]!==void 0,Dt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(Hle),s=Object.fromEntries(o),c=use.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[n,c].join("?"):n,u=["put","post","delete","patch"].includes(t.toLowerCase())?a:void 0;return{method:t,url:l,headers:s,data:u}},Zle=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Kle=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Gle=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Yle=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Jle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Xle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Qle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),ece=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),tce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),nce=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),rce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ice=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata,replyTo:e.replyTo}}),ace=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{payload:e.payload,metadata:e.metadata}}),oce=e=>({path:`/messages/${encodeURIComponent(e.id)}/select`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),sce=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),lce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),cce=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),uce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),fce=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),dce=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),pce=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),hce=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags,expiresAt:e.expiresAt}}),mce=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Zle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Kle(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Gle(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=Yle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Jle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=Xle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Qle(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=ece(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=tce(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=nce(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=rce(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=ice(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"updateMessage",async e=>{const{path:t,headers:n,query:r,body:i}=ace(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"selectMessage",async e=>{const{path:t,headers:n,query:r,body:i}=oce(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=sce(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=lce(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=cce(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=uce(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=fce(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=dce(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=pce(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=hce(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});this.axiosInstance=e,this.props=t}};function jt(e){var t;return zt.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Y$(e.response.data):Y$(e)}var J$=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},vce=(e,t)=>{const n=new dse.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new J$;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},yce=async(e,t={})=>{const{emitter:n,source:r}=vce(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},gce=C.object({type:C.literal("message_created"),data:C.object({id:C.string().describe("Id of the [Message](#schema_message)"),createdAt:C.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:C.union([C.object({audioUrl:C.string().min(1),type:C.literal("audio")}),C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)})),type:C.literal("card")}),C.object({items:C.array(C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)}))})),type:C.literal("carousel")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("choice")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("dropdown")}),C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional(),type:C.literal("file")}),C.object({imageUrl:C.string().min(1),type:C.literal("image")}),C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional(),type:C.literal("location")}),C.object({text:C.string().min(1),value:C.string().optional(),type:C.literal("text")}),C.object({videoUrl:C.string().min(1),type:C.literal("video")}),C.object({items:C.array(C.union([C.object({type:C.literal("text"),payload:C.object({text:C.string().min(1),value:C.string().optional()})}),C.object({type:C.literal("markdown"),payload:C.object({markdown:C.string().min(1)})}),C.object({type:C.literal("image"),payload:C.object({imageUrl:C.string().min(1)})}),C.object({type:C.literal("audio"),payload:C.object({audioUrl:C.string().min(1)})}),C.object({type:C.literal("video"),payload:C.object({videoUrl:C.string().min(1)})}),C.object({type:C.literal("file"),payload:C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional()})}),C.object({type:C.literal("location"),payload:C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional()})})])),type:C.literal("bloc")}),C.object({markdown:C.string().min(1),type:C.literal("markdown")}),C.object({url:C.string(),name:C.string(),data:C.union([C.any(),C.null()]).optional(),type:C.literal("custom")}),C.object({reaction:C.string(),type:C.literal("reaction")})]).describe("Payload is the content of the message."),userId:C.string().describe("ID of the [User](#schema_user)"),conversationId:C.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:C.record(C.union([C.any(),C.null()])).describe("Metadata of the message").optional(),replyTo:C.string().describe("ID of the message this message is replying to").optional(),selectedBy:C.string().describe("ID of the user who selected this message. Undefined if not selected.").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),bce=C.object({type:C.literal("message_updated"),data:C.object({id:C.string().describe("Id of the [Message](#schema_message)"),createdAt:C.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:C.union([C.object({audioUrl:C.string().min(1),type:C.literal("audio")}),C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)})),type:C.literal("card")}),C.object({items:C.array(C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)}))})),type:C.literal("carousel")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("choice")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("dropdown")}),C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional(),type:C.literal("file")}),C.object({imageUrl:C.string().min(1),type:C.literal("image")}),C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional(),type:C.literal("location")}),C.object({text:C.string().min(1),value:C.string().optional(),type:C.literal("text")}),C.object({videoUrl:C.string().min(1),type:C.literal("video")}),C.object({items:C.array(C.union([C.object({type:C.literal("text"),payload:C.object({text:C.string().min(1),value:C.string().optional()})}),C.object({type:C.literal("markdown"),payload:C.object({markdown:C.string().min(1)})}),C.object({type:C.literal("image"),payload:C.object({imageUrl:C.string().min(1)})}),C.object({type:C.literal("audio"),payload:C.object({audioUrl:C.string().min(1)})}),C.object({type:C.literal("video"),payload:C.object({videoUrl:C.string().min(1)})}),C.object({type:C.literal("file"),payload:C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional()})}),C.object({type:C.literal("location"),payload:C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional()})})])),type:C.literal("bloc")}),C.object({markdown:C.string().min(1),type:C.literal("markdown")}),C.object({url:C.string(),name:C.string(),data:C.union([C.any(),C.null()]).optional(),type:C.literal("custom")}),C.object({reaction:C.string(),type:C.literal("reaction")})]).describe("Payload is the content of the message."),userId:C.string().describe("ID of the [User](#schema_user)"),conversationId:C.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:C.record(C.union([C.any(),C.null()])).describe("Metadata of the message").optional(),replyTo:C.string().describe("ID of the message this message is replying to").optional(),selectedBy:C.string().describe("ID of the user who selected this message. Undefined if not selected.").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),wce=C.object({type:C.literal("webchat_visibility"),data:C.object({visibility:C.union([C.literal("show"),C.literal("hide"),C.literal("toggle")])})}),xce=C.object({type:C.literal("webchat_config"),data:C.object({config:C.record(C.union([C.any(),C.null()]))})}),Sce=C.object({type:C.literal("custom"),data:C.object({event:C.record(C.union([C.any(),C.null()]))})}),Ece=C.object({type:C.literal("typing_started"),data:C.object({timeout:C.number().optional()})}),_ce=C.object({type:C.literal("typing_stopped"),data:C.record(C.never())}),kce={messageCreated:gce,messageUpdated:bce,webchatVisibility:wce,webchatConfig:xce,custom:Sce,typingStarted:Ece,typingStopped:_ce},X$="unknown error",Q$=class extends J${constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await yce(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(kce)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(X$);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(X$)}});this._props=t}get status(){return this._state.status}},eI=Q$;gle(eI,"listen",async e=>{const t=new Q$(e);return await t.connect(),t});var tI=100*1024*1024,Tce=tI,Cce=tI,Oce=6e4,nI=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"updateMessage",e=>this._auto.updateMessage(e));_e(this,"selectMessage",e=>this._auto.selectMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await eI.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??Oce,i=zt.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:Tce,maxContentLength:Cce});this._auto=new mce(i)}};const $ce=6e4;function rI({apiUrl:e,clientId:t,sseTimeout:n=$ce}){const r=new nI({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return li(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return li(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(li),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return li(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}const Df={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Tn=(e,t)=>e.status===t,Mr=(e,t)=>Df[e.status]<Df[t],iI=(e,t)=>Df[e.status]>=Df[t];class Fr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const aI=["audio","file","image","video"],jf=e=>aI.includes(e),Ice=6e4;class Rce extends Al{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(iI(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(Tn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(iI(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return Tn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=tp(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new nI({apiUrl:r,sseTimeout:Ice})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Mr(this._state,"user_created"))return this._state.userId}async getUser(){if(Mr(this._state,"user_created"))throw new Fr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Mr(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){Tn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():Tn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=b=>{var w;return h((w=b.target)==null?void 0:w.result)},v.onerror=b=>{var w;return y((w=b.target)==null?void 0:w.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",d=jf(f)?f:"file",p=d==="image"?{type:d,imageUrl:u}:d==="audio"?{type:d,audioUrl:u}:d==="video"?{type:d,videoUrl:u}:{type:d,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:u,name:a,type:d}}async sendMessage(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);Tn(this._state,"conversation_created")&&this._state.conversationId===n||Tn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Mr(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Xy(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Xy(r)&&i(r))return!1;throw r}}async newConversation(){if(Mr(this._state,"user_created"))throw new Fr(this._state);Tn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!Tn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const Ace=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new Rce({apiUrl:t,clientId:e}),Pce=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=D.useState(Ace({clientId:e,apiUrl:t}));return n};function oI(){const[e,t]=D.useState(!1),n=D.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var Dce=Object.defineProperty,jce=(e,t,n)=>t in e?Dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nce=(e,t,n)=>jce(e,t+"",n),Mce=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},Fce={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},Lce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Bce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Uce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},sI=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(c=>encodeURIComponent(c))).join(Bce(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let a=Lce(r),o=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Nf({allowReserved:e,name:n,value:s})).join(a);return r==="label"||r==="matrix"?a+o:o},Nf=({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)}`},lI=({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(([l,u])=>{s=[...s,l,e?u:encodeURIComponent(u)]});let c=s.join(",");switch(r){case"form":return`${n}=${c}`;case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;default:return c}}let a=Uce(r),o=Object.entries(i).map(([s,c])=>Nf({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:c})).join(a);return r==="label"||r==="matrix"?a+o:o},zce=/\{[^{}]+\}/g,qce=({path:e,url:t})=>{let n=t,r=t.match(zce);if(r)for(let i of r){let a=!1,o=i.substring(1,i.length-1),s="simple";o.endsWith("*")&&(a=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),s="label"):o.startsWith(";")&&(o=o.substring(1),s="matrix");let c=e[o];if(c==null)continue;if(Array.isArray(c)){n=n.replace(i,sI({explode:a,name:o,style:s,value:c}));continue}if(typeof c=="object"){n=n.replace(i,lI({explode:a,name:o,style:s,value:c}));continue}if(s==="matrix"){n=n.replace(i,`;${Nf({name:o,value:c})}`);continue}let l=encodeURIComponent(s==="label"?`.${c}`:c);n=n.replace(i,l)}return n},cI=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let a in r){let o=r[a];if(o!=null){if(Array.isArray(o)){i=[...i,sI({allowReserved:e,explode:!0,name:a,style:"form",value:o,...t})];continue}if(typeof o=="object"){i=[...i,lI({allowReserved:e,explode:!0,name:a,style:"deepObject",value:o,...n})];continue}i=[...i,Nf({allowReserved:e,name:a,value:o})]}}return i.join("&")},Wce=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"}},Vce=async({security:e,...t})=>{for(let n of e){let r=await Mce(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}},uI=e=>Hce({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:cI(e.querySerializer),url:e.url}),Hce=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith("/")?i:`/${i}`,o=(e??"")+a;t&&(o=qce({path:t,url:o}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(o+=`?${s}`),o},fI=(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=dI(e.headers,t.headers),r},dI=(...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,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(let o of a)t.append(i,o);else a!==void 0&&t.set(i,typeof a=="object"?JSON.stringify(a):a)}return t},Qy=class{constructor(){Nce(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]}},Zce=()=>({error:new Qy,request:new Qy,response:new Qy}),Kce=cI({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Gce={"Content-Type":"application/json"},pI=(e={})=>({...Fce,headers:Gce,parseAs:"auto",querySerializer:Kce,...e}),Yce=(e={})=>{let t=fI(pI(),e),n=()=>({...t}),r=o=>(t=fI(t,o),n()),i=Zce(),a=async o=>{let s={...t,...o,fetch:o.fetch??t.fetch??globalThis.fetch,headers:dI(t.headers,o.headers)};s.security&&await Vce({...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 c=uI(s),l={redirect:"follow",...s},u=new Request(c,l);for(let y of i.request._fns)u=await y(u,s);let f=s.fetch,d=await f(u);for(let y of i.response._fns)d=await y(d,u,s);let p={request:u,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...p};let y=(s.parseAs==="auto"?Wce(d.headers.get("Content-Type")):s.parseAs)??"json";if(y==="stream")return{data:d.body,...p};let v=await d[y]();return y==="json"&&(s.responseValidator&&await s.responseValidator(v),s.responseTransformer&&(v=await s.responseTransformer(v))),{data:v,...p}}let m=await d.text();try{m=JSON.parse(m)}catch{}let h=m;for(let y of i.error._fns)h=await y(m,d,u,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...p}};return{buildUrl:uI,connect:o=>a({...o,method:"CONNECT"}),delete:o=>a({...o,method:"DELETE"}),get:o=>a({...o,method:"GET"}),getConfig:n,head:o=>a({...o,method:"HEAD"}),interceptors:i,options:o=>a({...o,method:"OPTIONS"}),patch:o=>a({...o,method:"PATCH"}),post:o=>a({...o,method:"POST"}),put:o=>a({...o,method:"PUT"}),request:a,setConfig:r,trace:o=>a({...o,method:"TRACE"})}},Jce=Yce,Xce=pI;const Nt=Jce((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(Xce({baseUrl:"https://webchat.botpress.cloud/"}))),Qce=e=>(e.client??Nt).delete({url:"/conversations/{id}",...e}),eue=e=>(e.client??Nt).get({url:"/conversations/{id}",...e}),tue=e=>(e.client??Nt).get({url:"/conversations",...e}),nue=e=>(e.client??Nt).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),rue=e=>(e.client??Nt).get({url:"/conversations/{id}/messages",...e}),iue=e=>(e.client??Nt).get({url:"/conversations/{id}/participants",...e}),aue=e=>(e.client??Nt).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),oue=e=>(e.client??Nt).delete({url:"/conversations/{id}/participants/{userId}",...e}),sue=e=>(e.client??Nt).get({url:"/conversations/{id}/participants/{userId}",...e}),lue=e=>(e.client??Nt).delete({url:"/messages/{id}",...e}),cue=e=>(e.client??Nt).get({url:"/messages/{id}",...e}),uue=e=>(e.client??Nt).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),fue=e=>(e.client??Nt).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),due=e=>(e.client??Nt).delete({url:"/users/me",...e}),pue=e=>(e.client??Nt).get({url:"/users/me",...e}),hue=e=>(e.client??Nt).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hI=e=>((e==null?void 0:e.client)??Nt).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),mue=e=>(e.client??Nt).get({url:"/events/{id}",...e}),vue=e=>(e.client??Nt).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),yue=e=>(e.client??Nt).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let mI=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 eg(e){}function gue(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=eg,onError:n=eg,onRetry:r=eg,onComment:i}=e;let a="",o=!0,s,c="",l="";function u(h){const y=o?h.replace(/^\xEF\xBB\xBF/,""):h,[v,b]=bue(`${a}${y}`);for(const w of v)f(w);a=b,o=!1}function f(h){if(h===""){p();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const y=h.indexOf(":");if(y!==-1){const v=h.slice(0,y),b=h[y+1]===" "?2:1,w=h.slice(y+b);d(v,w,h);return}d(h,"",h)}function d(h,y,v){switch(h){case"event":l=y;break;case"data":c=`${c}${y}
|
|
185
|
-
`;break;case"id":s=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?r(parseInt(y,10)):n(new mI(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:v}));break;default:n(new mI(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:y,line:v}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
|
|
186
|
-
`)?c.slice(0,-1):c}),s=void 0,c="",l=""}function m(h={}){a&&h.consume&&f(a),o=!0,s=void 0,c="",l="",a=""}return{feed:u,reset:m}}function bue(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),a=e.indexOf(`
|
|
187
|
-
`,r);let o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i!==-1?o=i:a!==-1&&(o=a),o===-1){n=e.slice(r);break}else{const s=e.slice(r,o);t.push(s),r=o+1,e[r-1]==="\r"&&e[r]===`
|
|
188
|
-
`&&r++}}return[t,n]}class vI 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(yI(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(yI(this),n)}}function wue(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function tg(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(tg).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${tg(e.cause)}`:e.message:`${e}`}function yI(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var gI=e=>{throw TypeError(e)},ng=(e,t,n)=>t.has(e)||gI("Cannot "+n),Je=(e,t,n)=>(ng(e,t,"read from private field"),n?n.call(e):t.get(e)),Kt=(e,t,n)=>t.has(e)?gI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),kt=(e,t,n,r)=>(ng(e,t,"write to private field"),t.set(e,n),n),ei=(e,t,n)=>(ng(e,t,"access private method"),n),Cn,la,xo,Mf,Ff,Tl,So,Cl,Pi,Eo,_o,ko,Ol,ur,rg,ig,ag,bI,og,sg,$l,lg,cg;class Lf extends EventTarget{constructor(t,n){var r,i;super(),Kt(this,ur),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Kt(this,Cn),Kt(this,la),Kt(this,xo),Kt(this,Mf),Kt(this,Ff),Kt(this,Tl),Kt(this,So),Kt(this,Cl,null),Kt(this,Pi),Kt(this,Eo),Kt(this,_o,null),Kt(this,ko,null),Kt(this,Ol,null),Kt(this,ig,async a=>{var o;Je(this,Eo).reset();const{body:s,redirected:c,status:l,headers:u}=a;if(l===204){ei(this,ur,$l).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(c?kt(this,xo,new URL(a.url)):kt(this,xo,void 0),l!==200){ei(this,ur,$l).call(this,`Non-200 status code (${l})`,l);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){ei(this,ur,$l).call(this,'Invalid content type, expected "text/event-stream"',l);return}if(Je(this,Cn)===this.CLOSED)return;kt(this,Cn,this.OPEN);const f=new Event("open");if((o=Je(this,Ol))==null||o.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){ei(this,ur,$l).call(this,"Invalid response body, expected a web ReadableStream",l),this.close();return}const d=new TextDecoder,p=s.getReader();let m=!0;do{const{done:h,value:y}=await p.read();y&&Je(this,Eo).feed(d.decode(y,{stream:!h})),h&&(m=!1,Je(this,Eo).reset(),ei(this,ur,lg).call(this))}while(m)}),Kt(this,ag,a=>{kt(this,Pi,void 0),!(a.name==="AbortError"||a.type==="aborted")&&ei(this,ur,lg).call(this,tg(a))}),Kt(this,og,a=>{typeof a.id=="string"&&kt(this,Cl,a.id);const o=new MessageEvent(a.event||"message",{data:a.data,origin:Je(this,xo)?Je(this,xo).origin:Je(this,la).origin,lastEventId:a.id||""});Je(this,ko)&&(!a.event||a.event==="message")&&Je(this,ko).call(this,o),this.dispatchEvent(o)}),Kt(this,sg,a=>{kt(this,Tl,a)}),Kt(this,cg,()=>{kt(this,So,void 0),Je(this,Cn)===this.CONNECTING&&ei(this,ur,rg).call(this)});try{if(t instanceof URL)kt(this,la,t);else if(typeof t=="string")kt(this,la,new URL(t,xue()));else throw new Error("Invalid URL")}catch{throw wue("An invalid or illegal string was specified")}kt(this,Eo,gue({onEvent:Je(this,og),onRetry:Je(this,sg)})),kt(this,Cn,this.CONNECTING),kt(this,Tl,3e3),kt(this,Ff,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),kt(this,Mf,(i=n==null?void 0:n.withCredentials)!=null?i:!1),ei(this,ur,rg).call(this)}get readyState(){return Je(this,Cn)}get url(){return Je(this,la).href}get withCredentials(){return Je(this,Mf)}get onerror(){return Je(this,_o)}set onerror(t){kt(this,_o,t)}get onmessage(){return Je(this,ko)}set onmessage(t){kt(this,ko,t)}get onopen(){return Je(this,Ol)}set onopen(t){kt(this,Ol,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(){Je(this,So)&&clearTimeout(Je(this,So)),Je(this,Cn)!==this.CLOSED&&(Je(this,Pi)&&Je(this,Pi).abort(),kt(this,Cn,this.CLOSED),kt(this,Pi,void 0))}}Cn=new WeakMap,la=new WeakMap,xo=new WeakMap,Mf=new WeakMap,Ff=new WeakMap,Tl=new WeakMap,So=new WeakMap,Cl=new WeakMap,Pi=new WeakMap,Eo=new WeakMap,_o=new WeakMap,ko=new WeakMap,Ol=new WeakMap,ur=new WeakSet,rg=function(){kt(this,Cn,this.CONNECTING),kt(this,Pi,new AbortController),Je(this,Ff)(Je(this,la),ei(this,ur,bI).call(this)).then(Je(this,ig)).catch(Je(this,ag))},ig=new WeakMap,ag=new WeakMap,bI=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Je(this,Cl)?{"Last-Event-ID":Je(this,Cl)}:void 0},cache:"no-store",signal:(e=Je(this,Pi))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},og=new WeakMap,sg=new WeakMap,$l=function(e,t){var n;Je(this,Cn)!==this.CLOSED&&kt(this,Cn,this.CLOSED);const r=new vI("error",{code:t,message:e});(n=Je(this,_o))==null||n.call(this,r),this.dispatchEvent(r)},lg=function(e,t){var n;if(Je(this,Cn)===this.CLOSED)return;kt(this,Cn,this.CONNECTING);const r=new vI("error",{code:t,message:e});(n=Je(this,_o))==null||n.call(this,r),this.dispatchEvent(r),kt(this,So,setTimeout(Je(this,cg),Je(this,Tl)))},cg=new WeakMap,Lf.CONNECTING=0,Lf.OPEN=1,Lf.CLOSED=2;function xue(){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 Sue{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(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}}const Mt=e=>e.data,wI={throwOnError:!0},Eue=({clientId:e,apiUrl:t})=>{const n=`${t||Nt.getConfig().baseUrl}/${e}`,r={...wI,baseUrl:n};return hI({...r,body:{}}).then(Mt)},xI=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Nt.getConfig().baseUrl}/${t}`,a={...wI,baseUrl:i};return{createConversation:()=>nue({...a,headers:r,body:{}}).then(Mt),getConversation:({conversationId:o})=>eue({...a,headers:r,path:{id:o}}).then(Mt),deleteConversation:({conversationId:o})=>Qce({...a,headers:r,path:{id:o}}).then(Mt),listConversations:({nextToken:o})=>tue({...a,headers:r,query:{nextToken:o}}).then(Mt),listConversationMessages:({conversationId:o,nextToken:s})=>rue({...a,headers:r,path:{id:o},query:{nextToken:s}}).then(Mt),addParticipant:({conversationId:o,userId:s})=>aue({...a,headers:r,path:{id:o},body:{userId:s}}).then(Mt),removeParticipant:({conversationId:o,userId:s})=>oue({...a,headers:r,path:{id:o,userId:s}}).then(Mt),getParticipant:({conversationId:o,userId:s})=>sue({...a,headers:r,path:{id:o,userId:s}}).then(Mt),listParticipants:({conversationId:o,nextToken:s})=>iue({...a,headers:r,path:{id:o},query:{nextToken:s}}).then(Mt),createMessage:o=>fue({...a,headers:r,body:o}).then(Mt),updateMessage:({messageId:o,...s})=>uue({...a,headers:r,path:{id:o},body:s}).then(Mt),getMessage:({messageId:o})=>cue({...a,headers:r,path:{id:o}}).then(Mt),deleteMessage:({messageId:o})=>lue({...a,headers:r,path:{id:o}}).then(Mt),createFile:o=>yue({...a,headers:r,body:o}).then(Mt),createUser:o=>hI({...a,headers:r,body:o}).then(Mt),getUser:()=>pue({...a,headers:r}).then(Mt),updateUser:o=>hue({...a,headers:r,body:o}).then(Mt),deleteUser:()=>due({...a,headers:r}).then(Mt),createEvent:o=>vue({...a,headers:r,body:o}).then(Mt),getEvent:({eventId:o})=>mue({...a,headers:r,path:{id:o}}).then(Mt),listenConversation:({conversationId:o})=>{let s=0,c=null;const l=new Sue,u=()=>{c&&c.close();const f=`${i}/conversations/${o}/listen`;c=new Lf(f,{fetch:(d,p)=>fetch(d,{...p,headers:{...p==null?void 0:p.headers,...r,timeout:"60_000"}})}),c.onopen=()=>l.emit("open"),c.onerror=d=>{l.emit("error",d),s<10&&(s++,setTimeout(()=>u(),3e3))},c.onmessage=d=>{const p=_ue(d.data);l.emit(p.type,p.data)}};return u(),l.on.bind(l)}}},_ue=e=>{try{return JSON.parse(e)}catch{return e}};async function kue({conversationId:e,userCredentials:t,clientId:n,apiUrl:r}){let i=t,a=e,o;if(i){if(o=xI({userKey:i.userToken,clientId:n,apiUrl:r}),!a){const{conversation:s}=await o.createConversation();a=s.id}}else{const{key:s,user:c}=await Eue({clientId:n,apiUrl:r});i={userId:c.id,userToken:s},o=xI({userKey:i.userToken,clientId:n,apiUrl:r});const{conversation:l}=await o.createConversation();a=l.id}return{client:o,conversationId:a,userCredentials:i}}function SI({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const a=ip(n,r),o=a(I=>I.conversationId),s=a(I=>I.user),c=a(I=>I.setConversationId),l=a(I=>I.setUser),u=yr(I=>I.messages),f=yr(I=>I.addMessage),d=yr(I=>I.fetchMessages),p=yr(I=>I.setMessages),m=yr(I=>I.isFetching),[h,y]=D.useState("connecting"),{isTyping:v,setIsTyping:b}=oI(),w=D.useMemo(()=>new Al,[]),[T,E]=D.useState(!!i.conversationId||!!o),[_,$]=D.useState(i.conversationId),[U,z]=D.useState(i.user),[k,j]=D.useState(void 0);if(D.useEffect(()=>{async function I(){try{const A=i.conversationId||o;A&&E(!0);const{client:L,conversationId:Z,userCredentials:H}=await kue({clientId:t,apiUrl:e,userCredentials:i.user||s,conversationId:A});j(L),$(Z),z(H),l(H),c(Z),y("connected"),!A&&w.emit("conversation",Z)}catch(A){console.error("Failed to initialize webchat:",A),y("error")}}I()},[i.user,i.conversationId]),D.useEffect(()=>{async function I(){if(T&&k&&_){const A=await d({client:k,conversationId:_});p(A),E(!1)}}I()},[T,k,_]),D.useEffect(()=>{if(!k||!_)return;const I=k.listenConversation({conversationId:_}),A=[I("open",()=>y("connected")),I("error",L=>{w.emit("error",new Error(`Connection to conversation lost: ${L.message}`)),y("error")}),I("message_created",L=>{const Z=np(L);f(Z),w.emit("message",Z),b(!1),(U==null?void 0:U.userId)!==Z.authorId?b(!1):setTimeout(()=>b(!0,5e3),500)}),I("webchat_visibility",L=>w.emit("webchatVisibility",L.visibility)),I("webchat_config",L=>w.emit("webchatConfig",L.config)),I("typing_started",L=>{const Z=L.timeout??5e3;b(!0,Z),w.emit("isTyping",{isTyping:!0,timeout:Z})}),I("typing_stopped",()=>{b(!1),w.emit("isTyping",{isTyping:!1,timeout:0})}),I("custom",L=>w.emit("customEvent",L.event))];return()=>{A.forEach(L=>L())}},[_,k]),h==="connecting"||!U||!_||!k)return{clientState:"connecting",on:w.on.bind(w),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:m};const W=async()=>{const{conversation:I}=await k.createConversation();return a.setState({conversationId:I.id}),$(I.id),await k.createEvent({conversationId:I.id,payload:{type:"conversation_started",data:{}}}),I.id},B={sendMessage:async I=>{const A=Zv();f(np({id:A,createdAt:new Date().toISOString(),userId:U.userId,conversationId:_,payload:I,metadata:{clientMessageId:A,delivered:!1}})),await k.createMessage({conversationId:_,payload:I,metadata:{clientMessageId:A}}).catch(L=>w.emit("error",L))},updateUser:async I=>{const{user:A}=await k.updateUser({name:I.name,pictureUrl:I.pictureUrl,userData:I.data});return A},sendEvent:async I=>{await k.createEvent({conversationId:_,payload:{type:"custom",data:I}})},uploadFile:async I=>{const{size:A,name:L}=I,H=await(J=>new Promise((Y,Q)=>{const ae=new FileReader;ae.onload=oe=>{var X;return Y((X=oe.target)==null?void 0:X.result)},ae.onerror=oe=>{var X;return Q((X=oe.target)==null?void 0:X.error)},ae.readAsArrayBuffer(J)}))(I),R=new Date;R.setDate(R.getDate()+30);const{file:{uploadUrl:g,contentType:N,url:V}}=await k.createFile({size:A,key:L,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:R.toISOString()});await fetch(g,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:H});const S=N.split("/").shift()??"",K=jf(S)?S:"file";return{fileUrl:V,name:L,type:K}},getUser:async()=>{const{user:I}=await k.getUser({userId:U.userId});return I}};return{clientState:h,on:w.on.bind(w),client:B,messages:u,conversationId:_,newConversation:()=>{p([]),W().then(c)},user:s,isTyping:v,isFetchingMessages:m}}var EI={},ug={},Bf=vt&&vt.__assign||function(){return Bf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bf.apply(this,arguments)};Object.defineProperty(ug,"__esModule",{value:!0});var Tue={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Cue(e){var t=Bf(Bf({},Tue),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ug.getSanitizedOptions=Cue;var fg={},dg={},Uf={},pg={},hg={};Object.defineProperty(hg,"__esModule",{value:!0});function Oue(e){var t=Math.random()*e;return Math.round(t)}hg.fullJitter=Oue;var mg={};Object.defineProperty(mg,"__esModule",{value:!0});function $ue(e){return e}mg.noJitter=$ue,Object.defineProperty(pg,"__esModule",{value:!0});var Iue=hg,Rue=mg;function Aue(e){switch(e.jitter){case"full":return Iue.fullJitter;case"none":default:return Rue.noJitter}}pg.JitterFactory=Aue,Object.defineProperty(Uf,"__esModule",{value:!0});var Pue=pg,Due=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Pue.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Uf.Delay=Due;var jue=vt&&vt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nue=vt&&vt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})},Mue=vt&&vt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(dg,"__esModule",{value:!0});var Fue=Uf,Lue=function(e){jue(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Nue(this,void 0,void 0,function(){return Mue(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Fue.Delay);dg.SkipFirstDelay=Lue;var vg={},Bue=vt&&vt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(vg,"__esModule",{value:!0});var Uue=Uf,zue=function(e){Bue(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Uue.Delay);vg.AlwaysDelay=zue,Object.defineProperty(fg,"__esModule",{value:!0});var que=dg,Wue=vg;function Vue(e,t){var n=Hue(e);return n.setAttemptNumber(t),n}fg.DelayFactory=Vue;function Hue(e){return e.delayFirstAttempt?new Wue.AlwaysDelay(e):new que.SkipFirstDelay(e)}var yg=vt&&vt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})},gg=vt&&vt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(EI,"__esModule",{value:!0});var Zue=ug,Kue=fg;function Gue(e,t){return t===void 0&&(t={}),yg(this,void 0,void 0,function(){var n,r;return gg(this,function(i){switch(i.label){case 0:return n=Zue.getSanitizedOptions(t),r=new Jue(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var Yue=EI.backOff=Gue,Jue=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return yg(this,void 0,void 0,function(){var t,n;return gg(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return yg(this,void 0,void 0,function(){var t;return gg(this,function(n){switch(n.label){case 0:return t=Kue.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function Xue({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const[a,o]=D.useState(),s=yr(k=>k.messages),c=yr(k=>k.addMessage),l=yr(k=>k.fetchMessagesLegacy),u=yr(k=>k.setMessages),f=yr(k=>k.isFetching),[d,p]=D.useState("connecting"),{isTyping:m,setIsTyping:h}=oI(),y=D.useMemo(()=>new Al,[]),v=ip(n,r),b=D.useMemo(()=>rI({apiUrl:e,clientId:t}),[e,t]),w=D.useRef(null),[T,E]=D.useState(i.userKey),[_,$]=D.useState(i.conversationId);async function U(k){const{conversation:j}=await b.createConversation({"x-user-key":k});return v.setState({conversationId:j.id}),await b.createEvent({"x-user-key":k,conversationId:j.id,payload:{type:"conversation_started",data:{}}}),j.id}if(D.useEffect(()=>{let k=!0;async function j({userKey:W,conversationId:B}){let I,A=i.userKey??W,L=i.conversationId??B;if(p("connecting"),!A){const R=v.getState().user;A=R==null?void 0:R.userToken}if(!A){const{key:R,user:g}=await b.createUser({});I=g,A=R,v.setState({user:{userId:g.id,userToken:A}})}if(!I){const{user:R}=await b.getUser({"x-user-key":A});I=R}L||(L=v.getState().conversationId),L||(L=await U(A));const[Z,H]=await Promise.all([b.listenConversation({"x-user-key":A,id:L}),l({client:b,conversationId:L,userKey:A})]);y.emit("conversation",L),_I({emitter:y,signalEmitter:Z}),k&&(w.current=Z,E(A),$(L),o(I),u(H),p("connected"))}return j({userKey:T,conversationId:_}).catch(W=>{console.error(W)}),()=>{w.current&&(w.current.cleanup(),w.current=null),k=!1}},[T,_,b,y,i.conversationId,i.userKey]),D.useEffect(()=>{var j;if(!T||!_)return;async function k({userKey:W,conversationId:B}){const I=await b.listenConversation({"x-user-key":W,id:B});w.current=I,_I({emitter:y,signalEmitter:I})}d==="error"&&((j=w.current)==null||j.cleanup(),Yue(()=>k({conversationId:_,userKey:T}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),p("connected"))},[d,T,_]),D.useEffect(()=>{const k=[y.on("message",j=>((a==null?void 0:a.id)!==j.authorId&&y.emit("isTyping",{isTyping:!1,timeout:0}),c(j))),y.on("isTyping",({isTyping:j,timeout:W})=>{h(j,W)}),y.on("error",()=>{p("error")})];return()=>{k.forEach(j=>j())}},[]),d==="connecting"||!T||!_)return{clientState:"connecting",on:y.on.bind(y),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:f};const z={sendMessage:async k=>{const j=Zv();c(li({id:j,createdAt:new Date().toISOString(),userId:(a==null?void 0:a.id)??"",conversationId:_,payload:k,metadata:{clientMessageId:j,delivered:!1}})),await b.createMessage({"x-user-key":T,conversationId:_,payload:k,metadata:{clientMessageId:j}}).catch(W=>y.emit("error",W))},updateUser:async k=>{const{user:j}=await b.updateUser({"x-user-key":T,name:k.name,pictureUrl:k.pictureUrl,userData:k.data});return j},sendEvent:async k=>{await b.createEvent({"x-user-key":T,conversationId:_,payload:{type:"custom",data:k}})},uploadFile:async k=>{const{size:j,name:W}=k,I=await(N=>new Promise((V,S)=>{const K=new FileReader;K.onload=J=>{var Y;return V((Y=J.target)==null?void 0:Y.result)},K.onerror=J=>{var Y;return S((Y=J.target)==null?void 0:Y.error)},K.readAsArrayBuffer(N)}))(k),A=new Date;A.setDate(A.getDate()+30);const{file:{uploadUrl:L,contentType:Z,url:H}}=await b.createFile({"x-user-key":T,size:j,key:W,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:A.toISOString()});await fetch(L,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:I});const R=Z.split("/").shift()??"",g=jf(R)?R:"file";return{fileUrl:H,name:W,type:g}},getUser:async()=>{const{user:k}=await b.getUser({"x-user-key":T});return k}};return{clientState:d,on:y.on.bind(y),client:z,messages:s,conversationId:_,newConversation:()=>{u([]),U(T).then($)},user:a,isTyping:m,isFetchingMessages:f}}function _I({emitter:e,signalEmitter:t}){t.on("unknown",n=>{}),t.on("message_created",n=>{e.emit("message",li(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const Que=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:a,conversationId:o,...s})=>{const c=t||`bp-webchat-${e}`,{clientState:l,client:u,isFetchingMessages:f,isTyping:d,newConversation:p,messages:m,user:h}=SI({clientId:e,apiUrl:i,conversationId:o,user:a,storageKey:c,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:y,uploadFile:v}=u??{};return O.jsx(nO,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:f||l==="connecting",isTyping:d,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:m,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:p,...s})};Re.Avatar=Zl,Re.Block=Pa,Re.Chat=nO,Re.Composer=f1,Re.Container=fh,Re.Fab=jS,Re.Header=US,Re.Message=vh,Re.MessageList=Kv,Re.Modal=gi,Re.ModalProvider=Yp,Re.RestartConversationButton=BS,Re.StylesheetProvider=q1,Re.TypingIndicator=zS,Re.Webchat=Que,Re.WebchatThemeSchema=id,Re.avatarThemeSchema=Hl,Re.blockThemeSchema=fb,Re.configPropsSchema=mb,Re.configurationSchema=lb,Re.cssStyleSchema=ub,Re.descriptionItemSchema=ma,Re.fileTypes=aI,Re.generateThemeStylesheet=vb,Re.getClient=rI,Re.getUseWebchatClientStore=ip,Re.initPropsSchema=yA,Re.integrationMessagePayloadToBlockPayload=tp,Re.integrationMessageToBlockMessage=li,Re.isFileType=jf,Re.markdownTypeSchema=cb,Re.renderers=r1,Re.statePropsSchema=pb,Re.styleOptionSchema=ve,Re.themeSchema=db,Re.useClient=Pce,Re.useWebchat=SI,Re.useWebchatClient=Xue,Re.useWebchatStore=hc,Re.userPropsSchema=hb,Re.webchatClasses=lt,Object.defineProperty(Re,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|