@botpress/webchat 2.3.5 → 2.3.6
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 +5 -5
- package/dist/components/Composer/Composer.d.ts +6 -1
- package/dist/components/MessageList/MessageList.d.ts +1 -1
- package/dist/index.js +7535 -7508
- package/dist/index.umd.cjs +77 -77
- package/package.json +2 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Pe,
|
|
1
|
+
(function(Pe,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],j):(Pe=typeof globalThis<"u"?globalThis:Pe||self,j(Pe.Webchat={},Pe.React,Pe.ReactDOM))})(this,function(Pe,j,Di){"use strict";var Xde=Object.defineProperty;var Qde=(Pe,j,Di)=>j in Pe?Xde(Pe,j,{enumerable:!0,configurable:!0,writable:!0,value:Di}):Pe[j]=Di;var Ee=(Pe,j,Di)=>Qde(Pe,typeof j!="symbol"?j+"":j,Di);function mg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const x=mg(j),vg=mg(Di),qI=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let Sl;const ZI=new Uint8Array(16);function KI(){if(!Sl&&(Sl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sl(ZI)}const Gt=[];for(let e=0;e<256;++e)Gt.push((e+256).toString(16).slice(1));function GI(e,t=0){return Gt[e[t+0]]+Gt[e[t+1]]+Gt[e[t+2]]+Gt[e[t+3]]+"-"+Gt[e[t+4]]+Gt[e[t+5]]+"-"+Gt[e[t+6]]+Gt[e[t+7]]+"-"+Gt[e[t+8]]+Gt[e[t+9]]+"-"+Gt[e[t+10]]+Gt[e[t+11]]+Gt[e[t+12]]+Gt[e[t+13]]+Gt[e[t+14]]+Gt[e[t+15]]}const yg={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function So(e,t,r){if(yg.randomUUID&&!t&&!e)return yg.randomUUID();e=e||{};const n=e.random||(e.rng||KI)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,GI(n)}const Eo=e=>({block:e,type:"bubble"}),gg=e=>{const t=e.title,r=e.subtitle,n=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 n&&a.push({type:"image",url:n}),t&&a.push({type:"text",text:`## ${t}`}),r&&a.push({type:"text",text:r}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},bg=e=>({payload:{type:"audio",url:e.audioUrl}}),YI=e=>({payload:Eo(gg(e))}),JI=e=>({payload:{type:"carousel",blocks:e.items.map(t=>gg(t))}}),XI=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),r=e.text,n=So(),i=Eo({type:"text",text:r});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",horizontalAlignment:"left",blocks:[i,{type:"row",blocks:t.map(({title:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:n}))}]}}},QI=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),r=e.text,n=[{type:"dropdown",label:r??"Select an option",options:t}];return r&&n.unshift({type:"text",text:r}),{disableInput:!0,payload:Eo({type:"column",blocks:n})}},wg=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),xg=e=>({payload:{type:"image",url:e.imageUrl}}),Sg=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Eg=e=>({payload:Eo({type:"text",text:e.markdown})}),_g=e=>({payload:Eo({type:"text",text:e.text})}),kg=e=>({payload:{type:"video",url:e.videoUrl}}),eR=e=>({payload:{type:"column",blocks:e.items.map(r=>{switch(r.type){case"audio":return bg({...r.payload,type:r.type}).payload;case"file":return wg({...r.payload,type:r.type}).payload;case"image":return xg({...r.payload,type:r.type}).payload;case"location":return Sg({...r.payload,type:r.type}).payload;case"markdown":return Eg({...r.payload,type:r.type}).payload;case"text":return _g({...r.payload,type:r.type}).payload;case"video":return kg({...r.payload,type:r.type}).payload;default:throw new Error("Unsuported message type")}})}}),_o=e=>{switch(e.type){case"audio":return bg(e);case"card":return YI(e);case"carousel":return JI(e);case"choice":return XI(e);case"dropdown":return QI(e);case"file":return wg(e);case"image":return xg(e);case"location":return Sg(e);case"markdown":return Eg(e);case"text":return _g(e);case"video":return kg(e);case"bloc":return eR(e);default:throw new Error("Unsuported message type")}},tR=Object.freeze(Object.defineProperty({__proto__:null,target:qI,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:_o},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rR(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Bf={exports:{}},ko={};/**
|
|
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 $g;function nR(){if($g)return ko;$g=1;var e=j,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,p=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)n.call(l,c)&&!a.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:d,ref:p,props:f,_owner:i.current}}return ko.Fragment=r,ko.jsx=o,ko.jsxs=o,ko}var $o={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,58 +14,58 @@
|
|
|
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
|
|
17
|
+
*/var Og;function iR(){return Og||(Og=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=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"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function g(T){if(T===null||typeof T!="object")return null;var te=h&&T[h]||T[m];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(T){{for(var te=arguments.length,ye=new Array(te>1?te-1:0),Le=1;Le<te;Le++)ye[Le-1]=arguments[Le];b("error",T,ye)}}function b(T,te,ye){{var Le=v.ReactDebugCurrentFrame,pt=Le.getStackAddendum();pt!==""&&(te+="%s",ye=ye.concat([pt]));var bt=ye.map(function(nt){return String(nt)});bt.unshift("Warning: "+te),Function.prototype.apply.call(console[T],console,bt)}}var k=!1,S=!1,_=!1,$=!1,N=!1,z;z=Symbol.for("react.module.reference");function O(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===a||N||T===i||T===u||T===c||$||T===p||k||S||_||typeof T=="object"&&T!==null&&(T.$$typeof===d||T.$$typeof===f||T.$$typeof===o||T.$$typeof===s||T.$$typeof===l||T.$$typeof===z||T.getModuleId!==void 0))}function D(T,te,ye){var Le=T.displayName;if(Le)return Le;var pt=te.displayName||te.name||"";return pt!==""?ye+"("+pt+")":ye}function H(T){return T.displayName||"Context"}function L(T){if(T==null)return null;if(typeof T.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case s:var te=T;return H(te)+".Consumer";case o:var ye=T;return H(ye._context)+".Provider";case l:return D(T,T.render,"ForwardRef");case f:var Le=T.displayName||null;return Le!==null?Le:L(T.type)||"Memo";case d:{var pt=T,bt=pt._payload,nt=pt._init;try{return L(nt(bt))}catch{return null}}}return null}var W=Object.assign,M=0,I,V,U,A,w,F,Z;function E(){}E.__reactDisabledLog=!0;function Y(){{if(M===0){I=console.log,V=console.info,U=console.warn,A=console.error,w=console.group,F=console.groupCollapsed,Z=console.groupEnd;var T={configurable:!0,enumerable:!0,value:E,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}M++}}function oe(){{if(M--,M===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},T,{value:I}),info:W({},T,{value:V}),warn:W({},T,{value:U}),error:W({},T,{value:A}),group:W({},T,{value:w}),groupCollapsed:W({},T,{value:F}),groupEnd:W({},T,{value:Z})})}M<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=v.ReactCurrentDispatcher,le;function pe(T,te,ye){{if(le===void 0)try{throw Error()}catch(pt){var Le=pt.stack.trim().match(/\n( *(at )?)/);le=Le&&Le[1]||""}return`
|
|
18
18
|
`+le+T}}var he=!1,ue;{var Q=typeof WeakMap=="function"?WeakMap:Map;ue=new Q}function K(T,te){if(!T||he)return"";{var ye=ue.get(T);if(ye!==void 0)return ye}var Le;he=!0;var pt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=re.current,re.current=null,Y();try{if(te){var nt=function(){throw Error()};if(Object.defineProperty(nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(nt,[])}catch(xr){Le=xr}Reflect.construct(T,[],nt)}else{try{nt.call()}catch(xr){Le=xr}T.call(nt.prototype)}}else{try{throw Error()}catch(xr){Le=xr}T()}}catch(xr){if(xr&&Le&&typeof xr.stack=="string"){for(var Je=xr.stack.split(`
|
|
19
19
|
`),fr=Le.stack.split(`
|
|
20
20
|
`),It=Je.length-1,Mt=fr.length-1;It>=1&&Mt>=0&&Je[It]!==fr[Mt];)Mt--;for(;It>=1&&Mt>=0;It--,Mt--)if(Je[It]!==fr[Mt]){if(It!==1||Mt!==1)do if(It--,Mt--,Mt<0||Je[It]!==fr[Mt]){var Wr=`
|
|
21
|
-
`+Je[It].replace(" at new "," at ");return T.displayName&&Wr.includes("<anonymous>")&&(Wr=Wr.replace("<anonymous>",T.displayName)),typeof T=="function"&&ue.set(T,Wr),Wr}while(It>=1&&Mt>=0);break}}}finally{he=!1,re.current=bt,oe(),Error.prepareStackTrace=pt}var xo=T?T.displayName||T.name:"",ca=xo?pe(xo):"";return typeof T=="function"&&ue.set(T,ca),ca}function de(T,te,ye){return K(T,!1)}function ve(T){var te=T.prototype;return!!(te&&te.isReactComponent)}function Ce(T,te,ye){if(T==null)return"";if(typeof T=="function")return K(T,ve(T));if(typeof T=="string")return pe(T);switch(T){case
|
|
21
|
+
`+Je[It].replace(" at new "," at ");return T.displayName&&Wr.includes("<anonymous>")&&(Wr=Wr.replace("<anonymous>",T.displayName)),typeof T=="function"&&ue.set(T,Wr),Wr}while(It>=1&&Mt>=0);break}}}finally{he=!1,re.current=bt,oe(),Error.prepareStackTrace=pt}var xo=T?T.displayName||T.name:"",ca=xo?pe(xo):"";return typeof T=="function"&&ue.set(T,ca),ca}function de(T,te,ye){return K(T,!1)}function ve(T){var te=T.prototype;return!!(te&&te.isReactComponent)}function Ce(T,te,ye){if(T==null)return"";if(typeof T=="function")return K(T,ve(T));if(typeof T=="string")return pe(T);switch(T){case u:return pe("Suspense");case c:return pe("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case l:return de(T.render);case f:return Ce(T.type,te,ye);case d:{var Le=T,pt=Le._payload,bt=Le._init;try{return Ce(bt(pt),te,ye)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,J={},ae=v.ReactDebugCurrentFrame;function ee(T){if(T){var te=T._owner,ye=Ce(T.type,T._source,te?te.type:null);ae.setExtraStackFrame(ye)}else ae.setExtraStackFrame(null)}function ke(T,te,ye,Le,pt){{var bt=Function.call.bind(R);for(var nt in T)if(bt(T,nt)){var Je=void 0;try{if(typeof T[nt]!="function"){var fr=Error((Le||"React class")+": "+ye+" type `"+nt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[nt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fr.name="Invariant Violation",fr}Je=T[nt](te,nt,Le,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(It){Je=It}Je&&!(Je instanceof Error)&&(ee(pt),y("%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).",Le||"React class",ye,nt,typeof Je),ee(null)),Je instanceof Error&&!(Je.message in J)&&(J[Je.message]=!0,ee(pt),y("Failed %s type: %s",ye,Je.message),ee(null))}}}var xe=Array.isArray;function Re(T){return xe(T)}function qe(T){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ye=te&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function Ae(T){try{return Be(T),!1}catch{return!0}}function Be(T){return""+T}function B(T){if(Ae(T))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(T)),Be(T)}var P=v.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0},ce,_e,Oe;Oe={};function Xe(T){if(R.call(T,"ref")){var te=Object.getOwnPropertyDescriptor(T,"ref").get;if(te&&te.isReactWarning)return!1}return T.ref!==void 0}function ut(T){if(R.call(T,"key")){var te=Object.getOwnPropertyDescriptor(T,"key").get;if(te&&te.isReactWarning)return!1}return T.key!==void 0}function zt(T,te){if(typeof T.ref=="string"&&P.current&&te&&P.current.stateNode!==te){var ye=L(P.current.type);Oe[ye]||(y('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',L(P.current.type),T.ref),Oe[ye]=!0)}}function Tt(T,te){{var ye=function(){ce||(ce=!0,y("%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))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function Ge(T,te){{var ye=function(){_e||(_e=!0,y("%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))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var Ct=function(T,te,ye,Le,pt,bt,nt){var Je={$$typeof:t,type:T,key:te,ref:ye,props:nt,_owner:bt};return Je._store={},Object.defineProperty(Je._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Je,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Le}),Object.defineProperty(Je,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pt}),Object.freeze&&(Object.freeze(Je.props),Object.freeze(Je)),Je};function rt(T,te,ye,Le,pt){{var bt,nt={},Je=null,fr=null;ye!==void 0&&(B(ye),Je=""+ye),ut(te)&&(B(te.key),Je=""+te.key),Xe(te)&&(fr=te.ref,zt(te,pt));for(bt in te)R.call(te,bt)&&!X.hasOwnProperty(bt)&&(nt[bt]=te[bt]);if(T&&T.defaultProps){var It=T.defaultProps;for(bt in It)nt[bt]===void 0&&(nt[bt]=It[bt])}if(Je||fr){var Mt=typeof T=="function"?T.displayName||T.name||"Unknown":T;Je&&Tt(nt,Mt),fr&&Ge(nt,Mt)}return Ct(T,Je,fr,pt,Le,P.current,nt)}}var wr=v.ReactCurrentOwner,Ir=v.ReactDebugCurrentFrame;function ln(T){if(T){var te=T._owner,ye=Ce(T.type,T._source,te?te.type:null);Ir.setExtraStackFrame(ye)}else Ir.setExtraStackFrame(null)}var Qn;Qn=!1;function jn(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function un(){{if(wr.current){var T=L(wr.current.type);if(T)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+T+"`."}return""}}function ei(T){return""}var mt={};function St(T){{var te=un();if(!te){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(te=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+ye+">.")}return te}}function Wt(T,te){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=St(te);if(mt[ye])return;mt[ye]=!0;var Le="";T&&T._owner&&T._owner!==wr.current&&(Le=" It was passed a child from "+L(T._owner.type)+"."),ln(T),
|
|
25
|
+
Check the top-level render call using <`+ye+">.")}return te}}function Wt(T,te){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=St(te);if(mt[ye])return;mt[ye]=!0;var Le="";T&&T._owner&&T._owner!==wr.current&&(Le=" It was passed a child from "+L(T._owner.type)+"."),ln(T),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Le),ln(null)}}function Ht(T,te){{if(typeof T!="object")return;if(Re(T))for(var ye=0;ye<T.length;ye++){var Le=T[ye];jn(Le)&&Wt(Le,te)}else if(jn(T))T._store&&(T._store.validated=!0);else if(T){var pt=g(T);if(typeof pt=="function"&&pt!==T.entries)for(var bt=pt.call(T),nt;!(nt=bt.next()).done;)jn(nt.value)&&Wt(nt.value,te)}}}function Qt(T){{var te=T.type;if(te==null||typeof te=="string")return;var ye;if(typeof te=="function")ye=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===l||te.$$typeof===f))ye=te.propTypes;else return;if(ye){var Le=L(te);ke(ye,T.props,"prop",Le,T)}else if(te.PropTypes!==void 0&&!Qn){Qn=!0;var pt=L(te);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pt||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vt(T){{for(var te=Object.keys(T.props),ye=0;ye<te.length;ye++){var Le=te[ye];if(Le!=="children"&&Le!=="key"){ln(T),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Le),ln(null);break}}T.ref!==null&&(ln(T),y("Invalid attribute `ref` supplied to `React.Fragment`."),ln(null))}}var Ur={};function zr(T,te,ye,Le,pt,bt){{var nt=O(T);if(!nt){var Je="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Je+=" 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 fr=ei();fr?Je+=fr:Je+=un();var It;T===null?It="null":Re(T)?It="array":T!==void 0&&T.$$typeof===t?(It="<"+(L(T.type)||"Unknown")+" />",Je=" Did you accidentally export a JSX literal instead of a component?"):It=typeof T,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",It,Je)}var Mt=rt(T,te,ye,pt,bt);if(Mt==null)return Mt;if(nt){var Wr=te.children;if(Wr!==void 0)if(Le)if(Re(Wr)){for(var xo=0;xo<Wr.length;xo++)Ht(Wr[xo],T);Object.freeze&&Object.freeze(Wr)}else y("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 Ht(Wr,T)}if(R.call(te,"key")){var ca=L(T),xr=Object.keys(te).filter(function(Jde){return Jde!=="key"}),ug=xr.length>0?"{key: someKey, "+xr.join(": ..., ")+": ...}":"{key: someKey}";if(!Ur[ca+ug]){var Yde=xr.length>0?"{"+xr.join(": ..., ")+": ...}":"{}";y(`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} />`,lg,ca,Kde,ca),Ur[ca+lg]=!0}}return T===n?Vt(Mt):Qt(Mt),Mt}}function Ni(T,te,ye){return zr(T,te,ye,!0)}function Vde(T,te,ye){return zr(T,te,ye,!1)}var qde=Vde,Zde=Ni;$o.Fragment=n,$o.jsx=qde,$o.jsxs=Zde}()),$o}process.env.NODE_ENV==="production"?Bf.exports=tR():Bf.exports=rR();var C=Bf.exports;function nR(e,t=[]){let r=[];function n(a,o){const s=x.createContext(o),u=r.length;r=[...r,o];function l(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][u])||s,g=x.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:g,children:p})}function c(f,d){const p=(d==null?void 0:d[e][u])||s,h=x.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=r.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[n,iR(i,...t)]}function iR(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function ti(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var fa=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function aR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Og(...e){return t=>e.forEach(r=>aR(r,t))}function ri(...e){return x.useCallback(Og(...e),e)}var Uf=x.forwardRef((e,t)=>{const{children:r,...n}=e,i=x.Children.toArray(r),a=i.find(sR);if(a){const o=a.props.children,s=i.map(u=>u===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return C.jsx(zf,{...n,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return C.jsx(zf,{...n,ref:t,children:r})});Uf.displayName="Slot";var zf=x.forwardRef((e,t)=>{const{children:r,...n}=e;if(x.isValidElement(r)){const i=uR(r);return x.cloneElement(r,{...lR(n,r.props),ref:t?Og(t,i):i})}return x.Children.count(r)>1?x.Children.only(null):null});zf.displayName="SlotClone";var oR=({children:e})=>C.jsx(C.Fragment,{children:e});function sR(e){return x.isValidElement(e)&&e.type===oR}function lR(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{a(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function uR(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dr=cR.reduce((e,t)=>{const r=x.forwardRef((n,i)=>{const{asChild:a,...o}=n,s=a?Uf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function fR(e,t){e&&mg.flushSync(()=>e.dispatchEvent(t))}var Wf="Avatar",[dR,epe]=nR(Wf),[pR,Tg]=dR(Wf),Hf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=x.useState("idle");return C.jsx(pR,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:C.jsx(dr.span,{...n,ref:t})})});Hf.displayName=Wf;var Cg="AvatarImage",Vf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,o=Tg(Cg,r),s=hR(n),u=ti(l=>{i(l),o.onImageLoadingStatusChange(l)});return fa(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?C.jsx(dr.img,{...a,ref:t,src:n}):null});Vf.displayName=Cg;var Ig="AvatarFallback",qf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=Tg(Ig,r),[o,s]=x.useState(n===void 0);return x.useEffect(()=>{if(n!==void 0){const u=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(u)}},[n]),o&&a.imageLoadingStatus!=="loaded"?C.jsx(dr.span,{...i,ref:t}):null});qf.displayName=Ig;function hR(e){const[t,r]=x.useState("idle");return fa(()=>{if(!e){r("error");return}let n=!0;const i=new window.Image,a=o=>()=>{n&&r(o)};return r("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{n=!1}},[e]),t}function Zf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(u=>u+u).join(""));const i=parseInt(n,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function mR(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const vR=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function Rg(e){return Object.entries(e).reduce((t,[r,n])=>{const i=r.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:n}},{})}const yR=2.4,gR=.2126729,bR=.7151522,wR=.072175,xR=.56,SR=.57,ER=.62,_R=.65,El=.022,Ag=1.414,kR=1.14,$R=1.14,OR=.035991,TR=.035991,CR=27.7847239587675,IR=27.7847239587675,Pg=.027,Ng=.027,Dg=.001,RR=5e-4;function jg(e){const{r:t,g:r,b:n}=e,i=a=>(a/255)**yR;return gR*i(t)+bR*i(r)+wR*i(n)}function Mg(e,t){if(!e||!t)return 0;let r=jg(Zf(e)),n=jg(Zf(t)),i=0,a=0;return r=r>El?r:r+(El-r)**Ag,n=n>El?n:n+(El-n)**Ag,Math.abs(n-r)<RR?0:(n>r?(i=(n**xR-r**SR)*kR,a=i<Dg?0:i<OR?i-i*CR*Pg:i-Pg):(i=(n**_R-r**ER)*$R,a=i>-Dg?0:i>-TR?i-i*IR*Ng:i+Ng),Math.abs(a*100))}let Lg=class{constructor(){Ee(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var i;(i=this.eventMap[t])==null||i.delete(r)}}emit(t,r){var n,i;(n=this.eventMap[t])==null||n.forEach(a=>{a(r)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:r})})}};const AR=new Lg;function Fg(e,t){let r=`${e} {`;for(const[n,i]of Object.entries(t))r+=`${n}: ${i}; `;return r+="}",r}function Bg(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);r=(r<<5)-r+i,r=r&r}return Math.abs(r)%t}var Ug={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",d="quarter",p="year",h="date",m="Invalid Date",g=/^(\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 j=["th","st","nd","rd"],F=I%100;return"["+I+(j[(F-20)%10]||j[F]||j[0])+"]"}},y=function(I,j,F){var q=String(I);return!q||q.length>=j?I:""+Array(j+1-q.length).join(F)+I},k={s:y,z:function(I){var j=-I.utcOffset(),F=Math.abs(j),q=Math.floor(F/60),U=F%60;return(j<=0?"+":"-")+y(q,2,"0")+":"+y(U,2,"0")},m:function I(j,F){if(j.date()<F.date())return-I(F,j);var q=12*(F.year()-j.year())+(F.month()-j.month()),U=j.clone().add(q,f),P=F-U<0,w=j.clone().add(q+(P?-1:1),f);return+(-(q+(F-U)/(P?U-w:w-U))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:p,w:c,d:l,D:h,h:u,m:s,s:o,ms:a,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},S="en",E={};E[S]=b;var $="$isDayjsObject",M=function(I){return I instanceof H||!(!I||!I[$])},z=function I(j,F,q){var U;if(!j)return S;if(typeof j=="string"){var P=j.toLowerCase();E[P]&&(U=P),F&&(E[P]=F,U=P);var w=j.split("-");if(!U&&w.length>1)return I(w[0])}else{var W=j.name;E[W]=j,U=W}return!q&&U&&(S=U),U||!q&&S},O=function(I,j){if(M(I))return I.clone();var F=typeof j=="object"?j:{};return F.date=I,F.args=arguments,new H(F)},D=k;D.l=z,D.i=M,D.w=function(I,j){return O(I,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var H=function(){function I(F){this.$L=z(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[$]=!0}var j=I.prototype;return j.parse=function(F){this.$d=function(q){var U=q.date,P=q.utc;if(U===null)return new Date(NaN);if(D.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var w=U.match(g);if(w){var W=w[2]-1||0,Z=(w[7]||"0").substring(0,3);return P?new Date(Date.UTC(w[1],W,w[3]||1,w[4]||0,w[5]||0,w[6]||0,Z)):new Date(w[1],W,w[3]||1,w[4]||0,w[5]||0,w[6]||0,Z)}}return new Date(U)}(F),this.init()},j.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},j.$utils=function(){return D},j.isValid=function(){return this.$d.toString()!==m},j.isSame=function(F,q){var U=O(F);return this.startOf(q)<=U&&U<=this.endOf(q)},j.isAfter=function(F,q){return O(F)<this.startOf(q)},j.isBefore=function(F,q){return this.endOf(q)<O(F)},j.$g=function(F,q,U){return D.u(F)?this[q]:this.set(U,F)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(F,q){var U=this,P=!!D.u(q)||q,w=D.p(F),W=function(he,ue){var Q=D.w(U.$u?Date.UTC(U.$y,ue,he):new Date(U.$y,ue,he),U);return P?Q:Q.endOf(l)},Z=function(he,ue){return D.w(U.toDate()[he].apply(U.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(ue)),U)},_=this.$W,Y=this.$M,oe=this.$D,re="set"+(this.$u?"UTC":"");switch(w){case p:return P?W(1,0):W(31,11);case f:return P?W(1,Y):W(0,Y+1);case c:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return W(P?oe-pe:oe+(6-pe),Y);case l:case h:return Z(re+"Hours",0);case u:return Z(re+"Minutes",1);case s:return Z(re+"Seconds",2);case o:return Z(re+"Milliseconds",3);default:return this.clone()}},j.endOf=function(F){return this.startOf(F,!1)},j.$set=function(F,q){var U,P=D.p(F),w="set"+(this.$u?"UTC":""),W=(U={},U[l]=w+"Date",U[h]=w+"Date",U[f]=w+"Month",U[p]=w+"FullYear",U[u]=w+"Hours",U[s]=w+"Minutes",U[o]=w+"Seconds",U[a]=w+"Milliseconds",U)[P],Z=P===l?this.$D+(q-this.$W):q;if(P===f||P===p){var _=this.clone().set(h,1);_.$d[W](Z),_.init(),this.$d=_.set(h,Math.min(this.$D,_.daysInMonth())).$d}else W&&this.$d[W](Z);return this.init(),this},j.set=function(F,q){return this.clone().$set(F,q)},j.get=function(F){return this[D.p(F)]()},j.add=function(F,q){var U,P=this;F=Number(F);var w=D.p(q),W=function(Y){var oe=O(P);return D.w(oe.date(oe.date()+Math.round(Y*F)),P)};if(w===f)return this.set(f,this.$M+F);if(w===p)return this.set(p,this.$y+F);if(w===l)return W(1);if(w===c)return W(7);var Z=(U={},U[s]=n,U[u]=i,U[o]=r,U)[w]||1,_=this.$d.getTime()+F*Z;return D.w(_,this)},j.subtract=function(F,q){return this.add(-1*F,q)},j.format=function(F){var q=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var P=F||"YYYY-MM-DDTHH:mm:ssZ",w=D.z(this),W=this.$H,Z=this.$m,_=this.$M,Y=U.weekdays,oe=U.months,re=U.meridiem,le=function(ue,Q,K,de){return ue&&(ue[Q]||ue(q,P))||K[Q].slice(0,de)},pe=function(ue){return D.s(W%12||12,ue,"0")},he=re||function(ue,Q,K){var de=ue<12?"AM":"PM";return K?de.toLowerCase():de};return P.replace(v,function(ue,Q){return Q||function(K){switch(K){case"YY":return String(q.$y).slice(-2);case"YYYY":return D.s(q.$y,4,"0");case"M":return _+1;case"MM":return D.s(_+1,2,"0");case"MMM":return le(U.monthsShort,_,oe,3);case"MMMM":return le(oe,_);case"D":return q.$D;case"DD":return D.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return le(U.weekdaysMin,q.$W,Y,2);case"ddd":return le(U.weekdaysShort,q.$W,Y,3);case"dddd":return Y[q.$W];case"H":return String(W);case"HH":return D.s(W,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(W,Z,!0);case"A":return he(W,Z,!1);case"m":return String(Z);case"mm":return D.s(Z,2,"0");case"s":return String(q.$s);case"ss":return D.s(q.$s,2,"0");case"SSS":return D.s(q.$ms,3,"0");case"Z":return w}return null}(ue)||w.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(F,q,U){var P,w=this,W=D.p(q),Z=O(F),_=(Z.utcOffset()-this.utcOffset())*n,Y=this-Z,oe=function(){return D.m(w,Z)};switch(W){case p:P=oe()/12;break;case f:P=oe();break;case d:P=oe()/3;break;case c:P=(Y-_)/6048e5;break;case l:P=(Y-_)/864e5;break;case u:P=Y/i;break;case s:P=Y/n;break;case o:P=Y/r;break;default:P=Y}return U?P:D.a(P)},j.daysInMonth=function(){return this.endOf(f).$D},j.$locale=function(){return E[this.$L]},j.locale=function(F,q){if(!F)return this.$L;var U=this.clone(),P=z(F,q,!0);return P&&(U.$L=P),U},j.clone=function(){return D.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},I}(),L=H.prototype;return O.prototype=L,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",p],["$D",h]].forEach(function(I){L[I[1]]=function(j){return this.$g(j,I[0],I[1])}}),O.extend=function(I,j){return I.$i||(I(j,H,O),I.$i=!0),O},O.locale=z,O.isDayjs=M,O.unix=function(I){return O(1e3*I)},O.en=E[S],O.Ls=E,O.p={},O})})(Ug);var PR=Ug.exports;const _l=Ze(PR);var zg={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){return function(r,n,i){n.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(zg);var NR=zg.exports;const DR=Ze(NR);var Wg={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){return function(r,n,i){n.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Wg);var jR=Wg.exports;const MR=Ze(jR);_l.extend(DR),_l.extend(MR);function LR(e,t="day"){var n,i,a;if(!e||e.length===0)return[];const r=[];(n=e[0])!=null&&n.timestamp&&r.push(Hg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&r.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!_l(s).isSame(u,t)&&u&&r.push(Hg(u))}return r}function Hg(e){return{id:So(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:FR(e)}}}function FR(e,t=!1){const r=_l(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.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(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function UR(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function zR(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function WR(e,t){return e.map(r=>Math.round(r*t))}const Oo=e=>t=>zR(t,e),To=e=>t=>WR(t,e),HR={50:Oo(.95),100:Oo(.9),200:Oo(.75),300:Oo(.6),400:Oo(.3),500:e=>e,600:To(.9),700:To(.6),800:To(.45),900:To(.3),950:To(.2)};function Vg(e,t=HR){const r={},n=BR(e);for(const[i,a]of Object.entries(t))r[i]=UR(a(n));return r}var ot;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,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 n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ot||(ot={}));var Kf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Kf||(Kf={}));const ge=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ni=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=ot.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"]),VR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Hr=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},n={_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)n._errors.push(r(o));else{let s=n,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Hr.create=e=>new Hr(e);const Co=(e,t)=>{let r;switch(e.code){case se.invalid_type:e.received===ge.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:r=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case se.invalid_union:r="Invalid input";break;case se.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case se.invalid_enum_value:r=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:r="Invalid function arguments";break;case se.invalid_return_type:r="Invalid function return type";break;case se.invalid_date:r="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case se.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case se.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case se.custom:r="Invalid input";break;case se.invalid_intersection_types:r="Intersection results could not be merged";break;case se.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:r="Number must be finite";break;default:r=t.defaultError,ot.assertNever(e)}return{message:r}};let qg=Co;function qR(e){qg=e}function kl(){return qg}const $l=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};let s="";const u=n.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},ZR=[];function we(e,t){const r=$l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,kl(),Co].filter(n=>!!n)});e.common.issues.push(r)}let pr=class FI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return Fe;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r)n.push({key:await i.key,value:await i.value});return FI.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}};const Fe=Object.freeze({status:"aborted"}),Zg=e=>({status:"dirty",value:e}),sr=e=>({status:"valid",value:e}),Gf=e=>e.status==="aborted",Yf=e=>e.status==="dirty",Io=e=>e.status==="valid",Ol=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));let fn=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 Kg=(e,t)=>{if(Io(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 r=new Hr(e.common.issues);return this._error=r,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))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:n??s.defaultError}:{message:r??s.defaultError},description:i}}let He=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 ni(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ni(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pr,ctx:{common:t.parent.common,data:t.data,parsedType:ni(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Ol(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ni(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Kg(i,a)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ni(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(Ol(i)?i:Promise.resolve(i));return Kg(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Vr({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ln.create(this,this._def)}nullable(){return Li.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return ma.create(this,this._def)}or(t){return Mo.create([this,t],this._def)}and(t){return Lo.create(this,t,this._def)}transform(t){return new Vr({...Ue(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Wo({...Ue(this._def),innerType:this,defaultValue:r,typeName:Ne.ZodDefault})}brand(){return new Qg({typeName:Ne.ZodBranded,type:this,...Ue(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Pl({...Ue(this._def),innerType:this,catchValue:r,typeName:Ne.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Qf.create(this,t)}readonly(){return Dl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const KR=/^c[^\s-]{8,}$/i,GR=/^[a-z][a-z0-9]*$/,YR=/^[0-9A-HJKMNP-TV-Z]{26}$/,JR=/^[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,XR=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,QR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Jf;const eA=/^(((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}))$/,tA=/^(([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})))$/,rA=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 nA(e,t){return!!((t==="v4"||!t)&&eA.test(e)||(t==="v6"||!t)&&tA.test(e))}let da=class xl extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Fe}const n=new pr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.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?we(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&we(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")XR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"email",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Jf||(Jf=new RegExp(QR,"u")),Jf.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"emoji",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")JR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"uuid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")KR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")GR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")YR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ulid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),we(i,{validation:"url",code:se.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"regex",code:se.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.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),we(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?rA(a).test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="ip"?nA(t.data,a.version)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ip",code:se.invalid_string,message:a.message}),n.dirty()):ot.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:se.invalid_string,...Te.errToObj(n)})}_addCheck(t){return new xl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var r;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Te.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Te.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Te.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Te.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Te.errToObj(r)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new xl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xl({...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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};da.create=e=>{var t;return new da({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};function iA(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let Ro=class ug extends He{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)!==ge.number){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Fe}let n;const i=new pr;for(const a of this._def.checks)a.kind==="int"?ot.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.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)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?iA(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_finite,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,i){return new ug({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(i)}]})}_addCheck(t){return new ug({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ro.create=e=>new Ro({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});let Ao=class cg extends He{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)!==ge.bigint){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Fe}let n;const i=new pr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.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)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,i){return new cg({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(i)}]})}_addCheck(t){return new cg({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ao.create=e=>{var t;return new Ao({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};let Po=class extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.boolean,received:n.parsedType}),Fe}return sr(t.data)}};Po.create=e=>new Po({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});let No=class BI extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Fe}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_date}),Fe}const n=new pr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):ot.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new BI({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};No.create=e=>new No({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Ue(e)});let Tl=class extends He{_parse(t){if(this._getType(t)!==ge.symbol){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.symbol,received:n.parsedType}),Fe}return sr(t.data)}};Tl.create=e=>new Tl({typeName:Ne.ZodSymbol,...Ue(e)});let Do=class extends He{_parse(t){if(this._getType(t)!==ge.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.undefined,received:n.parsedType}),Fe}return sr(t.data)}};Do.create=e=>new Do({typeName:Ne.ZodUndefined,...Ue(e)});let jo=class extends He{_parse(t){if(this._getType(t)!==ge.null){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.null,received:n.parsedType}),Fe}return sr(t.data)}};jo.create=e=>new jo({typeName:Ne.ZodNull,...Ue(e)});let pa=class extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return sr(t.data)}};pa.create=e=>new pa({typeName:Ne.ZodAny,...Ue(e)});let ji=class extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sr(t.data)}};ji.create=e=>new ji({typeName:Ne.ZodUnknown,...Ue(e)});let Mn=class extends He{_parse(t){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.never,received:r.parsedType}),Fe}};Mn.create=e=>new Mn({typeName:Ne.ZodNever,...Ue(e)});let Cl=class extends He{_parse(t){if(this._getType(t)!==ge.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.void,received:n.parsedType}),Fe}return sr(t.data)}};Cl.create=e=>new Cl({typeName:Ne.ZodVoid,...Ue(e)});let Mi=class Lf extends He{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==ge.array)return we(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Fe;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(we(r,{code:o?se.too_big:se.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}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(we(r,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(we(r,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new fn(r,o,r.path,s)))).then(o=>pr.mergeArray(n,o));const a=[...r.data].map((o,s)=>i.type._parseSync(new fn(r,o,r.path,s)));return pr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Lf({...this._def,minLength:{value:t,message:Te.toString(r)}})}max(t,r){return new Lf({...this._def,maxLength:{value:t,message:Te.toString(r)}})}length(t,r){return new Lf({...this._def,exactLength:{value:t,message:Te.toString(r)}})}nonempty(t){return this.min(1,t)}};Mi.create=(e,t)=>new Mi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Ue(t)});function ha(e){if(e instanceof Rr){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ln.create(ha(n))}return new Rr({...e._def,shape:()=>t})}else return e instanceof Mi?new Mi({...e._def,type:ha(e.element)}):e instanceof Ln?Ln.create(ha(e.unwrap())):e instanceof Li?Li.create(ha(e.unwrap())):e instanceof ii?ii.create(e.items.map(t=>ha(t))):e}let Rr=class cn extends He{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(),r=ot.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return we(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Fe}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Mn&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new fn(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Mn){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(we(i,{code:se.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new fn(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key;l.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>pr.mergeObjectSync(n,l)):pr.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new cn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cn({...this._def,unknownKeys:"strip"})}passthrough(){return new cn({...this._def,unknownKeys:"passthrough"})}extend(t){return new cn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new cn({...this._def,catchall:t})}pick(t){const r={};return ot.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}omit(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}deepPartial(){return ha(this)}partial(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new cn({...this._def,shape:()=>r})}required(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ln;)a=a._def.innerType;r[n]=a}}),new cn({...this._def,shape:()=>r})}keyof(){return Xg(ot.objectKeys(this.shape))}};Rr.create=(e,t)=>new Rr({shape:()=>e,unknownKeys:"strip",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)}),Rr.strictCreate=(e,t)=>new Rr({shape:()=>e,unknownKeys:"strict",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)}),Rr.lazycreate=(e,t)=>new Rr({shape:e,unknownKeys:"strip",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)});let Mo=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=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 r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Hr(s.ctx.common.issues));return we(r,{code:se.invalid_union,unionErrors:o}),Fe}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of n){const l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Hr(u));return we(r,{code:se.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}};Mo.create=(e,t)=>new Mo({options:e,typeName:Ne.ZodUnion,...Ue(t)});const Il=e=>e instanceof Fo?Il(e.schema):e instanceof Vr?Il(e.innerType()):e instanceof Bo?[e.value]:e instanceof Uo?e.options:e instanceof zo?Object.keys(e.enum):e instanceof Wo?Il(e._def.innerType):e instanceof Do?[void 0]:e instanceof jo?[null]:null;let Gg=class UI extends He{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return we(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Fe;const n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(we(r,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Fe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const a of r){const o=Il(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 UI({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...Ue(n)})}};function Xf(e,t){const r=ni(e),n=ni(t);if(e===t)return{valid:!0,data:e};if(r===ge.object&&n===ge.object){const i=ot.objectKeys(t),a=ot.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Xf(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(r===ge.array&&n===ge.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],u=Xf(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===ge.date&&n===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Lo=class extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(Gf(a)||Gf(o))return Fe;const s=Xf(a.value,o.value);return s.valid?((Yf(a)||Yf(o))&&r.dirty(),{status:r.value,value:s.data}):(we(n,{code:se.invalid_intersection_types}),Fe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Lo.create=(e,t,r)=>new Lo({left:e,right:t,typeName:Ne.ZodIntersection,...Ue(r)});let ii=class zI extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.array)return we(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Fe;if(n.data.length<this._def.items.length)return we(n,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&n.data.length>this._def.items.length&&(we(n,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new fn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>pr.mergeArray(r,o)):pr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new zI({...this._def,rest:t})}};ii.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ii({items:e,typeName:Ne.ZodTuple,rest:null,...Ue(t)})};let Yg=class fg extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return we(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Fe;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new fn(n,s,n.path,s)),value:o._parse(new fn(n,n.data[s],n.path,s))});return n.common.async?pr.mergeObjectAsync(r,i):pr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof He?new fg({keyType:t,valueType:r,typeName:Ne.ZodRecord,...Ue(n)}):new fg({keyType:da.create(),valueType:t,typeName:Ne.ZodRecord,...Ue(r)})}},Rl=class extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.map)return we(n,{code:se.invalid_type,expected:ge.map,received:n.parsedType}),Fe;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new fn(n,s,n.path,[l,"key"])),value:a._parse(new fn(n,u,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Fe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Fe;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}};Rl.create=(e,t,r)=>new Rl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Ue(r)});let Al=class dg extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.set)return we(n,{code:se.invalid_type,expected:ge.set,received:n.parsedType}),Fe;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(we(n,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(we(n,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Fe;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((u,l)=>a._parse(new fn(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,r){return new dg({...this._def,minSize:{value:t,message:Te.toString(r)}})}max(t,r){return new dg({...this._def,maxSize:{value:t,message:Te.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Al.create=(e,t)=>new Al({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Ue(t)});let Jg=class Ff extends He{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.function)return we(r,{code:se.invalid_type,expected:ge.function,received:r.parsedType}),Fe;function n(s,u){return $l({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kl(),Co].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:u}})}function i(s,u){return $l({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kl(),Co].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:u}})}const a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ma){const s=this;return sr(async function(...u){const l=new Hr([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(n(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return sr(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Hr([n(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Hr([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ff({...this._def,args:ii.create(t).rest(ji.create())})}returns(t){return new Ff({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ff({args:t||ii.create([]).rest(ji.create()),returns:r||ji.create(),typeName:Ne.ZodFunction,...Ue(n)})}},Fo=class extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Fo.create=(e,t)=>new Fo({getter:e,typeName:Ne.ZodLazy,...Ue(t)});let Bo=class extends He{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:se.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}};Bo.create=(e,t)=>new Bo({value:e,typeName:Ne.ZodLiteral,...Ue(t)});function Xg(e,t){return new Uo({values:e,typeName:Ne.ZodEnum,...Ue(t)})}let Uo=class pg extends He{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{expected:ot.joinValues(n),received:r.parsedType,code:se.invalid_type}),Fe}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{received:r.data,code:se.invalid_enum_value,options:n}),Fe}return sr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return pg.create(t)}exclude(t){return pg.create(this.options.filter(r=>!t.includes(r)))}};Uo.create=Xg;let zo=class extends He{_parse(t){const r=ot.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ge.string&&n.parsedType!==ge.number){const i=ot.objectValues(r);return we(n,{expected:ot.joinValues(i),received:n.parsedType,code:se.invalid_type}),Fe}if(r.indexOf(t.data)===-1){const i=ot.objectValues(r);return we(n,{received:n.data,code:se.invalid_enum_value,options:i}),Fe}return sr(t.data)}get enum(){return this._def.values}};zo.create=(e,t)=>new zo({values:e,typeName:Ne.ZodNativeEnum,...Ue(t)});let ma=class extends He{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.promise&&r.common.async===!1)return we(r,{code:se.invalid_type,expected:ge.promise,received:r.parsedType}),Fe;const n=r.parsedType===ge.promise?r.data:Promise.resolve(r.data);return sr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ma.create=(e,t)=>new ma({type:e,typeName:Ne.ZodPromise,...Ue(t)});let Vr=class extends He{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:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{we(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Fe:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Io(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:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Io(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):o);ot.assertNever(i)}};Vr.create=(e,t,r)=>new Vr({schema:e,typeName:Ne.ZodEffects,effect:t,...Ue(r)}),Vr.createWithPreprocess=(e,t,r)=>new Vr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Ue(r)});let Ln=class extends He{_parse(t){return this._getType(t)===ge.undefined?sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ln.create=(e,t)=>new Ln({innerType:e,typeName:Ne.ZodOptional,...Ue(t)});let Li=class extends He{_parse(t){return this._getType(t)===ge.null?sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Li.create=(e,t)=>new Li({innerType:e,typeName:Ne.ZodNullable,...Ue(t)});let Wo=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ge.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Wo.create=(e,t)=>new Wo({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});let Pl=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ol(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Hr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Hr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Pl.create=(e,t)=>new Pl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});let Nl=class extends He{_parse(t){if(this._getType(t)!==ge.nan){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.nan,received:n.parsedType}),Fe}return{status:"valid",value:t.data}}};Nl.create=e=>new Nl({typeName:Ne.ZodNaN,...Ue(e)});const aA=Symbol("zod_brand");let Qg=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Qf=class WI extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Fe:a.status==="dirty"?(r.dirty(),Zg(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Fe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new WI({in:t,out:r,typeName:Ne.ZodPipeline})}},Dl=class extends He{_parse(t){const r=this._def.innerType._parse(t);return Io(r)&&(r.value=Object.freeze(r.value)),r}};Dl.create=(e,t)=>new Dl({innerType:e,typeName:Ne.ZodReadonly,...Ue(t)});const eb=(e,t={},r)=>e?pa.create().superRefine((n,i)=>{var a,o;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):pa.create(),oA={object:Rr.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 sA=(e,t={message:`Input not instance of ${e.name}`})=>eb(r=>r instanceof e,t),tb=da.create,rb=Ro.create,lA=Nl.create,uA=Ao.create,nb=Po.create,cA=No.create,fA=Tl.create,dA=Do.create,pA=jo.create,hA=pa.create,mA=ji.create,vA=Mn.create,yA=Cl.create,gA=Mi.create,bA=Rr.create,wA=Rr.strictCreate,xA=Mo.create,SA=Gg.create,EA=Lo.create,_A=ii.create,kA=Yg.create,$A=Rl.create,OA=Al.create,TA=Jg.create,CA=Fo.create,IA=Bo.create,RA=Uo.create,AA=zo.create,PA=ma.create,ib=Vr.create,NA=Ln.create,DA=Li.create,jA=Vr.createWithPreprocess,MA=Qf.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:Co,setErrorMap:qR,getErrorMap:kl,makeIssue:$l,EMPTY_PATH:ZR,addIssueToContext:we,ParseStatus:pr,INVALID:Fe,DIRTY:Zg,OK:sr,isAborted:Gf,isDirty:Yf,isValid:Io,isAsync:Ol,get util(){return ot},get objectUtil(){return Kf},ZodParsedType:ge,getParsedType:ni,ZodType:He,ZodString:da,ZodNumber:Ro,ZodBigInt:Ao,ZodBoolean:Po,ZodDate:No,ZodSymbol:Tl,ZodUndefined:Do,ZodNull:jo,ZodAny:pa,ZodUnknown:ji,ZodNever:Mn,ZodVoid:Cl,ZodArray:Mi,ZodObject:Rr,ZodUnion:Mo,ZodDiscriminatedUnion:Gg,ZodIntersection:Lo,ZodTuple:ii,ZodRecord:Yg,ZodMap:Rl,ZodSet:Al,ZodFunction:Jg,ZodLazy:Fo,ZodLiteral:Bo,ZodEnum:Uo,ZodNativeEnum:zo,ZodPromise:ma,ZodEffects:Vr,ZodTransformer:Vr,ZodOptional:Ln,ZodNullable:Li,ZodDefault:Wo,ZodCatch:Pl,ZodNaN:Nl,BRAND:aA,ZodBranded:Qg,ZodPipeline:Qf,ZodReadonly:Dl,custom:eb,Schema:He,ZodSchema:He,late:oA,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>da.create({...e,coerce:!0}),number:e=>Ro.create({...e,coerce:!0}),boolean:e=>Po.create({...e,coerce:!0}),bigint:e=>Ao.create({...e,coerce:!0}),date:e=>No.create({...e,coerce:!0})},any:hA,array:gA,bigint:uA,boolean:nb,date:cA,discriminatedUnion:SA,effect:ib,enum:RA,function:TA,instanceof:sA,intersection:EA,lazy:CA,literal:IA,map:$A,nan:lA,nativeEnum:AA,never:vA,null:pA,nullable:DA,number:rb,object:bA,oboolean:()=>nb().optional(),onumber:()=>rb().optional(),optional:NA,ostring:()=>tb().optional(),pipeline:MA,preprocess:jA,promise:PA,record:kA,set:OA,strictObject:wA,string:tb,symbol:fA,transformer:ib,tuple:_A,undefined:dA,union:xA,unknown:mA,void:yA,NEVER:Fe,ZodIssueCode:se,quotelessJson:VR,ZodError:Hr});const va=Se.object({title:Se.string().optional(),link:Se.string().optional()}),ed=Se.object({color:Se.string().optional(),variant:Se.enum(["soft","solid"]).optional(),themeMode:Se.enum(["light","dark"]).optional(),fontFamily:Se.enum(["rubik","inter","ibm","fira"]).optional(),radius:Se.number().min(.5).max(4).optional()}),ab=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:va.optional(),email:va.optional(),phone:va.optional(),privacyPolicy:va.optional(),termsOfService:va.optional(),showPoweredBy:Se.boolean().optional()}).merge(ed),ob=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),sb=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:sb.optional()}),jl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),lb=Se.object({button:fe.optional(),text:Se.record(ob,fe.optional()),image:Se.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:Se.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:Se.object({button:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:Se.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),ub=Se.object({container:fe.optional(),modal:Se.object({overlay:fe.optional(),container:fe.optional(),dialog:Se.object({container:fe.optional(),title:Se.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:Se.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:Se.object({container:fe.optional(),content:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:jl.optional(),actions:Se.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:Se.object({container:fe.optional(),group:fe.optional(),descriptionItems:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:Se.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:Se.object({container:fe.optional(),input:fe.optional(),uploadButton:Se.object({container:fe.optional(),icon:fe.optional()}).optional(),button:Se.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:Se.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:Se.object({scrollbar:Se.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:Se.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:jl.optional(),container:fe.optional()}).optional(),scrollDownButton:Se.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:Se.object({container:fe.optional(),avatar:jl.optional(),blocks:lb.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),cb=Se.enum(["opened","closed","initial"]),fb=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),db=Se.object({configuration:ab.optional().catch(void 0),theme:ub.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:fb.optional().catch(void 0)}),LA=db.extend({clientId:Se.string(),botId:Se.string(),selector:Se.string().optional().catch(void 0),webchatScriptUrl:Se.string().optional().catch(void 0),fabScriptUrl:Se.string().optional().catch(void 0),pushpinUrl:Se.string().optional().catch(void 0),defaultState:cb.optional().catch(void 0)});function pb(e){const{fontFamily:t,radius:r,themeMode:n,variant:i,color:a}=ed.parse(e);let o={},s={};if(a){const c=Vg(a),f=n==="dark"?Rg(c):c,d=Vg(mR(vR(Zf(a)))),p=n==="dark"?Rg(d):d,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((g,[v,b])=>({...g,[`--bpPrimary-${v}`]:b}),{});const m=Object.entries({...p,1:h}).reduce((g,[v,b])=>({...g,[`--bpGray-${v}`]:b}),{});o={...s,...m}}r&&(o={...o,"--bpRadius-scale":r.toString()});const u=s?Mg(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":u,"--header-description":u,"--header-description-icon":u,"--header-description-link":u,"--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":u,"--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":u}:{"--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?Mg(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},Fg(":root",o)+(t?Fg(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const td=N.forwardRef(({userId:e,src:t,container:r,image:n,fallback:i,...a},o)=>{const s=Bg(e??"",15);return C.jsxs(Hf,{ref:o,"data-color":s,...r,...a,children:[C.jsx(Vf,{src:t,...n}),C.jsx(qf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});function ope(){}function spe(){}function FA(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const BA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zA={};function hb(e,t){return(zA.jsx?UA:BA).test(e)}const WA=/[ \t\n\f\r]/g;function HA(e){return typeof e=="object"?e.type==="text"?mb(e.value):!1:mb(e)}function mb(e){return e.replace(WA,"")===""}class Ho{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Ho.prototype.property={},Ho.prototype.normal={},Ho.prototype.space=null;function vb(e,t){const r={},n={};let i=-1;for(;++i<e.length;)Object.assign(r,e[i].property),Object.assign(n,e[i].normal);return new Ho(r,n,t)}function rd(e){return e.toLowerCase()}class Ar{constructor(t,r){this.property=t,this.attribute=r}}Ar.prototype.space=null,Ar.prototype.boolean=!1,Ar.prototype.booleanish=!1,Ar.prototype.overloadedBoolean=!1,Ar.prototype.number=!1,Ar.prototype.commaSeparated=!1,Ar.prototype.spaceSeparated=!1,Ar.prototype.commaOrSpaceSeparated=!1,Ar.prototype.mustUseProperty=!1,Ar.prototype.defined=!1;let VA=0;const ze=Fi(),Rt=Fi(),yb=Fi(),ie=Fi(),wt=Fi(),ya=Fi(),Sr=Fi();function Fi(){return 2**++VA}const nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Rt,commaOrSpaceSeparated:Sr,commaSeparated:ya,number:ie,overloadedBoolean:yb,spaceSeparated:wt},Symbol.toStringTag,{value:"Module"})),id=Object.keys(nd);class ad extends Ar{constructor(t,r,n,i){let a=-1;if(super(t,r),gb(this,"space",i),typeof n=="number")for(;++a<id.length;){const o=id[a];gb(this,id[a],(n&nd[o])===nd[o])}}}ad.prototype.defined=!0;function gb(e,t,r){r&&(e[t]=r)}const qA={}.hasOwnProperty;function ga(e){const t={},r={};let n;for(n in e.properties)if(qA.call(e.properties,n)){const i=e.properties[n],a=new ad(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[rd(n)]=n,r[rd(a.attribute)]=n}return new Ho(t,r,e.space)}const bb=ga({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}}),wb=ga({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xb(e,t){return t in e?e[t]:t}function Sb(e,t){return xb(e,t.toLowerCase())}const Eb=ga({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sb,properties:{xmlns:null,xmlnsXLink:null}}),_b=ga({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:wt,ariaCurrent:null,ariaDescribedBy:wt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:wt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:wt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wt,ariaLevel:ie,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:wt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:wt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),ZA=ga({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ya,acceptCharset:wt,accessKey:wt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:wt,autoFocus:ze,autoPlay:ze,blocking:wt,capture:null,charSet:null,checked:ze,cite:null,className:wt,cols:ie,colSpan:null,content:null,contentEditable:Rt,controls:ze,controlsList:wt,coords:ie|ya,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:yb,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:wt,height:ie,hidden:ze,high:ie,href:null,hrefLang:null,htmlFor:wt,httpEquiv:wt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:wt,itemRef:wt,itemScope:ze,itemType:wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ie,pattern:null,ping:wt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:wt,required:ze,reversed:ze,rows:ie,rowSpan:ie,sandbox:wt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ie,security:null,unselectable:null}}),KA=ga({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:xb,properties:{about:Sr,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:wt,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:ya,g2:ya,glyphName:ya,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sr,rev:Sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sr,requiredFeatures:Sr,requiredFonts:Sr,requiredFormats:Sr,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sr,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),GA=/^data[-\w.:]+$/i,kb=/-[a-z]/g,YA=/[A-Z]/g;function JA(e,t){const r=rd(t);let n=t,i=Ar;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&GA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(kb,QA);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!kb.test(a)){let o=a.replace(YA,XA);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ad}return new i(n,t)}function XA(e){return"-"+e.toLowerCase()}function QA(e){return e.charAt(1).toUpperCase()}const eP={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"},tP=vb([wb,bb,Eb,_b,ZA],"html"),od=vb([wb,bb,Eb,_b,KA],"svg");function rP(e){return e.join(" ").trim()}var $b={},Ob=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,nP=/\n/g,iP=/^\s*/,aP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oP=/^:\s*/,sP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,lP=/^[;\s]*/,uP=/^\s+|\s+$/g,cP=`
|
|
31
|
-
`,Tb="/",Cb="*",Bi="",fP="comment",dP="declaration",pP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(h){var m=h.match(nP);m&&(r+=m.length);var g=h.lastIndexOf(cP);n=~g?h.length-g:n+h.length}function a(){var h={line:r,column:n};return function(m){return m.position=new o(h),l(),m}}function o(h){this.start=h,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+r+":"+n+": "+h);if(m.reason=h,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function u(h){var m=h.exec(e);if(m){var g=m[0];return i(g),e=e.slice(g.length),m}}function l(){u(iP)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!(Tb!=e.charAt(0)||Cb!=e.charAt(1))){for(var m=2;Bi!=e.charAt(m)&&(Cb!=e.charAt(m)||Tb!=e.charAt(m+1));)++m;if(m+=2,Bi===e.charAt(m-1))return s("End of comment missing");var g=e.slice(2,m-2);return n+=2,i(g),e=e.slice(m),n+=2,h({type:fP,comment:g})}}function d(){var h=a(),m=u(aP);if(m){if(f(),!u(oP))return s("property missing ':'");var g=u(sP),v=h({type:dP,property:Ib(m[0].replace(Ob,Bi)),value:g?Ib(g[0].replace(Ob,Bi)):Bi});return u(lP),v}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return l(),p()};function Ib(e){return e?e.replace(uP,Bi):Bi}var hP=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($b,"__esModule",{value:!0});var Rb=$b.default=vP,mP=hP(pP);function vP(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,mP.default)(e),i=typeof t=="function";return n.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(r=r||{},r[o]=s)}}),r}const yP=Rb.default||Rb,Ab=Pb("end"),sd=Pb("start");function Pb(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function gP(e){const t=sd(e),r=Ab(e);if(t&&r)return{start:t,end:r}}function Vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nb(e.position):"start"in e||"end"in e?Nb(e):"line"in e||"column"in e?ld(e):""}function ld(e){return Db(e&&e.line)+":"+Db(e&&e.column)}function Nb(e){return ld(e&&e.start)+"-"+ld(e&&e.end)}function Db(e){return e&&typeof e=="number"?e:1}class er extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const u=n.indexOf(":");u===-1?a.ruleId=n:(a.source=n.slice(0,u),a.ruleId=n.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.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=Vo(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}}er.prototype.file="",er.prototype.name="",er.prototype.reason="",er.prototype.message="",er.prototype.stack="",er.prototype.column=void 0,er.prototype.line=void 0,er.prototype.ancestors=void 0,er.prototype.cause=void 0,er.prototype.fatal=void 0,er.prototype.place=void 0,er.prototype.ruleId=void 0,er.prototype.source=void 0;const ud={}.hasOwnProperty,bP=new Map,wP=/[A-Z]/g,xP=/-([a-z])/g,SP=new Set(["table","tbody","thead","tfoot","tr"]),EP=new Set(["td","th"]),jb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _P(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=AP(r,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");n=RP(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?od:tP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Mb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Mb(e,t,r){if(t.type==="element")return kP(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $P(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return TP(e,t,r);if(t.type==="mdxjsEsm")return OP(e,t);if(t.type==="root")return CP(e,t,r);if(t.type==="text")return IP(e,t)}function kP(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=od,e.schema=i),e.ancestors.push(t);const a=Fb(e,t.tagName,!1),o=PP(e,t);let s=fd(e,t);return SP.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!HA(u):!0})),Lb(e,o,a,t),cd(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function $P(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qo(e,t.position)}function OP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qo(e,t.position)}function TP(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=od,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Fb(e,t.name,!0),o=NP(e,t),s=fd(e,t);return Lb(e,o,a,t),cd(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function CP(e,t,r){const n={};return cd(n,fd(e,t)),e.create(t,e.Fragment,n,r)}function IP(e,t){return t.value}function Lb(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function cd(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function RP(e,t,r){return n;function n(i,a,o,s){const l=Array.isArray(o.children)?r:t;return s?l(a,o,s):l(a,o)}}function AP(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),u=sd(n);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function PP(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&ud.call(t.properties,i)){const a=DP(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&EP.has(t.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function NP(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else qo(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else qo(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function fd(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:bP;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=Mb(e,a,o);s!==void 0&&r.push(s)}return r}function DP(e,t,r){const n=JA(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?FA(r):rP(r)),n.property==="style"){let i=typeof r=="object"?r:jP(e,String(r));return e.stylePropertyNameCase==="css"&&(i=MP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?eP[n.property]||n.property:n.attribute,r]}}function jP(e,t){const r={};try{yP(t,n)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new er("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=jb+"#cannot-parse-style-attribute",o}}return r;function n(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(xP,FP)),r[o]=a}}function Fb(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=hb(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}n=o}else n=hb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return ud.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);qo(e)}function qo(e,t){const r=new er("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jb+"#cannot-handle-mdx-estrees-without-createevaluater",r}function MP(e){const t={};let r;for(r in e)ud.call(e,r)&&(t[LP(r)]=e[r]);return t}function LP(e){let t=e.replace(wP,BP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function FP(e,t){return t.toUpperCase()}function BP(e){return"-"+e.toLowerCase()}const dd={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"]},UP={};function pd(e,t){const r=UP,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Bb(e,n,i)}function Bb(e,t,r){if(zP(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ub(e.children,t,r)}return Array.isArray(e)?Ub(e,t,r):""}function Ub(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=Bb(e[i],t,r);return n.join("")}function zP(e){return!!(e&&typeof e=="object")}const zb=document.createElement("i");function hd(e){const t="&"+e+";";zb.innerHTML=t;const r=zb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Pr(e,t,r,n){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Nr(e,t){return e.length>0?(Pr(e,e.length,0,t),e):t}const Wb={}.hasOwnProperty;function Hb(e){const t={};let r=-1;for(;++r<e.length;)WP(t,e[r]);return t}function WP(e,t){let r;for(r in t){const i=(Wb.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){Wb.call(i,o)||(i[o]=[]);const s=a[o];HP(i[o],Array.isArray(s)?s:s?[s]:[])}}}function HP(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Pr(e,0,0,n)}function Vb(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function qr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=ai(/[A-Za-z]/),tr=ai(/[\dA-Za-z]/),VP=ai(/[#-'*+\--9=?A-Z^-~]/);function Ml(e){return e!==null&&(e<32||e===127)}const md=ai(/\d/),qP=ai(/[\dA-Fa-f]/),ZP=ai(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Ll=ai(new RegExp("\\p{P}|\\p{S}","u")),Ui=ai(/\s/);function ai(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ba(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&tr(e.charCodeAt(r+1))&&tr(e.charCodeAt(r+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(r+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(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Qe(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return Ke(u)?(e.enter(r),s(u)):t(u)}function s(u){return Ke(u)&&a++<i?(e.consume(u),s):(e.exit(r),t(u))}}const KP={tokenize:GP};function GP(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ie(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const YP={tokenize:JP},qb={tokenize:XP};function JP(e){const t=this,r=[];let n=0,i,a,o;return s;function s(y){if(n<r.length){const k=r[n];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(y)}return l(y)}function u(y){if(n++,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}v(n);let $=k;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},E),$++;return Pr(t.events,S+1,0,t.events.slice(k)),t.events.length=$,l(y)}return s(y)}function l(y){if(n===r.length){if(!i)return d(y);if(i.currentConstruct&&i.currentConstruct.concrete)return h(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qb,c,f)(y)}function c(y){return i&&b(),v(n),d(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,h(y)}function d(y){return t.containerState={},e.attempt(qb,p,h)(y)}function p(y){return n++,r.push([t.currentConstruct,t.containerState]),d(y)}function h(y){if(y===null){i&&b(),v(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),m(y)}function m(y){if(y===null){g(e.exit("chunkFlow"),!0),v(0),e.consume(y);return}return Ie(y)?(e.consume(y),g(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(y),m)}function g(y,k){const S=t.sliceStream(y);if(k&&S.push(null),y.previous=a,a&&(a.next=y),a=y,i.defineSkip(y.start),i.write(S),t.parser.lazy[y.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const $=t.events.length;let M=$,z,O;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(z){O=t.events[M][1].end;break}z=!0}for(v(n),E=$;E<t.events.length;)t.events[E][1].end=Object.assign({},O),E++;Pr(t.events,M+1,0,t.events.slice($)),t.events.length=E}}function v(y){let k=r.length;for(;k-- >y;){const S=r[k];t.containerState=S[1],S[0].exit.call(t,e)}r.length=y}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function XP(e,t,r){return Qe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||yt(e)||Ui(e))return 1;if(Ll(e))return 2}function Bl(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const vd={name:"attention",tokenize:eN,resolveAll:QP};function QP(e,t){let r=-1,n,i,a,o,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),d=Object.assign({},e[r][1].start);Zb(f,-u),Zb(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:d},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Nr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Nr(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Nr(l,Bl(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Nr(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=Nr(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Pr(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function eN(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Fl(n);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Fl(u),f=!c||c===2&&i||r.includes(u),d=!i||i===2&&c||r.includes(n);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function Zb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tN={name:"autolink",tokenize:rN};function rN(e,t,r){let n=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 lr(p)?(e.consume(p),o):p===64?r(p):l(p)}function o(p){return p===43||p===45||p===46||tr(p)?(n=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),n=0,u):(p===43||p===45||p===46||tr(p))&&n++<32?(e.consume(p),s):(n=0,l(p))}function u(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||Ml(p)?r(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):VP(p)?(e.consume(p),l):r(p)}function c(p){return tr(p)?f(p):r(p)}function f(p){return p===46?(e.consume(p),n=0,c):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||tr(p))&&n++<63){const h=p===45?d:f;return e.consume(p),h}return r(p)}}const Zo={tokenize:nN,partial:!0};function nN(e,t,r){return n;function n(a){return Ke(a)?Qe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):r(a)}}const Kb={name:"blockQuote",tokenize:iN,continuation:{tokenize:aN},exit:oN};function iN(e,t,r){const n=this;return i;function i(o){if(o===62){const s=n.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 r(o)}function a(o){return Ke(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function aN(e,t,r){const n=this;return i;function i(o){return Ke(o)?Qe(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Kb,t,r)(o)}}function oN(e){e.exit("blockQuote")}const Gb={name:"characterEscape",tokenize:sN};function sN(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return ZP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const Yb={name:"characterReference",tokenize:lN};function lN(e,t,r){const n=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=tr,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=qP,c):(e.enter("characterReferenceValue"),a=7,o=md,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===tr&&!hd(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):r(f)}}const Jb={tokenize:cN,partial:!0},Xb={name:"codeFenced",tokenize:uN,concrete:!0};function uN(e,t,r){const n=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return u;function u(E){return l(E)}function l(E){const $=n.events[n.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(o++,e.consume(E),c):o<3?r(E):(e.exit("codeFencedFenceSequence"),Ke(E)?Qe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Ie(E)?(e.exit("codeFencedFence"),n.interrupt?t(E):e.check(Jb,m,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):Ke(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,p,"whitespace")(E)):E===96&&E===s?r(E):(e.consume(E),d)}function p(E){return E===null||Ie(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||Ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?r(E):(e.consume(E),h)}function m(E){return e.attempt(i,k,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return a>0&&Ke(E)?Qe(e,b,"linePrefix",a+1)(E):b(E)}function b(E){return E===null||Ie(E)?e.check(Jb,m,k)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||Ie(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),y)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,$,M){let z=0;return O;function O(j){return E.enter("lineEnding"),E.consume(j),E.exit("lineEnding"),D}function D(j){return E.enter("codeFencedFence"),Ke(j)?Qe(E,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):H(j)}function H(j){return j===s?(E.enter("codeFencedFenceSequence"),L(j)):M(j)}function L(j){return j===s?(z++,E.consume(j),L):z>=o?(E.exit("codeFencedFenceSequence"),Ke(j)?Qe(E,I,"whitespace")(j):I(j)):M(j)}function I(j){return j===null||Ie(j)?(E.exit("codeFencedFence"),$(j)):M(j)}}}function cN(e,t,r){const n=this;return i;function i(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const yd={name:"codeIndented",tokenize:dN},fN={tokenize:pN,partial:!0};function dN(e,t,r){const n=this;return i;function i(l){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(l)}function a(l){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):r(l)}function o(l){return l===null?u(l):Ie(l)?e.attempt(fN,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Ie(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function pN(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Qe(e,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Ie(o)?i(o):r(o)}}const hN={name:"codeText",tokenize:yN,resolve:mN,previous:vN};function mN(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function vN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yN(e,t,r){let n=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),n++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):Ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Ie(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class gN{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,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ko(this.left,n),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),Ko(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ko(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);Ko(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ko(this.left,r.reverse())}}}function Ko(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Qb(e){const t={};let r=-1,n,i,a,o,s,u,l;const c=new gN(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,bN(c,r)),r=t[r],l=!0);else if(n[1]._container){for(a=r,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(n[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return Pr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function bN(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,u=[],l={};let c,f,d=-1,p=r,h=0,m=0;const g=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++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&&(m=d+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const v=s.slice(g[d],g[d+1]),b=a.pop();u.push([b,b+v.length-1]),e.splice(b,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[h+u[d][0]]=h+u[d][1],h+=u[d][1]-u[d][0]-1;return l}const wN={tokenize:EN,resolve:SN},xN={tokenize:_N,partial:!0};function SN(e){return Qb(e),e}function EN(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Ie(s)?e.check(xN,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"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function _N(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function ew(e,t,r,n,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||Ml(v)?r(v):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(n),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||Ie(v)?r(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!c&&(v===null||v===41||yt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(v)):c<l&&v===40?(e.consume(v),c++,m):v===41?(e.consume(v),c--,m):v===null||v===32||v===40||Ml(v)?r(v):(e.consume(v),v===92?g:m)}function g(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function tw(e,t,r,n,i,a){const o=this;let s=0,u;return l;function l(p){return e.enter(n),e.enter(i),e.consume(p),e.exit(i),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Ie(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!Ke(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function rw(e,t,r,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):r(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?r(d):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Qe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||Ie(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Go(e,t){let r;return n;function n(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ke(i)?Qe(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const kN={name:"definition",tokenize:ON},$N={tokenize:TN,partial:!0};function ON(e,t,r){const n=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return tw.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=qr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):r(p)}function u(p){return yt(p)?Go(e,l)(p):l(p)}function l(p){return ew(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt($N,f,f)(p)}function f(p){return Ke(p)?Qe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Ie(p)?(e.exit("definition"),n.parser.defined.push(i),t(p)):r(p)}}function TN(e,t,r){return n;function n(s){return yt(s)?Go(e,i)(s):r(s)}function i(s){return rw(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ke(s)?Qe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ie(s)?t(s):r(s)}}const CN={name:"hardBreakEscape",tokenize:IN};function IN(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const RN={name:"headingAtx",tokenize:PN,resolve:AN};function AN(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Pr(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function PN(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||yt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Ie(c)?(e.exit("atxHeading"),t(c)):Ke(c)?Qe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||yt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const NN=["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"],nw=["pre","script","style","textarea"],DN={name:"htmlFlow",tokenize:FN,resolveTo:LN,concrete:!0},jN={tokenize:UN,partial:!0},MN={tokenize:BN,partial:!0};function LN(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 FN(e,t,r){const n=this;let i,a,o,s,u;return l;function l(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),d):_===47?(e.consume(_),a=!0,m):_===63?(e.consume(_),i=3,n.interrupt?t:w):lr(_)?(e.consume(_),o=String.fromCharCode(_),g):r(_)}function d(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,s=0,h):lr(_)?(e.consume(_),i=4,n.interrupt?t:w):r(_)}function p(_){return _===45?(e.consume(_),n.interrupt?t:w):r(_)}function h(_){const Y="CDATA[";return _===Y.charCodeAt(s++)?(e.consume(_),s===Y.length?n.interrupt?t:H:h):r(_)}function m(_){return lr(_)?(e.consume(_),o=String.fromCharCode(_),g):r(_)}function g(_){if(_===null||_===47||_===62||yt(_)){const Y=_===47,oe=o.toLowerCase();return!Y&&!a&&nw.includes(oe)?(i=1,n.interrupt?t(_):H(_)):NN.includes(o.toLowerCase())?(i=6,Y?(e.consume(_),v):n.interrupt?t(_):H(_)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(_):a?b(_):y(_))}return _===45||tr(_)?(e.consume(_),o+=String.fromCharCode(_),g):r(_)}function v(_){return _===62?(e.consume(_),n.interrupt?t:H):r(_)}function b(_){return Ke(_)?(e.consume(_),b):O(_)}function y(_){return _===47?(e.consume(_),O):_===58||_===95||lr(_)?(e.consume(_),k):Ke(_)?(e.consume(_),y):O(_)}function k(_){return _===45||_===46||_===58||_===95||tr(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),E):Ke(_)?(e.consume(_),S):y(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),u=_,$):Ke(_)?(e.consume(_),E):M(_)}function $(_){return _===u?(e.consume(_),u=null,z):_===null||Ie(_)?r(_):(e.consume(_),$)}function M(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||yt(_)?S(_):(e.consume(_),M)}function z(_){return _===47||_===62||Ke(_)?y(_):r(_)}function O(_){return _===62?(e.consume(_),D):r(_)}function D(_){return _===null||Ie(_)?H(_):Ke(_)?(e.consume(_),D):r(_)}function H(_){return _===45&&i===2?(e.consume(_),F):_===60&&i===1?(e.consume(_),q):_===62&&i===4?(e.consume(_),W):_===63&&i===3?(e.consume(_),w):_===93&&i===5?(e.consume(_),P):Ie(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(jN,Z,L)(_)):_===null||Ie(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),H)}function L(_){return e.check(MN,I,Z)(_)}function I(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),j}function j(_){return _===null||Ie(_)?L(_):(e.enter("htmlFlowData"),H(_))}function F(_){return _===45?(e.consume(_),w):H(_)}function q(_){return _===47?(e.consume(_),o="",U):H(_)}function U(_){if(_===62){const Y=o.toLowerCase();return nw.includes(Y)?(e.consume(_),W):H(_)}return lr(_)&&o.length<8?(e.consume(_),o+=String.fromCharCode(_),U):H(_)}function P(_){return _===93?(e.consume(_),w):H(_)}function w(_){return _===62?(e.consume(_),W):_===45&&i===2?(e.consume(_),w):H(_)}function W(_){return _===null||Ie(_)?(e.exit("htmlFlowData"),Z(_)):(e.consume(_),W)}function Z(_){return e.exit("htmlFlow"),t(_)}}function BN(e,t,r){const n=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function UN(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Zo,t,r)}}const zN={name:"htmlText",tokenize:WN};function WN(e,t,r){const n=this;let i,a,o;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),S):w===63?(e.consume(w),y):lr(w)?(e.consume(w),M):r(w)}function l(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),a=0,h):lr(w)?(e.consume(w),b):r(w)}function c(w){return w===45?(e.consume(w),p):r(w)}function f(w){return w===null?r(w):w===45?(e.consume(w),d):Ie(w)?(o=f,q(w)):(e.consume(w),f)}function d(w){return w===45?(e.consume(w),p):f(w)}function p(w){return w===62?F(w):w===45?d(w):f(w)}function h(w){const W="CDATA[";return w===W.charCodeAt(a++)?(e.consume(w),a===W.length?m:h):r(w)}function m(w){return w===null?r(w):w===93?(e.consume(w),g):Ie(w)?(o=m,q(w)):(e.consume(w),m)}function g(w){return w===93?(e.consume(w),v):m(w)}function v(w){return w===62?F(w):w===93?(e.consume(w),v):m(w)}function b(w){return w===null||w===62?F(w):Ie(w)?(o=b,q(w)):(e.consume(w),b)}function y(w){return w===null?r(w):w===63?(e.consume(w),k):Ie(w)?(o=y,q(w)):(e.consume(w),y)}function k(w){return w===62?F(w):y(w)}function S(w){return lr(w)?(e.consume(w),E):r(w)}function E(w){return w===45||tr(w)?(e.consume(w),E):$(w)}function $(w){return Ie(w)?(o=$,q(w)):Ke(w)?(e.consume(w),$):F(w)}function M(w){return w===45||tr(w)?(e.consume(w),M):w===47||w===62||yt(w)?z(w):r(w)}function z(w){return w===47?(e.consume(w),F):w===58||w===95||lr(w)?(e.consume(w),O):Ie(w)?(o=z,q(w)):Ke(w)?(e.consume(w),z):F(w)}function O(w){return w===45||w===46||w===58||w===95||tr(w)?(e.consume(w),O):D(w)}function D(w){return w===61?(e.consume(w),H):Ie(w)?(o=D,q(w)):Ke(w)?(e.consume(w),D):z(w)}function H(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(e.consume(w),i=w,L):Ie(w)?(o=H,q(w)):Ke(w)?(e.consume(w),H):(e.consume(w),I)}function L(w){return w===i?(e.consume(w),i=void 0,j):w===null?r(w):Ie(w)?(o=L,q(w)):(e.consume(w),L)}function I(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||yt(w)?z(w):(e.consume(w),I)}function j(w){return w===47||w===62||yt(w)?z(w):r(w)}function F(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):r(w)}function q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),U}function U(w){return Ke(w)?Qe(e,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):P(w)}function P(w){return e.enter("htmlTextData"),o(w)}}const gd={name:"labelEnd",tokenize:GN,resolveTo:KN,resolveAll:ZN},HN={tokenize:YN},VN={tokenize:JN},qN={tokenize:XN};function ZN(e){let t=-1;for(;++t<e.length;){const r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function KN(e,t){let r=e.length,n=0,i,a,o,s;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(o=r);const u={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)},c={type:"labelText",start:Object.assign({},e[a+n+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=Nr(s,e.slice(a+1,a+n+3)),s=Nr(s,[["enter",c,t]]),s=Nr(s,Bl(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),s=Nr(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=Nr(s,e.slice(o+1)),s=Nr(s,[["exit",u,t]]),Pr(e,a,e.length,s),e}function GN(e,t,r){const n=this;let i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=n.parser.defined.includes(qr(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):r(d)}function u(d){return d===40?e.attempt(HN,c,o?c:f)(d):d===91?e.attempt(VN,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(qN,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,r(d)}}function YN(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return yt(f)?Go(e,a)(f):a(f)}function a(f){return f===41?c(f):ew(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return yt(f)?Go(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?rw(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return yt(f)?Go(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function JN(e,t,r){const n=this;return i;function i(s){return tw.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(qr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function XN(e,t,r){return n;function n(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):r(a)}}const QN={name:"labelStartImage",tokenize:eD,resolveAll:gd.resolveAll};function eD(e,t,r){const n=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):r(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const tD={name:"labelStartLink",tokenize:rD,resolveAll:gd.resolveAll};function rD(e,t,r){const n=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 n.parser.constructs?r(o):t(o)}}const bd={name:"lineEnding",tokenize:nD};function nD(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Ul={name:"thematicBreak",tokenize:iD};function iD(e,t,r){let n=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"),u(l)):n>=3&&(l===null||Ie(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),Ke(l)?Qe(e,s,"whitespace")(l):s(l))}}const hr={name:"list",tokenize:sD,continuation:{tokenize:lD},exit:cD},aD={tokenize:fD,partial:!0},oD={tokenize:uD,partial:!0};function sD(e,t,r){const n=this,i=n.events[n.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 h=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:md(p)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ul,r,l)(p):l(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return r(p)}function u(p){return md(p)&&++o<10?(e.consume(p),u):(!n.interrupt||o<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):r(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Zo,n.interrupt?r:c,e.attempt(aD,d,f))}function c(p){return n.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ke(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):r(p)}function d(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function lD(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Zo,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Qe(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ke(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(oD,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Qe(e,e.attempt(hr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function uD(e,t,r){const n=this;return Qe(e,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function cD(e){e.exit(this.containerState.type)}function fD(e,t,r){const n=this;return Qe(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ke(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const iw={name:"setextUnderline",tokenize:pD,resolveTo:dD};function dD(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);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[n][1],t]),e[n][1].end=Object.assign({},e[a][1].end)):e[n][1]=o,e.push(["exit",o,t]),e}function pD(e,t,r){const n=this;let i;return a;function a(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):r(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ke(l)?Qe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Ie(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const hD={tokenize:mD};function mD(e){const t=this,r=e.attempt(Zo,n,e.attempt(this.parser.constructs.flowInitial,i,Qe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(wN,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const vD={resolveAll:ow()},yD=aw("string"),gD=aw("text");function aw(e){return{tokenize:t,resolveAll:ow(e==="text"?bD:void 0)};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),a(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function ow(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function bD(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,o=-1,s=0,u;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)u=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+a,_bufferIndex:a?o:n.start._bufferIndex+o},end:Object.assign({},n.end)};n.end=Object.assign({},l.start),n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}function wD(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:b,enter:y,exit:k,attempt:$(S),check:$(E),interrupt:$(E,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:h,defineSkip:m,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(D){return o=Nr(o,D),g(),o[o.length-1]!==null?[]:(M(t,0),l.events=Bl(a,l.events,l),l.events)}function d(D,H){return SD(p(D),H)}function p(D){return xD(o,D)}function h(){const{line:D,column:H,offset:L,_index:I,_bufferIndex:j}=n;return{line:D,column:H,offset:L,_index:I,_bufferIndex:j}}function m(D){i[D.line]=D.column,O()}function g(){let D;for(;n._index<o.length;){const H=o[n._index];if(typeof H=="string")for(D=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===D&&n._bufferIndex<H.length;)v(H.charCodeAt(n._bufferIndex));else v(H)}}function v(D){c=c(D)}function b(D){Ie(D)?(n.line++,n.column=1,n.offset+=D===-3?2:1,O()):D!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=D}function y(D,H){const L=H||{};return L.type=D,L.start=h(),l.events.push(["enter",L,l]),s.push(L),L}function k(D){const H=s.pop();return H.end=h(),l.events.push(["exit",H,l]),H}function S(D,H){M(D,H.from)}function E(D,H){H.restore()}function $(D,H){return L;function L(I,j,F){let q,U,P,w;return Array.isArray(I)?Z(I):"tokenize"in I?Z([I]):W(I);function W(re){return le;function le(pe){const he=pe!==null&&re[pe],ue=pe!==null&&re.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return Z(Q)(pe)}}function Z(re){return q=re,U=0,re.length===0?F:_(re[U])}function _(re){return le;function le(pe){return w=z(),P=re,re.partial||(l.currentConstruct=re),re.name&&l.parser.constructs.disable.null.includes(re.name)?oe():re.tokenize.call(H?Object.assign(Object.create(l),H):l,u,Y,oe)(pe)}}function Y(re){return D(P,w),j}function oe(re){return w.restore(),++U<q.length?_(q[U]):F}}}function M(D,H){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Pr(l.events,H,l.events.length-H,D.resolve(l.events.slice(H),l)),D.resolveTo&&(l.events=D.resolveTo(l.events,l))}function z(){const D=h(),H=l.previous,L=l.currentConstruct,I=l.events.length,j=Array.from(s);return{restore:F,from:I};function F(){n=D,l.previous=H,l.currentConstruct=L,l.events.length=I,s=j,O()}}function O(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function xD(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function SD(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
30
|
+
<%s key={someKey} {...props} />`,ug,ca,Yde,ca),Ur[ca+ug]=!0}}return T===n?Vt(Mt):Qt(Mt),Mt}}function Ni(T,te,ye){return zr(T,te,ye,!0)}function Zde(T,te,ye){return zr(T,te,ye,!1)}var Kde=Zde,Gde=Ni;$o.Fragment=n,$o.jsx=Kde,$o.jsxs=Gde}()),$o}process.env.NODE_ENV==="production"?Bf.exports=nR():Bf.exports=iR();var C=Bf.exports;function aR(e,t=[]){let r=[];function n(a,o){const s=x.createContext(o),l=r.length;r=[...r,o];function u(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][l])||s,g=x.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:g,children:p})}function c(f,d){const p=(d==null?void 0:d[e][l])||s,h=x.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,c]}const i=()=>{const a=r.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,oR(i,...t)]}function oR(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function ti(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var fa=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function sR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tg(...e){return t=>e.forEach(r=>sR(r,t))}function ri(...e){return x.useCallback(Tg(...e),e)}var Uf=x.forwardRef((e,t)=>{const{children:r,...n}=e,i=x.Children.toArray(r),a=i.find(uR);if(a){const o=a.props.children,s=i.map(l=>l===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return C.jsx(zf,{...n,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return C.jsx(zf,{...n,ref:t,children:r})});Uf.displayName="Slot";var zf=x.forwardRef((e,t)=>{const{children:r,...n}=e;if(x.isValidElement(r)){const i=fR(r);return x.cloneElement(r,{...cR(n,r.props),ref:t?Tg(t,i):i})}return x.Children.count(r)>1?x.Children.only(null):null});zf.displayName="SlotClone";var lR=({children:e})=>C.jsx(C.Fragment,{children:e});function uR(e){return x.isValidElement(e)&&e.type===lR}function cR(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{a(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function fR(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var dR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dr=dR.reduce((e,t)=>{const r=x.forwardRef((n,i)=>{const{asChild:a,...o}=n,s=a?Uf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pR(e,t){e&&vg.flushSync(()=>e.dispatchEvent(t))}var Wf="Avatar",[hR,rpe]=aR(Wf),[mR,Cg]=hR(Wf),Hf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=x.useState("idle");return C.jsx(mR,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:C.jsx(dr.span,{...n,ref:t})})});Hf.displayName=Wf;var Ig="AvatarImage",Vf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,o=Cg(Ig,r),s=vR(n),l=ti(u=>{i(u),o.onImageLoadingStatusChange(u)});return fa(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(dr.img,{...a,ref:t,src:n}):null});Vf.displayName=Ig;var Rg="AvatarFallback",qf=x.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=Cg(Rg,r),[o,s]=x.useState(n===void 0);return x.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),o&&a.imageLoadingStatus!=="loaded"?C.jsx(dr.span,{...i,ref:t}):null});qf.displayName=Rg;function vR(e){const[t,r]=x.useState("idle");return fa(()=>{if(!e){r("error");return}let n=!0;const i=new window.Image,a=o=>()=>{n&&r(o)};return r("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{n=!1}},[e]),t}function Zf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(l=>l+l).join(""));const i=parseInt(n,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function yR(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const gR=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function Ag(e){return Object.entries(e).reduce((t,[r,n])=>{const i=r.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:n}},{})}const bR=2.4,wR=.2126729,xR=.7151522,SR=.072175,ER=.56,_R=.57,kR=.62,$R=.65,El=.022,Pg=1.414,OR=1.14,TR=1.14,CR=.035991,IR=.035991,RR=27.7847239587675,AR=27.7847239587675,Ng=.027,Dg=.027,jg=.001,PR=5e-4;function Mg(e){const{r:t,g:r,b:n}=e,i=a=>(a/255)**bR;return wR*i(t)+xR*i(r)+SR*i(n)}function Lg(e,t){if(!e||!t)return 0;let r=Mg(Zf(e)),n=Mg(Zf(t)),i=0,a=0;return r=r>El?r:r+(El-r)**Pg,n=n>El?n:n+(El-n)**Pg,Math.abs(n-r)<PR?0:(n>r?(i=(n**ER-r**_R)*OR,a=i<jg?0:i<CR?i-i*RR*Ng:i-Ng):(i=(n**$R-r**kR)*TR,a=i>-jg?0:i>-IR?i-i*AR*Dg:i+Dg),Math.abs(a*100))}let Fg=class{constructor(){Ee(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var i;(i=this.eventMap[t])==null||i.delete(r)}}emit(t,r){var n,i;(n=this.eventMap[t])==null||n.forEach(a=>{a(r)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:r})})}};const NR=new Fg;function Bg(e,t){let r=`${e} {`;for(const[n,i]of Object.entries(t))r+=`${n}: ${i}; `;return r+="}",r}function Ug(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);r=(r<<5)-r+i,r=r&r}return Math.abs(r)%t}var zg={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",c="week",f="month",d="quarter",p="year",h="date",m="Invalid Date",g=/^(\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,y={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(W){var M=["th","st","nd","rd"],I=W%100;return"["+W+(M[(I-20)%10]||M[I]||M[0])+"]"}},b=function(W,M,I){var V=String(W);return!V||V.length>=M?W:""+Array(M+1-V.length).join(I)+W},k={s:b,z:function(W){var M=-W.utcOffset(),I=Math.abs(M),V=Math.floor(I/60),U=I%60;return(M<=0?"+":"-")+b(V,2,"0")+":"+b(U,2,"0")},m:function W(M,I){if(M.date()<I.date())return-W(I,M);var V=12*(I.year()-M.year())+(I.month()-M.month()),U=M.clone().add(V,f),A=I-U<0,w=M.clone().add(V+(A?-1:1),f);return+(-(V+(I-U)/(A?U-w:w-U))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:f,y:p,w:c,d:u,D:h,h:l,m:s,s:o,ms:a,Q:d}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},S="en",_={};_[S]=y;var $="$isDayjsObject",N=function(W){return W instanceof H||!(!W||!W[$])},z=function W(M,I,V){var U;if(!M)return S;if(typeof M=="string"){var A=M.toLowerCase();_[A]&&(U=A),I&&(_[A]=I,U=A);var w=M.split("-");if(!U&&w.length>1)return W(w[0])}else{var F=M.name;_[F]=M,U=F}return!V&&U&&(S=U),U||!V&&S},O=function(W,M){if(N(W))return W.clone();var I=typeof M=="object"?M:{};return I.date=W,I.args=arguments,new H(I)},D=k;D.l=z,D.i=N,D.w=function(W,M){return O(W,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var H=function(){function W(I){this.$L=z(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[$]=!0}var M=W.prototype;return M.parse=function(I){this.$d=function(V){var U=V.date,A=V.utc;if(U===null)return new Date(NaN);if(D.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var w=U.match(g);if(w){var F=w[2]-1||0,Z=(w[7]||"0").substring(0,3);return A?new Date(Date.UTC(w[1],F,w[3]||1,w[4]||0,w[5]||0,w[6]||0,Z)):new Date(w[1],F,w[3]||1,w[4]||0,w[5]||0,w[6]||0,Z)}}return new Date(U)}(I),this.init()},M.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(I,V){var U=O(I);return this.startOf(V)<=U&&U<=this.endOf(V)},M.isAfter=function(I,V){return O(I)<this.startOf(V)},M.isBefore=function(I,V){return this.endOf(V)<O(I)},M.$g=function(I,V,U){return D.u(I)?this[V]:this.set(U,I)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(I,V){var U=this,A=!!D.u(V)||V,w=D.p(I),F=function(he,ue){var Q=D.w(U.$u?Date.UTC(U.$y,ue,he):new Date(U.$y,ue,he),U);return A?Q:Q.endOf(u)},Z=function(he,ue){return D.w(U.toDate()[he].apply(U.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ue)),U)},E=this.$W,Y=this.$M,oe=this.$D,re="set"+(this.$u?"UTC":"");switch(w){case p:return A?F(1,0):F(31,11);case f:return A?F(1,Y):F(0,Y+1);case c:var le=this.$locale().weekStart||0,pe=(E<le?E+7:E)-le;return F(A?oe-pe:oe+(6-pe),Y);case u:case h:return Z(re+"Hours",0);case l:return Z(re+"Minutes",1);case s:return Z(re+"Seconds",2);case o:return Z(re+"Milliseconds",3);default:return this.clone()}},M.endOf=function(I){return this.startOf(I,!1)},M.$set=function(I,V){var U,A=D.p(I),w="set"+(this.$u?"UTC":""),F=(U={},U[u]=w+"Date",U[h]=w+"Date",U[f]=w+"Month",U[p]=w+"FullYear",U[l]=w+"Hours",U[s]=w+"Minutes",U[o]=w+"Seconds",U[a]=w+"Milliseconds",U)[A],Z=A===u?this.$D+(V-this.$W):V;if(A===f||A===p){var E=this.clone().set(h,1);E.$d[F](Z),E.init(),this.$d=E.set(h,Math.min(this.$D,E.daysInMonth())).$d}else F&&this.$d[F](Z);return this.init(),this},M.set=function(I,V){return this.clone().$set(I,V)},M.get=function(I){return this[D.p(I)]()},M.add=function(I,V){var U,A=this;I=Number(I);var w=D.p(V),F=function(Y){var oe=O(A);return D.w(oe.date(oe.date()+Math.round(Y*I)),A)};if(w===f)return this.set(f,this.$M+I);if(w===p)return this.set(p,this.$y+I);if(w===u)return F(1);if(w===c)return F(7);var Z=(U={},U[s]=n,U[l]=i,U[o]=r,U)[w]||1,E=this.$d.getTime()+I*Z;return D.w(E,this)},M.subtract=function(I,V){return this.add(-1*I,V)},M.format=function(I){var V=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var A=I||"YYYY-MM-DDTHH:mm:ssZ",w=D.z(this),F=this.$H,Z=this.$m,E=this.$M,Y=U.weekdays,oe=U.months,re=U.meridiem,le=function(ue,Q,K,de){return ue&&(ue[Q]||ue(V,A))||K[Q].slice(0,de)},pe=function(ue){return D.s(F%12||12,ue,"0")},he=re||function(ue,Q,K){var de=ue<12?"AM":"PM";return K?de.toLowerCase():de};return A.replace(v,function(ue,Q){return Q||function(K){switch(K){case"YY":return String(V.$y).slice(-2);case"YYYY":return D.s(V.$y,4,"0");case"M":return E+1;case"MM":return D.s(E+1,2,"0");case"MMM":return le(U.monthsShort,E,oe,3);case"MMMM":return le(oe,E);case"D":return V.$D;case"DD":return D.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return le(U.weekdaysMin,V.$W,Y,2);case"ddd":return le(U.weekdaysShort,V.$W,Y,3);case"dddd":return Y[V.$W];case"H":return String(F);case"HH":return D.s(F,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(F,Z,!0);case"A":return he(F,Z,!1);case"m":return String(Z);case"mm":return D.s(Z,2,"0");case"s":return String(V.$s);case"ss":return D.s(V.$s,2,"0");case"SSS":return D.s(V.$ms,3,"0");case"Z":return w}return null}(ue)||w.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(I,V,U){var A,w=this,F=D.p(V),Z=O(I),E=(Z.utcOffset()-this.utcOffset())*n,Y=this-Z,oe=function(){return D.m(w,Z)};switch(F){case p:A=oe()/12;break;case f:A=oe();break;case d:A=oe()/3;break;case c:A=(Y-E)/6048e5;break;case u:A=(Y-E)/864e5;break;case l:A=Y/i;break;case s:A=Y/n;break;case o:A=Y/r;break;default:A=Y}return U?A:D.a(A)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return _[this.$L]},M.locale=function(I,V){if(!I)return this.$L;var U=this.clone(),A=z(I,V,!0);return A&&(U.$L=A),U},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},W}(),L=H.prototype;return O.prototype=L,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",h]].forEach(function(W){L[W[1]]=function(M){return this.$g(M,W[0],W[1])}}),O.extend=function(W,M){return W.$i||(W(M,H,O),W.$i=!0),O},O.locale=z,O.isDayjs=N,O.unix=function(W){return O(1e3*W)},O.en=_[S],O.Ls=_,O.p={},O})})(zg);var DR=zg.exports;const _l=Ze(DR);var Wg={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){return function(r,n,i){n.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Wg);var jR=Wg.exports;const MR=Ze(jR);var Hg={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ct,function(){return function(r,n,i){n.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Hg);var LR=Hg.exports;const FR=Ze(LR);_l.extend(MR),_l.extend(FR);function BR(e,t="day"){var n,i,a;if(!e||e.length===0)return[];const r=[];(n=e[0])!=null&&n.timestamp&&r.push(Vg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&r.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,l=(a=e[o+1])==null?void 0:a.timestamp;!_l(s).isSame(l,t)&&l&&r.push(Vg(l))}return r}function Vg(e){return{id:So(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:UR(e)}}}function UR(e,t=!1){const r=_l(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.format("YYYY-MM-DD")}function zR(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(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));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 HR(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function VR(e,t){return e.map(r=>Math.round(r*t))}const Oo=e=>t=>HR(t,e),To=e=>t=>VR(t,e),qR={50:Oo(.95),100:Oo(.9),200:Oo(.75),300:Oo(.6),400:Oo(.3),500:e=>e,600:To(.9),700:To(.6),800:To(.45),900:To(.3),950:To(.2)};function qg(e,t=qR){const r={},n=zR(e);for(const[i,a]of Object.entries(t))r[i]=WR(a(n));return r}var ot;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,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 n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ot||(ot={}));var Kf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Kf||(Kf={}));const ge=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ni=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=ot.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"]),ZR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Hr=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},n={_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)n._errors.push(r(o));else{let s=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Hr.create=e=>new Hr(e);const Co=(e,t)=>{let r;switch(e.code){case se.invalid_type:e.received===ge.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:r=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case se.invalid_union:r="Invalid input";break;case se.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case se.invalid_enum_value:r=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:r="Invalid function arguments";break;case se.invalid_return_type:r="Invalid function return type";break;case se.invalid_date:r="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case se.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case se.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case se.custom:r="Invalid input";break;case se.invalid_intersection_types:r="Intersection results could not be merged";break;case se.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:r="Number must be finite";break;default:r=t.defaultError,ot.assertNever(e)}return{message:r}};let Zg=Co;function KR(e){Zg=e}function kl(){return Zg}const $l=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};let s="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},GR=[];function we(e,t){const r=$l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,kl(),Co].filter(n=>!!n)});e.common.issues.push(r)}let pr=class UI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return Fe;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r)n.push({key:await i.key,value:await i.value});return UI.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}};const Fe=Object.freeze({status:"aborted"}),Kg=e=>({status:"dirty",value:e}),sr=e=>({status:"valid",value:e}),Gf=e=>e.status==="aborted",Yf=e=>e.status==="dirty",Io=e=>e.status==="valid",Ol=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));let fn=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 Gg=(e,t)=>{if(Io(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 r=new Hr(e.common.issues);return this._error=r,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))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:n??s.defaultError}:{message:r??s.defaultError},description:i}}let He=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 ni(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ni(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pr,ctx:{common:t.parent.common,data:t.data,parsedType:ni(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Ol(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ni(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Gg(i,a)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ni(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(Ol(i)?i:Promise.resolve(i));return Gg(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Vr({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ln.create(this,this._def)}nullable(){return Li.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return ma.create(this,this._def)}or(t){return Mo.create([this,t],this._def)}and(t){return Lo.create(this,t,this._def)}transform(t){return new Vr({...Ue(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Wo({...Ue(this._def),innerType:this,defaultValue:r,typeName:Ne.ZodDefault})}brand(){return new eb({typeName:Ne.ZodBranded,type:this,...Ue(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Pl({...Ue(this._def),innerType:this,catchValue:r,typeName:Ne.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Qf.create(this,t)}readonly(){return Dl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const YR=/^c[^\s-]{8,}$/i,JR=/^[a-z][a-z0-9]*$/,XR=/^[0-9A-HJKMNP-TV-Z]{26}$/,QR=/^[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,eA=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Jf;const rA=/^(((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}))$/,nA=/^(([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})))$/,iA=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 aA(e,t){return!!((t==="v4"||!t)&&rA.test(e)||(t==="v6"||!t)&&nA.test(e))}let da=class xl extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Fe}const n=new pr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.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?we(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&we(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")eA.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"email",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Jf||(Jf=new RegExp(tA,"u")),Jf.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"emoji",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")QR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"uuid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")YR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")JR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")XR.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ulid",code:se.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),we(i,{validation:"url",code:se.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"regex",code:se.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.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),we(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?iA(a).test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:se.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="ip"?aA(t.data,a.version)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ip",code:se.invalid_string,message:a.message}),n.dirty()):ot.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:se.invalid_string,...Te.errToObj(n)})}_addCheck(t){return new xl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var r;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Te.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Te.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Te.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Te.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Te.errToObj(r)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new xl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xl({...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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};da.create=e=>{var t;return new da({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};function oA(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let Ro=class cg extends He{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)!==ge.number){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Fe}let n;const i=new pr;for(const a of this._def.checks)a.kind==="int"?ot.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.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)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?oA(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_finite,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,i){return new cg({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(i)}]})}_addCheck(t){return new cg({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ro.create=e=>new Ro({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});let Ao=class fg extends He{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)!==ge.bigint){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Fe}let n;const i=new pr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.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)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),we(n,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,i){return new fg({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(i)}]})}_addCheck(t){return new fg({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Ao.create=e=>{var t;return new Ao({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};let Po=class extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.boolean,received:n.parsedType}),Fe}return sr(t.data)}};Po.create=e=>new Po({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});let No=class zI extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Fe}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return we(a,{code:se.invalid_date}),Fe}const n=new pr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):ot.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zI({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};No.create=e=>new No({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Ue(e)});let Tl=class extends He{_parse(t){if(this._getType(t)!==ge.symbol){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.symbol,received:n.parsedType}),Fe}return sr(t.data)}};Tl.create=e=>new Tl({typeName:Ne.ZodSymbol,...Ue(e)});let Do=class extends He{_parse(t){if(this._getType(t)!==ge.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.undefined,received:n.parsedType}),Fe}return sr(t.data)}};Do.create=e=>new Do({typeName:Ne.ZodUndefined,...Ue(e)});let jo=class extends He{_parse(t){if(this._getType(t)!==ge.null){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.null,received:n.parsedType}),Fe}return sr(t.data)}};jo.create=e=>new jo({typeName:Ne.ZodNull,...Ue(e)});let pa=class extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return sr(t.data)}};pa.create=e=>new pa({typeName:Ne.ZodAny,...Ue(e)});let ji=class extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sr(t.data)}};ji.create=e=>new ji({typeName:Ne.ZodUnknown,...Ue(e)});let Mn=class extends He{_parse(t){const r=this._getOrReturnCtx(t);return we(r,{code:se.invalid_type,expected:ge.never,received:r.parsedType}),Fe}};Mn.create=e=>new Mn({typeName:Ne.ZodNever,...Ue(e)});let Cl=class extends He{_parse(t){if(this._getType(t)!==ge.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.void,received:n.parsedType}),Fe}return sr(t.data)}};Cl.create=e=>new Cl({typeName:Ne.ZodVoid,...Ue(e)});let Mi=class Lf extends He{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==ge.array)return we(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Fe;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(we(r,{code:o?se.too_big:se.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}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(we(r,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(we(r,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new fn(r,o,r.path,s)))).then(o=>pr.mergeArray(n,o));const a=[...r.data].map((o,s)=>i.type._parseSync(new fn(r,o,r.path,s)));return pr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Lf({...this._def,minLength:{value:t,message:Te.toString(r)}})}max(t,r){return new Lf({...this._def,maxLength:{value:t,message:Te.toString(r)}})}length(t,r){return new Lf({...this._def,exactLength:{value:t,message:Te.toString(r)}})}nonempty(t){return this.min(1,t)}};Mi.create=(e,t)=>new Mi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Ue(t)});function ha(e){if(e instanceof Rr){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ln.create(ha(n))}return new Rr({...e._def,shape:()=>t})}else return e instanceof Mi?new Mi({...e._def,type:ha(e.element)}):e instanceof Ln?Ln.create(ha(e.unwrap())):e instanceof Li?Li.create(ha(e.unwrap())):e instanceof ii?ii.create(e.items.map(t=>ha(t))):e}let Rr=class cn extends He{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(),r=ot.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ge.object){const u=this._getOrReturnCtx(t);return we(u,{code:se.invalid_type,expected:ge.object,received:u.parsedType}),Fe}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Mn&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const c=a[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new fn(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Mn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(we(i,{code:se.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new fn(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key;u.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>pr.mergeObjectSync(n,u)):pr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new cn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new cn({...this._def,unknownKeys:"strip"})}passthrough(){return new cn({...this._def,unknownKeys:"passthrough"})}extend(t){return new cn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new cn({...this._def,catchall:t})}pick(t){const r={};return ot.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}omit(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}deepPartial(){return ha(this)}partial(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new cn({...this._def,shape:()=>r})}required(t){const r={};return ot.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Ln;)a=a._def.innerType;r[n]=a}}),new cn({...this._def,shape:()=>r})}keyof(){return Qg(ot.objectKeys(this.shape))}};Rr.create=(e,t)=>new Rr({shape:()=>e,unknownKeys:"strip",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)}),Rr.strictCreate=(e,t)=>new Rr({shape:()=>e,unknownKeys:"strict",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)}),Rr.lazycreate=(e,t)=>new Rr({shape:e,unknownKeys:"strip",catchall:Mn.create(),typeName:Ne.ZodObject,...Ue(t)});let Mo=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=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 r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Hr(s.ctx.common.issues));return we(r,{code:se.invalid_union,unionErrors:o}),Fe}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new Hr(l));return we(r,{code:se.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}};Mo.create=(e,t)=>new Mo({options:e,typeName:Ne.ZodUnion,...Ue(t)});const Il=e=>e instanceof Fo?Il(e.schema):e instanceof Vr?Il(e.innerType()):e instanceof Bo?[e.value]:e instanceof Uo?e.options:e instanceof zo?Object.keys(e.enum):e instanceof Wo?Il(e._def.innerType):e instanceof Do?[void 0]:e instanceof jo?[null]:null;let Yg=class WI extends He{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return we(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Fe;const n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(we(r,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Fe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const a of r){const o=Il(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 WI({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...Ue(n)})}};function Xf(e,t){const r=ni(e),n=ni(t);if(e===t)return{valid:!0,data:e};if(r===ge.object&&n===ge.object){const i=ot.objectKeys(t),a=ot.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=Xf(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(r===ge.array&&n===ge.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],l=Xf(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===ge.date&&n===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Lo=class extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(Gf(a)||Gf(o))return Fe;const s=Xf(a.value,o.value);return s.valid?((Yf(a)||Yf(o))&&r.dirty(),{status:r.value,value:s.data}):(we(n,{code:se.invalid_intersection_types}),Fe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Lo.create=(e,t,r)=>new Lo({left:e,right:t,typeName:Ne.ZodIntersection,...Ue(r)});let ii=class HI extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.array)return we(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Fe;if(n.data.length<this._def.items.length)return we(n,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&n.data.length>this._def.items.length&&(we(n,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new fn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>pr.mergeArray(r,o)):pr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new HI({...this._def,rest:t})}};ii.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ii({items:e,typeName:Ne.ZodTuple,rest:null,...Ue(t)})};let Jg=class dg extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return we(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Fe;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new fn(n,s,n.path,s)),value:o._parse(new fn(n,n.data[s],n.path,s))});return n.common.async?pr.mergeObjectAsync(r,i):pr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof He?new dg({keyType:t,valueType:r,typeName:Ne.ZodRecord,...Ue(n)}):new dg({keyType:da.create(),valueType:t,typeName:Ne.ZodRecord,...Ue(r)})}},Rl=class extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.map)return we(n,{code:se.invalid_type,expected:ge.map,received:n.parsedType}),Fe;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,l],u)=>({key:i._parse(new fn(n,s,n.path,[u,"key"])),value:a._parse(new fn(n,l,n.path,[u,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Fe;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Fe;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}}}};Rl.create=(e,t,r)=>new Rl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Ue(r)});let Al=class pg extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.set)return we(n,{code:se.invalid_type,expected:ge.set,received:n.parsedType}),Fe;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(we(n,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(we(n,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Fe;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}const s=[...n.data.values()].map((l,u)=>a._parse(new fn(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,r){return new pg({...this._def,minSize:{value:t,message:Te.toString(r)}})}max(t,r){return new pg({...this._def,maxSize:{value:t,message:Te.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Al.create=(e,t)=>new Al({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Ue(t)});let Xg=class Ff extends He{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.function)return we(r,{code:se.invalid_type,expected:ge.function,received:r.parsedType}),Fe;function n(s,l){return $l({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kl(),Co].filter(u=>!!u),issueData:{code:se.invalid_arguments,argumentsError:l}})}function i(s,l){return $l({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kl(),Co].filter(u=>!!u),issueData:{code:se.invalid_return_type,returnTypeError:l}})}const a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ma){const s=this;return sr(async function(...l){const u=new Hr([]),c=await s._def.args.parseAsync(l,a).catch(p=>{throw u.addIssue(n(l,p)),u}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw u.addIssue(i(f,p)),u})})}else{const s=this;return sr(function(...l){const u=s._def.args.safeParse(l,a);if(!u.success)throw new Hr([n(l,u.error)]);const c=Reflect.apply(o,this,u.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Hr([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ff({...this._def,args:ii.create(t).rest(ji.create())})}returns(t){return new Ff({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ff({args:t||ii.create([]).rest(ji.create()),returns:r||ji.create(),typeName:Ne.ZodFunction,...Ue(n)})}},Fo=class extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Fo.create=(e,t)=>new Fo({getter:e,typeName:Ne.ZodLazy,...Ue(t)});let Bo=class extends He{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:se.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}};Bo.create=(e,t)=>new Bo({value:e,typeName:Ne.ZodLiteral,...Ue(t)});function Qg(e,t){return new Uo({values:e,typeName:Ne.ZodEnum,...Ue(t)})}let Uo=class hg extends He{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{expected:ot.joinValues(n),received:r.parsedType,code:se.invalid_type}),Fe}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{received:r.data,code:se.invalid_enum_value,options:n}),Fe}return sr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return hg.create(t)}exclude(t){return hg.create(this.options.filter(r=>!t.includes(r)))}};Uo.create=Qg;let zo=class extends He{_parse(t){const r=ot.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ge.string&&n.parsedType!==ge.number){const i=ot.objectValues(r);return we(n,{expected:ot.joinValues(i),received:n.parsedType,code:se.invalid_type}),Fe}if(r.indexOf(t.data)===-1){const i=ot.objectValues(r);return we(n,{received:n.data,code:se.invalid_enum_value,options:i}),Fe}return sr(t.data)}get enum(){return this._def.values}};zo.create=(e,t)=>new zo({values:e,typeName:Ne.ZodNativeEnum,...Ue(t)});let ma=class extends He{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.promise&&r.common.async===!1)return we(r,{code:se.invalid_type,expected:ge.promise,received:r.parsedType}),Fe;const n=r.parsedType===ge.promise?r.data:Promise.resolve(r.data);return sr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ma.create=(e,t)=>new ma({type:e,typeName:Ne.ZodPromise,...Ue(t)});let Vr=class extends He{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:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{we(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Fe:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Io(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:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Io(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):o);ot.assertNever(i)}};Vr.create=(e,t,r)=>new Vr({schema:e,typeName:Ne.ZodEffects,effect:t,...Ue(r)}),Vr.createWithPreprocess=(e,t,r)=>new Vr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Ue(r)});let Ln=class extends He{_parse(t){return this._getType(t)===ge.undefined?sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ln.create=(e,t)=>new Ln({innerType:e,typeName:Ne.ZodOptional,...Ue(t)});let Li=class extends He{_parse(t){return this._getType(t)===ge.null?sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Li.create=(e,t)=>new Li({innerType:e,typeName:Ne.ZodNullable,...Ue(t)});let Wo=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ge.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Wo.create=(e,t)=>new Wo({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});let Pl=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ol(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Hr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Hr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Pl.create=(e,t)=>new Pl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});let Nl=class extends He{_parse(t){if(this._getType(t)!==ge.nan){const n=this._getOrReturnCtx(t);return we(n,{code:se.invalid_type,expected:ge.nan,received:n.parsedType}),Fe}return{status:"valid",value:t.data}}};Nl.create=e=>new Nl({typeName:Ne.ZodNaN,...Ue(e)});const sA=Symbol("zod_brand");let eb=class extends He{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Qf=class VI extends He{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Fe:a.status==="dirty"?(r.dirty(),Kg(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Fe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new VI({in:t,out:r,typeName:Ne.ZodPipeline})}},Dl=class extends He{_parse(t){const r=this._def.innerType._parse(t);return Io(r)&&(r.value=Object.freeze(r.value)),r}};Dl.create=(e,t)=>new Dl({innerType:e,typeName:Ne.ZodReadonly,...Ue(t)});const tb=(e,t={},r)=>e?pa.create().superRefine((n,i)=>{var a,o;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&o!==void 0?o:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):pa.create(),lA={object:Rr.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 uA=(e,t={message:`Input not instance of ${e.name}`})=>tb(r=>r instanceof e,t),rb=da.create,nb=Ro.create,cA=Nl.create,fA=Ao.create,ib=Po.create,dA=No.create,pA=Tl.create,hA=Do.create,mA=jo.create,vA=pa.create,yA=ji.create,gA=Mn.create,bA=Cl.create,wA=Mi.create,xA=Rr.create,SA=Rr.strictCreate,EA=Mo.create,_A=Yg.create,kA=Lo.create,$A=ii.create,OA=Jg.create,TA=Rl.create,CA=Al.create,IA=Xg.create,RA=Fo.create,AA=Bo.create,PA=Uo.create,NA=zo.create,DA=ma.create,ab=Vr.create,jA=Ln.create,MA=Li.create,LA=Vr.createWithPreprocess,FA=Qf.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:Co,setErrorMap:KR,getErrorMap:kl,makeIssue:$l,EMPTY_PATH:GR,addIssueToContext:we,ParseStatus:pr,INVALID:Fe,DIRTY:Kg,OK:sr,isAborted:Gf,isDirty:Yf,isValid:Io,isAsync:Ol,get util(){return ot},get objectUtil(){return Kf},ZodParsedType:ge,getParsedType:ni,ZodType:He,ZodString:da,ZodNumber:Ro,ZodBigInt:Ao,ZodBoolean:Po,ZodDate:No,ZodSymbol:Tl,ZodUndefined:Do,ZodNull:jo,ZodAny:pa,ZodUnknown:ji,ZodNever:Mn,ZodVoid:Cl,ZodArray:Mi,ZodObject:Rr,ZodUnion:Mo,ZodDiscriminatedUnion:Yg,ZodIntersection:Lo,ZodTuple:ii,ZodRecord:Jg,ZodMap:Rl,ZodSet:Al,ZodFunction:Xg,ZodLazy:Fo,ZodLiteral:Bo,ZodEnum:Uo,ZodNativeEnum:zo,ZodPromise:ma,ZodEffects:Vr,ZodTransformer:Vr,ZodOptional:Ln,ZodNullable:Li,ZodDefault:Wo,ZodCatch:Pl,ZodNaN:Nl,BRAND:sA,ZodBranded:eb,ZodPipeline:Qf,ZodReadonly:Dl,custom:tb,Schema:He,ZodSchema:He,late:lA,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>da.create({...e,coerce:!0}),number:e=>Ro.create({...e,coerce:!0}),boolean:e=>Po.create({...e,coerce:!0}),bigint:e=>Ao.create({...e,coerce:!0}),date:e=>No.create({...e,coerce:!0})},any:vA,array:wA,bigint:fA,boolean:ib,date:dA,discriminatedUnion:_A,effect:ab,enum:PA,function:IA,instanceof:uA,intersection:kA,lazy:RA,literal:AA,map:TA,nan:cA,nativeEnum:NA,never:gA,null:mA,nullable:MA,number:nb,object:xA,oboolean:()=>ib().optional(),onumber:()=>nb().optional(),optional:jA,ostring:()=>rb().optional(),pipeline:FA,preprocess:LA,promise:DA,record:OA,set:CA,strictObject:SA,string:rb,symbol:pA,transformer:ab,tuple:$A,undefined:hA,union:EA,unknown:yA,void:bA,NEVER:Fe,ZodIssueCode:se,quotelessJson:ZR,ZodError:Hr});const va=Se.object({title:Se.string().optional(),link:Se.string().optional()}),ed=Se.object({color:Se.string().optional(),variant:Se.enum(["soft","solid"]).optional(),themeMode:Se.enum(["light","dark"]).optional(),fontFamily:Se.enum(["rubik","inter","ibm","fira"]).optional(),radius:Se.number().min(.5).max(4).optional()}),ob=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:va.optional(),email:va.optional(),phone:va.optional(),privacyPolicy:va.optional(),termsOfService:va.optional(),showPoweredBy:Se.boolean().optional()}).merge(ed),sb=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),lb=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:lb.optional()}),jl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),ub=Se.object({button:fe.optional(),text:Se.record(sb,fe.optional()),image:Se.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:Se.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:Se.object({button:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:Se.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),cb=Se.object({container:fe.optional(),modal:Se.object({overlay:fe.optional(),container:fe.optional(),dialog:Se.object({container:fe.optional(),title:Se.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:Se.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:Se.object({container:fe.optional(),content:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:jl.optional(),actions:Se.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:Se.object({container:fe.optional(),group:fe.optional(),descriptionItems:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:Se.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:Se.object({container:fe.optional(),input:fe.optional(),uploadButton:Se.object({container:fe.optional(),icon:fe.optional()}).optional(),button:Se.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:Se.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:Se.object({scrollbar:Se.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:Se.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:jl.optional(),container:fe.optional()}).optional(),scrollDownButton:Se.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:Se.object({container:fe.optional(),avatar:jl.optional(),blocks:ub.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),fb=Se.enum(["opened","closed","initial"]),db=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),pb=Se.object({configuration:ob.optional().catch(void 0),theme:cb.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:db.optional().catch(void 0)}),BA=pb.extend({clientId:Se.string(),botId:Se.string(),selector:Se.string().optional().catch(void 0),webchatScriptUrl:Se.string().optional().catch(void 0),fabScriptUrl:Se.string().optional().catch(void 0),pushpinUrl:Se.string().optional().catch(void 0),defaultState:fb.optional().catch(void 0)});function hb(e){const{fontFamily:t,radius:r,themeMode:n,variant:i,color:a}=ed.parse(e);let o={},s={};if(a){const c=qg(a),f=n==="dark"?Ag(c):c,d=qg(yR(gR(Zf(a)))),p=n==="dark"?Ag(d):d,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((g,[v,y])=>({...g,[`--bpPrimary-${v}`]:y}),{});const m=Object.entries({...p,1:h}).reduce((g,[v,y])=>({...g,[`--bpGray-${v}`]:y}),{});o={...s,...m}}r&&(o={...o,"--bpRadius-scale":r.toString()});const l=s?Lg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",u=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":l,"--header-description":l,"--header-description-icon":l,"--header-description-link":l,"--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":l,"--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":l}:{"--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,...u},Bg(":root",o)+(t?Bg(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const td=j.forwardRef(({userId:e,src:t,container:r,image:n,fallback:i,...a},o)=>{const s=Ug(e??"",15);return C.jsxs(Hf,{ref:o,"data-color":s,...r,...a,children:[C.jsx(Vf,{src:t,...n}),C.jsx(qf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});function lpe(){}function upe(){}function UA(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const zA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HA={};function mb(e,t){return(HA.jsx?WA:zA).test(e)}const VA=/[ \t\n\f\r]/g;function qA(e){return typeof e=="object"?e.type==="text"?vb(e.value):!1:vb(e)}function vb(e){return e.replace(VA,"")===""}class Ho{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Ho.prototype.property={},Ho.prototype.normal={},Ho.prototype.space=null;function yb(e,t){const r={},n={};let i=-1;for(;++i<e.length;)Object.assign(r,e[i].property),Object.assign(n,e[i].normal);return new Ho(r,n,t)}function rd(e){return e.toLowerCase()}class Ar{constructor(t,r){this.property=t,this.attribute=r}}Ar.prototype.space=null,Ar.prototype.boolean=!1,Ar.prototype.booleanish=!1,Ar.prototype.overloadedBoolean=!1,Ar.prototype.number=!1,Ar.prototype.commaSeparated=!1,Ar.prototype.spaceSeparated=!1,Ar.prototype.commaOrSpaceSeparated=!1,Ar.prototype.mustUseProperty=!1,Ar.prototype.defined=!1;let ZA=0;const ze=Fi(),Rt=Fi(),gb=Fi(),ie=Fi(),wt=Fi(),ya=Fi(),Sr=Fi();function Fi(){return 2**++ZA}const nd=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Rt,commaOrSpaceSeparated:Sr,commaSeparated:ya,number:ie,overloadedBoolean:gb,spaceSeparated:wt},Symbol.toStringTag,{value:"Module"})),id=Object.keys(nd);class ad extends Ar{constructor(t,r,n,i){let a=-1;if(super(t,r),bb(this,"space",i),typeof n=="number")for(;++a<id.length;){const o=id[a];bb(this,id[a],(n&nd[o])===nd[o])}}}ad.prototype.defined=!0;function bb(e,t,r){r&&(e[t]=r)}const KA={}.hasOwnProperty;function ga(e){const t={},r={};let n;for(n in e.properties)if(KA.call(e.properties,n)){const i=e.properties[n],a=new ad(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[rd(n)]=n,r[rd(a.attribute)]=n}return new Ho(t,r,e.space)}const wb=ga({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}}),xb=ga({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Sb(e,t){return t in e?e[t]:t}function Eb(e,t){return Sb(e,t.toLowerCase())}const _b=ga({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Eb,properties:{xmlns:null,xmlnsXLink:null}}),kb=ga({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:wt,ariaCurrent:null,ariaDescribedBy:wt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:wt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:wt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wt,ariaLevel:ie,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:wt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:wt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),GA=ga({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Eb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ya,acceptCharset:wt,accessKey:wt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:wt,autoFocus:ze,autoPlay:ze,blocking:wt,capture:null,charSet:null,checked:ze,cite:null,className:wt,cols:ie,colSpan:null,content:null,contentEditable:Rt,controls:ze,controlsList:wt,coords:ie|ya,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:gb,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:wt,height:ie,hidden:ze,high:ie,href:null,hrefLang:null,htmlFor:wt,httpEquiv:wt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:wt,itemRef:wt,itemScope:ze,itemType:wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ie,pattern:null,ping:wt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:wt,required:ze,reversed:ze,rows:ie,rowSpan:ie,sandbox:wt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ie,security:null,unselectable:null}}),YA=ga({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:Sb,properties:{about:Sr,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:wt,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:ya,g2:ya,glyphName:ya,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sr,rev:Sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sr,requiredFeatures:Sr,requiredFonts:Sr,requiredFormats:Sr,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sr,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),JA=/^data[-\w.:]+$/i,$b=/-[a-z]/g,XA=/[A-Z]/g;function QA(e,t){const r=rd(t);let n=t,i=Ar;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&JA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace($b,tP);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!$b.test(a)){let o=a.replace(XA,eP);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ad}return new i(n,t)}function eP(e){return"-"+e.toLowerCase()}function tP(e){return e.charAt(1).toUpperCase()}const rP={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"},nP=yb([xb,wb,_b,kb,GA],"html"),od=yb([xb,wb,_b,kb,YA],"svg");function iP(e){return e.join(" ").trim()}var Ob={},Tb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aP=/\n/g,oP=/^\s*/,sP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lP=/^:\s*/,uP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cP=/^[;\s]*/,fP=/^\s+|\s+$/g,dP=`
|
|
31
|
+
`,Cb="/",Ib="*",Bi="",pP="comment",hP="declaration",mP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(h){var m=h.match(aP);m&&(r+=m.length);var g=h.lastIndexOf(dP);n=~g?h.length-g:n+h.length}function a(){var h={line:r,column:n};return function(m){return m.position=new o(h),u(),m}}function o(h){this.start=h,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+r+":"+n+": "+h);if(m.reason=h,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var g=m[0];return i(g),e=e.slice(g.length),m}}function u(){l(oP)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!(Cb!=e.charAt(0)||Ib!=e.charAt(1))){for(var m=2;Bi!=e.charAt(m)&&(Ib!=e.charAt(m)||Cb!=e.charAt(m+1));)++m;if(m+=2,Bi===e.charAt(m-1))return s("End of comment missing");var g=e.slice(2,m-2);return n+=2,i(g),e=e.slice(m),n+=2,h({type:pP,comment:g})}}function d(){var h=a(),m=l(sP);if(m){if(f(),!l(lP))return s("property missing ':'");var g=l(uP),v=h({type:hP,property:Rb(m[0].replace(Tb,Bi)),value:g?Rb(g[0].replace(Tb,Bi)):Bi});return l(cP),v}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()};function Rb(e){return e?e.replace(fP,Bi):Bi}var vP=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ob,"__esModule",{value:!0});var Ab=Ob.default=gP,yP=vP(mP);function gP(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,yP.default)(e),i=typeof t=="function";return n.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(r=r||{},r[o]=s)}}),r}const bP=Ab.default||Ab,Pb=Nb("end"),sd=Nb("start");function Nb(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function wP(e){const t=sd(e),r=Pb(e);if(t&&r)return{start:t,end:r}}function Vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Db(e.position):"start"in e||"end"in e?Db(e):"line"in e||"column"in e?ld(e):""}function ld(e){return jb(e&&e.line)+":"+jb(e&&e.column)}function Db(e){return ld(e&&e.start)+"-"+ld(e&&e.end)}function jb(e){return e&&typeof e=="number"?e:1}class er extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.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=Vo(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}}er.prototype.file="",er.prototype.name="",er.prototype.reason="",er.prototype.message="",er.prototype.stack="",er.prototype.column=void 0,er.prototype.line=void 0,er.prototype.ancestors=void 0,er.prototype.cause=void 0,er.prototype.fatal=void 0,er.prototype.place=void 0,er.prototype.ruleId=void 0,er.prototype.source=void 0;const ud={}.hasOwnProperty,xP=new Map,SP=/[A-Z]/g,EP=/-([a-z])/g,_P=new Set(["table","tbody","thead","tfoot","tr"]),kP=new Set(["td","th"]),Mb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $P(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=NP(r,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");n=PP(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?od:nP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Lb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Lb(e,t,r){if(t.type==="element")return OP(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return IP(e,t,r);if(t.type==="mdxjsEsm")return CP(e,t);if(t.type==="root")return RP(e,t,r);if(t.type==="text")return AP(e,t)}function OP(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=od,e.schema=i),e.ancestors.push(t);const a=Bb(e,t.tagName,!1),o=DP(e,t);let s=fd(e,t);return _P.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!qA(l):!0})),Fb(e,o,a,t),cd(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function TP(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qo(e,t.position)}function CP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qo(e,t.position)}function IP(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=od,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Bb(e,t.name,!0),o=jP(e,t),s=fd(e,t);return Fb(e,o,a,t),cd(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function RP(e,t,r){const n={};return cd(n,fd(e,t)),e.create(t,e.Fragment,n,r)}function AP(e,t){return t.value}function Fb(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function cd(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function PP(e,t,r){return n;function n(i,a,o,s){const u=Array.isArray(o.children)?r:t;return s?u(a,o,s):u(a,o)}}function NP(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),l=sd(n);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function DP(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&ud.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"&&kP.has(t.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function jP(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else qo(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else qo(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function fd(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:xP;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const s=Lb(e,a,o);s!==void 0&&r.push(s)}return r}function MP(e,t,r){const n=QA(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?UA(r):iP(r)),n.property==="style"){let i=typeof r=="object"?r:LP(e,String(r));return e.stylePropertyNameCase==="css"&&(i=FP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?rP[n.property]||n.property:n.attribute,r]}}function LP(e,t){const r={};try{bP(t,n)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new er("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=Mb+"#cannot-parse-style-attribute",o}}return r;function n(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(EP,UP)),r[o]=a}}function Bb(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=mb(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}n=o}else n=mb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return ud.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);qo(e)}function qo(e,t){const r=new er("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Mb+"#cannot-handle-mdx-estrees-without-createevaluater",r}function FP(e){const t={};let r;for(r in e)ud.call(e,r)&&(t[BP(r)]=e[r]);return t}function BP(e){let t=e.replace(SP,zP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function UP(e,t){return t.toUpperCase()}function zP(e){return"-"+e.toLowerCase()}const dd={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"]},WP={};function pd(e,t){const r=WP,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ub(e,n,i)}function Ub(e,t,r){if(HP(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zb(e.children,t,r)}return Array.isArray(e)?zb(e,t,r):""}function zb(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=Ub(e[i],t,r);return n.join("")}function HP(e){return!!(e&&typeof e=="object")}const Wb=document.createElement("i");function hd(e){const t="&"+e+";";Wb.innerHTML=t;const r=Wb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Pr(e,t,r,n){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Nr(e,t){return e.length>0?(Pr(e,e.length,0,t),e):t}const Hb={}.hasOwnProperty;function Vb(e){const t={};let r=-1;for(;++r<e.length;)VP(t,e[r]);return t}function VP(e,t){let r;for(r in t){const i=(Hb.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){Hb.call(i,o)||(i[o]=[]);const s=a[o];qP(i[o],Array.isArray(s)?s:s?[s]:[])}}}function qP(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Pr(e,0,0,n)}function qb(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function qr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=ai(/[A-Za-z]/),tr=ai(/[\dA-Za-z]/),ZP=ai(/[#-'*+\--9=?A-Z^-~]/);function Ml(e){return e!==null&&(e<32||e===127)}const md=ai(/\d/),KP=ai(/[\dA-Fa-f]/),GP=ai(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Ll=ai(new RegExp("\\p{P}|\\p{S}","u")),Ui=ai(/\s/);function ai(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ba(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&tr(e.charCodeAt(r+1))&&tr(e.charCodeAt(r+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(r+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(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Qe(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Ke(l)?(e.enter(r),s(l)):t(l)}function s(l){return Ke(l)&&a++<i?(e.consume(l),s):(e.exit(r),t(l))}}const YP={tokenize:JP};function JP(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ie(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const XP={tokenize:QP},Zb={tokenize:eN};function QP(e){const t=this,r=[];let n=0,i,a,o;return s;function s(b){if(n<r.length){const k=r[n];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(b)}return u(b)}function l(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const k=t.events.length;let S=k,_;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){_=t.events[S][1].end;break}v(n);let $=k;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},_),$++;return Pr(t.events,S+1,0,t.events.slice(k)),t.events.length=$,u(b)}return s(b)}function u(b){if(n===r.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zb,c,f)(b)}function c(b){return i&&y(),v(n),d(b)}function f(b){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,h(b)}function d(b){return t.containerState={},e.attempt(Zb,p,h)(b)}function p(b){return n++,r.push([t.currentConstruct,t.containerState]),d(b)}function h(b){if(b===null){i&&y(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),m(b)}function m(b){if(b===null){g(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Ie(b)?(e.consume(b),g(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(b),m)}function g(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(S),t.parser.lazy[b.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 N=$,z,O;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(z){O=t.events[N][1].end;break}z=!0}for(v(n),_=$;_<t.events.length;)t.events[_][1].end=Object.assign({},O),_++;Pr(t.events,N+1,0,t.events.slice($)),t.events.length=_}}function v(b){let k=r.length;for(;k-- >b;){const S=r[k];t.containerState=S[1],S[0].exit.call(t,e)}r.length=b}function y(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function eN(e,t,r){return Qe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||yt(e)||Ui(e))return 1;if(Ll(e))return 2}function Bl(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const vd={name:"attention",tokenize:rN,resolveAll:tN};function tN(e,t){let r=-1,n,i,a,o,s,l,u,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),d=Object.assign({},e[r][1].start);Kb(f,-l),Kb(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:d},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[r][1].start=Object.assign({},s.end),u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Nr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Nr(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=Nr(u,Bl(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=Nr(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,u=Nr(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Pr(e,n-1,r-n+3,u),r=n+u.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function rN(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Fl(n);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const u=e.exit("attentionSequence"),c=Fl(l),f=!c||c===2&&i||r.includes(l),d=!i||i===2&&c||r.includes(n);return u._open=!!(a===42?f:f&&(i||!d)),u._close=!!(a===42?d:d&&(c||!f)),t(l)}}function Kb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nN={name:"autolink",tokenize:iN};function iN(e,t,r){let n=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 lr(p)?(e.consume(p),o):p===64?r(p):u(p)}function o(p){return p===43||p===45||p===46||tr(p)?(n=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||tr(p))&&n++<32?(e.consume(p),s):(n=0,u(p))}function l(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||Ml(p)?r(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):ZP(p)?(e.consume(p),u):r(p)}function c(p){return tr(p)?f(p):r(p)}function f(p){return p===46?(e.consume(p),n=0,c):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||tr(p))&&n++<63){const h=p===45?d:f;return e.consume(p),h}return r(p)}}const Zo={tokenize:aN,partial:!0};function aN(e,t,r){return n;function n(a){return Ke(a)?Qe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):r(a)}}const Gb={name:"blockQuote",tokenize:oN,continuation:{tokenize:sN},exit:lN};function oN(e,t,r){const n=this;return i;function i(o){if(o===62){const s=n.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 r(o)}function a(o){return Ke(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function sN(e,t,r){const n=this;return i;function i(o){return Ke(o)?Qe(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Gb,t,r)(o)}}function lN(e){e.exit("blockQuote")}const Yb={name:"characterEscape",tokenize:uN};function uN(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return GP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const Jb={name:"characterReference",tokenize:cN};function cN(e,t,r){const n=this;let i=0,a,o;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"),a=31,o=tr,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=KP,c):(e.enter("characterReferenceValue"),a=7,o=md,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===tr&&!hd(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):r(f)}}const Xb={tokenize:dN,partial:!0},Qb={name:"codeFenced",tokenize:fN,concrete:!0};function fN(e,t,r){const n=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return l;function l(_){return u(_)}function u(_){const $=n.events[n.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(_)}function c(_){return _===s?(o++,e.consume(_),c):o<3?r(_):(e.exit("codeFencedFenceSequence"),Ke(_)?Qe(e,f,"whitespace")(_):f(_))}function f(_){return _===null||Ie(_)?(e.exit("codeFencedFence"),n.interrupt?t(_):e.check(Xb,m,k)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ke(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,p,"whitespace")(_)):_===96&&_===s?r(_):(e.consume(_),d)}function p(_){return _===null||Ie(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?r(_):(e.consume(_),h)}function m(_){return e.attempt(i,k,g)(_)}function g(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ke(_)?Qe(e,y,"linePrefix",a+1)(_):y(_)}function y(_){return _===null||Ie(_)?e.check(Xb,m,k)(_):(e.enter("codeFlowValue"),b(_))}function b(_){return _===null||Ie(_)?(e.exit("codeFlowValue"),y(_)):(e.consume(_),b)}function k(_){return e.exit("codeFenced"),t(_)}function S(_,$,N){let z=0;return O;function O(M){return _.enter("lineEnding"),_.consume(M),_.exit("lineEnding"),D}function D(M){return _.enter("codeFencedFence"),Ke(M)?Qe(_,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):H(M)}function H(M){return M===s?(_.enter("codeFencedFenceSequence"),L(M)):N(M)}function L(M){return M===s?(z++,_.consume(M),L):z>=o?(_.exit("codeFencedFenceSequence"),Ke(M)?Qe(_,W,"whitespace")(M):W(M)):N(M)}function W(M){return M===null||Ie(M)?(_.exit("codeFencedFence"),$(M)):N(M)}}}function dN(e,t,r){const n=this;return i;function i(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const yd={name:"codeIndented",tokenize:hN},pN={tokenize:mN,partial:!0};function hN(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(u)}function a(u){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):r(u)}function o(u){return u===null?l(u):Ie(u)?e.attempt(pN,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||Ie(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function mN(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Qe(e,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Ie(o)?i(o):r(o)}}const vN={name:"codeText",tokenize:bN,resolve:yN,previous:gN};function yN(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function gN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bN(e,t,r){let n=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),n++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):Ie(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||Ie(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",u(f))}}class wN{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,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ko(this.left,n),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),Ko(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ko(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);Ko(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ko(this.left,r.reverse())}}}function Ko(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ew(e){const t={};let r=-1,n,i,a,o,s,l,u;const c=new wN(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,xN(c,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(n[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return Pr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function xN(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,l=[],u={};let c,f,d=-1,p=r,h=0,m=0;const g=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++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&&(m=d+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const v=s.slice(g[d],g[d+1]),y=a.pop();l.push([y,y+v.length-1]),e.splice(y,2,v)}for(l.reverse(),d=-1;++d<l.length;)u[h+l[d][0]]=h+l[d][1],h+=l[d][1]-l[d][0]-1;return u}const SN={tokenize:kN,resolve:_N},EN={tokenize:$N,partial:!0};function _N(e){return ew(e),e}function kN(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Ie(s)?e.check(EN,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"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function $N(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function tw(e,t,r,n,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||Ml(v)?r(v):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(n),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||Ie(v)?r(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!c&&(v===null||v===41||yt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(v)):c<u&&v===40?(e.consume(v),c++,m):v===41?(e.consume(v),c--,m):v===null||v===32||v===40||Ml(v)?r(v):(e.consume(v),v===92?g:m)}function g(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function rw(e,t,r,n,i,a){const o=this;let s=0,l;return u;function u(p){return e.enter(n),e.enter(i),e.consume(p),e.exit(i),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Ie(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!Ke(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function nw(e,t,r,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,l):r(d)}function l(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),u(d))}function u(d){return d===o?(e.exit(a),l(o)):d===null?r(d):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Qe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||Ie(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Go(e,t){let r;return n;function n(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ke(i)?Qe(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const ON={name:"definition",tokenize:CN},TN={tokenize:IN,partial:!0};function CN(e,t,r){const n=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return rw.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=qr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):r(p)}function l(p){return yt(p)?Go(e,u)(p):u(p)}function u(p){return tw(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(TN,f,f)(p)}function f(p){return Ke(p)?Qe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Ie(p)?(e.exit("definition"),n.parser.defined.push(i),t(p)):r(p)}}function IN(e,t,r){return n;function n(s){return yt(s)?Go(e,i)(s):r(s)}function i(s){return nw(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ke(s)?Qe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ie(s)?t(s):r(s)}}const RN={name:"hardBreakEscape",tokenize:AN};function AN(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const PN={name:"headingAtx",tokenize:DN,resolve:NN};function NN(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Pr(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function DN(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||yt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||Ie(c)?(e.exit("atxHeading"),t(c)):Ke(c)?Qe(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||yt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const jN=["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"],iw=["pre","script","style","textarea"],MN={name:"htmlFlow",tokenize:UN,resolveTo:BN,concrete:!0},LN={tokenize:WN,partial:!0},FN={tokenize:zN,partial:!0};function BN(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 UN(e,t,r){const n=this;let i,a,o,s,l;return u;function u(E){return c(E)}function c(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),f}function f(E){return E===33?(e.consume(E),d):E===47?(e.consume(E),a=!0,m):E===63?(e.consume(E),i=3,n.interrupt?t:w):lr(E)?(e.consume(E),o=String.fromCharCode(E),g):r(E)}function d(E){return E===45?(e.consume(E),i=2,p):E===91?(e.consume(E),i=5,s=0,h):lr(E)?(e.consume(E),i=4,n.interrupt?t:w):r(E)}function p(E){return E===45?(e.consume(E),n.interrupt?t:w):r(E)}function h(E){const Y="CDATA[";return E===Y.charCodeAt(s++)?(e.consume(E),s===Y.length?n.interrupt?t:H:h):r(E)}function m(E){return lr(E)?(e.consume(E),o=String.fromCharCode(E),g):r(E)}function g(E){if(E===null||E===47||E===62||yt(E)){const Y=E===47,oe=o.toLowerCase();return!Y&&!a&&iw.includes(oe)?(i=1,n.interrupt?t(E):H(E)):jN.includes(o.toLowerCase())?(i=6,Y?(e.consume(E),v):n.interrupt?t(E):H(E)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(E):a?y(E):b(E))}return E===45||tr(E)?(e.consume(E),o+=String.fromCharCode(E),g):r(E)}function v(E){return E===62?(e.consume(E),n.interrupt?t:H):r(E)}function y(E){return Ke(E)?(e.consume(E),y):O(E)}function b(E){return E===47?(e.consume(E),O):E===58||E===95||lr(E)?(e.consume(E),k):Ke(E)?(e.consume(E),b):O(E)}function k(E){return E===45||E===46||E===58||E===95||tr(E)?(e.consume(E),k):S(E)}function S(E){return E===61?(e.consume(E),_):Ke(E)?(e.consume(E),S):b(E)}function _(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),l=E,$):Ke(E)?(e.consume(E),_):N(E)}function $(E){return E===l?(e.consume(E),l=null,z):E===null||Ie(E)?r(E):(e.consume(E),$)}function N(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||yt(E)?S(E):(e.consume(E),N)}function z(E){return E===47||E===62||Ke(E)?b(E):r(E)}function O(E){return E===62?(e.consume(E),D):r(E)}function D(E){return E===null||Ie(E)?H(E):Ke(E)?(e.consume(E),D):r(E)}function H(E){return E===45&&i===2?(e.consume(E),I):E===60&&i===1?(e.consume(E),V):E===62&&i===4?(e.consume(E),F):E===63&&i===3?(e.consume(E),w):E===93&&i===5?(e.consume(E),A):Ie(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(LN,Z,L)(E)):E===null||Ie(E)?(e.exit("htmlFlowData"),L(E)):(e.consume(E),H)}function L(E){return e.check(FN,W,Z)(E)}function W(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),M}function M(E){return E===null||Ie(E)?L(E):(e.enter("htmlFlowData"),H(E))}function I(E){return E===45?(e.consume(E),w):H(E)}function V(E){return E===47?(e.consume(E),o="",U):H(E)}function U(E){if(E===62){const Y=o.toLowerCase();return iw.includes(Y)?(e.consume(E),F):H(E)}return lr(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),U):H(E)}function A(E){return E===93?(e.consume(E),w):H(E)}function w(E){return E===62?(e.consume(E),F):E===45&&i===2?(e.consume(E),w):H(E)}function F(E){return E===null||Ie(E)?(e.exit("htmlFlowData"),Z(E)):(e.consume(E),F)}function Z(E){return e.exit("htmlFlow"),t(E)}}function zN(e,t,r){const n=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function WN(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Zo,t,r)}}const HN={name:"htmlText",tokenize:VN};function VN(e,t,r){const n=this;let i,a,o;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),S):w===63?(e.consume(w),b):lr(w)?(e.consume(w),N):r(w)}function u(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),a=0,h):lr(w)?(e.consume(w),y):r(w)}function c(w){return w===45?(e.consume(w),p):r(w)}function f(w){return w===null?r(w):w===45?(e.consume(w),d):Ie(w)?(o=f,V(w)):(e.consume(w),f)}function d(w){return w===45?(e.consume(w),p):f(w)}function p(w){return w===62?I(w):w===45?d(w):f(w)}function h(w){const F="CDATA[";return w===F.charCodeAt(a++)?(e.consume(w),a===F.length?m:h):r(w)}function m(w){return w===null?r(w):w===93?(e.consume(w),g):Ie(w)?(o=m,V(w)):(e.consume(w),m)}function g(w){return w===93?(e.consume(w),v):m(w)}function v(w){return w===62?I(w):w===93?(e.consume(w),v):m(w)}function y(w){return w===null||w===62?I(w):Ie(w)?(o=y,V(w)):(e.consume(w),y)}function b(w){return w===null?r(w):w===63?(e.consume(w),k):Ie(w)?(o=b,V(w)):(e.consume(w),b)}function k(w){return w===62?I(w):b(w)}function S(w){return lr(w)?(e.consume(w),_):r(w)}function _(w){return w===45||tr(w)?(e.consume(w),_):$(w)}function $(w){return Ie(w)?(o=$,V(w)):Ke(w)?(e.consume(w),$):I(w)}function N(w){return w===45||tr(w)?(e.consume(w),N):w===47||w===62||yt(w)?z(w):r(w)}function z(w){return w===47?(e.consume(w),I):w===58||w===95||lr(w)?(e.consume(w),O):Ie(w)?(o=z,V(w)):Ke(w)?(e.consume(w),z):I(w)}function O(w){return w===45||w===46||w===58||w===95||tr(w)?(e.consume(w),O):D(w)}function D(w){return w===61?(e.consume(w),H):Ie(w)?(o=D,V(w)):Ke(w)?(e.consume(w),D):z(w)}function H(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(e.consume(w),i=w,L):Ie(w)?(o=H,V(w)):Ke(w)?(e.consume(w),H):(e.consume(w),W)}function L(w){return w===i?(e.consume(w),i=void 0,M):w===null?r(w):Ie(w)?(o=L,V(w)):(e.consume(w),L)}function W(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||yt(w)?z(w):(e.consume(w),W)}function M(w){return w===47||w===62||yt(w)?z(w):r(w)}function I(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):r(w)}function V(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),U}function U(w){return Ke(w)?Qe(e,A,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):A(w)}function A(w){return e.enter("htmlTextData"),o(w)}}const gd={name:"labelEnd",tokenize:JN,resolveTo:YN,resolveAll:GN},qN={tokenize:XN},ZN={tokenize:QN},KN={tokenize:eD};function GN(e){let t=-1;for(;++t<e.length;){const r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function YN(e,t){let r=e.length,n=0,i,a,o,s;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(o=r);const l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[a+n+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=Nr(s,e.slice(a+1,a+n+3)),s=Nr(s,[["enter",c,t]]),s=Nr(s,Bl(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),s=Nr(s,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),s=Nr(s,e.slice(o+1)),s=Nr(s,[["exit",l,t]]),Pr(e,a,e.length,s),e}function JN(e,t,r){const n=this;let i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=n.parser.defined.includes(qr(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):r(d)}function l(d){return d===40?e.attempt(qN,c,o?c:f)(d):d===91?e.attempt(ZN,c,o?u:f)(d):o?c(d):f(d)}function u(d){return e.attempt(KN,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,r(d)}}function XN(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return yt(f)?Go(e,a)(f):a(f)}function a(f){return f===41?c(f):tw(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return yt(f)?Go(e,l)(f):c(f)}function s(f){return r(f)}function l(f){return f===34||f===39||f===40?nw(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return yt(f)?Go(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function QN(e,t,r){const n=this;return i;function i(s){return rw.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(qr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function eD(e,t,r){return n;function n(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):r(a)}}const tD={name:"labelStartImage",tokenize:rD,resolveAll:gd.resolveAll};function rD(e,t,r){const n=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):r(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const nD={name:"labelStartLink",tokenize:iD,resolveAll:gd.resolveAll};function iD(e,t,r){const n=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 n.parser.constructs?r(o):t(o)}}const bd={name:"lineEnding",tokenize:aD};function aD(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Ul={name:"thematicBreak",tokenize:oD};function oD(e,t,r){let n=0,i;return a;function a(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||Ie(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===i?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),Ke(u)?Qe(e,s,"whitespace")(u):s(u))}}const hr={name:"list",tokenize:uD,continuation:{tokenize:cD},exit:dD},sD={tokenize:pD,partial:!0},lD={tokenize:fD,partial:!0};function uD(e,t,r){const n=this,i=n.events[n.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 h=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:md(p)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ul,r,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return r(p)}function l(p){return md(p)&&++o<10?(e.consume(p),l):(!n.interrupt||o<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):r(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Zo,n.interrupt?r:c,e.attempt(sD,d,f))}function c(p){return n.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ke(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):r(p)}function d(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function cD(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Zo,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Qe(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ke(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(lD,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Qe(e,e.attempt(hr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function fD(e,t,r){const n=this;return Qe(e,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function dD(e){e.exit(this.containerState.type)}function pD(e,t,r){const n=this;return Qe(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ke(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const aw={name:"setextUnderline",tokenize:mD,resolveTo:hD};function hD(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);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[n][1],t]),e[n][1].end=Object.assign({},e[a][1].end)):e[n][1]=o,e.push(["exit",o,t]),e}function mD(e,t,r){const n=this;let i;return a;function a(u){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):r(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),Ke(u)?Qe(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ie(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const vD={tokenize:yD};function yD(e){const t=this,r=e.attempt(Zo,n,e.attempt(this.parser.constructs.flowInitial,i,Qe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(SN,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const gD={resolveAll:sw()},bD=ow("string"),wD=ow("text");function ow(e){return{tokenize:t,resolveAll:sw(e==="text"?xD:void 0)};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(c){return u(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return u(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function sw(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function xD(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,o=-1,s=0,l;for(;a--;){const u=i[a];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)l=!0,s++;else if(u!==-1){a++;break}}if(s){const u={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+a,_bufferIndex:a?o:n.start._bufferIndex+o},end:Object.assign({},n.end)};n.end=Object.assign({},u.start),n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}function SD(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const l={consume:y,enter:b,exit:k,attempt:$(S),check:$(_),interrupt:$(_,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:h,defineSkip:m,write:f};let c=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function f(D){return o=Nr(o,D),g(),o[o.length-1]!==null?[]:(N(t,0),u.events=Bl(a,u.events,u),u.events)}function d(D,H){return _D(p(D),H)}function p(D){return ED(o,D)}function h(){const{line:D,column:H,offset:L,_index:W,_bufferIndex:M}=n;return{line:D,column:H,offset:L,_index:W,_bufferIndex:M}}function m(D){i[D.line]=D.column,O()}function g(){let D;for(;n._index<o.length;){const H=o[n._index];if(typeof H=="string")for(D=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===D&&n._bufferIndex<H.length;)v(H.charCodeAt(n._bufferIndex));else v(H)}}function v(D){c=c(D)}function y(D){Ie(D)?(n.line++,n.column=1,n.offset+=D===-3?2:1,O()):D!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=D}function b(D,H){const L=H||{};return L.type=D,L.start=h(),u.events.push(["enter",L,u]),s.push(L),L}function k(D){const H=s.pop();return H.end=h(),u.events.push(["exit",H,u]),H}function S(D,H){N(D,H.from)}function _(D,H){H.restore()}function $(D,H){return L;function L(W,M,I){let V,U,A,w;return Array.isArray(W)?Z(W):"tokenize"in W?Z([W]):F(W);function F(re){return le;function le(pe){const he=pe!==null&&re[pe],ue=pe!==null&&re.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return Z(Q)(pe)}}function Z(re){return V=re,U=0,re.length===0?I:E(re[U])}function E(re){return le;function le(pe){return w=z(),A=re,re.partial||(u.currentConstruct=re),re.name&&u.parser.constructs.disable.null.includes(re.name)?oe():re.tokenize.call(H?Object.assign(Object.create(u),H):u,l,Y,oe)(pe)}}function Y(re){return D(A,w),M}function oe(re){return w.restore(),++U<V.length?E(V[U]):I}}}function N(D,H){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Pr(u.events,H,u.events.length-H,D.resolve(u.events.slice(H),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function z(){const D=h(),H=u.previous,L=u.currentConstruct,W=u.events.length,M=Array.from(s);return{restore:I,from:W};function I(){n=D,u.previous=H,u.currentConstruct=L,u.events.length=W,s=M,O()}}function O(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function ED(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function _D(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
32
32
|
`;break}case-3:{o=`\r
|
|
33
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}const ED=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:kN},disable:{null:[]},document:{42:hr,43:hr,45:hr,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,62:Kb},flow:{35:RN,42:Ul,45:[iw,Ul],60:DN,61:iw,95:Ul,96:Xb,126:Xb},flowInitial:{[-2]:yd,[-1]:yd,32:yd},insideSpan:{null:[vd,vD]},string:{38:Yb,92:Gb},text:{[-5]:bd,[-4]:bd,[-3]:bd,33:QN,38:Yb,42:vd,60:[tN,zN],91:tD,92:[CN,Gb],93:gd,95:vd,96:hN}},Symbol.toStringTag,{value:"Module"}));function _D(e){const r=Hb([ED,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:i(KP),document:i(YP),flow:i(hD),string:i(yD),text:i(gD)};return n;function i(a){return o;function o(s){return wD(n,a,s)}}}function kD(e){for(;!Qb(e););return e}const sw=/[\0\t\n\r]/g;function $D(){let e=1,t="",r=!0,n;return i;function i(a,o,s){const u=[];let l,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(sw.lastIndex=f,l=sw.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&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}const OD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TD(e){return e.replace(OD,CD)}function CD(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return Vb(r.slice(a?2:1),a?16:10)}return hd(r)||e}const lw={}.hasOwnProperty;function ID(e,t,r){return typeof t!="string"&&(r=t,t=void 0),RD(r)(kD(_D(r).document().write($D()(e,t,!0))))}function RD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ce),blockQuote:a(ue),characterEscape:z,characterReference:z,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(K,o),codeTextData:z,data:z,codeFlowValue:z,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(J,o),htmlFlowData:z,htmlText:a(J,o),htmlTextData:z,image:a(ae),label:o,link:a(ee),listItem:a(xe),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Re),reference:_,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(qe),thematicBreak:a(Be)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:re,characterReference:le,codeFenced:u(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:u(v),codeText:u(j),codeTextData:O,data:O,definition:u(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(H),hardBreakTrailing:u(H),htmlFlow:u(L),htmlFlowData:O,htmlText:u(I),htmlTextData:O,image:u(q),label:P,labelText:U,lineEnding:D,link:u(F),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Y,resourceDestinationString:w,resourceTitleString:W,resource:Z,setextHeading:u(M),setextHeadingLineSequence:$,setextHeadingText:E,strong:u(),thematicBreak:u()}};uw(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(B){let A={type:"root",children:[]};const X={stack:[A],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:r},ce=[];let _e=-1;for(;++_e<B.length;)if(B[_e][1].type==="listOrdered"||B[_e][1].type==="listUnordered")if(B[_e][0]==="enter")ce.push(_e);else{const Oe=ce.pop();_e=i(B,Oe,_e)}for(_e=-1;++_e<B.length;){const Oe=t[B[_e][0]];lw.call(Oe,B[_e][1].type)&&Oe[B[_e][1].type].call(Object.assign({sliceSerialize:B[_e][2].sliceSerialize},X),B[_e][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||cw).call(X,void 0,Oe[0])}for(A.position={start:oi(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:oi(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)A=t.transforms[_e](A)||A;return A}function i(B,A,X){let ce=A-1,_e=-1,Oe=!1,Xe,ut,zt,Tt;for(;++ce<=X;){const Ge=B[ce];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?_e++:_e--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Xe&&!Tt&&!_e&&!zt&&(zt=ce),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!_e&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||_e===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Xe){let Ct=ce;for(ut=void 0;Ct--;){const rt=B[Ct];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;ut&&(B[ut][1].type="lineEndingBlank",Oe=!0),rt[1].type="lineEnding",ut=Ct}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}zt&&(!ut||zt<ut)&&(Xe._spread=!0),Xe.end=Object.assign({},ut?B[ut][1].start:Ge[1].end),B.splice(ut||ce,0,["exit",Xe,Ge[2]]),ce++,X++}if(Ge[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Xe=Ct,B.splice(ce,0,["enter",Ct,Ge[2]]),ce++,X++,zt=void 0,Tt=!0}}}return B[A][1]._spread=Oe,X}function a(B,A){return X;function X(ce){s.call(this,B(ce),ce),A&&A.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(B,A,X){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([A,X]),B.position={start:oi(A.start),end:void 0}}function u(B){return A;function A(X){B&&B.call(this,X),l.call(this,X)}}function l(B,A){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==B.type&&(A?A.call(this,B,ce[0]):(ce[1]||cw).call(this,B,ce[0]));else throw new Error("Cannot close `"+B.type+"` ("+Vo({start:B.start,end:B.end})+"): it’s not open");X.position.end=oi(B.end)}function c(){return pd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(B){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),A=this.stack[this.stack.length-1];A.lang=B}function h(){const B=this.resume(),A=this.stack[this.stack.length-1];A.meta=B}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const B=this.resume(),A=this.stack[this.stack.length-1];A.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const B=this.resume(),A=this.stack[this.stack.length-1];A.value=B.replace(/(\r?\n|\r)$/g,"")}function b(B){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qr(this.sliceSerialize(B)).toLowerCase()}function y(){const B=this.resume(),A=this.stack[this.stack.length-1];A.title=B}function k(){const B=this.resume(),A=this.stack[this.stack.length-1];A.url=B}function S(B){const A=this.stack[this.stack.length-1];if(!A.depth){const X=this.sliceSerialize(B).length;A.depth=X}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function $(B){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function z(B){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:oi(B.start),end:void 0},X.push(ce)),this.stack.push(ce)}function O(B){const A=this.stack.pop();A.value+=this.sliceSerialize(B),A.position.end=oi(B.end)}function D(B){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=A.children[A.children.length-1];X.position.end=oi(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(z.call(this,B),O.call(this,B))}function H(){this.data.atHardBreak=!0}function L(){const B=this.resume(),A=this.stack[this.stack.length-1];A.value=B}function I(){const B=this.resume(),A=this.stack[this.stack.length-1];A.value=B}function j(){const B=this.resume(),A=this.stack[this.stack.length-1];A.value=B}function F(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=A,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function q(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=A,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function U(B){const A=this.sliceSerialize(B),X=this.stack[this.stack.length-2];X.label=TD(A),X.identifier=qr(A).toLowerCase()}function P(){const B=this.stack[this.stack.length-1],A=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ce=B.children;X.children=ce}else X.alt=A}function w(){const B=this.resume(),A=this.stack[this.stack.length-1];A.url=B}function W(){const B=this.resume(),A=this.stack[this.stack.length-1];A.title=B}function Z(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Y(B){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qr(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function oe(B){this.data.characterReferenceType=B.type}function re(B){const A=this.sliceSerialize(B),X=this.data.characterReferenceType;let ce;X?(ce=Vb(A,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=hd(A);const _e=this.stack[this.stack.length-1];_e.value+=ce}function le(B){const A=this.stack.pop();A.position.end=oi(B.end)}function pe(B){O.call(this,B);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(B)}function he(B){O.call(this,B);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(B)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function J(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function xe(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Be(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function uw(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?uw(e,n):AD(e,n)}}function AD(e,t){let r;for(r in t)if(lw.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function cw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is still open")}function PD(e){const t=this;t.parser=r;function r(n){return ID(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ND(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function DD(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
34
|
-
`}]}function
|
|
35
|
-
`:"",n={};t.lang&&(n.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};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
|
-
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const
|
|
37
|
-
`});const
|
|
33
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}const kD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ON},disable:{null:[]},document:{42:hr,43:hr,45:hr,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,62:Gb},flow:{35:PN,42:Ul,45:[aw,Ul],60:MN,61:aw,95:Ul,96:Qb,126:Qb},flowInitial:{[-2]:yd,[-1]:yd,32:yd},insideSpan:{null:[vd,gD]},string:{38:Jb,92:Yb},text:{[-5]:bd,[-4]:bd,[-3]:bd,33:tD,38:Jb,42:vd,60:[nN,HN],91:nD,92:[RN,Yb],93:gd,95:vd,96:vN}},Symbol.toStringTag,{value:"Module"}));function $D(e){const r=Vb([kD,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:i(YP),document:i(XP),flow:i(vD),string:i(bD),text:i(wD)};return n;function i(a){return o;function o(s){return SD(n,a,s)}}}function OD(e){for(;!ew(e););return e}const lw=/[\0\t\n\r]/g;function TD(){let e=1,t="",r=!0,n;return i;function i(a,o,s){const l=[];let u,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(lw.lastIndex=f,u=lw.exec(a),d=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(d),!u){t=a.slice(f);break}if(p===10&&f===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),p){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:n=!0,e=1}f=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const CD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ID(e){return e.replace(CD,RD)}function RD(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return qb(r.slice(a?2:1),a?16:10)}return hd(r)||e}const uw={}.hasOwnProperty;function AD(e,t,r){return typeof t!="string"&&(r=t,t=void 0),PD(r)(OD($D(r).document().write(TD()(e,t,!0))))}function PD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ce),blockQuote:a(ue),characterEscape:z,characterReference:z,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(K,o),codeTextData:z,data:z,codeFlowValue:z,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(J,o),htmlFlowData:z,htmlText:a(J,o),htmlTextData:z,image:a(ae),label:o,link:a(ee),listItem:a(xe),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Re),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(qe),thematicBreak:a(Be)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:re,characterReference:le,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(v),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(H),hardBreakTrailing:l(H),htmlFlow:l(L),htmlFlowData:O,htmlText:l(W),htmlTextData:O,image:l(V),label:A,labelText:U,lineEnding:D,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Y,resourceDestinationString:w,resourceTitleString:F,resource:Z,setextHeading:l(N),setextHeadingLineSequence:$,setextHeadingText:_,strong:l(),thematicBreak:l()}};cw(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(B){let P={type:"root",children:[]};const X={stack:[P],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:c,data:r},ce=[];let _e=-1;for(;++_e<B.length;)if(B[_e][1].type==="listOrdered"||B[_e][1].type==="listUnordered")if(B[_e][0]==="enter")ce.push(_e);else{const Oe=ce.pop();_e=i(B,Oe,_e)}for(_e=-1;++_e<B.length;){const Oe=t[B[_e][0]];uw.call(Oe,B[_e][1].type)&&Oe[B[_e][1].type].call(Object.assign({sliceSerialize:B[_e][2].sliceSerialize},X),B[_e][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||fw).call(X,void 0,Oe[0])}for(P.position={start:oi(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:oi(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)P=t.transforms[_e](P)||P;return P}function i(B,P,X){let ce=P-1,_e=-1,Oe=!1,Xe,ut,zt,Tt;for(;++ce<=X;){const Ge=B[ce];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?_e++:_e--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Xe&&!Tt&&!_e&&!zt&&(zt=ce),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!_e&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||_e===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Xe){let Ct=ce;for(ut=void 0;Ct--;){const rt=B[Ct];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;ut&&(B[ut][1].type="lineEndingBlank",Oe=!0),rt[1].type="lineEnding",ut=Ct}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}zt&&(!ut||zt<ut)&&(Xe._spread=!0),Xe.end=Object.assign({},ut?B[ut][1].start:Ge[1].end),B.splice(ut||ce,0,["exit",Xe,Ge[2]]),ce++,X++}if(Ge[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Xe=Ct,B.splice(ce,0,["enter",Ct,Ge[2]]),ce++,X++,zt=void 0,Tt=!0}}}return B[P][1]._spread=Oe,X}function a(B,P){return X;function X(ce){s.call(this,B(ce),ce),P&&P.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(B,P,X){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([P,X]),B.position={start:oi(P.start),end:void 0}}function l(B){return P;function P(X){B&&B.call(this,X),u.call(this,X)}}function u(B,P){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==B.type&&(P?P.call(this,B,ce[0]):(ce[1]||fw).call(this,B,ce[0]));else throw new Error("Cannot close `"+B.type+"` ("+Vo({start:B.start,end:B.end})+"): it’s not open");X.position.end=oi(B.end)}function c(){return pd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(B){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function p(){const B=this.resume(),P=this.stack[this.stack.length-1];P.lang=B}function h(){const B=this.resume(),P=this.stack[this.stack.length-1];P.meta=B}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const B=this.resume(),P=this.stack[this.stack.length-1];P.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const B=this.resume(),P=this.stack[this.stack.length-1];P.value=B.replace(/(\r?\n|\r)$/g,"")}function y(B){const P=this.resume(),X=this.stack[this.stack.length-1];X.label=P,X.identifier=qr(this.sliceSerialize(B)).toLowerCase()}function b(){const B=this.resume(),P=this.stack[this.stack.length-1];P.title=B}function k(){const B=this.resume(),P=this.stack[this.stack.length-1];P.url=B}function S(B){const P=this.stack[this.stack.length-1];if(!P.depth){const X=this.sliceSerialize(B).length;P.depth=X}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function $(B){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function z(B){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:oi(B.start),end:void 0},X.push(ce)),this.stack.push(ce)}function O(B){const P=this.stack.pop();P.value+=this.sliceSerialize(B),P.position.end=oi(B.end)}function D(B){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=P.children[P.children.length-1];X.position.end=oi(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(z.call(this,B),O.call(this,B))}function H(){this.data.atHardBreak=!0}function L(){const B=this.resume(),P=this.stack[this.stack.length-1];P.value=B}function W(){const B=this.resume(),P=this.stack[this.stack.length-1];P.value=B}function M(){const B=this.resume(),P=this.stack[this.stack.length-1];P.value=B}function I(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=P,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function V(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=P,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function U(B){const P=this.sliceSerialize(B),X=this.stack[this.stack.length-2];X.label=ID(P),X.identifier=qr(P).toLowerCase()}function A(){const B=this.stack[this.stack.length-1],P=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ce=B.children;X.children=ce}else X.alt=P}function w(){const B=this.resume(),P=this.stack[this.stack.length-1];P.url=B}function F(){const B=this.resume(),P=this.stack[this.stack.length-1];P.title=B}function Z(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Y(B){const P=this.resume(),X=this.stack[this.stack.length-1];X.label=P,X.identifier=qr(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function oe(B){this.data.characterReferenceType=B.type}function re(B){const P=this.sliceSerialize(B),X=this.data.characterReferenceType;let ce;X?(ce=qb(P,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=hd(P);const _e=this.stack[this.stack.length-1];_e.value+=ce}function le(B){const P=this.stack.pop();P.position.end=oi(B.end)}function pe(B){O.call(this,B);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(B)}function he(B){O.call(this,B);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(B)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function J(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function xe(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Be(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function cw(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?cw(e,n):ND(e,n)}}function ND(e,t){let r;for(r in t)if(uw.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function fw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vo({start:t.start,end:t.end})+") is still open")}function DD(e){const t=this;t.parser=r;function r(n){return AD(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jD(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function MD(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
34
|
+
`}]}function LD(e,t){const r=t.value?t.value+`
|
|
35
|
+
`:"",n={};t.lang&&(n.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};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 FD(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BD(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UD(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=ba(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(n,s);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function zD(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function WD(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function dw(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function HD(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return dw(e,t);const i={src:ba(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function VD(e,t){const r={src:ba(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function qD(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function ZD(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return dw(e,t);const i={href:ba(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function KD(e,t){const r={href:ba(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GD(e,t,r){const n=e.all(t),i=r?YD(r):pw(t),a={},o=[];if(typeof t.checked=="boolean"){const c=n[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},n.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:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const c=n[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
36
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
37
|
+
`});const u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)}function YD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=pw(r[n])}return t}function pw(e){const t=e.spread;return t??e.children.length>1}function JD(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function XD(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function QD(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function ej(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tj(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),i.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=sd(t.children[1]),l=Pb(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function rj(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,s=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],d={},p=o?o[l]:void 0;p&&(d.align=p);let h={type:"element",tagName:a,properties:d,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),u.push(h)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function nj(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const hw=9,mw=32;function ij(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(vw(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(vw(t.slice(i),i>0,!1)),a.join("")}function vw(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===hw||a===mw;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===hw||a===mw;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function aj(e,t){const r={type:"text",value:ij(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function oj(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const sj={blockquote:jD,break:MD,code:LD,delete:FD,emphasis:BD,footnoteReference:UD,heading:zD,html:WD,imageReference:HD,image:VD,inlineCode:qD,linkReference:ZD,link:KD,listItem:GD,list:JD,paragraph:XD,root:QD,strong:ej,table:tj,tableCell:nj,tableRow:rj,text:aj,thematicBreak:oj,toml:zl,yaml:zl,definition:zl,footnoteDefinition:zl};function zl(){}const yw=-1,Wl=0,Hl=1,Vl=2,wd=3,xd=4,Sd=5,Ed=6,gw=7,bw=8,ww=typeof self=="object"?self:globalThis,lj=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Wl:case yw:return r(o,i);case Hl:{const s=r([],i);for(const l of o)s.push(n(l));return s}case Vl:{const s=r({},i);for(const[l,u]of o)s[n(l)]=n(u);return s}case wd:return r(new Date(o),i);case xd:{const{source:s,flags:l}=o;return r(new RegExp(s,l),i)}case Sd:{const s=r(new Map,i);for(const[l,u]of o)s.set(n(l),n(u));return s}case Ed:{const s=r(new Set,i);for(const l of o)s.add(n(l));return s}case gw:{const{name:s,message:l}=o;return r(new ww[s](l),i)}case bw:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i)}return r(new ww[a](o),i)};return n},xw=e=>lj(new Map,e)(0),wa="",{toString:uj}={},{keys:cj}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[Wl,t];const r=uj.call(e).slice(8,-1);switch(r){case"Array":return[Hl,wa];case"Object":return[Vl,wa];case"Date":return[wd,wa];case"RegExp":return[xd,wa];case"Map":return[Sd,wa];case"Set":return[Ed,wa]}return r.includes("Array")?[Hl,r]:r.includes("Error")?[gw,r]:[Vl,r]},ql=([e,t])=>e===Wl&&(t==="function"||t==="symbol"),fj=(e,t,r,n)=>{const i=(o,s)=>{const l=n.push(o)-1;return r.set(s,l),l},a=o=>{if(r.has(o))return r.get(o);let[s,l]=Yo(o);switch(s){case Wl:{let c=o;switch(l){case"bigint":s=bw,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([yw],o)}return i([s,c],o)}case Hl:{if(l)return i([l,[...o]],o);const c=[],f=i([s,c],o);for(const d of o)c.push(a(d));return f}case Vl:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const d of cj(o))(e||!ql(Yo(o[d])))&&c.push([a(d),a(o[d])]);return f}case wd:return i([s,o.toISOString()],o);case xd:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case Sd:{const c=[],f=i([s,c],o);for(const[d,p]of o)(e||!(ql(Yo(d))||ql(Yo(p))))&&c.push([a(d),a(p)]);return f}case Ed:{const c=[],f=i([s,c],o);for(const d of o)(e||!ql(Yo(d)))&&c.push(a(d));return f}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},Sw=(e,{json:t,lossy:r}={})=>{const n=[];return fj(!(t||r),!!t,new Map,n)(e),n},Zl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xw(Sw(e,t)):structuredClone(e):(e,t)=>xw(Sw(e,t));function dj(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function pj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||dj,n=e.options.footnoteBackLabel||pj,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=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(),d=ba(f.toLowerCase());let p=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++p<=m;){h.length>0&&h.push({type:"text",value:" "});let y=typeof r=="string"?r:r(l,p);typeof y=="string"&&(y={type:"text",value:y}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,p),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const g=c[c.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const y=g.children[g.children.length-1];y&&y.type==="text"?y.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...h)}else c.push(...h);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Zl(o),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 Kl=function(e){if(e==null)return
|
|
39
|
+
`}]}}const Kl=function(e){if(e==null)return gj;if(typeof e=="function")return Gl(e);if(typeof e=="object")return Array.isArray(e)?mj(e):vj(e);if(typeof e=="string")return yj(e);throw new Error("Expected function, string, or object as test")};function mj(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Kl(e[r]);return Gl(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function vj(e){const t=e;return Gl(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function yj(e){return Gl(t);function t(r){return r&&r.type===e}}function Gl(e){return t;function t(r,n,i){return!!(bj(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function gj(){return!0}function bj(e){return e!==null&&typeof e=="object"&&"type"in e}function bpe(e){return e}const Ew=[],wj=!0,_d=!1,xj="skip";function _w(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=Kl(i),o=n?-1:1;s(e,void 0,[])();function s(l,u,c){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Ew,h,m,g;if((!t||a(l,u,c[c.length-1]||void 0))&&(p=Sj(r(l,c)),p[0]===_d))return p;if("children"in l&&l.children){const v=l;if(v.children&&p[0]!==xj)for(m=(n?v.children.length:-1)+o,g=c.concat(v);m>-1&&m<v.children.length;){const y=v.children[m];if(h=s(y,m,g)(),h[0]===_d)return h;m=typeof h[1]=="number"?h[1]:m+o}}return p}}}function Sj(e){return Array.isArray(e)?e:typeof e=="number"?[wj,e]:e==null?Ew:[e]}function kd(e,t,r,n){let i,a,o;typeof t=="function"&&typeof r!="function"?(a=void 0,o=t,i=r):(a=t,o=r,i=n),_w(e,a,s,i);function s(l,u){const c=u[u.length-1],f=c?c.children.indexOf(l):void 0;return o(l,f,c)}}const $d={}.hasOwnProperty,Ej={};function _j(e,t){const r=t||Ej,n=new Map,i=new Map,a=new Map,o={...sj,...r.handlers},s={all:u,applyData:$j,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:l,options:r,patch:kj,wrap:Tj};return kd(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?n:i,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function l(c,f){const d=c.type,p=s.handlers[d];if($d.call(s.handlers,d)&&p)return p(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){const{children:m,...g}=c,v=Zl(g);return v.children=s.all(c),v}return Zl(c)}return(s.options.unknownHandler||Oj)(s,c,f)}function u(c){const f=[];if("children"in c){const d=c.children;let p=-1;for(;++p<d.length;){const h=s.one(d[p],c);if(h){if(p&&d[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=kw(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=kw(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function kj(e,t){e.position&&(t.position=wP(e))}function $j(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,Zl(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function Oj(e,t){const r=t.data||{},n="value"in t&&!($d.call(r,"hProperties")||$d.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tj(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
40
40
|
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
41
41
|
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
42
|
-
`}),r}function
|
|
43
|
-
`},i),a}function Oj(e,t){return e&&"run"in e?async function(r,n){const i=kw(r,{file:n,...t});await e.run(i,n)}:function(r,n){return kw(r,{file:n,...e||t})}}function $w(e){if(e)throw e}var Yl=Object.prototype.hasOwnProperty,Ow=Object.prototype.toString,Tw=Object.defineProperty,Cw=Object.getOwnPropertyDescriptor,Iw=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ow.call(t)==="[object Array]"},Rw=function(t){if(!t||Ow.call(t)!=="[object Object]")return!1;var r=Yl.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Yl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Yl.call(t,i)},Aw=function(t,r){Tw&&r.name==="__proto__"?Tw(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Pw=function(t,r){if(r==="__proto__")if(Yl.call(t,r)){if(Cw)return Cw(t,r).value}else return;return t[r]},Tj=function e(){var t,r,n,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(r in t)n=Pw(s,r),i=Pw(t,r),s!==i&&(c&&i&&(Rw(i)||(a=Iw(i)))?(a?(a=!1,o=n&&Iw(n)?n:[]):o=n&&Rw(n)?n:{},Aw(s,{name:r,newValue:e(c,o,i)})):typeof i<"u"&&Aw(s,{name:r,newValue:i}));return s};const Od=Ze(Tj);function Td(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 Cj(){const e=[],t={run:r,use:n};return t;function r(...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(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Ij(c,s)(...l):o(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ij(e,t){let r;return n;function n(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const dn={basename:Rj,dirname:Aj,extname:Pj,join:Nj,sep:"/"};function Rj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Jo(e);let r=0,n=-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){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Aj(e){if(Jo(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Pj(e){Jo(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function Nj(...e){let t=-1,r;for(;++t<e.length;)Jo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Dj(r)}function Dj(e){Jo(e);const t=e.codePointAt(0)===47;let r=jj(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function jj(e,t){let r="",n=0,i=-1,a=0,o=-1,s,u;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(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function Jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mj={cwd:Lj};function Lj(){return"/"}function Cd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Fj(e){if(typeof e=="string")e=new URL(e);else if(!Cd(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 Bj(e)}function Bj(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===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 Id=["history","path","basename","stem","extname","dirname"];class Nw{constructor(t){let r;t?Cd(t)?r={path:t}:typeof t=="string"||Uj(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Mj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Id.length;){const a=Id[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Id.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?dn.basename(this.path):void 0}set basename(t){Ad(t,"basename"),Rd(t,"basename"),this.path=dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dn.dirname(this.path):void 0}set dirname(t){Dw(this.basename,"dirname"),this.path=dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dn.extname(this.path):void 0}set extname(t){if(Rd(t,"extname"),Dw(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=dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cd(t)&&(t=Fj(t)),Ad(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dn.basename(this.path,this.extname):void 0}set stem(t){Ad(t,"stem"),Rd(t,"stem"),this.path=dn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new er(t,r,n);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 Rd(e,t){if(e&&e.includes(dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dn.sep+"`")}function Ad(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Dw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Uj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zj=function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},Wj={}.hasOwnProperty;class Pd extends zj{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=Cj()}copy(){const t=new Pd;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Od(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(jd("data",this.frozen),this.namespace[t]=r,this):Wj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jd("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[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Jl(t),n=this.parser||this.Parser;return Nd("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Nd("process",this.parser||this.Parser),Dd("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=Jl(t),u=n.parse(s);n.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const p=f,h=n.stringify(p,d);qj(h)?d.value=h:d.result=h,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Nd("processSync",this.parser||this.Parser),Dd("processSync",this.compiler||this.Compiler),this.process(t,i),Mw("processSync","process",r),n;function i(a,o){r=!0,$w(a),n=o}}run(t,r,n){jw(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const u=Jl(r);i.run(t,u,l);function l(c,f,d){const p=f||t;c?s(c):o?o(p):n(void 0,p,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Mw("runSync","run",n),i;function a(o,s){$w(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=Jl(r),i=this.compiler||this.Compiler;return Dd("stringify",i),jw(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(jd("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);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")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,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=Od(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===l){d=f;break}if(d===-1)n.push([l,...c]);else if(c.length>0){let[p,...h]=c;const m=n[d][1];Td(m)&&Td(p)&&(p=Od(!0,m,p)),n[d]=[l,p,...h]}}}}const Hj=new Pd().freeze();function Nd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jd(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 jw(e){if(!Td(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mw(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jl(e){return Vj(e)?e:new Nw(e)}function Vj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qj(e){return typeof e=="string"||Zj(e)}function Zj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Kj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Lw=[],Fw={allowDangerousHtml:!0},Gj=/^(https?|ircs?|mailto|xmpp)$/i,Yj=[{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 Jj(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Lw,u=e.remarkPlugins||Lw,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fw}:Fw,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Xj,p=Hj().use(PD).use(u).use(Oj,l).use(s),h=new Nw;typeof n=="string"&&(h.value=n);for(const b of Yj)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Kj+b.id,void 0);const m=p.parse(h);let g=p.runSync(m,h);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),kd(g,v),_P(g,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function v(b,y,k){if(b.type==="raw"&&k&&typeof y=="number")return c?k.children.splice(y,1):k.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let S;for(S in dd)if(Object.hasOwn(dd,S)&&Object.hasOwn(b.properties,S)){const E=b.properties[S],$=dd[S];($===null||$.includes(b.tagName))&&(b.properties[S]=d(String(E||""),S,b))}}if(b.type==="element"){let S=t?!t.includes(b.tagName):o?o.includes(b.tagName):!1;if(!S&&r&&typeof y=="number"&&(S=!r(b,y,k)),S&&k&&typeof y=="number")return f&&b.children?k.children.splice(y,1,...b.children):k.children.splice(y,1),y}}}function Xj(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Gj.test(e.slice(0,t))?e:""}function Qj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bw(e,t,r){const i=Kl((r||{}).ignore||[]),a=eM(t);let o=-1;for(;++o<a.length;)Ew(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const p=c[f],h=d?d.children:void 0;if(i(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],p=a[o][1];let h=0;const g=f.children.indexOf(l);let v=!1,b=[];d.lastIndex=0;let y=d.exec(l.value);for(;y;){const k=y.index,S={index:y.index,input:y.input,stack:[...c,l]};let E=p(...y,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=k+1:(h!==k&&b.push({type:"text",value:l.value.slice(h,k)}),Array.isArray(E)?b.push(...E):E&&b.push(E),h=k+y[0].length,v=!0),!d.global)break;y=d.exec(l.value)}return v?(h<l.value.length&&b.push({type:"text",value:l.value.slice(h)}),f.children.splice(g,1,...b)):b=[l],g+b.length}}function eM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([tM(i[0]),rM(i[1])])}return t}function tM(e){return typeof e=="string"?new RegExp(Qj(e),"g"):e}function rM(e){return typeof e=="function"?e:function(){return e}}function nM(e){Bw(e,[/\r?\n|\r/g,iM])}function iM(){return{type:"break"}}function aM(){return function(e){nM(e)}}function Uw(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const Md="phrasing",Ld=["autolink","link","image","label"];function oM(){return{transforms:[pM],enter:{literalAutolink:lM,literalAutolinkEmail:Fd,literalAutolinkHttp:Fd,literalAutolinkWww:Fd},exit:{literalAutolink:dM,literalAutolinkEmail:fM,literalAutolinkHttp:uM,literalAutolinkWww:cM}}}function sM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Md,notInConstruct:Ld},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Md,notInConstruct:Ld},{character:":",before:"[ps]",after:"\\/",inConstruct:Md,notInConstruct:Ld}]}}function lM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fd(e){this.config.enter.autolinkProtocol.call(this,e)}function uM(e){this.config.exit.autolinkProtocol.call(this,e)}function cM(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 fM(e){this.config.exit.autolinkEmail.call(this,e)}function dM(e){this.exit(e)}function pM(e){Bw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),mM]],{ignore:["link","linkReference"]})}function hM(e,t,r,n,i){let a="";if(!zw(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!vM(r)))return!1;const o=yM(r+n);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 mM(e,t,r,n){return!zw(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function vM(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 yM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Uw(e,"(");let a=Uw(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function zw(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(r)||Ll(r))&&(!t||r!==47)}Ww.peek=TM;function gM(){return{enter:{gfmFootnoteDefinition:wM,gfmFootnoteDefinitionLabelString:xM,gfmFootnoteCall:_M,gfmFootnoteCallString:kM},exit:{gfmFootnoteDefinition:EM,gfmFootnoteDefinitionLabelString:SM,gfmFootnoteCall:OM,gfmFootnoteCallString:$M}}}function bM(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:CM,footnoteReference:Ww}}}function wM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function xM(){this.buffer()}function SM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=qr(this.sliceSerialize(e)).toLowerCase()}function EM(e){this.exit(e)}function _M(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kM(){this.buffer()}function $M(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=qr(this.sliceSerialize(e)).toLowerCase()}function OM(e){this.exit(e)}function Ww(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function TM(){return"["}function CM(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteDefinition"),s=r.enter("label");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(r.indentLines(r.containerFlow(e,i.current()),IM)),o(),a}function IM(e,t,r){return t===0?e:(r?"":" ")+e}const RM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hw.peek=jM;function AM(){return{canContainEols:["delete"],enter:{strikethrough:NM},exit:{strikethrough:DM}}}function PM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:RM}],handlers:{delete:Hw}}}function NM(e){this.enter({type:"delete",children:[]},e)}function DM(e){this.exit(e)}function Hw(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function jM(){return"~"}function MM(e){return e.length}function LM(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||MM,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const m=[],g=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const b=FM(e[c][v]);if(r.alignDelimiters!==!1){const y=i(b);g[v]=y,(u[v]===void 0||y>u[v])&&(u[v]=y)}m.push(b)}o[c]=m,s[c]=g}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)a[f]=Vw(n[f]);else{const m=Vw(n);for(;++f<l;)a[f]=m}f=-1;const d=[],p=[];for(;++f<l;){const m=a[f];let g="",v="";m===99?(g=":",v=":"):m===108?g=":":m===114&&(v=":");let b=r.alignDelimiters===!1?1:Math.max(1,u[f]-g.length-v.length);const y=g+"-".repeat(b)+v;r.alignDelimiters!==!1&&(b=g.length+b+v.length,b>u[f]&&(u[f]=b),p[f]=b),d[f]=y}o.splice(1,0,d),s.splice(1,0,p),c=-1;const h=[];for(;++c<o.length;){const m=o[c],g=s[c];f=-1;const v=[];for(;++f<l;){const b=m[f]||"";let y="",k="";if(r.alignDelimiters!==!1){const S=u[f]-(g[f]||0),E=a[f];E===114?y=" ".repeat(S):E===99?S%2?(y=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(y=" ".repeat(S/2),k=y):k=" ".repeat(S)}r.delimiterStart!==!1&&!f&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&b==="")&&(r.delimiterStart!==!1||f)&&v.push(" "),r.alignDelimiters!==!1&&v.push(y),v.push(b),r.alignDelimiters!==!1&&v.push(k),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&v.push("|")}h.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(`
|
|
44
|
-
`)}function
|
|
45
|
-
`&&
|
|
46
|
-
`}function
|
|
42
|
+
`}),r}function kw(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function $w(e,t){const r=_j(e,t),n=r.one(e,void 0),i=hj(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
43
|
+
`},i),a}function Cj(e,t){return e&&"run"in e?async function(r,n){const i=$w(r,{file:n,...t});await e.run(i,n)}:function(r,n){return $w(r,{file:n,...e||t})}}function Ow(e){if(e)throw e}var Yl=Object.prototype.hasOwnProperty,Tw=Object.prototype.toString,Cw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,Rw=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Tw.call(t)==="[object Array]"},Aw=function(t){if(!t||Tw.call(t)!=="[object Object]")return!1;var r=Yl.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Yl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Yl.call(t,i)},Pw=function(t,r){Cw&&r.name==="__proto__"?Cw(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Nw=function(t,r){if(r==="__proto__")if(Yl.call(t,r)){if(Iw)return Iw(t,r).value}else return;return t[r]},Ij=function e(){var t,r,n,i,a,o,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(r in t)n=Nw(s,r),i=Nw(t,r),s!==i&&(c&&i&&(Aw(i)||(a=Rw(i)))?(a?(a=!1,o=n&&Rw(n)?n:[]):o=n&&Aw(n)?n:{},Pw(s,{name:r,newValue:e(c,o,i)})):typeof i<"u"&&Pw(s,{name:r,newValue:i}));return s};const Od=Ze(Ij);function Td(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 Rj(){const e=[],t={run:r,use:n};return t;function r(...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(l,...u){const c=e[++a];let f=-1;if(l){o(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?Aj(c,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Aj(e,t){let r;return n;function n(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(s&&r)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const dn={basename:Pj,dirname:Nj,extname:Dj,join:jj,sep:"/"};function Pj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Jo(e);let r=0,n=-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){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Nj(e){if(Jo(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Dj(e){Jo(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function jj(...e){let t=-1,r;for(;++t<e.length;)Jo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Mj(r)}function Mj(e){Jo(e);const t=e.codePointAt(0)===47;let r=Lj(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Lj(e,t){let r="",n=0,i=-1,a=0,o=-1,s,l;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(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function Jo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fj={cwd:Bj};function Bj(){return"/"}function Cd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Uj(e){if(typeof e=="string")e=new URL(e);else if(!Cd(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 zj(e)}function zj(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===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 Id=["history","path","basename","stem","extname","dirname"];class Dw{constructor(t){let r;t?Cd(t)?r={path:t}:typeof t=="string"||Wj(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Fj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Id.length;){const a=Id[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Id.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?dn.basename(this.path):void 0}set basename(t){Ad(t,"basename"),Rd(t,"basename"),this.path=dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dn.dirname(this.path):void 0}set dirname(t){jw(this.basename,"dirname"),this.path=dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dn.extname(this.path):void 0}set extname(t){if(Rd(t,"extname"),jw(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=dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cd(t)&&(t=Uj(t)),Ad(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dn.basename(this.path,this.extname):void 0}set stem(t){Ad(t,"stem"),Rd(t,"stem"),this.path=dn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new er(t,r,n);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 Rd(e,t){if(e&&e.includes(dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dn.sep+"`")}function Ad(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Wj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hj=function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},Vj={}.hasOwnProperty;class Pd extends Hj{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=Rj()}copy(){const t=new Pd;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Od(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(jd("data",this.frozen),this.namespace[t]=r,this):Vj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jd("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[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Jl(t),n=this.parser||this.Parser;return Nd("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Nd("process",this.parser||this.Parser),Dd("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=Jl(t),l=n.parse(s);n.run(l,s,function(c,f,d){if(c||!f||!d)return u(c);const p=f,h=n.stringify(p,d);Kj(h)?d.value=h:d.result=h,u(c,d)});function u(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Nd("processSync",this.parser||this.Parser),Dd("processSync",this.compiler||this.Compiler),this.process(t,i),Lw("processSync","process",r),n;function i(a,o){r=!0,Ow(a),n=o}}run(t,r,n){Mw(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=Jl(r);i.run(t,l,u);function u(c,f,d){const p=f||t;c?s(c):o?o(p):n(void 0,p,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Lw("runSync","run",n),i;function a(o,s){Ow(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=Jl(r),i=this.compiler||this.Compiler;return Dd("stringify",i),Mw(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(jd("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);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(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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=Od(!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];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===u){d=f;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[p,...h]=c;const m=n[d][1];Td(m)&&Td(p)&&(p=Od(!0,m,p)),n[d]=[u,p,...h]}}}}const qj=new Pd().freeze();function Nd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jd(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 Mw(e){if(!Td(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Lw(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jl(e){return Zj(e)?e:new Dw(e)}function Zj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Kj(e){return typeof e=="string"||Gj(e)}function Gj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fw=[],Bw={allowDangerousHtml:!0},Jj=/^(https?|ircs?|mailto|xmpp)$/i,Xj=[{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 Qj(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Fw,l=e.remarkPlugins||Fw,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bw}:Bw,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||eM,p=qj().use(DD).use(l).use(Cj,u).use(s),h=new Dw;typeof n=="string"&&(h.value=n);for(const y of Xj)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Yj+y.id,void 0);const m=p.parse(h);let g=p.runSync(m,h);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),kd(g,v),$P(g,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function v(y,b,k){if(y.type==="raw"&&k&&typeof b=="number")return c?k.children.splice(b,1):k.children[b]={type:"text",value:y.value},b;if(y.type==="element"){let S;for(S in dd)if(Object.hasOwn(dd,S)&&Object.hasOwn(y.properties,S)){const _=y.properties[S],$=dd[S];($===null||$.includes(y.tagName))&&(y.properties[S]=d(String(_||""),S,y))}}if(y.type==="element"){let S=t?!t.includes(y.tagName):o?o.includes(y.tagName):!1;if(!S&&r&&typeof b=="number"&&(S=!r(y,b,k)),S&&k&&typeof b=="number")return f&&y.children?k.children.splice(b,1,...y.children):k.children.splice(b,1),b}}}function eM(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Jj.test(e.slice(0,t))?e:""}function tM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Uw(e,t,r){const i=Kl((r||{}).ignore||[]),a=rM(t);let o=-1;for(;++o<a.length;)_w(e,"text",s);function s(u,c){let f=-1,d;for(;++f<c.length;){const p=c[f],h=d?d.children:void 0;if(i(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return l(u,c)}function l(u,c){const f=c[c.length-1],d=a[o][0],p=a[o][1];let h=0;const g=f.children.indexOf(u);let v=!1,y=[];d.lastIndex=0;let b=d.exec(u.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...c,u]};let _=p(...b,S);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=k+1:(h!==k&&y.push({type:"text",value:u.value.slice(h,k)}),Array.isArray(_)?y.push(..._):_&&y.push(_),h=k+b[0].length,v=!0),!d.global)break;b=d.exec(u.value)}return v?(h<u.value.length&&y.push({type:"text",value:u.value.slice(h)}),f.children.splice(g,1,...y)):y=[u],g+y.length}}function rM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([nM(i[0]),iM(i[1])])}return t}function nM(e){return typeof e=="string"?new RegExp(tM(e),"g"):e}function iM(e){return typeof e=="function"?e:function(){return e}}function aM(e){Uw(e,[/\r?\n|\r/g,oM])}function oM(){return{type:"break"}}function sM(){return function(e){aM(e)}}function zw(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const Md="phrasing",Ld=["autolink","link","image","label"];function lM(){return{transforms:[mM],enter:{literalAutolink:cM,literalAutolinkEmail:Fd,literalAutolinkHttp:Fd,literalAutolinkWww:Fd},exit:{literalAutolink:hM,literalAutolinkEmail:pM,literalAutolinkHttp:fM,literalAutolinkWww:dM}}}function uM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Md,notInConstruct:Ld},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Md,notInConstruct:Ld},{character:":",before:"[ps]",after:"\\/",inConstruct:Md,notInConstruct:Ld}]}}function cM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fd(e){this.config.enter.autolinkProtocol.call(this,e)}function fM(e){this.config.exit.autolinkProtocol.call(this,e)}function dM(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 pM(e){this.config.exit.autolinkEmail.call(this,e)}function hM(e){this.exit(e)}function mM(e){Uw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yM]],{ignore:["link","linkReference"]})}function vM(e,t,r,n,i){let a="";if(!Ww(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!gM(r)))return!1;const o=bM(r+n);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 yM(e,t,r,n){return!Ww(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function gM(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 bM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=zw(e,"(");let a=zw(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Ww(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(r)||Ll(r))&&(!t||r!==47)}Hw.peek=IM;function wM(){return{enter:{gfmFootnoteDefinition:SM,gfmFootnoteDefinitionLabelString:EM,gfmFootnoteCall:$M,gfmFootnoteCallString:OM},exit:{gfmFootnoteDefinition:kM,gfmFootnoteDefinitionLabelString:_M,gfmFootnoteCall:CM,gfmFootnoteCallString:TM}}}function xM(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:RM,footnoteReference:Hw}}}function SM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function EM(){this.buffer()}function _M(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=qr(this.sliceSerialize(e)).toLowerCase()}function kM(e){this.exit(e)}function $M(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function OM(){this.buffer()}function TM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=qr(this.sliceSerialize(e)).toLowerCase()}function CM(e){this.exit(e)}function Hw(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function IM(){return"["}function RM(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteDefinition"),s=r.enter("label");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(r.indentLines(r.containerFlow(e,i.current()),AM)),o(),a}function AM(e,t,r){return t===0?e:(r?"":" ")+e}const PM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vw.peek=LM;function NM(){return{canContainEols:["delete"],enter:{strikethrough:jM},exit:{strikethrough:MM}}}function DM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:PM}],handlers:{delete:Vw}}}function jM(e){this.enter({type:"delete",children:[]},e)}function MM(e){this.exit(e)}function Vw(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function LM(){return"~"}function FM(e){return e.length}function BM(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||FM,a=[],o=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const m=[],g=[];let v=-1;for(e[c].length>u&&(u=e[c].length);++v<e[c].length;){const y=UM(e[c][v]);if(r.alignDelimiters!==!1){const b=i(y);g[v]=b,(l[v]===void 0||b>l[v])&&(l[v]=b)}m.push(y)}o[c]=m,s[c]=g}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<u;)a[f]=qw(n[f]);else{const m=qw(n);for(;++f<u;)a[f]=m}f=-1;const d=[],p=[];for(;++f<u;){const m=a[f];let g="",v="";m===99?(g=":",v=":"):m===108?g=":":m===114&&(v=":");let y=r.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-v.length);const b=g+"-".repeat(y)+v;r.alignDelimiters!==!1&&(y=g.length+y+v.length,y>l[f]&&(l[f]=y),p[f]=y),d[f]=b}o.splice(1,0,d),s.splice(1,0,p),c=-1;const h=[];for(;++c<o.length;){const m=o[c],g=s[c];f=-1;const v=[];for(;++f<u;){const y=m[f]||"";let b="",k="";if(r.alignDelimiters!==!1){const S=l[f]-(g[f]||0),_=a[f];_===114?b=" ".repeat(S):_===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}r.delimiterStart!==!1&&!f&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&y==="")&&(r.delimiterStart!==!1||f)&&v.push(" "),r.alignDelimiters!==!1&&v.push(b),v.push(y),r.alignDelimiters!==!1&&v.push(k),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||f!==u-1)&&v.push("|")}h.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(`
|
|
44
|
+
`)}function UM(e){return e==null?"":String(e)}function qw(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 zM(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),WM);return i(),o}function WM(e,t,r){return">"+(r?"":" ")+e}function HM(e,t){return Zw(e,t.inConstruct,!0)&&!Zw(e,t.notInConstruct,!1)}function Zw(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Kw(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
45
|
+
`&&HM(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
46
|
+
`}function VM(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>o&&(o=a):a=1,i=n+t.length,n=r.indexOf(t,i);return o}function qM(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 ZM(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 KM(e,t,r,n){const i=ZM(r),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(qM(e,r)){const f=r.enter("codeIndented"),d=r.indentLines(a,GM);return f(),d}const s=r.createTracker(n),l=i.repeat(Math.max(VM(a,i)+1,3)),u=r.enter("codeFenced");let c=s.move(l);if(e.lang){const f=r.enter(`codeFencedLang${o}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
|
|
47
47
|
`,encode:["`"],...s.current()})),f()}return c+=s.move(`
|
|
48
48
|
`),a&&(c+=s.move(a+`
|
|
49
|
-
`)),c+=s.move(
|
|
50
|
-
`,...
|
|
49
|
+
`)),c+=s.move(l),u(),c}function GM(e,t,r){return(r?"":" ")+e}function Bd(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 YM(e,t,r,n){const i=Bd(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const l=r.createTracker(n);let u=l.move("[");return u+=l.move(r.safe(r.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":`
|
|
50
|
+
`,...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),o(),u}function JM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Gw.peek=XM;function Gw(e,t,r,n){const i=JM(r),a=r.enter("emphasis"),o=r.createTracker(n);let s=o.move(i);return s+=o.move(r.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function XM(e,t,r){return r.options.emphasis||"*"}function QM(e,t){let r=!1;return kd(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,_d}),!!((!e.depth||e.depth<3)&&pd(e)&&(t.options.setext||r))}function e2(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(QM(e,r)){const c=r.enter("headingSetext"),f=r.enter("phrasing"),d=r.containerPhrasing(e,{...a.current(),before:`
|
|
51
51
|
`,after:`
|
|
52
52
|
`});return f(),c(),d+`
|
|
53
53
|
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
54
|
-
`))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),
|
|
55
|
-
`,...a.current()});return/^[\t ]/.test(
|
|
56
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:
|
|
57
|
-
`))}function u(p,h,m,g){const v=m.enter("tableCell"),b=m.enter("phrasing"),y=m.containerPhrasing(p,{...g,before:a,after:a});return b(),v(),y}function l(p,h){return LM(p,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(p,h,m){const g=p.children;let v=-1;const b=[],y=h.enter("table");for(;++v<g.length;)b[v]=f(g[v],h,m);return y(),b}function f(p,h,m){const g=p.children;let v=-1;const b=[],y=h.enter("tableRow");for(;++v<g.length;)b[v]=u(g[v],p,h,m);return y(),b}function d(p,h,m){let g=ix.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function k2(){return{exit:{taskListCheckValueChecked:ox,taskListCheckValueUnchecked:ox,paragraph:O2}}}function $2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:T2}}}function ox(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function O2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.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===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function T2(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let u=ix.listItem(e,t,r,{...n,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function C2(){return[oM(),gM(),AM(),g2(),k2()]}function I2(e){return{extensions:[sM(),bM(),PM(),_2(e),$2()]}}const R2={tokenize:M2,partial:!0},sx={tokenize:L2,partial:!0},lx={tokenize:F2,partial:!0},ux={tokenize:B2,partial:!0},A2={tokenize:U2,partial:!0},cx={name:"wwwAutolink",tokenize:D2,previous:dx},fx={name:"protocolAutolink",tokenize:j2,previous:px},Fn={name:"emailAutolink",tokenize:N2,previous:hx},pn={};function P2(){return{text:pn}}let zi=48;for(;zi<123;)pn[zi]=Fn,zi++,zi===58?zi=65:zi===91&&(zi=97);pn[43]=Fn,pn[45]=Fn,pn[46]=Fn,pn[95]=Fn,pn[72]=[Fn,fx],pn[104]=[Fn,fx],pn[87]=[Fn,cx],pn[119]=[Fn,cx];function N2(e,t,r){const n=this;let i,a;return o;function o(f){return!Wd(f)||!hx.call(n,n.previous)||Hd(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Wd(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(A2,c,l)(f):f===45||f===95||tr(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&lr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function D2(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!dx.call(n,n.previous)||Hd(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(R2,e.attempt(sx,e.attempt(lx,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function j2(e,t,r){const n=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&px.call(n,n.previous)&&!Hd(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(lr(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),u}return r(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):r(f)}function l(f){return f===null||Ml(f)||yt(f)||Ui(f)||Ll(f)?r(f):e.attempt(sx,e.attempt(lx,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function M2(e,t,r){let n=0;return i;function i(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),i):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function L2(e,t,r){let n,i,a;return o;function o(l){return l===46||l===95?e.check(ux,u,s)(l):l===null||yt(l)||Ui(l)||l!==45&&Ll(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),o}function u(l){return i||n||!a?r(l):t(l)}}function F2(e,t){let r=0,n=0;return i;function i(o){return o===40?(r++,e.consume(o),i):o===41&&n<r?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(ux,t,a)(o):o===null||yt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function B2(e,t,r){return n;function n(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),n):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||yt(s)||Ui(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||yt(s)||Ui(s)?t(s):n(s)}function a(s){return lr(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):lr(s)?(e.consume(s),o):r(s)}}function U2(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return tr(a)?r(a):t(a)}}function dx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function px(e){return!lr(e)}function hx(e){return!(e===47||Wd(e))}function Wd(e){return e===43||e===45||e===46||e===95||tr(e)}function Hd(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const z2={tokenize:Y2,partial:!0};function W2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Z2,continuation:{tokenize:K2},exit:G2}},text:{91:{name:"gfmFootnoteCall",tokenize:q2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:H2,resolveTo:V2}}}}function H2(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const u=n.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return r(u);const l=qr(n.sliceSerialize({start:o.end,end:n.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function V2(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+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[r+1],e[r+2],["enter",n,t],e[r+3],e[r+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",n,t]];return e.splice(r,e.length-r+1,...s),e}function q2(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(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||yt(f))return r(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(qr(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return yt(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function Z2(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(o>999||h===93&&!s||h===null||h===91||yt(h))return r(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=qr(n.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return yt(h)||(s=!0),o++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(a)||i.push(a),Qe(e,p,"gfmFootnoteDefinitionWhitespace")):r(h)}function p(h){return t(h)}}function K2(e,t,r){return e.check(Zo,t,e.attempt(z2,t,r))}function G2(e){e.exit("gfmFootnoteDefinition")}function Y2(e,t,r){const n=this;return Qe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function J2(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Pr(d,d.length,0,Bl(p,o.slice(l+1,u),s)),Pr(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Pr(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(h){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=Fl(l);if(h===126)return f>1?u(h):(o.consume(h),f++,p);if(f<2&&!r)return u(h);const g=o.exit("strikethroughSequenceTemporary"),v=Fl(h);return g._open=!v||v===2&&!!m,g._close=!m||m===2&&!!v,s(h)}}}class X2{constructor(){this.map=[]}add(t,r,n){Q2(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let i=n.pop();for(;i;)t.push(...i),i=n.pop();this.map.length=0}}function Q2(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function eL(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function tL(){return{flow:{null:{name:"table",tokenize:rL,resolveAll:nL}}}}function rL(e,t,r){const n=this;let i=0,a=0,o;return s;function s(O){let D=n.events.length-1;for(;D>-1;){const I=n.events[D][1].type;if(I==="lineEnding"||I==="linePrefix")D--;else break}const H=D>-1?n.events[D][1].type:null,L=H==="tableHead"||H==="tableRow"?E:u;return L===E&&n.parser.lazy[n.now().line]?r(O):L(O)}function u(O){return e.enter("tableHead"),e.enter("tableRow"),l(O)}function l(O){return O===124||(o=!0,a+=1),c(O)}function c(O){return O===null?r(O):Ie(O)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),p):r(O):Ke(O)?Qe(e,c,"whitespace")(O):(a+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||yt(O)?(e.exit("data"),c(O)):(e.consume(O),O===92?d:f)}function d(O){return O===92||O===124?(e.consume(O),f):f(O)}function p(O){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(O):(e.enter("tableDelimiterRow"),o=!1,Ke(O)?Qe(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?g(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):S(O)}function m(O){return Ke(O)?Qe(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||Ie(O)?k(O):S(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),b(O)):S(O)}function b(O){return O===45?(e.consume(O),b):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(O))}function y(O){return Ke(O)?Qe(e,k,"whitespace")(O):k(O)}function k(O){return O===124?h(O):O===null||Ie(O)?!o||i!==a?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return r(O)}function E(O){return e.enter("tableRow"),$(O)}function $(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),$):O===null||Ie(O)?(e.exit("tableRow"),t(O)):Ke(O)?Qe(e,$,"whitespace")(O):(e.enter("data"),M(O))}function M(O){return O===null||O===124||yt(O)?(e.exit("data"),$(O)):(e.consume(O),O===92?z:M)}function z(O){return O===92||O===124?(e.consume(O),M):M(O)}}function nL(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new X2;for(;++r<e.length;){const p=e[r],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,u!==0&&(mx(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,a=[0,0,0,0],o=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Xl(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],f=Xl(d,t,a,i,void 0,f)),a=o,o=[a[1],r,0,0])):h.type==="tableHead"?(s=!0,u=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(u=r,a[1]!==0?(o[0]=o[1],f=Xl(d,t,a,i,r,f)):o[1]!==0&&(f=Xl(d,t,o,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=r)}for(u!==0&&mx(d,t,u,l,c),d.consume(t.events),r=-1;++r<t.events.length;){const p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=eL(t.events,r))}return e}function Xl(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},xa(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const u=xa(t.events,r[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const l=xa(t.events,r[2]),c=xa(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const d=t.events[r[2]],p=t.events[r[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,m=r[3]-r[2]-1;e.add(h,m,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},xa(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function mx(e,t,r,n,i){const a=[],o=xa(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function xa(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const iL={name:"tasklistCheck",tokenize:oL};function aL(){return{text:{91:iL}}}function oL(e,t,r){const n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return yt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):r(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return Ie(u)?t(u):Ke(u)?e.check({tokenize:sL},t,r)(u):r(u)}}function sL(e,t,r){return Qe(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function lL(e){return Hb([P2(),W2(),J2(e),tL(),aL()])}const uL={};function cL(e){const t=this,r=e||uL,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(lL(r)),a.push(C2()),o.push(I2(r))}const gt={container:{className:"bpReset bpContainer"},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"},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"},poweredBy:{className:"bpComposerPoweredBy"},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"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},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"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},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"}}},fL=({text:e})=>{const{message:{blocks:{text:t}}}=gt,r={h1:({node:n,...i})=>C.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:n,...i})=>C.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:n,...i})=>C.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...i})=>C.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:n,...i})=>C.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:n,...i})=>C.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:n,...i})=>C.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:n,...i})=>C.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...i})=>C.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:n,...i})=>C.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:n,...i})=>C.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:n,...i})=>C.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:n,...i})=>C.jsx("pre",{...i,...t==null?void 0:t.pre})};return C.jsx(Jj,{components:r,remarkPlugins:[cL,aM],children:e})};function vx(e,t){return function(){return e.apply(t,arguments)}}const{toString:yx}=Object.prototype,{getPrototypeOf:Vd}=Object,qd=(e=>t=>{const r=yx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bn=e=>(e=e.toLowerCase(),t=>qd(t)===e),Ql=e=>t=>typeof t===e,{isArray:Sa}=Array,Xo=Ql("undefined");function dL(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gx=Bn("ArrayBuffer");function pL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&gx(e.buffer),t}const hL=Ql("string"),Wi=Ql("function"),bx=Ql("number"),Zd=e=>e!==null&&typeof e=="object",mL=e=>e===!0||e===!1,eu=e=>{if(qd(e)!=="object")return!1;const t=Vd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},vL=Bn("Date"),yL=Bn("File"),gL=Bn("Blob"),bL=Bn("FileList"),wL=e=>Zd(e)&&Wi(e.pipe),xL=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||yx.call(e)===t||Wi(e.toString)&&e.toString()===t)},SL=Bn("URLSearchParams"),EL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Sa(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(n=0;n<o;n++)s=a[n],t.call(null,e[s],s,e)}}function wx(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const xx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sx=e=>!Xo(e)&&e!==xx;function Kd(){const{caseless:e}=Sx(this)&&this||{},t={},r=(n,i)=>{const a=e&&wx(t,i)||i;eu(t[a])&&eu(n)?t[a]=Kd(t[a],n):eu(n)?t[a]=Kd({},n):Sa(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Qo(arguments[n],r);return t}const _L=(e,t,r,{allOwnKeys:n}={})=>(Qo(t,(i,a)=>{r&&Wi(i)?e[a]=vx(i,r):e[a]=i},{allOwnKeys:n}),e),kL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$L=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},OL=(e,t,r,n)=>{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],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Vd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},TL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},CL=e=>{if(!e)return null;if(Sa(e))return e;let t=e.length;if(!bx(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},IL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vd(Uint8Array)),RL=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},AL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},PL=Bn("HTMLFormElement"),NL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Ex=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),DL=Bn("RegExp"),_x=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Qo(r,(i,a)=>{t(i,a,e)!==!1&&(n[a]=i)}),Object.defineProperties(e,n)},G={isArray:Sa,isArrayBuffer:gx,isBuffer:dL,isFormData:xL,isArrayBufferView:pL,isString:hL,isNumber:bx,isBoolean:mL,isObject:Zd,isPlainObject:eu,isUndefined:Xo,isDate:vL,isFile:yL,isBlob:gL,isRegExp:DL,isFunction:Wi,isStream:wL,isURLSearchParams:SL,isTypedArray:IL,isFileList:bL,forEach:Qo,merge:Kd,extend:_L,trim:EL,stripBOM:kL,inherits:$L,toFlatObject:OL,kindOf:qd,kindOfTest:Bn,endsWith:TL,toArray:CL,forEachEntry:RL,matchAll:AL,isHTMLForm:PL,hasOwnProperty:Ex,hasOwnProp:Ex,reduceDescriptors:_x,freezeMethods:e=>{_x(e,(t,r)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Wi(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Sa(e)?n(e):n(String(e).split(t)),r},toCamelCase:NL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:wx,global:xx,isContextDefined:Sx,toJSONObject:e=>{const t=new Array(10),r=(n,i)=>{if(Zd(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=Sa(n)?[]:{};return Qo(n,(o,s)=>{const u=r(o,i+1);!Xo(u)&&(a[s]=u)}),t[i]=void 0,a}}return n};return r(e,0)}};function it(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}G.inherits(it,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const kx=it.prototype,$x={};["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=>{$x[e]={value:e}}),Object.defineProperties(it,$x),Object.defineProperty(kx,"isAxiosError",{value:!0}),it.from=(e,t,r,n,i,a)=>{const o=Object.create(kx);return G.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var jL=typeof self=="object"?self.FormData:window.FormData;const ML=Ze(jL);function Gd(e){return G.isPlainObject(e)||G.isArray(e)}function Ox(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Tx(e,t,r){return e?e.concat(t).map(function(i,a){return i=Ox(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function LL(e){return G.isArray(e)&&!e.some(Gd)}const FL=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function BL(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function tu(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(ML||FormData),r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!G.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&BL(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(!u&&G.isBlob(h))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,g){let v=h;if(h&&!g&&typeof h=="object"){if(G.endsWith(m,"{}"))m=n?m:m.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&LL(h)||G.isFileList(h)||G.endsWith(m,"[]")&&(v=G.toArray(h)))return m=Ox(m),v.forEach(function(y,k){!(G.isUndefined(y)||y===null)&&t.append(o===!0?Tx([m],k,a):o===null?m:m+"[]",l(y))}),!1}return Gd(h)?!0:(t.append(Tx(g,m,a),l(h)),!1)}const f=[],d=Object.assign(FL,{defaultVisitor:c,convertValue:l,isVisitable:Gd});function p(h,m){if(!G.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),G.forEach(h,function(v,b){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(b)?b.trim():b,m,d))===!0&&p(v,m?m.concat(b):[b])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Cx(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Yd(e,t){this._pairs=[],e&&tu(e,this,t)}const Ix=Yd.prototype;Ix.append=function(t,r){this._pairs.push([t,r])},Ix.toString=function(t){const r=t?function(n){return t.call(this,n,Cx)}:Cx;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function UL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rx(e,t,r){if(!t)return e;const n=r&&r.encode||UL,i=r&&r.serialize;let a;if(i?a=i(t,r):a=G.isURLSearchParams(t)?t.toString():new Yd(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ax{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Px={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zL=typeof URLSearchParams<"u"?URLSearchParams:Yd,WL=FormData,HL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),VL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hn={isBrowser:!0,classes:{URLSearchParams:zL,FormData:WL,Blob},isStandardBrowserEnv:HL,isStandardBrowserWebWorkerEnv:VL,protocols:["http","https","file","blob","url","data"]};function qL(e,t){return tu(e,new hn.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return hn.isNode&&G.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function ZL(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function KL(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function Nx(e){function t(r,n,i,a){let o=r[a++];const s=Number.isFinite(+o),u=a>=r.length;return o=!o&&G.isArray(i)?i.length:o,u?(G.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&G.isArray(i[o])&&(i[o]=KL(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const r={};return G.forEachEntry(e,(n,i)=>{t(ZL(n),i,r,0)}),r}return null}const GL={"Content-Type":void 0};function YL(e,t,r){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ea={transitional:Px,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(Nx(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return qL(t,this.formSerializer).toString();if((s=G.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return tu(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),YL(t)):t}],transformResponse:[function(t){const r=this.transitional||Ea.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.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:hn.classes.FormData,Blob:hn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){Ea.headers[t]={}}),G.forEach(["post","put","patch"],function(t){Ea.headers[t]=G.merge(GL)});const JL=G.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"]),XL=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
58
|
-
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&
|
|
59
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Dx]=this[Dx]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=es(o);n[s]||(rF(i,o),n[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Dr.prototype),G.freezeMethods(Dr);function Jd(e,t){const r=this||Ea,n=t||r,i=Dr.from(n.headers);let a=n.data;return G.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Mx(e){return!!(e&&e.__CANCEL__)}function ts(e,t,r){it.call(this,e??"canceled",it.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(ts,it,{__CANCEL__:!0});const nF=null;function iF(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new it("Request failed with status code "+r.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const aF=hn.isStandardBrowserEnv?function(){return{write:function(r,n,i,a,o,s){const u=[];u.push(r+"="+encodeURIComponent(n)),G.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),G.isString(a)&&u.push("path="+a),G.isString(o)&&u.push("domain="+o),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function oF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Lx(e,t){return e&&!oF(t)?sF(e,t):t}const lF=hn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(a){let o=a;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function uF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cF(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=n[a];o||(o=l),r[i]=u,n[i]=l;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(d*1e3/p):void 0}}function Fx(e,t){let r=0;const n=cF(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,u=n(s),l=a<=o;r=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const nu={http:nF,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let i=e.data;const a=Dr.from(e.headers).normalize(),o=e.responseType;let s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(hn.isStandardBrowserEnv||hn.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+h))}const c=Lx(e.baseURL,e.url);l.open(e.method.toUpperCase(),Rx(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const p=Dr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};iF(function(v){r(v),u()},function(v){n(v),u()},m),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&&(n(new it("Request aborted",it.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new it("Network Error",it.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Px;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new it(h,m.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,l)),l=null},hn.isStandardBrowserEnv){const p=(e.withCredentials||lF(c))&&e.xsrfCookieName&&aF.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&G.forEach(a.toJSON(),function(h,m){l.setRequestHeader(m,h)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Fx(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Fx(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{l&&(n(!p||p.type?new ts(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=uF(c);if(d&&hn.protocols.indexOf(d)===-1){n(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};G.forEach(nu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fF={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let i=0;i<t&&(r=e[i],!(n=G.isString(r)?nu[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new it(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(nu,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!G.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:nu};function Xd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ts(null,e)}function Bx(e){return Xd(e),e.headers=Dr.from(e.headers),e.data=Jd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fF.getAdapter(e.adapter||Ea.adapter)(e).then(function(n){return Xd(e),n.data=Jd.call(e,e.transformResponse,n),n.headers=Dr.from(n.headers),n},function(n){return Mx(n)||(Xd(e),n&&n.response&&(n.response.data=Jd.call(e,e.transformResponse,n.response),n.response.headers=Dr.from(n.response.headers))),Promise.reject(n)})}const Ux=e=>e instanceof Dr?e.toJSON():e;function _a(e,t){t=t||{};const r={};function n(l,c,f){return G.isPlainObject(l)&&G.isPlainObject(c)?G.merge.call({caseless:f},l,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function i(l,c,f){if(G.isUndefined(c)){if(!G.isUndefined(l))return n(void 0,l,f)}else return n(l,c,f)}function a(l,c){if(!G.isUndefined(c))return n(void 0,c)}function o(l,c){if(G.isUndefined(c)){if(!G.isUndefined(l))return n(void 0,l)}else return n(void 0,c)}function s(l,c,f){if(f in t)return n(l,c);if(f in e)return n(void 0,l)}const u={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,c)=>i(Ux(l),Ux(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,d=f(e[c],t[c],c);G.isUndefined(d)&&f!==s||(r[c]=d)}),r}const zx="1.2.5",Qd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Wx={};Qd.transitional=function(t,r,n){function i(a,o){return"[Axios v"+zx+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(r?" in "+r:"")),it.ERR_DEPRECATED);return r&&!Wx[o]&&(Wx[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};function dF(e,t,r){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new it("option "+a+" must be "+u,it.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const ep={assertOptions:dF,validators:Qd},si=ep.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new Ax,response:new Ax}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_a(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&ep.assertOptions(n,{silentJSONParsing:si.transitional(si.boolean),forcedJSONParsing:si.transitional(si.boolean),clarifyTimeoutError:si.transitional(si.boolean)},!1),i!==void 0&&ep.assertOptions(i,{encode:si.function,serialize:si.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[r.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),r.headers=Dr.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(u=u&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!u){const h=[Bx.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),d=h.length,c=Promise.resolve(r);f<d;)c=c.then(h[f++],h[f++]);return c}d=s.length;let p=r;for(f=0;f<d;){const h=s[f++],m=s[f++];try{p=h(p)}catch(g){m.call(this,g);break}}try{c=Bx.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=_a(this.defaults,t);const r=Lx(t.baseURL,t.url);return Rx(r,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(r,n){return this.request(_a(n||{},{method:t,url:r,data:(n||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function r(n){return function(a,o,s){return this.request(_a(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=r(),Hi.prototype[t+"Form"]=r(!0)});class tp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new ts(a,o,s),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new tp(function(i){t=i}),cancel:t}}}function pF(e){return function(r){return e.apply(null,r)}}function hF(e){return G.isObject(e)&&e.isAxiosError===!0}const rp={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(rp).forEach(([e,t])=>{rp[t]=e});function Hx(e){const t=new Hi(e),r=vx(Hi.prototype.request,t);return G.extend(r,Hi.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Hx(_a(e,i))},r}const At=Hx(Ea);At.Axios=Hi,At.CanceledError=ts,At.CancelToken=tp,At.isCancel=Mx,At.VERSION=zx,At.toFormData=tu,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=pF,At.isAxiosError=hF,At.mergeConfig=_a,At.AxiosHeaders=Dr,At.formToJSON=e=>Nx(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=rp,At.default=At;const Vx={},mF=Object.freeze(Object.defineProperty({__proto__:null,default:Vx},Symbol.toStringTag,{value:"Module"}));var vF=Error,yF=EvalError,gF=RangeError,bF=ReferenceError,qx=SyntaxError,li=TypeError,wF=URIError,iu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Zx=typeof Symbol<"u"&&Symbol,xF=iu,np=function(){return typeof Zx!="function"||typeof Symbol!="function"||typeof Zx("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:xF()},ip={__proto__:null,foo:{}},SF=Object,EF=function(){return{__proto__:ip}.foo===ip.foo&&!(ip instanceof SF)},_F="Function.prototype.bind called on incompatible ",kF=Object.prototype.toString,$F=Math.max,OF="[object Function]",Kx=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},TF=function(t,r){for(var n=[],i=r,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},CF=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},IF=function(t){var r=this;if(typeof r!="function"||kF.apply(r)!==OF)throw new TypeError(_F+r);for(var n=TF(arguments,1),i,a=function(){if(this instanceof i){var c=r.apply(this,Kx(n,arguments));return Object(c)===c?c:this}return r.apply(t,Kx(n,arguments))},o=$F(0,r.length-n.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+CF(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i},RF=IF,ap=Function.prototype.bind||RF,AF=Function.prototype.call,PF=Object.prototype.hasOwnProperty,NF=ap,Gx=NF.call(AF,PF),Ye,DF=vF,jF=yF,MF=gF,LF=bF,ka=qx,$a=li,FF=wF,Yx=Function,op=function(e){try{return Yx('"use strict"; return ('+e+").constructor;")()}catch{}},Vi=Object.getOwnPropertyDescriptor;if(Vi)try{Vi({},"")}catch{Vi=null}var sp=function(){throw new $a},BF=Vi?function(){try{return arguments.callee,sp}catch{try{return Vi(arguments,"callee").get}catch{return sp}}}():sp,Oa=np(),UF=EF(),qt=Object.getPrototypeOf||(UF?function(e){return e.__proto__}:null),Ta={},zF=typeof Uint8Array>"u"||!qt?Ye:qt(Uint8Array),qi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ye:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ye:ArrayBuffer,"%ArrayIteratorPrototype%":Oa&&qt?qt([][Symbol.iterator]()):Ye,"%AsyncFromSyncIteratorPrototype%":Ye,"%AsyncFunction%":Ta,"%AsyncGenerator%":Ta,"%AsyncGeneratorFunction%":Ta,"%AsyncIteratorPrototype%":Ta,"%Atomics%":typeof Atomics>"u"?Ye:Atomics,"%BigInt%":typeof BigInt>"u"?Ye:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ye:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ye:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ye:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":DF,"%eval%":eval,"%EvalError%":jF,"%Float32Array%":typeof Float32Array>"u"?Ye:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ye:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ye:FinalizationRegistry,"%Function%":Yx,"%GeneratorFunction%":Ta,"%Int8Array%":typeof Int8Array>"u"?Ye:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ye:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ye:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oa&&qt?qt(qt([][Symbol.iterator]())):Ye,"%JSON%":typeof JSON=="object"?JSON:Ye,"%Map%":typeof Map>"u"?Ye:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oa||!qt?Ye:qt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ye:Promise,"%Proxy%":typeof Proxy>"u"?Ye:Proxy,"%RangeError%":MF,"%ReferenceError%":LF,"%Reflect%":typeof Reflect>"u"?Ye:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ye:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oa||!qt?Ye:qt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ye:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oa&&qt?qt(""[Symbol.iterator]()):Ye,"%Symbol%":Oa?Symbol:Ye,"%SyntaxError%":ka,"%ThrowTypeError%":BF,"%TypedArray%":zF,"%TypeError%":$a,"%Uint8Array%":typeof Uint8Array>"u"?Ye:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ye:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ye:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ye:Uint32Array,"%URIError%":FF,"%WeakMap%":typeof WeakMap>"u"?Ye:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ye:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ye:WeakSet};if(qt)try{null.error}catch(e){var WF=qt(qt(e));qi["%Error.prototype%"]=WF}var HF=function e(t){var r;if(t==="%AsyncFunction%")r=op("async function () {}");else if(t==="%GeneratorFunction%")r=op("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=op("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&qt&&(r=qt(i.prototype))}return qi[t]=r,r},Jx={__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"]},rs=ap,au=Gx,VF=rs.call(Function.call,Array.prototype.concat),qF=rs.call(Function.apply,Array.prototype.splice),Xx=rs.call(Function.call,String.prototype.replace),ou=rs.call(Function.call,String.prototype.slice),ZF=rs.call(Function.call,RegExp.prototype.exec),KF=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,GF=/\\(\\)?/g,YF=function(t){var r=ou(t,0,1),n=ou(t,-1);if(r==="%"&&n!=="%")throw new ka("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ka("invalid intrinsic syntax, expected opening `%`");var i=[];return Xx(t,KF,function(a,o,s,u){i[i.length]=s?Xx(u,GF,"$1"):o||a}),i},JF=function(t,r){var n=t,i;if(au(Jx,n)&&(i=Jx[n],n="%"+i[0]+"%"),au(qi,n)){var a=qi[n];if(a===Ta&&(a=HF(n)),typeof a>"u"&&!r)throw new $a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ka("intrinsic "+t+" does not exist!")},mn=function(t,r){if(typeof t!="string"||t.length===0)throw new $a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new $a('"allowMissing" argument must be a boolean');if(ZF(/^%?[^%]*%?$/,t)===null)throw new ka("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=YF(t),i=n.length>0?n[0]:"",a=JF("%"+i+"%",r),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],qF(n,VF([0,1],l)));for(var c=1,f=!0;c<n.length;c+=1){var d=n[c],p=ou(d,0,1),h=ou(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new ka("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(u=!0),i+="."+d,o="%"+i+"%",au(qi,o))s=qi[o];else if(s!=null){if(!(d in s)){if(!r)throw new $a("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vi&&c+1>=n.length){var m=Vi(s,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[d]}else f=au(s,d),s=s[d];f&&!u&&(qi[o]=s)}}return s},Qx={exports:{}},XF=mn,su=XF("%Object.defineProperty%",!0)||!1;if(su)try{su({},"a",{value:1})}catch{su=!1}var lp=su,QF=mn,lu=QF("%Object.getOwnPropertyDescriptor%",!0);if(lu)try{lu([],"length")}catch{lu=null}var up=lu,e0=lp,e5=qx,Ca=li,t0=up,cp=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Ca("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ca("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ca("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ca("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ca("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ca("`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,u=!!t0&&t0(t,r);if(e0)e0(t,r,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new e5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},fp=lp,r0=function(){return!!fp};r0.hasArrayLengthDefineBug=function(){if(!fp)return null;try{return fp([],"length",{value:1}).length!==1}catch{return!0}};var dp=r0,t5=mn,n0=cp,r5=dp(),i0=up,a0=li,n5=t5("%Math.floor%"),i5=function(t,r){if(typeof t!="function")throw new a0("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||n5(r)!==r)throw new a0("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&i0){var o=i0(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(r5?n0(t,"length",r,!0,!0):n0(t,"length",r)),t};(function(e){var t=ap,r=mn,n=i5,i=li,a=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||t.call(o,a),u=lp,l=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return n(p,1+l(0,d.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(Qx);var Ia=Qx.exports,o0=mn,s0=Ia,a5=s0(o0("String.prototype.indexOf")),jr=function(t,r){var n=o0(t,!!r);return typeof n=="function"&&a5(t,".prototype.")>-1?s0(n):n};const o5=eR(mF);var pp=typeof Map=="function"&&Map.prototype,hp=Object.getOwnPropertyDescriptor&&pp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,uu=pp&&hp&&typeof hp.get=="function"?hp.get:null,l0=pp&&Map.prototype.forEach,mp=typeof Set=="function"&&Set.prototype,vp=Object.getOwnPropertyDescriptor&&mp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,cu=mp&&vp&&typeof vp.get=="function"?vp.get:null,u0=mp&&Set.prototype.forEach,s5=typeof WeakMap=="function"&&WeakMap.prototype,ns=s5?WeakMap.prototype.has:null,l5=typeof WeakSet=="function"&&WeakSet.prototype,is=l5?WeakSet.prototype.has:null,u5=typeof WeakRef=="function"&&WeakRef.prototype,c0=u5?WeakRef.prototype.deref:null,c5=Boolean.prototype.valueOf,f5=Object.prototype.toString,d5=Function.prototype.toString,p5=String.prototype.match,yp=String.prototype.slice,ui=String.prototype.replace,h5=String.prototype.toUpperCase,f0=String.prototype.toLowerCase,d0=RegExp.prototype.test,p0=Array.prototype.concat,vn=Array.prototype.join,m5=Array.prototype.slice,h0=Math.floor,gp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,bp=Object.getOwnPropertySymbols,wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ra||!0)?Symbol.toStringTag:null,m0=Object.prototype.propertyIsEnumerable,v0=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function y0(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||d0.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-h0(-e):h0(e);if(n!==e){var i=String(n),a=yp.call(t,i.length+1);return ui.call(i,r,"$&_")+"."+ui.call(ui.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ui.call(t,r,"$&_")}var xp=o5,g0=xp.custom,b0=S0(g0)?g0:null,v5=function e(t,r,n,i){var a=r||{};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 _0(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?y0(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?y0(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return Sp(t)?"[Array]":"[Object]";var f=N5(a,n);if(typeof i>"u")i=[];else if(E0(i,t)>=0)return"[Circular]";function d(L,I,j){if(I&&(i=m5.call(i),i.push(I)),j){var F={depth:a.depth};return ci(a,"quoteStyle")&&(F.quoteStyle=a.quoteStyle),e(L,F,n+1,i)}return e(L,a,n+1,i)}if(typeof t=="function"&&!x0(t)){var p=k5(t),h=fu(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+vn.call(h,", ")+" }":"")}if(S0(t)){var m=Ra?ui.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):wp.call(t);return typeof t=="object"&&!Ra?as(m):m}if(R5(t)){for(var g="<"+f0.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)g+=" "+v[b].name+"="+w0(y5(v[b].value),"double",a);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+f0.call(String(t.nodeName))+">",g}if(Sp(t)){if(t.length===0)return"[]";var y=fu(t,d);return f&&!P5(y)?"["+_p(y,f)+"]":"[ "+vn.call(y,", ")+" ]"}if(b5(t)){var k=fu(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!m0.call(t,"cause")?"{ ["+String(t)+"] "+vn.call(p0.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+vn.call(k,", ")+" }"}if(typeof t=="object"&&o){if(b0&&typeof t[b0]=="function"&&xp)return xp(t,{depth:c-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($5(t)){var S=[];return l0&&l0.call(t,function(L,I){S.push(d(I,t,!0)+" => "+d(L,t))}),k0("Map",uu.call(t),S,f)}if(C5(t)){var E=[];return u0&&u0.call(t,function(L){E.push(d(L,t))}),k0("Set",cu.call(t),E,f)}if(O5(t))return Ep("WeakMap");if(I5(t))return Ep("WeakSet");if(T5(t))return Ep("WeakRef");if(x5(t))return as(d(Number(t)));if(E5(t))return as(d(gp.call(t)));if(S5(t))return as(c5.call(t));if(w5(t))return as(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ct<"u"&&t===ct)return"{ [object globalThis] }";if(!g5(t)&&!x0(t)){var $=fu(t,d),M=v0?v0(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",O=!M&&rr&&Object(t)===t&&rr in t?yp.call(fi(t),8,-1):z?"Object":"",D=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=D+(O||z?"["+vn.call(p0.call([],O||[],z||[]),": ")+"] ":"");return $.length===0?H+"{}":f?H+"{"+_p($,f)+"}":H+"{ "+vn.call($,", ")+" }"}return String(t)};function w0(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function y5(e){return ui.call(String(e),/"/g,""")}function Sp(e){return fi(e)==="[object Array]"&&(!rr||!(typeof e=="object"&&rr in e))}function g5(e){return fi(e)==="[object Date]"&&(!rr||!(typeof e=="object"&&rr in e))}function x0(e){return fi(e)==="[object RegExp]"&&(!rr||!(typeof e=="object"&&rr in e))}function b5(e){return fi(e)==="[object Error]"&&(!rr||!(typeof e=="object"&&rr in e))}function w5(e){return fi(e)==="[object String]"&&(!rr||!(typeof e=="object"&&rr in e))}function x5(e){return fi(e)==="[object Number]"&&(!rr||!(typeof e=="object"&&rr in e))}function S5(e){return fi(e)==="[object Boolean]"&&(!rr||!(typeof e=="object"&&rr in e))}function S0(e){if(Ra)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!wp)return!1;try{return wp.call(e),!0}catch{}return!1}function E5(e){if(!e||typeof e!="object"||!gp)return!1;try{return gp.call(e),!0}catch{}return!1}var _5=Object.prototype.hasOwnProperty||function(e){return e in this};function ci(e,t){return _5.call(e,t)}function fi(e){return f5.call(e)}function k5(e){if(e.name)return e.name;var t=p5.call(d5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function E0(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function $5(e){if(!uu||!e||typeof e!="object")return!1;try{uu.call(e);try{cu.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function O5(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{is.call(e,is)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function T5(e){if(!c0||!e||typeof e!="object")return!1;try{return c0.call(e),!0}catch{}return!1}function C5(e){if(!cu||!e||typeof e!="object")return!1;try{cu.call(e);try{uu.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function I5(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e,is);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function R5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function _0(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return _0(yp.call(e,0,t.maxStringLength),t)+n}var i=ui.call(ui.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,A5);return w0(i,"single",t)}function A5(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+h5.call(t.toString(16))}function as(e){return"Object("+e+")"}function Ep(e){return e+" { ? }"}function k0(e,t,r,n){var i=n?_p(r,n):vn.call(r,", ");return e+" ("+t+") {"+i+"}"}function P5(e){for(var t=0;t<e.length;t++)if(E0(e[t],`
|
|
60
|
-
`)>=0)return!1;return!0}function
|
|
54
|
+
`))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),l=r.enter("phrasing");a.move(o+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
+
`,...a.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?o+" "+u:o,r.options.closeAtx&&(u+=" "+o),l(),s(),u}Yw.peek=t2;function Yw(e){return e.value||""}function t2(){return"<"}Jw.peek=r2;function Jw(e,t,r,n){const i=Bd(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const l=r.createTracker(n);let u=l.move("![");return u+=l.move(r.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),o(),u}function r2(){return"!"}Xw.peek=n2;function Xw(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const s=r.createTracker(n);let l=s.move("![");const u=r.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function n2(){return"!"}Qw.peek=i2;function Qw(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const o=r.unsafe[a],s=r.compilePattern(o);let l;if(o.atBreak)for(;l=s.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return i+n+i}function i2(){return"`"}function ex(e,t){const r=pd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tx.peek=a2;function tx(e,t,r,n){const i=Bd(r),a=i==='"'?"Quote":"Apostrophe",o=r.createTracker(n);let s,l;if(ex(e,r)){const c=r.stack;r.stack=[],s=r.enter("autolink");let f=o.move("<");return f+=o.move(r.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),r.stack=c,f}s=r.enter("link"),l=r.enter("label");let u=o.move("[");return u+=o.move(r.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function a2(e,t,r){return ex(e,r)?"<":"["}rx.peek=o2;function rx(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const s=r.createTracker(n);let l=s.move("[");const u=r.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function o2(){return"["}function Ud(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 s2(e){const t=Ud(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function l2(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 nx(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 u2(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?l2(r):Ud(r);const s=e.ordered?o==="."?")":".":s2(r);let l=t&&r.bulletLastUsed?o===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),nx(r)===o&&c){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),r.bulletCurrent=o;const u=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),u}function c2(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 f2(e,t,r,n){const i=c2(r);let a=r.bulletCurrent||Ud(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),c);return l(),u;function c(f,d,p){return d?(p?"":" ".repeat(o))+f:(p?a:a+" ".repeat(o-a.length))+f}}function d2(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o}const p2=Kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function h2(e,t,r,n){return(e.children.some(function(o){return p2(o)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function m2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ix.peek=v2;function ix(e,t,r,n){const i=m2(r),a=r.enter("strong"),o=r.createTracker(n);let s=o.move(i+i);return s+=o.move(r.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function v2(e,t,r){return r.options.strong||"*"}function y2(e,t,r,n){return r.safe(e.value,n)}function g2(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 b2(e,t,r){const n=(nx(r)+(r.options.ruleSpaces?" ":"")).repeat(g2(r));return r.options.ruleSpaces?n.slice(0,-1):n}const ax={blockquote:zM,break:Kw,code:KM,definition:YM,emphasis:Gw,hardBreak:Kw,heading:e2,html:Yw,image:Jw,imageReference:Xw,inlineCode:Qw,link:tx,linkReference:rx,list:u2,listItem:f2,paragraph:d2,root:h2,strong:ix,text:y2,thematicBreak:b2};function w2(){return{enter:{table:x2,tableData:ox,tableHeader:ox,tableRow:E2},exit:{codeText:_2,table:S2,tableData:zd,tableHeader:zd,tableRow:zd}}}function x2(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function S2(e){this.exit(e),this.data.inTable=void 0}function E2(e){this.enter({type:"tableRow",children:[]},e)}function zd(e){this.exit(e)}function ox(e){this.enter({type:"tableCell",children:[]},e)}function _2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,k2));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function k2(e,t){return t==="|"?t:e}function $2(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";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:d,table:o,tableCell:l,tableRow:s}};function o(p,h,m,g){return u(c(p,m,g),p.align)}function s(p,h,m,g){const v=f(p,m,g),y=u([v]);return y.slice(0,y.indexOf(`
|
|
57
|
+
`))}function l(p,h,m,g){const v=m.enter("tableCell"),y=m.enter("phrasing"),b=m.containerPhrasing(p,{...g,before:a,after:a});return y(),v(),b}function u(p,h){return BM(p,{align:h,alignDelimiters:n,padding:r,stringLength:i})}function c(p,h,m){const g=p.children;let v=-1;const y=[],b=h.enter("table");for(;++v<g.length;)y[v]=f(g[v],h,m);return b(),y}function f(p,h,m){const g=p.children;let v=-1;const y=[],b=h.enter("tableRow");for(;++v<g.length;)y[v]=l(g[v],p,h,m);return b(),y}function d(p,h,m){let g=ax.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function O2(){return{exit:{taskListCheckValueChecked:sx,taskListCheckValueUnchecked:sx,paragraph:C2}}}function T2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:I2}}}function sx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function C2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.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===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function I2(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let l=ax.listItem(e,t,r,{...n,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+o}}function R2(){return[lM(),wM(),NM(),w2(),O2()]}function A2(e){return{extensions:[uM(),xM(),DM(),$2(e),T2()]}}const P2={tokenize:F2,partial:!0},lx={tokenize:B2,partial:!0},ux={tokenize:U2,partial:!0},cx={tokenize:z2,partial:!0},N2={tokenize:W2,partial:!0},fx={name:"wwwAutolink",tokenize:M2,previous:px},dx={name:"protocolAutolink",tokenize:L2,previous:hx},Fn={name:"emailAutolink",tokenize:j2,previous:mx},pn={};function D2(){return{text:pn}}let zi=48;for(;zi<123;)pn[zi]=Fn,zi++,zi===58?zi=65:zi===91&&(zi=97);pn[43]=Fn,pn[45]=Fn,pn[46]=Fn,pn[95]=Fn,pn[72]=[Fn,dx],pn[104]=[Fn,dx],pn[87]=[Fn,fx],pn[119]=[Fn,fx];function j2(e,t,r){const n=this;let i,a;return o;function o(f){return!Wd(f)||!mx.call(n,n.previous)||Hd(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Wd(f)?(e.consume(f),s):f===64?(e.consume(f),l):r(f)}function l(f){return f===46?e.check(N2,c,u)(f):f===45||f===95||tr(f)?(a=!0,e.consume(f),l):c(f)}function u(f){return e.consume(f),i=!0,l}function c(f){return a&&i&&lr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function M2(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!px.call(n,n.previous)||Hd(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(P2,e.attempt(lx,e.attempt(ux,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function L2(e,t,r){const n=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&hx.call(n,n.previous)&&!Hd(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(lr(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),l}return r(f)}function l(f){return f===47?(e.consume(f),a?u:(a=!0,l)):r(f)}function u(f){return f===null||Ml(f)||yt(f)||Ui(f)||Ll(f)?r(f):e.attempt(lx,e.attempt(ux,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function F2(e,t,r){let n=0;return i;function i(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),i):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function B2(e,t,r){let n,i,a;return o;function o(u){return u===46||u===95?e.check(cx,l,s)(u):u===null||yt(u)||Ui(u)||u!==45&&Ll(u)?l(u):(a=!0,e.consume(u),o)}function s(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),o}function l(u){return i||n||!a?r(u):t(u)}}function U2(e,t){let r=0,n=0;return i;function i(o){return o===40?(r++,e.consume(o),i):o===41&&n<r?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(cx,t,a)(o):o===null||yt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function z2(e,t,r){return n;function n(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),n):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||yt(s)||Ui(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||yt(s)||Ui(s)?t(s):n(s)}function a(s){return lr(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):lr(s)?(e.consume(s),o):r(s)}}function W2(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return tr(a)?r(a):t(a)}}function px(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function hx(e){return!lr(e)}function mx(e){return!(e===47||Wd(e))}function Wd(e){return e===43||e===45||e===46||e===95||tr(e)}function Hd(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const H2={tokenize:X2,partial:!0};function V2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:G2,continuation:{tokenize:Y2},exit:J2}},text:{91:{name:"gfmFootnoteCall",tokenize:K2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:q2,resolveTo:Z2}}}}function q2(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){o=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(!o||!o._balanced)return r(l);const u=qr(n.sliceSerialize({start:o.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Z2(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+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[r+1],e[r+2],["enter",n,t],e[r+3],e[r+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",n,t]];return e.splice(r,e.length-r+1,...s),e}function K2(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;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?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(a>999||f===93&&!o||f===null||f===91||yt(f))return r(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(qr(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return yt(f)||(o=!0),a++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,u):u(f)}}function G2(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(h)}function c(h){if(o>999||h===93&&!s||h===null||h===91||yt(h))return r(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=qr(n.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return yt(h)||(s=!0),o++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(a)||i.push(a),Qe(e,p,"gfmFootnoteDefinitionWhitespace")):r(h)}function p(h){return t(h)}}function Y2(e,t,r){return e.check(Zo,t,e.attempt(H2,t,r))}function J2(e){e.exit("gfmFootnoteDefinition")}function X2(e,t,r){const n=this;return Qe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function Q2(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Pr(d,d.length,0,Bl(p,o.slice(u+1,l),s)),Pr(d,d.length,0,[["exit",f,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),Pr(o,u-1,l-u+3,d),l=u+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const u=this.previous,c=this.events;let f=0;return d;function d(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=Fl(u);if(h===126)return f>1?l(h):(o.consume(h),f++,p);if(f<2&&!r)return l(h);const g=o.exit("strikethroughSequenceTemporary"),v=Fl(h);return g._open=!v||v===2&&!!m,g._close=!m||m===2&&!!v,s(h)}}}class eL{constructor(){this.map=[]}add(t,r,n){tL(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let i=n.pop();for(;i;)t.push(...i),i=n.pop();this.map.length=0}}function tL(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function rL(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function nL(){return{flow:{null:{name:"table",tokenize:iL,resolveAll:aL}}}}function iL(e,t,r){const n=this;let i=0,a=0,o;return s;function s(O){let D=n.events.length-1;for(;D>-1;){const W=n.events[D][1].type;if(W==="lineEnding"||W==="linePrefix")D--;else break}const H=D>-1?n.events[D][1].type:null,L=H==="tableHead"||H==="tableRow"?_:l;return L===_&&n.parser.lazy[n.now().line]?r(O):L(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(o=!0,a+=1),c(O)}function c(O){return O===null?r(O):Ie(O)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),p):r(O):Ke(O)?Qe(e,c,"whitespace")(O):(a+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||yt(O)?(e.exit("data"),c(O)):(e.consume(O),O===92?d:f)}function d(O){return O===92||O===124?(e.consume(O),f):f(O)}function p(O){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(O):(e.enter("tableDelimiterRow"),o=!1,Ke(O)?Qe(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?g(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):S(O)}function m(O){return Ke(O)?Qe(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||Ie(O)?k(O):S(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),y(O)):S(O)}function y(O){return O===45?(e.consume(O),y):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(O))}function b(O){return Ke(O)?Qe(e,k,"whitespace")(O):k(O)}function k(O){return O===124?h(O):O===null||Ie(O)?!o||i!==a?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return r(O)}function _(O){return e.enter("tableRow"),$(O)}function $(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),$):O===null||Ie(O)?(e.exit("tableRow"),t(O)):Ke(O)?Qe(e,$,"whitespace")(O):(e.enter("data"),N(O))}function N(O){return O===null||O===124||yt(O)?(e.exit("data"),$(O)):(e.consume(O),O===92?z:N)}function z(O){return O===92||O===124?(e.consume(O),N):N(O)}}function aL(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,f;const d=new eL;for(;++r<e.length;){const p=e[r],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(vx(d,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(r,0,[["enter",u,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,f=void 0,a=[0,0,0,0],o=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(r,0,[["enter",c,t]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Xl(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],f=Xl(d,t,a,i,void 0,f)),a=o,o=[a[1],r,0,0])):h.type==="tableHead"?(s=!0,l=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=r,a[1]!==0?(o[0]=o[1],f=Xl(d,t,a,i,r,f)):o[1]!==0&&(f=Xl(d,t,o,i,r,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=r)}for(l!==0&&vx(d,t,l,u,c),d.consume(t.events),r=-1;++r<t.events.length;){const p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=rL(t.events,r))}return e}function Xl(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},xa(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const l=xa(t.events,r[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const u=xa(t.events,r[2]),c=xa(t.events,r[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const d=t.events[r[2]],p=t.events[r[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,m=r[3]-r[2]-1;e.add(h,m,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},xa(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function vx(e,t,r,n,i){const a=[],o=xa(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function xa(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const oL={name:"tasklistCheck",tokenize:lL};function sL(){return{text:{91:oL}}}function lL(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return yt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):r(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(l)}function s(l){return Ie(l)?t(l):Ke(l)?e.check({tokenize:uL},t,r)(l):r(l)}}function uL(e,t,r){return Qe(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function cL(e){return Vb([D2(),V2(),Q2(e),nL(),sL()])}const fL={};function dL(e){const t=this,r=e||fL,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(cL(r)),a.push(R2()),o.push(A2(r))}const gt={container:{className:"bpReset bpContainer"},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"},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"},poweredBy:{className:"bpComposerPoweredBy"},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"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},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"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},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"}}},pL=({text:e})=>{const{message:{blocks:{text:t}}}=gt,r={h1:({node:n,...i})=>C.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:n,...i})=>C.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:n,...i})=>C.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...i})=>C.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:n,...i})=>C.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:n,...i})=>C.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:n,...i})=>C.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:n,...i})=>C.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...i})=>C.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:n,...i})=>C.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:n,...i})=>C.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:n,...i})=>C.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:n,...i})=>C.jsx("pre",{...i,...t==null?void 0:t.pre})};return C.jsx(Qj,{components:r,remarkPlugins:[dL,sM],children:e})};function yx(e,t){return function(){return e.apply(t,arguments)}}const{toString:gx}=Object.prototype,{getPrototypeOf:Vd}=Object,qd=(e=>t=>{const r=gx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bn=e=>(e=e.toLowerCase(),t=>qd(t)===e),Ql=e=>t=>typeof t===e,{isArray:Sa}=Array,Xo=Ql("undefined");function hL(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bx=Bn("ArrayBuffer");function mL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bx(e.buffer),t}const vL=Ql("string"),Wi=Ql("function"),wx=Ql("number"),Zd=e=>e!==null&&typeof e=="object",yL=e=>e===!0||e===!1,eu=e=>{if(qd(e)!=="object")return!1;const t=Vd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},gL=Bn("Date"),bL=Bn("File"),wL=Bn("Blob"),xL=Bn("FileList"),SL=e=>Zd(e)&&Wi(e.pipe),EL=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||gx.call(e)===t||Wi(e.toString)&&e.toString()===t)},_L=Bn("URLSearchParams"),kL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Sa(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(n=0;n<o;n++)s=a[n],t.call(null,e[s],s,e)}}function xx(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Sx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ex=e=>!Xo(e)&&e!==Sx;function Kd(){const{caseless:e}=Ex(this)&&this||{},t={},r=(n,i)=>{const a=e&&xx(t,i)||i;eu(t[a])&&eu(n)?t[a]=Kd(t[a],n):eu(n)?t[a]=Kd({},n):Sa(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Qo(arguments[n],r);return t}const $L=(e,t,r,{allOwnKeys:n}={})=>(Qo(t,(i,a)=>{r&&Wi(i)?e[a]=yx(i,r):e[a]=i},{allOwnKeys:n}),e),OL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},CL=(e,t,r,n)=>{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],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Vd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},IL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},RL=e=>{if(!e)return null;if(Sa(e))return e;let t=e.length;if(!wx(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},AL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vd(Uint8Array)),PL=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},NL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},DL=Bn("HTMLFormElement"),jL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),_x=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),ML=Bn("RegExp"),kx=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Qo(r,(i,a)=>{t(i,a,e)!==!1&&(n[a]=i)}),Object.defineProperties(e,n)},G={isArray:Sa,isArrayBuffer:bx,isBuffer:hL,isFormData:EL,isArrayBufferView:mL,isString:vL,isNumber:wx,isBoolean:yL,isObject:Zd,isPlainObject:eu,isUndefined:Xo,isDate:gL,isFile:bL,isBlob:wL,isRegExp:ML,isFunction:Wi,isStream:SL,isURLSearchParams:_L,isTypedArray:AL,isFileList:xL,forEach:Qo,merge:Kd,extend:$L,trim:kL,stripBOM:OL,inherits:TL,toFlatObject:CL,kindOf:qd,kindOfTest:Bn,endsWith:IL,toArray:RL,forEachEntry:PL,matchAll:NL,isHTMLForm:DL,hasOwnProperty:_x,hasOwnProp:_x,reduceDescriptors:kx,freezeMethods:e=>{kx(e,(t,r)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Wi(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Sa(e)?n(e):n(String(e).split(t)),r},toCamelCase:jL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:xx,global:Sx,isContextDefined:Ex,toJSONObject:e=>{const t=new Array(10),r=(n,i)=>{if(Zd(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=Sa(n)?[]:{};return Qo(n,(o,s)=>{const l=r(o,i+1);!Xo(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)}};function it(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}G.inherits(it,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $x=it.prototype,Ox={};["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=>{Ox[e]={value:e}}),Object.defineProperties(it,Ox),Object.defineProperty($x,"isAxiosError",{value:!0}),it.from=(e,t,r,n,i,a)=>{const o=Object.create($x);return G.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var LL=typeof self=="object"?self.FormData:window.FormData;const FL=Ze(LL);function Gd(e){return G.isPlainObject(e)||G.isArray(e)}function Tx(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Cx(e,t,r){return e?e.concat(t).map(function(i,a){return i=Tx(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function BL(e){return G.isArray(e)&&!e.some(Gd)}const UL=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function zL(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function tu(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(FL||FormData),r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!G.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&zL(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(!l&&G.isBlob(h))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,g){let v=h;if(h&&!g&&typeof h=="object"){if(G.endsWith(m,"{}"))m=n?m:m.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&BL(h)||G.isFileList(h)||G.endsWith(m,"[]")&&(v=G.toArray(h)))return m=Tx(m),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?Cx([m],k,a):o===null?m:m+"[]",u(b))}),!1}return Gd(h)?!0:(t.append(Cx(g,m,a),u(h)),!1)}const f=[],d=Object.assign(UL,{defaultVisitor:c,convertValue:u,isVisitable:Gd});function p(h,m){if(!G.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),G.forEach(h,function(v,y){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(y)?y.trim():y,m,d))===!0&&p(v,m?m.concat(y):[y])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Ix(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Yd(e,t){this._pairs=[],e&&tu(e,this,t)}const Rx=Yd.prototype;Rx.append=function(t,r){this._pairs.push([t,r])},Rx.toString=function(t){const r=t?function(n){return t.call(this,n,Ix)}:Ix;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function WL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ax(e,t,r){if(!t)return e;const n=r&&r.encode||WL,i=r&&r.serialize;let a;if(i?a=i(t,r):a=G.isURLSearchParams(t)?t.toString():new Yd(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Px{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Nx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},HL=typeof URLSearchParams<"u"?URLSearchParams:Yd,VL=FormData,qL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ZL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hn={isBrowser:!0,classes:{URLSearchParams:HL,FormData:VL,Blob},isStandardBrowserEnv:qL,isStandardBrowserWebWorkerEnv:ZL,protocols:["http","https","file","blob","url","data"]};function KL(e,t){return tu(e,new hn.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return hn.isNode&&G.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function GL(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function YL(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function Dx(e){function t(r,n,i,a){let o=r[a++];const s=Number.isFinite(+o),l=a>=r.length;return o=!o&&G.isArray(i)?i.length:o,l?(G.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&G.isArray(i[o])&&(i[o]=YL(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const r={};return G.forEachEntry(e,(n,i)=>{t(GL(n),i,r,0)}),r}return null}const JL={"Content-Type":void 0};function XL(e,t,r){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ea={transitional:Nx,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(Dx(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return KL(t,this.formSerializer).toString();if((s=G.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return tu(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),XL(t)):t}],transformResponse:[function(t){const r=this.transitional||Ea.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.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:hn.classes.FormData,Blob:hn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){Ea.headers[t]={}}),G.forEach(["post","put","patch"],function(t){Ea.headers[t]=G.merge(JL)});const QL=G.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"]),eF=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
58
|
+
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&QL[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},jx=Symbol("internals");function es(e){return e&&String(e).trim().toLowerCase()}function ru(e){return e===!1||e==null?e:G.isArray(e)?e.map(ru):String(e)}function tF(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function rF(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Mx(e,t,r,n){if(G.isFunction(n))return n.call(this,t,r);if(G.isString(t)){if(G.isString(n))return t.indexOf(n)!==-1;if(G.isRegExp(n))return n.test(t)}}function nF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function iF(e,t){const r=G.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}class Dr{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=es(l);if(!c)throw new Error("header name must be a non-empty string");const f=G.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=ru(s))}const o=(s,l)=>G.forEach(s,(u,c)=>a(u,c,l));return G.isPlainObject(t)||t instanceof this.constructor?o(t,r):G.isString(t)&&(t=t.trim())&&!rF(t)?o(eF(t),r):t!=null&&a(r,t,n),this}get(t,r){if(t=es(t),t){const n=G.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return tF(i);if(G.isFunction(r))return r.call(this,i,n);if(G.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=es(t),t){const n=G.findKey(this,t);return!!(n&&(!r||Mx(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=es(o),o){const s=G.findKey(n,o);s&&(!r||Mx(n,n[s],s,r))&&(delete n[s],i=!0)}}return G.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const r=this,n={};return G.forEach(this,(i,a)=>{const o=G.findKey(n,a);if(o){r[o]=ru(i),delete r[a];return}const s=t?nF(a):String(a).trim();s!==a&&delete r[a],r[s]=ru(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return G.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&G.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
59
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[jx]=this[jx]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=es(o);n[s]||(iF(i,o),n[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Dr.prototype),G.freezeMethods(Dr);function Jd(e,t){const r=this||Ea,n=t||r,i=Dr.from(n.headers);let a=n.data;return G.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Lx(e){return!!(e&&e.__CANCEL__)}function ts(e,t,r){it.call(this,e??"canceled",it.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(ts,it,{__CANCEL__:!0});const aF=null;function oF(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new it("Request failed with status code "+r.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const sF=hn.isStandardBrowserEnv?function(){return{write:function(r,n,i,a,o,s){const l=[];l.push(r+"="+encodeURIComponent(n)),G.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),G.isString(a)&&l.push("path="+a),G.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function lF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function uF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Fx(e,t){return e&&!lF(t)?uF(e,t):t}const cF=hn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(a){let o=a;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function fF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dF(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(d*1e3/p):void 0}}function Bx(e,t){let r=0;const n=dF(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-r,l=n(s),u=a<=o;r=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-a)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const nu={http:aF,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let i=e.data;const a=Dr.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(hn.isStandardBrowserEnv||hn.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+h))}const c=Fx(e.baseURL,e.url);u.open(e.method.toUpperCase(),Ax(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const p=Dr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};oF(function(v){r(v),l()},function(v){n(v),l()},m),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(n(new it("Request aborted",it.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new it("Network Error",it.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Nx;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new it(h,m.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,u)),u=null},hn.isStandardBrowserEnv){const p=(e.withCredentials||cF(c))&&e.xsrfCookieName&&sF.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in u&&G.forEach(a.toJSON(),function(h,m){u.setRequestHeader(m,h)}),G.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Bx(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Bx(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{u&&(n(!p||p.type?new ts(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=fF(c);if(d&&hn.protocols.indexOf(d)===-1){n(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};G.forEach(nu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pF={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let i=0;i<t&&(r=e[i],!(n=G.isString(r)?nu[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new it(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(nu,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!G.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:nu};function Xd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ts(null,e)}function Ux(e){return Xd(e),e.headers=Dr.from(e.headers),e.data=Jd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pF.getAdapter(e.adapter||Ea.adapter)(e).then(function(n){return Xd(e),n.data=Jd.call(e,e.transformResponse,n),n.headers=Dr.from(n.headers),n},function(n){return Lx(n)||(Xd(e),n&&n.response&&(n.response.data=Jd.call(e,e.transformResponse,n.response),n.response.headers=Dr.from(n.response.headers))),Promise.reject(n)})}const zx=e=>e instanceof Dr?e.toJSON():e;function _a(e,t){t=t||{};const r={};function n(u,c,f){return G.isPlainObject(u)&&G.isPlainObject(c)?G.merge.call({caseless:f},u,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function i(u,c,f){if(G.isUndefined(c)){if(!G.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function a(u,c){if(!G.isUndefined(c))return n(void 0,c)}function o(u,c){if(G.isUndefined(c)){if(!G.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={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:(u,c)=>i(zx(u),zx(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=l[c]||i,d=f(e[c],t[c],c);G.isUndefined(d)&&f!==s||(r[c]=d)}),r}const Wx="1.2.5",Qd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Hx={};Qd.transitional=function(t,r,n){function i(a,o){return"[Axios v"+Wx+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(r?" in "+r:"")),it.ERR_DEPRECATED);return r&&!Hx[o]&&(Hx[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};function hF(e,t,r){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new it("option "+a+" must be "+l,it.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const ep={assertOptions:hF,validators:Qd},si=ep.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new Px,response:new Px}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_a(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&ep.assertOptions(n,{silentJSONParsing:si.transitional(si.boolean),forcedJSONParsing:si.transitional(si.boolean),clarifyTimeoutError:si.transitional(si.boolean)},!1),i!==void 0&&ep.assertOptions(i,{encode:si.function,serialize:si.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[r.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),r.headers=Dr.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){const h=[Ux.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f<d;)c=c.then(h[f++],h[f++]);return c}d=s.length;let p=r;for(f=0;f<d;){const h=s[f++],m=s[f++];try{p=h(p)}catch(g){m.call(this,g);break}}try{c=Ux.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=_a(this.defaults,t);const r=Fx(t.baseURL,t.url);return Ax(r,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(r,n){return this.request(_a(n||{},{method:t,url:r,data:(n||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function r(n){return function(a,o,s){return this.request(_a(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=r(),Hi.prototype[t+"Form"]=r(!0)});class tp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new ts(a,o,s),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new tp(function(i){t=i}),cancel:t}}}function mF(e){return function(r){return e.apply(null,r)}}function vF(e){return G.isObject(e)&&e.isAxiosError===!0}const rp={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(rp).forEach(([e,t])=>{rp[t]=e});function Vx(e){const t=new Hi(e),r=yx(Hi.prototype.request,t);return G.extend(r,Hi.prototype,t,{allOwnKeys:!0}),G.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Vx(_a(e,i))},r}const At=Vx(Ea);At.Axios=Hi,At.CanceledError=ts,At.CancelToken=tp,At.isCancel=Lx,At.VERSION=Wx,At.toFormData=tu,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=mF,At.isAxiosError=vF,At.mergeConfig=_a,At.AxiosHeaders=Dr,At.formToJSON=e=>Dx(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=rp,At.default=At;const qx={},yF=Object.freeze(Object.defineProperty({__proto__:null,default:qx},Symbol.toStringTag,{value:"Module"}));var gF=Error,bF=EvalError,wF=RangeError,xF=ReferenceError,Zx=SyntaxError,li=TypeError,SF=URIError,iu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Kx=typeof Symbol<"u"&&Symbol,EF=iu,np=function(){return typeof Kx!="function"||typeof Symbol!="function"||typeof Kx("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:EF()},ip={__proto__:null,foo:{}},_F=Object,kF=function(){return{__proto__:ip}.foo===ip.foo&&!(ip instanceof _F)},$F="Function.prototype.bind called on incompatible ",OF=Object.prototype.toString,TF=Math.max,CF="[object Function]",Gx=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},IF=function(t,r){for(var n=[],i=r,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},RF=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},AF=function(t){var r=this;if(typeof r!="function"||OF.apply(r)!==CF)throw new TypeError($F+r);for(var n=IF(arguments,1),i,a=function(){if(this instanceof i){var c=r.apply(this,Gx(n,arguments));return Object(c)===c?c:this}return r.apply(t,Gx(n,arguments))},o=TF(0,r.length-n.length),s=[],l=0;l<o;l++)s[l]="$"+l;if(i=Function("binder","return function ("+RF(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i},PF=AF,ap=Function.prototype.bind||PF,NF=Function.prototype.call,DF=Object.prototype.hasOwnProperty,jF=ap,Yx=jF.call(NF,DF),Ye,MF=gF,LF=bF,FF=wF,BF=xF,ka=Zx,$a=li,UF=SF,Jx=Function,op=function(e){try{return Jx('"use strict"; return ('+e+").constructor;")()}catch{}},Vi=Object.getOwnPropertyDescriptor;if(Vi)try{Vi({},"")}catch{Vi=null}var sp=function(){throw new $a},zF=Vi?function(){try{return arguments.callee,sp}catch{try{return Vi(arguments,"callee").get}catch{return sp}}}():sp,Oa=np(),WF=kF(),qt=Object.getPrototypeOf||(WF?function(e){return e.__proto__}:null),Ta={},HF=typeof Uint8Array>"u"||!qt?Ye:qt(Uint8Array),qi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ye:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ye:ArrayBuffer,"%ArrayIteratorPrototype%":Oa&&qt?qt([][Symbol.iterator]()):Ye,"%AsyncFromSyncIteratorPrototype%":Ye,"%AsyncFunction%":Ta,"%AsyncGenerator%":Ta,"%AsyncGeneratorFunction%":Ta,"%AsyncIteratorPrototype%":Ta,"%Atomics%":typeof Atomics>"u"?Ye:Atomics,"%BigInt%":typeof BigInt>"u"?Ye:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ye:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ye:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ye:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":MF,"%eval%":eval,"%EvalError%":LF,"%Float32Array%":typeof Float32Array>"u"?Ye:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ye:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ye:FinalizationRegistry,"%Function%":Jx,"%GeneratorFunction%":Ta,"%Int8Array%":typeof Int8Array>"u"?Ye:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ye:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ye:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oa&&qt?qt(qt([][Symbol.iterator]())):Ye,"%JSON%":typeof JSON=="object"?JSON:Ye,"%Map%":typeof Map>"u"?Ye:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oa||!qt?Ye:qt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ye:Promise,"%Proxy%":typeof Proxy>"u"?Ye:Proxy,"%RangeError%":FF,"%ReferenceError%":BF,"%Reflect%":typeof Reflect>"u"?Ye:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ye:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oa||!qt?Ye:qt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ye:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oa&&qt?qt(""[Symbol.iterator]()):Ye,"%Symbol%":Oa?Symbol:Ye,"%SyntaxError%":ka,"%ThrowTypeError%":zF,"%TypedArray%":HF,"%TypeError%":$a,"%Uint8Array%":typeof Uint8Array>"u"?Ye:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ye:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ye:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ye:Uint32Array,"%URIError%":UF,"%WeakMap%":typeof WeakMap>"u"?Ye:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ye:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ye:WeakSet};if(qt)try{null.error}catch(e){var VF=qt(qt(e));qi["%Error.prototype%"]=VF}var qF=function e(t){var r;if(t==="%AsyncFunction%")r=op("async function () {}");else if(t==="%GeneratorFunction%")r=op("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=op("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&qt&&(r=qt(i.prototype))}return qi[t]=r,r},Xx={__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"]},rs=ap,au=Yx,ZF=rs.call(Function.call,Array.prototype.concat),KF=rs.call(Function.apply,Array.prototype.splice),Qx=rs.call(Function.call,String.prototype.replace),ou=rs.call(Function.call,String.prototype.slice),GF=rs.call(Function.call,RegExp.prototype.exec),YF=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,JF=/\\(\\)?/g,XF=function(t){var r=ou(t,0,1),n=ou(t,-1);if(r==="%"&&n!=="%")throw new ka("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ka("invalid intrinsic syntax, expected opening `%`");var i=[];return Qx(t,YF,function(a,o,s,l){i[i.length]=s?Qx(l,JF,"$1"):o||a}),i},QF=function(t,r){var n=t,i;if(au(Xx,n)&&(i=Xx[n],n="%"+i[0]+"%"),au(qi,n)){var a=qi[n];if(a===Ta&&(a=qF(n)),typeof a>"u"&&!r)throw new $a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ka("intrinsic "+t+" does not exist!")},mn=function(t,r){if(typeof t!="string"||t.length===0)throw new $a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new $a('"allowMissing" argument must be a boolean');if(GF(/^%?[^%]*%?$/,t)===null)throw new ka("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=XF(t),i=n.length>0?n[0]:"",a=QF("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],KF(n,ZF([0,1],u)));for(var c=1,f=!0;c<n.length;c+=1){var d=n[c],p=ou(d,0,1),h=ou(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new ka("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),i+="."+d,o="%"+i+"%",au(qi,o))s=qi[o];else if(s!=null){if(!(d in s)){if(!r)throw new $a("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vi&&c+1>=n.length){var m=Vi(s,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[d]}else f=au(s,d),s=s[d];f&&!l&&(qi[o]=s)}}return s},e0={exports:{}},e5=mn,su=e5("%Object.defineProperty%",!0)||!1;if(su)try{su({},"a",{value:1})}catch{su=!1}var lp=su,t5=mn,lu=t5("%Object.getOwnPropertyDescriptor%",!0);if(lu)try{lu([],"length")}catch{lu=null}var up=lu,t0=lp,r5=Zx,Ca=li,r0=up,cp=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Ca("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ca("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ca("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ca("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ca("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ca("`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,l=!!r0&&r0(t,r);if(t0)t0(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new r5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},fp=lp,n0=function(){return!!fp};n0.hasArrayLengthDefineBug=function(){if(!fp)return null;try{return fp([],"length",{value:1}).length!==1}catch{return!0}};var dp=n0,n5=mn,i0=cp,i5=dp(),a0=up,o0=li,a5=n5("%Math.floor%"),o5=function(t,r){if(typeof t!="function")throw new o0("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||a5(r)!==r)throw new o0("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&a0){var o=a0(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(i5?i0(t,"length",r,!0,!0):i0(t,"length",r)),t};(function(e){var t=ap,r=mn,n=o5,i=li,a=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||t.call(o,a),l=lp,u=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return n(p,1+u(0,d.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c})(e0);var Ia=e0.exports,s0=mn,l0=Ia,s5=l0(s0("String.prototype.indexOf")),jr=function(t,r){var n=s0(t,!!r);return typeof n=="function"&&s5(t,".prototype.")>-1?l0(n):n};const l5=rR(yF);var pp=typeof Map=="function"&&Map.prototype,hp=Object.getOwnPropertyDescriptor&&pp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,uu=pp&&hp&&typeof hp.get=="function"?hp.get:null,u0=pp&&Map.prototype.forEach,mp=typeof Set=="function"&&Set.prototype,vp=Object.getOwnPropertyDescriptor&&mp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,cu=mp&&vp&&typeof vp.get=="function"?vp.get:null,c0=mp&&Set.prototype.forEach,u5=typeof WeakMap=="function"&&WeakMap.prototype,ns=u5?WeakMap.prototype.has:null,c5=typeof WeakSet=="function"&&WeakSet.prototype,is=c5?WeakSet.prototype.has:null,f5=typeof WeakRef=="function"&&WeakRef.prototype,f0=f5?WeakRef.prototype.deref:null,d5=Boolean.prototype.valueOf,p5=Object.prototype.toString,h5=Function.prototype.toString,m5=String.prototype.match,yp=String.prototype.slice,ui=String.prototype.replace,v5=String.prototype.toUpperCase,d0=String.prototype.toLowerCase,p0=RegExp.prototype.test,h0=Array.prototype.concat,vn=Array.prototype.join,y5=Array.prototype.slice,m0=Math.floor,gp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,bp=Object.getOwnPropertySymbols,wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ra||!0)?Symbol.toStringTag:null,v0=Object.prototype.propertyIsEnumerable,y0=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function g0(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||p0.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-m0(-e):m0(e);if(n!==e){var i=String(n),a=yp.call(t,i.length+1);return ui.call(i,r,"$&_")+"."+ui.call(ui.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ui.call(t,r,"$&_")}var xp=l5,b0=xp.custom,w0=E0(b0)?b0:null,g5=function e(t,r,n,i){var a=r||{};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 k0(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?g0(t,l):l}if(typeof t=="bigint"){var u=String(t)+"n";return s?g0(t,u):u}var c=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return Sp(t)?"[Array]":"[Object]";var f=j5(a,n);if(typeof i>"u")i=[];else if(_0(i,t)>=0)return"[Circular]";function d(L,W,M){if(W&&(i=y5.call(i),i.push(W)),M){var I={depth:a.depth};return ci(a,"quoteStyle")&&(I.quoteStyle=a.quoteStyle),e(L,I,n+1,i)}return e(L,a,n+1,i)}if(typeof t=="function"&&!S0(t)){var p=O5(t),h=fu(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+vn.call(h,", ")+" }":"")}if(E0(t)){var m=Ra?ui.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):wp.call(t);return typeof t=="object"&&!Ra?as(m):m}if(P5(t)){for(var g="<"+d0.call(String(t.nodeName)),v=t.attributes||[],y=0;y<v.length;y++)g+=" "+v[y].name+"="+x0(b5(v[y].value),"double",a);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+d0.call(String(t.nodeName))+">",g}if(Sp(t)){if(t.length===0)return"[]";var b=fu(t,d);return f&&!D5(b)?"["+_p(b,f)+"]":"[ "+vn.call(b,", ")+" ]"}if(x5(t)){var k=fu(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!v0.call(t,"cause")?"{ ["+String(t)+"] "+vn.call(h0.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+vn.call(k,", ")+" }"}if(typeof t=="object"&&o){if(w0&&typeof t[w0]=="function"&&xp)return xp(t,{depth:c-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(T5(t)){var S=[];return u0&&u0.call(t,function(L,W){S.push(d(W,t,!0)+" => "+d(L,t))}),$0("Map",uu.call(t),S,f)}if(R5(t)){var _=[];return c0&&c0.call(t,function(L){_.push(d(L,t))}),$0("Set",cu.call(t),_,f)}if(C5(t))return Ep("WeakMap");if(A5(t))return Ep("WeakSet");if(I5(t))return Ep("WeakRef");if(E5(t))return as(d(Number(t)));if(k5(t))return as(d(gp.call(t)));if(_5(t))return as(d5.call(t));if(S5(t))return as(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ct<"u"&&t===ct)return"{ [object globalThis] }";if(!w5(t)&&!S0(t)){var $=fu(t,d),N=y0?y0(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",O=!N&&rr&&Object(t)===t&&rr in t?yp.call(fi(t),8,-1):z?"Object":"",D=N||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=D+(O||z?"["+vn.call(h0.call([],O||[],z||[]),": ")+"] ":"");return $.length===0?H+"{}":f?H+"{"+_p($,f)+"}":H+"{ "+vn.call($,", ")+" }"}return String(t)};function x0(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function b5(e){return ui.call(String(e),/"/g,""")}function Sp(e){return fi(e)==="[object Array]"&&(!rr||!(typeof e=="object"&&rr in e))}function w5(e){return fi(e)==="[object Date]"&&(!rr||!(typeof e=="object"&&rr in e))}function S0(e){return fi(e)==="[object RegExp]"&&(!rr||!(typeof e=="object"&&rr in e))}function x5(e){return fi(e)==="[object Error]"&&(!rr||!(typeof e=="object"&&rr in e))}function S5(e){return fi(e)==="[object String]"&&(!rr||!(typeof e=="object"&&rr in e))}function E5(e){return fi(e)==="[object Number]"&&(!rr||!(typeof e=="object"&&rr in e))}function _5(e){return fi(e)==="[object Boolean]"&&(!rr||!(typeof e=="object"&&rr in e))}function E0(e){if(Ra)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!wp)return!1;try{return wp.call(e),!0}catch{}return!1}function k5(e){if(!e||typeof e!="object"||!gp)return!1;try{return gp.call(e),!0}catch{}return!1}var $5=Object.prototype.hasOwnProperty||function(e){return e in this};function ci(e,t){return $5.call(e,t)}function fi(e){return p5.call(e)}function O5(e){if(e.name)return e.name;var t=m5.call(h5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function _0(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function T5(e){if(!uu||!e||typeof e!="object")return!1;try{uu.call(e);try{cu.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C5(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{is.call(e,is)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function I5(e){if(!f0||!e||typeof e!="object")return!1;try{return f0.call(e),!0}catch{}return!1}function R5(e){if(!cu||!e||typeof e!="object")return!1;try{cu.call(e);try{uu.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function A5(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e,is);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function k0(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return k0(yp.call(e,0,t.maxStringLength),t)+n}var i=ui.call(ui.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,N5);return x0(i,"single",t)}function N5(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+v5.call(t.toString(16))}function as(e){return"Object("+e+")"}function Ep(e){return e+" { ? }"}function $0(e,t,r,n){var i=n?_p(r,n):vn.call(r,", ");return e+" ("+t+") {"+i+"}"}function D5(e){for(var t=0;t<e.length;t++)if(_0(e[t],`
|
|
60
|
+
`)>=0)return!1;return!0}function j5(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=vn.call(Array(e.indent+1)," ");else return null;return{base:r,prev:vn.call(Array(t+1),r)}}function _p(e,t){if(e.length===0)return"";var r=`
|
|
61
61
|
`+t.prev+t.base;return r+vn.call(e,","+r)+`
|
|
62
|
-
`+t.prev}function fu(e,t){var r=Sp(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=ci(e,i)?t(e[i],e):""}var a=typeof bp=="function"?bp(e):[],o;if(Ra){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)ci(e,u)&&(r&&String(Number(u))===u&&u<e.length||Ra&&o["$"+u]instanceof Symbol||(d0.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if(typeof bp=="function")for(var l=0;l<a.length;l++)m0.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}var $0=mn,Aa=jr,D5=v5,j5=li,du=$0("%WeakMap%",!0),pu=$0("%Map%",!0),M5=Aa("WeakMap.prototype.get",!0),L5=Aa("WeakMap.prototype.set",!0),F5=Aa("WeakMap.prototype.has",!0),B5=Aa("Map.prototype.get",!0),U5=Aa("Map.prototype.set",!0),z5=Aa("Map.prototype.has",!0),kp=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},W5=function(e,t){var r=kp(e,t);return r&&r.value},H5=function(e,t,r){var n=kp(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},V5=function(e,t){return!!kp(e,t)},$p=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new j5("Side channel does not contain "+D5(a))},get:function(a){if(du&&a&&(typeof a=="object"||typeof a=="function")){if(t)return M5(t,a)}else if(pu){if(r)return B5(r,a)}else if(n)return W5(n,a)},has:function(a){if(du&&a&&(typeof a=="object"||typeof a=="function")){if(t)return F5(t,a)}else if(pu){if(r)return z5(r,a)}else if(n)return V5(n,a);return!1},set:function(a,o){du&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new du),L5(t,a,o)):pu?(r||(r=new pu),U5(r,a,o)):(n||(n={key:{},next:null}),H5(n,a,o))}};return i},q5=String.prototype.replace,Z5=/%20/g,Op={RFC1738:"RFC1738",RFC3986:"RFC3986"},Tp={default:Op.RFC3986,formatters:{RFC1738:function(e){return q5.call(e,Z5,"+")},RFC3986:function(e){return String(e)}},RFC1738:Op.RFC1738,RFC3986:Op.RFC3986},K5=Tp,Cp=Object.prototype.hasOwnProperty,Zi=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),G5=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Zi(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},O0=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},Y5=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Zi(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Cp.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Zi(t)&&!Zi(r)&&(i=O0(t,n)),Zi(t)&&Zi(r)?(r.forEach(function(a,o){if(Cp.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,n):t.push(a)}else t[o]=a}),t):Object.keys(r).reduce(function(a,o){var s=r[o];return Cp.call(a,o)?a[o]=e(a[o],s,n):a[o]=s,a},i)},J5=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},X5=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ip=1024,Q5=function(t,r,n,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)),n==="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="",u=0;u<o.length;u+=Ip){for(var l=o.length>=Ip?o.slice(u,u+Ip):o,c=[],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===K5.RFC1738&&(d===40||d===41)){c[c.length]=l.charAt(f);continue}if(d<128){c[c.length]=yn[d];continue}if(d<2048){c[c.length]=yn[192|d>>6]+yn[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=yn[224|d>>12]+yn[128|d>>6&63]+yn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=yn[240|d>>18]+yn[128|d>>12&63]+yn[128|d>>6&63]+yn[128|d&63]}s+=c.join("")}return s},eB=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:o,prop:l}),n.push(c))}return G5(r),t},tB=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},rB=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nB=function(t,r){return[].concat(t,r)},iB=function(t,r){if(Zi(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},T0={arrayToObject:O0,assign:J5,combine:nB,compact:eB,decode:X5,encode:Q5,isBuffer:rB,isRegExp:tB,maybeMap:iB,merge:Y5},C0=$p,hu=T0,os=Tp,aB=Object.prototype.hasOwnProperty,I0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},gn=Array.isArray,oB=Array.prototype.push,R0=function(e,t){oB.apply(e,gn(t)?t:[t])},sB=Date.prototype.toISOString,A0=os.default,Lt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:hu.encode,encodeValuesOnly:!1,format:A0,formatter:os.formatters[A0],indices:!1,serializeDate:function(t){return sB.call(t)},skipNulls:!1,strictNullHandling:!1},lB=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Rp={},uB=function e(t,r,n,i,a,o,s,u,l,c,f,d,p,h,m,g,v,b){for(var y=t,k=b,S=0,E=!1;(k=k.get(Rp))!==void 0&&!E;){var $=k.get(t);if(S+=1,typeof $<"u"){if($===S)throw new RangeError("Cyclic object value");E=!0}typeof k.get(Rp)>"u"&&(S=0)}if(typeof c=="function"?y=c(r,y):y instanceof Date?y=p(y):n==="comma"&&gn(y)&&(y=hu.maybeMap(y,function(w){return w instanceof Date?p(w):w})),y===null){if(o)return l&&!g?l(r,Lt.encoder,v,"key",h):r;y=""}if(lB(y)||hu.isBuffer(y)){if(l){var M=g?r:l(r,Lt.encoder,v,"key",h);return[m(M)+"="+m(l(y,Lt.encoder,v,"value",h))]}return[m(r)+"="+m(String(y))]}var z=[];if(typeof y>"u")return z;var O;if(n==="comma"&&gn(y))g&&l&&(y=hu.maybeMap(y,l)),O=[{value:y.length>0?y.join(",")||null:void 0}];else if(gn(c))O=c;else{var D=Object.keys(y);O=f?D.sort(f):D}var H=u?r.replace(/\./g,"%2E"):r,L=i&&gn(y)&&y.length===1?H+"[]":H;if(a&&gn(y)&&y.length===0)return L+"[]";for(var I=0;I<O.length;++I){var j=O[I],F=typeof j=="object"&&typeof j.value<"u"?j.value:y[j];if(!(s&&F===null)){var q=d&&u?j.replace(/\./g,"%2E"):j,U=gn(y)?typeof n=="function"?n(L,q):L:L+(d?"."+q:"["+q+"]");b.set(t,S);var P=C0();P.set(Rp,b),R0(z,e(F,U,n,i,a,o,s,u,n==="comma"&&g&&gn(y)?null:l,c,f,d,p,h,m,g,v,P))}}return z},cB=function(t){if(!t)return Lt;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 r=t.charset||Lt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=os.default;if(typeof t.format<"u"){if(!aB.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=os.formatters[n],a=Lt.filter;(typeof t.filter=="function"||gn(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in I0?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Lt.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:Lt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Lt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Lt.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Lt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Lt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Lt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Lt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Lt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Lt.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Lt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Lt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Lt.strictNullHandling}},fB=function(e,t){var r=e,n=cB(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):gn(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof r!="object"||r===null)return"";var s=I0[n.arrayFormat],u=s==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=C0(),c=0;c<i.length;++c){var f=i[c];n.skipNulls&&r[f]===null||R0(o,uB(r[f],f,s,u,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Pa=T0,Ap=Object.prototype.hasOwnProperty,dB=Array.isArray,$t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Pa.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},pB=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},P0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hB="utf8=%26%2310003%3B",mB="utf8=%E2%9C%93",vB=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,a),s=-1,u,l=r.charset;if(r.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===mB?l="utf-8":o[u]===hB&&(l="iso-8859-1"),s=u,u=o.length);for(u=0;u<o.length;++u)if(u!==s){var c=o[u],f=c.indexOf("]="),d=f===-1?c.indexOf("="):f+1,p,h;d===-1?(p=r.decoder(c,$t.decoder,l,"key"),h=r.strictNullHandling?null:""):(p=r.decoder(c.slice(0,d),$t.decoder,l,"key"),h=Pa.maybeMap(P0(c.slice(d+1),r),function(g){return r.decoder(g,$t.decoder,l,"value")})),h&&r.interpretNumericEntities&&l==="iso-8859-1"&&(h=pB(h)),c.indexOf("[]=")>-1&&(h=dB(h)?[h]:h);var m=Ap.call(n,p);m&&r.duplicates==="combine"?n[p]=Pa.combine(n[p],h):(!m||r.duplicates==="last")&&(n[p]=h)}return n},yB=function(e,t,r,n){for(var i=n?t:P0(t,r),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&r.parseArrays)o=r.allowEmptyArrays&&(i===""||r.strictNullHandling&&i===null)?[]:[].concat(i);else{o=r.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!r.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},gB=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=n.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!n.plainObjects&&Ap.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&(u=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&Ap.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(u[1])}if(u){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return yB(c,r,n,i)}},bB=function(t){if(!t)return $t;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 r=typeof t.charset>"u"?$t.charset:t.charset,n=typeof t.duplicates>"u"?$t.duplicates:t.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:$t.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:$t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:$t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||Pa.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,duplicates:n,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:$t.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},wB=function(e,t){var r=bB(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?vB(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],u=gB(s,n[s],r,typeof e=="string");i=Pa.merge(i,u,r)}return r.allowSparse===!0?i:Pa.compact(i)},xB=fB,SB=wB,EB=Tp,_B={formats:EB,parse:SB,stringify:xB};const kB=Ze(_B);var Pp={exports:{}};/** @license
|
|
62
|
+
`+t.prev}function fu(e,t){var r=Sp(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=ci(e,i)?t(e[i],e):""}var a=typeof bp=="function"?bp(e):[],o;if(Ra){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)ci(e,l)&&(r&&String(Number(l))===l&&l<e.length||Ra&&o["$"+l]instanceof Symbol||(p0.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if(typeof bp=="function")for(var u=0;u<a.length;u++)v0.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}var O0=mn,Aa=jr,M5=g5,L5=li,du=O0("%WeakMap%",!0),pu=O0("%Map%",!0),F5=Aa("WeakMap.prototype.get",!0),B5=Aa("WeakMap.prototype.set",!0),U5=Aa("WeakMap.prototype.has",!0),z5=Aa("Map.prototype.get",!0),W5=Aa("Map.prototype.set",!0),H5=Aa("Map.prototype.has",!0),kp=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},V5=function(e,t){var r=kp(e,t);return r&&r.value},q5=function(e,t,r){var n=kp(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Z5=function(e,t){return!!kp(e,t)},$p=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new L5("Side channel does not contain "+M5(a))},get:function(a){if(du&&a&&(typeof a=="object"||typeof a=="function")){if(t)return F5(t,a)}else if(pu){if(r)return z5(r,a)}else if(n)return V5(n,a)},has:function(a){if(du&&a&&(typeof a=="object"||typeof a=="function")){if(t)return U5(t,a)}else if(pu){if(r)return H5(r,a)}else if(n)return Z5(n,a);return!1},set:function(a,o){du&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new du),B5(t,a,o)):pu?(r||(r=new pu),W5(r,a,o)):(n||(n={key:{},next:null}),q5(n,a,o))}};return i},K5=String.prototype.replace,G5=/%20/g,Op={RFC1738:"RFC1738",RFC3986:"RFC3986"},Tp={default:Op.RFC3986,formatters:{RFC1738:function(e){return K5.call(e,G5,"+")},RFC3986:function(e){return String(e)}},RFC1738:Op.RFC1738,RFC3986:Op.RFC3986},Y5=Tp,Cp=Object.prototype.hasOwnProperty,Zi=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),J5=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Zi(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},T0=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},X5=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Zi(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Cp.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Zi(t)&&!Zi(r)&&(i=T0(t,n)),Zi(t)&&Zi(r)?(r.forEach(function(a,o){if(Cp.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,n):t.push(a)}else t[o]=a}),t):Object.keys(r).reduce(function(a,o){var s=r[o];return Cp.call(a,o)?a[o]=e(a[o],s,n):a[o]=s,a},i)},Q5=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},eB=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ip=1024,tB=function(t,r,n,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)),n==="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="",l=0;l<o.length;l+=Ip){for(var u=o.length>=Ip?o.slice(l,l+Ip):o,c=[],f=0;f<u.length;++f){var d=u.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===Y5.RFC1738&&(d===40||d===41)){c[c.length]=u.charAt(f);continue}if(d<128){c[c.length]=yn[d];continue}if(d<2048){c[c.length]=yn[192|d>>6]+yn[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=yn[224|d>>12]+yn[128|d>>6&63]+yn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=yn[240|d>>18]+yn[128|d>>12&63]+yn[128|d>>6&63]+yn[128|d&63]}s+=c.join("")}return s},rB=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],o=a.obj[a.prop],s=Object.keys(o),l=0;l<s.length;++l){var u=s[l],c=o[u];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:o,prop:u}),n.push(c))}return J5(r),t},nB=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},iB=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},aB=function(t,r){return[].concat(t,r)},oB=function(t,r){if(Zi(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},C0={arrayToObject:T0,assign:Q5,combine:aB,compact:rB,decode:eB,encode:tB,isBuffer:iB,isRegExp:nB,maybeMap:oB,merge:X5},I0=$p,hu=C0,os=Tp,sB=Object.prototype.hasOwnProperty,R0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},gn=Array.isArray,lB=Array.prototype.push,A0=function(e,t){lB.apply(e,gn(t)?t:[t])},uB=Date.prototype.toISOString,P0=os.default,Lt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:hu.encode,encodeValuesOnly:!1,format:P0,formatter:os.formatters[P0],indices:!1,serializeDate:function(t){return uB.call(t)},skipNulls:!1,strictNullHandling:!1},cB=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Rp={},fB=function e(t,r,n,i,a,o,s,l,u,c,f,d,p,h,m,g,v,y){for(var b=t,k=y,S=0,_=!1;(k=k.get(Rp))!==void 0&&!_;){var $=k.get(t);if(S+=1,typeof $<"u"){if($===S)throw new RangeError("Cyclic object value");_=!0}typeof k.get(Rp)>"u"&&(S=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=p(b):n==="comma"&&gn(b)&&(b=hu.maybeMap(b,function(w){return w instanceof Date?p(w):w})),b===null){if(o)return u&&!g?u(r,Lt.encoder,v,"key",h):r;b=""}if(cB(b)||hu.isBuffer(b)){if(u){var N=g?r:u(r,Lt.encoder,v,"key",h);return[m(N)+"="+m(u(b,Lt.encoder,v,"value",h))]}return[m(r)+"="+m(String(b))]}var z=[];if(typeof b>"u")return z;var O;if(n==="comma"&&gn(b))g&&u&&(b=hu.maybeMap(b,u)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(gn(c))O=c;else{var D=Object.keys(b);O=f?D.sort(f):D}var H=l?r.replace(/\./g,"%2E"):r,L=i&&gn(b)&&b.length===1?H+"[]":H;if(a&&gn(b)&&b.length===0)return L+"[]";for(var W=0;W<O.length;++W){var M=O[W],I=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&I===null)){var V=d&&l?M.replace(/\./g,"%2E"):M,U=gn(b)?typeof n=="function"?n(L,V):L:L+(d?"."+V:"["+V+"]");y.set(t,S);var A=I0();A.set(Rp,y),A0(z,e(I,U,n,i,a,o,s,l,n==="comma"&&g&&gn(b)?null:u,c,f,d,p,h,m,g,v,A))}}return z},dB=function(t){if(!t)return Lt;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 r=t.charset||Lt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=os.default;if(typeof t.format<"u"){if(!sB.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=os.formatters[n],a=Lt.filter;(typeof t.filter=="function"||gn(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in R0?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Lt.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:Lt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Lt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Lt.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Lt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Lt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Lt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Lt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Lt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Lt.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Lt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Lt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Lt.strictNullHandling}},pB=function(e,t){var r=e,n=dB(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):gn(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof r!="object"||r===null)return"";var s=R0[n.arrayFormat],l=s==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var u=I0(),c=0;c<i.length;++c){var f=i[c];n.skipNulls&&r[f]===null||A0(o,fB(r[f],f,s,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var d=o.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Pa=C0,Ap=Object.prototype.hasOwnProperty,hB=Array.isArray,$t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Pa.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},mB=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},N0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},vB="utf8=%26%2310003%3B",yB="utf8=%E2%9C%93",gB=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,a),s=-1,l,u=r.charset;if(r.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===yB?u="utf-8":o[l]===vB&&(u="iso-8859-1"),s=l,l=o.length);for(l=0;l<o.length;++l)if(l!==s){var c=o[l],f=c.indexOf("]="),d=f===-1?c.indexOf("="):f+1,p,h;d===-1?(p=r.decoder(c,$t.decoder,u,"key"),h=r.strictNullHandling?null:""):(p=r.decoder(c.slice(0,d),$t.decoder,u,"key"),h=Pa.maybeMap(N0(c.slice(d+1),r),function(g){return r.decoder(g,$t.decoder,u,"value")})),h&&r.interpretNumericEntities&&u==="iso-8859-1"&&(h=mB(h)),c.indexOf("[]=")>-1&&(h=hB(h)?[h]:h);var m=Ap.call(n,p);m&&r.duplicates==="combine"?n[p]=Pa.combine(n[p],h):(!m||r.duplicates==="last")&&(n[p]=h)}return n},bB=function(e,t,r,n){for(var i=n?t:N0(t,r),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&r.parseArrays)o=r.allowEmptyArrays&&(i===""||r.strictNullHandling&&i===null)?[]:[].concat(i);else{o=r.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,u=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,c=parseInt(u,10);!r.parseArrays&&u===""?o={0:i}:!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[],o[c]=i):u!=="__proto__"&&(o[u]=i)}i=o}return i},wB=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&o.exec(a),u=l?a.slice(0,l.index):a,c=[];if(u){if(!n.plainObjects&&Ap.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var f=0;n.depth>0&&(l=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&Ap.call(Object.prototype,l[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(l[1])}if(l){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");c.push("["+a.slice(l.index)+"]")}return bB(c,r,n,i)}},xB=function(t){if(!t)return $t;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 r=typeof t.charset>"u"?$t.charset:t.charset,n=typeof t.duplicates>"u"?$t.duplicates:t.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:$t.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:$t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:$t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||Pa.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,duplicates:n,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:$t.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},SB=function(e,t){var r=xB(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?gB(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],l=wB(s,n[s],r,typeof e=="string");i=Pa.merge(i,l,r)}return r.allowSparse===!0?i:Pa.compact(i)},EB=pB,_B=SB,kB=Tp,$B={formats:kB,parse:_B,stringify:EB};const OB=Ze($B);var Pp={exports:{}};/** @license
|
|
63
63
|
* eventsource.js
|
|
64
64
|
* Available under MIT License (MIT)
|
|
65
65
|
* https://github.com/Yaffle/EventSource/
|
|
66
|
-
*/(function(e,t){(function(r){var n=r.setTimeout,i=r.clearTimeout,a=r.XMLHttpRequest,o=r.XDomainRequest,s=r.ActiveXObject,
|
|
67
|
-
`),ee=0;ee<ae.length;ee+=1){var ke=ae[ee],xe=ke.split(": "),Re=xe.shift(),qe=xe.join(": ");J[S(Re)]=qe}this._map=J}
|
|
68
|
-
`,zt+=zr):Ur==="id"?Tt=zr:Ur==="event"?Ge=zr:Ur==="retry"?(xe=pe(zr,xe),Ae=xe):Ur==="heartbeatTimeout"&&(Re=pe(zr,Re),Xe!==0&&(i(Xe),Xe=n(function(){ei()},Re)))}if(rt===W){if(zt!==""){qe=Tt,Ge===""&&(Ge="message");var Ni=new L(Ge,{data:zt.slice(1),lastEventId:Tt});if(R.dispatchEvent(Ni),Ge==="open"?ue(R,R.onopen,Ni):Ge==="message"?ue(R,R.onmessage,Ni):Ge==="error"&&ue(R,R.onerror,Ni),ut===P)return}zt="",Ge=""}rt=Ht===13?w:W}else rt===W&&(wr=Vt,rt=Z),rt===Z?Ht===58&&(Ir=Vt+1,rt=_):rt===_&&(rt=Y)}}},jn=function(mt){if(ut===U||ut===q){ut=F,Xe!==0&&(i(Xe),Xe=0),Xe=n(function(){ei()},Ae),Ae=he(Math.min(xe*16,Ae*2)),R.readyState=q;var St=new j("error",{error:mt});R.dispatchEvent(St),ue(R,R.onerror,St),mt!=null&&console.error(mt)}},un=function(){ut=P,Oe!=null&&(Oe.abort(),Oe=void 0),Xe!==0&&(i(Xe),Xe=0),R.readyState=P},ei=function(){if(Xe=0,ut!==F){if(!Be&&Oe!=null)jn(new Error("No activity within "+Re+" milliseconds. "+(ut===q?"No response received.":B+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var mt=Math.max((Be||Date.now())+Re-Date.now(),1);Be=!1,Xe=n(function(){ei()},mt)}return}Be=!1,B=0,Xe=n(function(){ei()},Re),ut=q,zt="",Ge="",Tt=qe,Ct="",wr=0,Ir=0,rt=W;var St=J;if(J.slice(0,5)!=="data:"&&J.slice(0,5)!=="blob:"&&qe!==""){var Wt=J.indexOf("?");St=Wt===-1?J:J.slice(0,Wt+1)+J.slice(Wt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(zr,Ni){return Ni===ke?"":zr}),St+=(J.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(qe)}var Ht=R.withCredentials,Qt={};Qt.Accept="text/event-stream";var Vt=R.headers;if(Vt!=null)for(var Ur in Vt)Object.prototype.hasOwnProperty.call(Vt,Ur)&&(Qt[Ur]=Vt[Ur]);try{Oe=_e.open(ce,ln,Qn,jn,St,Ht,Qt)}catch(zr){throw un(),zr}};R.url=J,R.readyState=q,R.withCredentials=ee,R.headers=A,R._close=un,ei()}Q.prototype=Object.create(O.prototype),Q.prototype.CONNECTING=q,Q.prototype.OPEN=U,Q.prototype.CLOSED=P,Q.prototype.close=function(){this._close()},Q.CONNECTING=q,Q.OPEN=U,Q.CLOSED=P,Q.prototype.withCredentials=void 0;var Ce=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&(Ce=Q),function(R){{var J=R(t);J!==void 0&&(e.exports=J)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=u,R.EventSource=Ce})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ct:globalThis)})(Pp,Pp.exports);var $B=Pp.exports;const OB=Ze($B);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,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 n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Np;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Np||(Np={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),di=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},ne=et.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"]),TB=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},n={_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)n._errors.push(r(o));else{let s=n,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof Er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const Na=(e,t)=>{let r;switch(e.code){case ne.invalid_type:e.received===be.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ne.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:r=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ne.invalid_union:r="Invalid input";break;case ne.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ne.invalid_enum_value:r=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ne.invalid_arguments:r="Invalid function arguments";break;case ne.invalid_return_type:r="Invalid function return type";break;case ne.invalid_date:r="Invalid date";break;case ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ne.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ne.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ne.custom:r="Invalid input";break;case ne.invalid_intersection_types:r="Intersection results could not be merged";break;case ne.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ne.not_finite:r="Number must be finite";break;default:r=t.defaultError,et.assertNever(e)}return{message:r}};let N0=Na;function CB(e){N0=e}function mu(){return N0}const vu=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=n.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},IB=[];function me(e,t){const r=mu(),n=vu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Na?void 0:Na].filter(i=>!!i)});e.common.issues.push(n)}class nr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return je;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return nr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return je;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const je=Object.freeze({status:"aborted"}),Da=e=>({status:"dirty",value:e}),ur=e=>({status:"valid",value:e}),Dp=e=>e.status==="aborted",jp=e=>e.status==="dirty",ss=e=>e.status==="valid",ls=e=>typeof Promise<"u"&&e instanceof Promise;function yu(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function D0(e,t,r,n,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,r),r}typeof SuppressedError=="function"&&SuppressedError;var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var us,cs;class bn{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 j0=(e,t)=>{if(ss(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 r=new Er(e.common.issues);return this._error=r,this._error}}};function We(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))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 u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??n)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??r)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{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 di(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new nr,ctx:{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(ls(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},a=this._parseSync({data:t,path:i.path,parent:i});return j0(i,a)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(ls(i)?i:Promise.resolve(i));return j0(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ne.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Gr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return xn.create(this,this._def)}nullable(){return vi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kr.create(this,this._def)}promise(){return Fa.create(this,this._def)}or(t){return hs.create([this,t],this._def)}and(t){return ms.create(this,t,this._def)}transform(t){return new Gr({...We(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new ws({...We(this._def),innerType:this,defaultValue:r,typeName:De.ZodDefault})}brand(){return new Fp({typeName:De.ZodBranded,type:this,...We(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new xs({...We(this._def),innerType:this,catchValue:r,typeName:De.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ss.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const RB=/^c[^\s-]{8,}$/i,AB=/^[0-9a-z]+$/,PB=/^[0-9A-HJKMNP-TV-Z]{26}$/,NB=/^[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,DB=/^[a-z0-9_-]{21}$/i,jB=/^[-+]?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)?)??$/,MB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mp;const FB=/^(?:(?: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])$/,BB=/^(([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})))$/,UB=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M0="((\\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])))",zB=new RegExp(`^${M0}$`);function L0(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 WB(e){return new RegExp(`^${L0(e)}$`)}function F0(e){let t=`${M0}T${L0(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function HB(e,t){return!!((t==="v4"||!t)&&FB.test(e)||(t==="v6"||!t)&&BB.test(e))}class Zr extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.string,received:a.parsedType}),je}const n=new nr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.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?me(i,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")MB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Mp||(Mp=new RegExp(LB,"u")),Mp.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")NB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")DB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")RB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")AB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")PB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:ne.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:ne.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.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),me(i,{code:ne.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?F0(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?zB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?WB(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?jB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:ne.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?HB(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:ne.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?UB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:ne.invalid_string,message:a.message}),n.dirty()):et.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:ne.invalid_string,...$e.errToObj(n)})}_addCheck(t){return new Zr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var r,n;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...$e.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,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...$e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...$e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...$e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...$e.errToObj(r)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new Zr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zr({...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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Zr.create=e=>{var t;return new Zr({checks:[],typeName:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...We(e)})};function VB(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class pi 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)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.number,received:a.parsedType}),je}let n;const i=new nr;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),me(n,{code:ne.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.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)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?VB(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}pi.create=e=>new pi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...We(e)});class hi extends Ve{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)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.bigint,received:a.parsedType}),je}let n;const i=new nr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.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)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}hi.create=e=>{var t;return new hi({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...We(e)})};class fs extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.boolean,received:n.parsedType}),je}return ur(t.data)}}fs.create=e=>new fs({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...We(e)});class Ki extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.date,received:a.parsedType}),je}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_date}),je}const n=new nr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):et.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...We(e)});class gu extends Ve{_parse(t){if(this._getType(t)!==be.symbol){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.symbol,received:n.parsedType}),je}return ur(t.data)}}gu.create=e=>new gu({typeName:De.ZodSymbol,...We(e)});class ds extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.undefined,received:n.parsedType}),je}return ur(t.data)}}ds.create=e=>new ds({typeName:De.ZodUndefined,...We(e)});class ps extends Ve{_parse(t){if(this._getType(t)!==be.null){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.null,received:n.parsedType}),je}return ur(t.data)}}ps.create=e=>new ps({typeName:De.ZodNull,...We(e)});class ja extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return ur(t.data)}}ja.create=e=>new ja({typeName:De.ZodAny,...We(e)});class Gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ur(t.data)}}Gi.create=e=>new Gi({typeName:De.ZodUnknown,...We(e)});class Un extends Ve{_parse(t){const r=this._getOrReturnCtx(t);return me(r,{code:ne.invalid_type,expected:be.never,received:r.parsedType}),je}}Un.create=e=>new Un({typeName:De.ZodNever,...We(e)});class bu extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.void,received:n.parsedType}),je}return ur(t.data)}}bu.create=e=>new bu({typeName:De.ZodVoid,...We(e)});class Kr extends Ve{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==be.array)return me(r,{code:ne.invalid_type,expected:be.array,received:r.parsedType}),je;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(me(r,{code:o?ne.too_big:ne.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}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(me(r,{code:ne.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(me(r,{code:ne.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new bn(r,o,r.path,s)))).then(o=>nr.mergeArray(n,o));const a=[...r.data].map((o,s)=>i.type._parseSync(new bn(r,o,r.path,s)));return nr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Kr({...this._def,minLength:{value:t,message:$e.toString(r)}})}max(t,r){return new Kr({...this._def,maxLength:{value:t,message:$e.toString(r)}})}length(t,r){return new Kr({...this._def,exactLength:{value:t,message:$e.toString(r)}})}nonempty(t){return this.min(1,t)}}Kr.create=(e,t)=>new Kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...We(t)});function Ma(e){if(e instanceof Et){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=xn.create(Ma(n))}return new Et({...e._def,shape:()=>t})}else return e instanceof Kr?new Kr({...e._def,type:Ma(e.element)}):e instanceof xn?xn.create(Ma(e.unwrap())):e instanceof vi?vi.create(Ma(e.unwrap())):e instanceof wn?wn.create(e.items.map(t=>Ma(t))):e}class Et 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(),r=et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==be.object){const l=this._getOrReturnCtx(t);return me(l,{code:ne.invalid_type,expected:be.object,received:l.parsedType}),je}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Un&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new bn(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Un){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(me(i,{code:ne.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new bn(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,d=await c.value;l.push({key:f,value:d,alwaysSet:c.alwaysSet})}return l}).then(l=>nr.mergeObjectSync(n,l)):nr.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const r={};return et.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Et({...this._def,shape:()=>r})}omit(t){const r={};return et.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Et({...this._def,shape:()=>r})}deepPartial(){return Ma(this)}partial(t){const r={};return et.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new Et({...this._def,shape:()=>r})}required(t){const r={};return et.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof xn;)a=a._def.innerType;r[n]=a}}),new Et({...this._def,shape:()=>r})}keyof(){return B0(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Un.create(),typeName:De.ZodObject,...We(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Un.create(),typeName:De.ZodObject,...We(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Un.create(),typeName:De.ZodObject,...We(t)});class hs extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n=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 r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Er(s.ctx.common.issues));return me(r,{code:ne.invalid_union,unionErrors:o}),je}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of n){const l={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Er(u));return me(r,{code:ne.invalid_union,unionErrors:s}),je}}get options(){return this._def.options}}hs.create=(e,t)=>new hs({options:e,typeName:De.ZodUnion,...We(t)});const zn=e=>e instanceof ys?zn(e.schema):e instanceof Gr?zn(e.innerType()):e instanceof gs?[e.value]:e instanceof mi?e.options:e instanceof bs?et.objectValues(e.enum):e instanceof ws?zn(e._def.innerType):e instanceof ds?[void 0]:e instanceof ps?[null]:e instanceof xn?[void 0,...zn(e.unwrap())]:e instanceof vi?[null,...zn(e.unwrap())]:e instanceof Fp||e instanceof Es?zn(e.unwrap()):e instanceof xs?zn(e._def.innerType):[];class wu extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:ne.invalid_type,expected:be.object,received:r.parsedType}),je;const n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(me(r,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const a of r){const o=zn(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 wu({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...We(n)})}}function Lp(e,t){const r=di(e),n=di(t);if(e===t)return{valid:!0,data:e};if(r===be.object&&n===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Lp(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(r===be.array&&n===be.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],u=Lp(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===be.date&&n===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ms extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(Dp(a)||Dp(o))return je;const s=Lp(a.value,o.value);return s.valid?((jp(a)||jp(o))&&r.dirty(),{status:r.value,value:s.data}):(me(n,{code:ne.invalid_intersection_types}),je)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ms.create=(e,t,r)=>new ms({left:e,right:t,typeName:De.ZodIntersection,...We(r)});class wn extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.array)return me(n,{code:ne.invalid_type,expected:be.array,received:n.parsedType}),je;if(n.data.length<this._def.items.length)return me(n,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&n.data.length>this._def.items.length&&(me(n,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new bn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>nr.mergeArray(r,o)):nr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new wn({...this._def,rest:t})}}wn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn({items:e,typeName:De.ZodTuple,rest:null,...We(t)})};class vs extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:ne.invalid_type,expected:be.object,received:n.parsedType}),je;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new bn(n,s,n.path,s)),value:o._parse(new bn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?nr.mergeObjectAsync(r,i):nr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ve?new vs({keyType:t,valueType:r,typeName:De.ZodRecord,...We(n)}):new vs({keyType:Zr.create(),valueType:t,typeName:De.ZodRecord,...We(r)})}}class xu extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.map)return me(n,{code:ne.invalid_type,expected:be.map,received:n.parsedType}),je;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,u],l)=>({key:i._parse(new bn(n,s,n.path,[l,"key"])),value:a._parse(new bn(n,u,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return je;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return je;(l.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(l.value,c.value)}return{status:r.value,value:s}}}}xu.create=(e,t,r)=>new xu({valueType:t,keyType:e,typeName:De.ZodMap,...We(r)});class Yi extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.set)return me(n,{code:ne.invalid_type,expected:be.set,received:n.parsedType}),je;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(me(n,{code:ne.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(me(n,{code:ne.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return je;c.status==="dirty"&&r.dirty(),l.add(c.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((u,l)=>a._parse(new bn(n,u,n.path,l)));return n.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,r){return new Yi({...this._def,minSize:{value:t,message:$e.toString(r)}})}max(t,r){return new Yi({...this._def,maxSize:{value:t,message:$e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Yi.create=(e,t)=>new Yi({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...We(t)});class La extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.function)return me(r,{code:ne.invalid_type,expected:be.function,received:r.parsedType}),je;function n(s,u){return vu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mu(),Na].filter(l=>!!l),issueData:{code:ne.invalid_arguments,argumentsError:u}})}function i(s,u){return vu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mu(),Na].filter(l=>!!l),issueData:{code:ne.invalid_return_type,returnTypeError:u}})}const a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Fa){const s=this;return ur(async function(...u){const l=new Er([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(n(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return ur(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Er([n(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Er([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new La({...this._def,args:wn.create(t).rest(Gi.create())})}returns(t){return new La({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new La({args:t||wn.create([]).rest(Gi.create()),returns:r||Gi.create(),typeName:De.ZodFunction,...We(n)})}}class ys extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ys.create=(e,t)=>new ys({getter:e,typeName:De.ZodLazy,...We(t)});class gs extends Ve{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return me(r,{received:r.data,code:ne.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}}gs.create=(e,t)=>new gs({value:e,typeName:De.ZodLiteral,...We(t)});function B0(e,t){return new mi({values:e,typeName:De.ZodEnum,...We(t)})}class mi extends Ve{constructor(){super(...arguments),us.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return me(r,{expected:et.joinValues(n),received:r.parsedType,code:ne.invalid_type}),je}if(yu(this,us)||D0(this,us,new Set(this._def.values)),!yu(this,us).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return me(r,{received:r.data,code:ne.invalid_enum_value,options:n}),je}return ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return mi.create(t,{...this._def,...r})}exclude(t,r=this._def){return mi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}us=new WeakMap,mi.create=B0;class bs extends Ve{constructor(){super(...arguments),cs.set(this,void 0)}_parse(t){const r=et.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==be.string&&n.parsedType!==be.number){const i=et.objectValues(r);return me(n,{expected:et.joinValues(i),received:n.parsedType,code:ne.invalid_type}),je}if(yu(this,cs)||D0(this,cs,new Set(et.getValidEnumValues(this._def.values))),!yu(this,cs).has(t.data)){const i=et.objectValues(r);return me(n,{received:n.data,code:ne.invalid_enum_value,options:i}),je}return ur(t.data)}get enum(){return this._def.values}}cs=new WeakMap,bs.create=(e,t)=>new bs({values:e,typeName:De.ZodNativeEnum,...We(t)});class Fa extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.promise&&r.common.async===!1)return me(r,{code:ne.invalid_type,expected:be.promise,received:r.parsedType}),je;const n=r.parsedType===be.promise?r.data:Promise.resolve(r.data);return ur(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Fa.create=(e,t)=>new Fa({type:e,typeName:De.ZodPromise,...We(t)});class Gr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return je;const u=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return u.status==="aborted"?je:u.status==="dirty"||r.value==="dirty"?Da(u.value):u});{if(r.value==="aborted")return je;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?je:s.status==="dirty"||r.value==="dirty"?Da(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ss(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:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ss(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):o);et.assertNever(i)}}Gr.create=(e,t,r)=>new Gr({schema:e,typeName:De.ZodEffects,effect:t,...We(r)}),Gr.createWithPreprocess=(e,t,r)=>new Gr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...We(r)});class xn extends Ve{_parse(t){return this._getType(t)===be.undefined?ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}xn.create=(e,t)=>new xn({innerType:e,typeName:De.ZodOptional,...We(t)});class vi extends Ve{_parse(t){return this._getType(t)===be.null?ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vi.create=(e,t)=>new vi({innerType:e,typeName:De.ZodNullable,...We(t)});class ws extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===be.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ws.create=(e,t)=>new ws({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...We(t)});class xs extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ls(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Er(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Er(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}xs.create=(e,t)=>new xs({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...We(t)});class Su extends Ve{_parse(t){if(this._getType(t)!==be.nan){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.nan,received:n.parsedType}),je}return{status:"valid",value:t.data}}}Su.create=e=>new Su({typeName:De.ZodNaN,...We(e)});const qB=Symbol("zod_brand");class Fp extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ss extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?je:a.status==="dirty"?(r.dirty(),Da(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?je:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new Ss({in:t,out:r,typeName:De.ZodPipeline})}}class Es extends Ve{_parse(t){const r=this._def.innerType._parse(t),n=i=>(ss(i)&&(i.value=Object.freeze(i.value)),i);return ls(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:De.ZodReadonly,...We(t)});function U0(e,t={},r){return e?ja.create().superRefine((n,i)=>{var a,o;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ja.create()}const ZB={object:Et.lazycreate};var De;(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"})(De||(De={}));const KB=(e,t={message:`Input not instance of ${e.name}`})=>U0(r=>r instanceof e,t),z0=Zr.create,W0=pi.create,GB=Su.create,YB=hi.create,H0=fs.create,JB=Ki.create,XB=gu.create,QB=ds.create,e3=ps.create,t3=ja.create,r3=Gi.create,n3=Un.create,i3=bu.create,a3=Kr.create,o3=Et.create,s3=Et.strictCreate,l3=hs.create,u3=wu.create,c3=ms.create,f3=wn.create,d3=vs.create,p3=xu.create,h3=Yi.create,m3=La.create,v3=ys.create,y3=gs.create,g3=mi.create,b3=bs.create,w3=Fa.create,V0=Gr.create,x3=xn.create,S3=vi.create,E3=Gr.createWithPreprocess,_3=Ss.create;var V=Object.freeze({__proto__:null,defaultErrorMap:Na,setErrorMap:CB,getErrorMap:mu,makeIssue:vu,EMPTY_PATH:IB,addIssueToContext:me,ParseStatus:nr,INVALID:je,DIRTY:Da,OK:ur,isAborted:Dp,isDirty:jp,isValid:ss,isAsync:ls,get util(){return et},get objectUtil(){return Np},ZodParsedType:be,getParsedType:di,ZodType:Ve,datetimeRegex:F0,ZodString:Zr,ZodNumber:pi,ZodBigInt:hi,ZodBoolean:fs,ZodDate:Ki,ZodSymbol:gu,ZodUndefined:ds,ZodNull:ps,ZodAny:ja,ZodUnknown:Gi,ZodNever:Un,ZodVoid:bu,ZodArray:Kr,ZodObject:Et,ZodUnion:hs,ZodDiscriminatedUnion:wu,ZodIntersection:ms,ZodTuple:wn,ZodRecord:vs,ZodMap:xu,ZodSet:Yi,ZodFunction:La,ZodLazy:ys,ZodLiteral:gs,ZodEnum:mi,ZodNativeEnum:bs,ZodPromise:Fa,ZodEffects:Gr,ZodTransformer:Gr,ZodOptional:xn,ZodNullable:vi,ZodDefault:ws,ZodCatch:xs,ZodNaN:Su,BRAND:qB,ZodBranded:Fp,ZodPipeline:Ss,ZodReadonly:Es,custom:U0,Schema:Ve,ZodSchema:Ve,late:ZB,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>Zr.create({...e,coerce:!0}),number:e=>pi.create({...e,coerce:!0}),boolean:e=>fs.create({...e,coerce:!0}),bigint:e=>hi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},any:t3,array:a3,bigint:YB,boolean:H0,date:JB,discriminatedUnion:u3,effect:V0,enum:g3,function:m3,instanceof:KB,intersection:c3,lazy:v3,literal:y3,map:p3,nan:GB,nativeEnum:b3,never:n3,null:e3,nullable:S3,number:W0,object:o3,oboolean:()=>H0().optional(),onumber:()=>W0().optional(),optional:x3,ostring:()=>z0().optional(),pipeline:_3,preprocess:E3,promise:w3,record:d3,set:h3,strictObject:s3,string:z0,symbol:XB,transformer:V0,tuple:f3,undefined:QB,union:l3,unknown:r3,void:i3,NEVER:je,ZodIssueCode:ne,quotelessJson:TB,ZodError:Er}),k3=Object.defineProperty,$3=(e,t,r)=>t in e?k3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O3=(e,t,r)=>($3(e,t+"",r),r),T3={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Bp=typeof window<"u"&&typeof window.document<"u"?window.crypto:Vx;Bp.getRandomValues||(Bp=T3);var xt=class extends Error{constructor(t,r,n,i,a,o){super(i);Ee(this,"isApiError",!0);this.code=t,this.description=r,this.type=n,this.message=i,this.error=a,this.id=o,this.id||(this.id=xt.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}}static generateId(){const t=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,i=Array.from(Bp.getRandomValues(new Uint8Array(n))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},C3=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Up=e=>e instanceof xt||C3(e)&&e.isApiError===!0,_s=class extends xt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},I3=class extends xt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},R3=class extends xt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},A3=class extends xt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},P3=class extends xt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},N3=class extends xt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},D3=class extends xt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},j3=class extends xt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},M3=class extends xt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},L3=class extends xt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},F3=class extends xt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},B3=class extends xt{constructor(e,t,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,r)}},U3=class extends xt{constructor(e,t,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,r)}},z3=class extends xt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},W3=class extends xt{constructor(e,t,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,r)}},H3=class extends xt{constructor(e,t,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,r)}},V3=class extends xt{constructor(e,t,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,r)}},q3=class extends xt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},Z3=class extends xt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},K3=class extends xt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},G3=class extends xt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},Y3=class extends xt{constructor(e,t,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,r)}},J3=class extends xt{constructor(e,t,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,r)}},X3=class extends xt{constructor(e,t,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,r)}},Q3={Unknown:_s,Internal:I3,Unauthorized:R3,Forbidden:A3,PayloadTooLarge:P3,InvalidPayload:N3,UnsupportedMediaType:D3,MethodNotFound:j3,ResourceNotFound:M3,InvalidJsonSchema:L3,InvalidDataFormat:F3,InvalidIdentifier:B3,RelationConflict:U3,ReferenceConstraint:z3,ResourceLockedConflict:W3,ReferenceNotFound:H3,InvalidQuery:V3,Runtime:q3,AlreadyExists:Z3,RateLimited:K3,PaymentRequired:G3,QuotaExceeded:Y3,LimitExceeded:J3,BreakingChanges:X3},q0=e=>Up(e)?e:e instanceof Error?new _s(e.message,e):typeof e=="string"?new _s(e):e4(e);function e4(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=Q3[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new _s(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new _s("An invalid error occurred: "+JSON.stringify(e))}var t4=e=>e[1]!==void 0,Pt=e=>{const{method:t,path:r,query:n,headers:i,body:a}=e,o=Object.entries(i).filter(t4),s=Object.fromEntries(o),u=kB.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[r,u].join("?"):r;return{method:t,url:l,headers:s,data:a}},r4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),n4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),i4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),a4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),o4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),s4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),l4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),u4=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:{}}),c4=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:{}}),f4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),d4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),p4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),h4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),m4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),v4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),y4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),g4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),b4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),w4=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}}),x4=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}}),S4=class{constructor(e,t={}){Ee(this,"getConversation",async e=>{const{path:t,headers:r,query:n,body:i}=r4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createConversation",async e=>{const{path:t,headers:r,query:n,body:i}=n4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteConversation",async e=>{const{path:t,headers:r,query:n,body:i}=i4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listConversations",async e=>{const{path:t,headers:r,query:n,body:i}=a4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listenConversation",async e=>{const{path:t,headers:r,query:n,body:i}=o4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listConversationMessages",async e=>{const{path:t,headers:r,query:n,body:i}=s4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"addParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=l4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"removeParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=u4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=c4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listParticipants",async e=>{const{path:t,headers:r,query:n,body:i}=f4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getMessage",async e=>{const{path:t,headers:r,query:n,body:i}=d4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createMessage",async e=>{const{path:t,headers:r,query:n,body:i}=p4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteMessage",async e=>{const{path:t,headers:r,query:n,body:i}=h4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getUser",async e=>{const{path:t,headers:r,query:n,body:i}=m4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createUser",async e=>{const{path:t,headers:r,query:n,body:i}=v4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"updateUser",async e=>{const{path:t,headers:r,query:n,body:i}=y4(e),o=(this.props.toAxiosRequest??Pt)({method:"put",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteUser",async e=>{const{path:t,headers:r,query:n,body:i}=g4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getEvent",async e=>{const{path:t,headers:r,query:n,body:i}=b4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createEvent",async e=>{const{path:t,headers:r,query:n,body:i}=w4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createFile",async e=>{const{path:t,headers:r,query:n,body:i}=x4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});this.axiosInstance=e,this.props=t}};function Nt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?q0(e.response.data):q0(e)}var Z0=class{constructor(){Ee(this,"listeners",{})}emit(e,t){const r=this.listeners[e];if(r)for(const n of[...r])n(t)}onceOrMore(e,t){const r=n=>{t(n)==="stop-listening"&&this.off(e,r)};this.on(e,r)}once(e,t){const r=n=>{this.off(e,r),t(n)};this.on(e,r)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const r=this.listeners[e];if(!r)return;const n=r.indexOf(t);n!==-1&&r.splice(n,1)}cleanup(){this.listeners={}}},E4=(e,t)=>{const r=new OB.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),n=new Z0;return r.onopen=i=>n.emit("open",i),r.onmessage=i=>n.emit("message",i),r.onerror=i=>n.emit("error",i),{emitter:n,source:r}},_4=async(e,t={})=>{const{emitter:r,source:n}=E4(e,t);return await new Promise((i,a)=>{r.on("open",()=>{i()}),r.on("error",o=>{a(o)})}).finally(()=>r.cleanup()),{on:r.on.bind(r),close:()=>{r.cleanup(),n.close()}}},k4=V.object({type:V.literal("message_created"),data:V.object({id:V.string().describe("Id of the [Message](#schema_message)"),createdAt:V.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:V.union([V.object({audioUrl:V.string().min(1),type:V.literal("audio")}),V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),type:V.literal("card")}),V.object({items:V.array(V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)}))})),type:V.literal("carousel")}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("choice"),disableFreeText:V.boolean().optional()}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("dropdown")}),V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional(),type:V.literal("file")}),V.object({imageUrl:V.string().min(1),type:V.literal("image")}),V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional(),type:V.literal("location")}),V.object({text:V.string().min(1),type:V.literal("text")}),V.object({videoUrl:V.string().min(1),type:V.literal("video")}),V.object({items:V.array(V.union([V.object({type:V.literal("text"),payload:V.object({text:V.string().min(1)})}),V.object({type:V.literal("markdown"),payload:V.object({markdown:V.string().min(1)})}),V.object({type:V.literal("image"),payload:V.object({imageUrl:V.string().min(1)})}),V.object({type:V.literal("audio"),payload:V.object({audioUrl:V.string().min(1)})}),V.object({type:V.literal("video"),payload:V.object({videoUrl:V.string().min(1)})}),V.object({type:V.literal("file"),payload:V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional()})}),V.object({type:V.literal("location"),payload:V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional()})})])),type:V.literal("bloc")}),V.object({markdown:V.string().min(1),type:V.literal("markdown")})]).describe("Payload is the content type of the message."),userId:V.string().describe("ID of the [User](#schema_user)"),conversationId:V.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:V.record(V.union([V.any(),V.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),$4=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),O4=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),T4=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),C4=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),I4=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),R4={messageCreated:k4,webchatVisibility:$4,webchatConfig:O4,custom:T4,typingStarted:C4,typingStopped:I4},K0="unknown error",G0=class extends Z0{constructor(t){super();Ee(this,"_state",{status:"disconnected"});Ee(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});Ee(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)});Ee(this,"_connect",async()=>{const t=await _4(`${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});Ee(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});Ee(this,"_handleMessage",t=>{const r=this._parseSignal(t.data);this.emit(r.type,r.data)});Ee(this,"_handleError",t=>r=>{this._disconnectSync(t);const n=this._toError(r);this.emit("error",n)});Ee(this,"_parseSignal",t=>{for(const r of Object.values(R4)){const n=this._safeJsonParse(t),i=r.safeParse(n);if(i.success)return i.data}return{type:"unknown",data:t}});Ee(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});Ee(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(K0);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const r=JSON.stringify(t);return new Error(r)}catch{return new Error(K0)}});this._props=t}get status(){return this._state.status}},Y0=G0;O3(Y0,"listen",async e=>{const t=new G0(e);return await t.connect(),t});var J0=100*1024*1024,A4=J0,P4=J0,N4=6e4,D4=class{constructor(e){Ee(this,"_auto");Ee(this,"createConversation",e=>this._auto.createConversation(e));Ee(this,"getConversation",e=>this._auto.getConversation(e));Ee(this,"deleteConversation",e=>this._auto.deleteConversation(e));Ee(this,"listConversations",e=>this._auto.listConversations(e));Ee(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));Ee(this,"addParticipant",e=>this._auto.addParticipant(e));Ee(this,"removeParticipant",e=>this._auto.removeParticipant(e));Ee(this,"getParticipant",e=>this._auto.getParticipant(e));Ee(this,"listParticipants",e=>this._auto.listParticipants(e));Ee(this,"createMessage",e=>this._auto.createMessage(e));Ee(this,"getMessage",e=>this._auto.getMessage(e));Ee(this,"deleteMessage",e=>this._auto.deleteMessage(e));Ee(this,"createFile",e=>this._auto.createFile(e));Ee(this,"createUser",e=>this._auto.createUser(e));Ee(this,"getUser",e=>this._auto.getUser(e));Ee(this,"updateUser",e=>this._auto.updateUser(e));Ee(this,"deleteUser",e=>this._auto.deleteUser(e));Ee(this,"createEvent",e=>this._auto.createEvent(e));Ee(this,"getEvent",e=>this._auto.getEvent(e));Ee(this,"listenConversation",async({id:e,"x-user-key":t})=>await Y0.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,r={...e.headers},n=this.props.timeout??N4,i=At.create({baseURL:t,headers:r,withCredentials:!0,timeout:n,maxBodyLength:A4,maxContentLength:P4});this._auto=new S4(i)}};const Eu={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},mr=(e,t)=>e.status===t,Sn=(e,t)=>Eu[e.status]<Eu[t],X0=(e,t)=>Eu[e.status]>=Eu[t];class En extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const Q0=["audio","file","image","video"],eS=e=>Q0.includes(e),j4=6e4;class M4 extends Lg{constructor(r){super();Ee(this,"_client");Ee(this,"_webhookId");Ee(this,"_apiUrl");Ee(this,"_state",{status:"disconnected"});Ee(this,"mode","pushpin");Ee(this,"_initialConnect",async({data:r,name:n,pictureUrl:i})=>{if(X0(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(mr(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:n,pictureUrl:i,userData:r});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});Ee(this,"_reConnect",async(r,{data:n,name:i,pictureUrl:a})=>{if(X0(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return mr(this._state,"user_creating")||(this._state={status:"user_created",userId:r.userId,userKey:r.userToken},await this._client.updateUser({"x-user-key":r.userToken,name:i,pictureUrl:a,userData:n})),r});Ee(this,"_mapMessage",r=>{const{metadata:n}=r,{payload:i,disableInput:a}=_o(r.payload);return{id:r.id,conversationId:r.conversationId,authorId:r.userId,sentOn:new Date(r.createdAt),payload:i,disableInput:a,metadata:n}});const n=`${r.apiUrl}/${r.clientId}`;this._webhookId=r.clientId,this._apiUrl=n,this._client=new D4({apiUrl:n,sseTimeout:j4})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Sn(this._state,"user_created"))return this._state.userId}async getUser(){if(Sn(this._state,"user_created"))throw new En(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(Sn(this._state,"user_created"))throw new En(this._state);const{user:n}=await this._client.updateUser({"x-user-key":this._state.userKey,name:r.name,pictureUrl:r.pictureUrl,userData:r.data});return n}get conversationId(){if(!Sn(this._state,"conversation_created"))return this._state.conversationId}async connect(r,n,i={}){const a={data:n,...i};return r?await this.userExists(r)?this._reConnect(r,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){mr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():mr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state));const{size:i,name:a}=r,s=await(h=>new Promise((m,g)=>{const v=new FileReader;v.onload=b=>{var y;return m((y=b.target)==null?void 0:y.result)},v.onerror=b=>{var y;return g((y=b.target)==null?void 0:y.error)},v.readAsArrayBuffer(h)}))(r),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":n.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",d=eS(f)?f:"file",p=d==="image"?{type:d,imageUrl:c}:d==="audio"?{type:d,audioUrl:c}:d==="video"?{type:d,videoUrl:c}:{type:d,fileUrl:c};return await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:c,name:a,type:d}}async sendMessage(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:r}),this.emit("messageSent",r)}async sendEvent(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"custom",data:r}})}async switchConversation(r){if(Sn(this._state,"user_created"))throw new En(this._state);mr(this._state,"conversation_created")&&this._state.conversationId===r||mr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,r))}async conversationExists(r){if(Sn(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(Up(n)&&n.code===404)return!1;throw n}}async userExists({userToken:r}){try{return await this._client.getUser({"x-user-key":r}),!0}catch(n){const i=a=>a.code===404||a.code===401;if(Up(n)&&i(n))return!1;throw n}}async newConversation(){if(Sn(this._state,"user_created"))throw new En(this._state);mr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(r){const{conversation:{id:n}}=await this._client.createConversation({"x-user-key":r.userKey}),i=await this._connectConversation(r,n);return await this._client.createEvent({"x-user-key":r.userKey,conversationId:n,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!mr(this._state,"conversation_created"))return[];const{conversationId:r,userKey:n}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(r,n){const i=await this._client.listenConversation({id:n,"x-user-key":r.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId!==r.userId&&this.emit("message",this._mapMessage(a))}),i.on("error",a=>{this._state={status:"user_created",userId:r.userId,userKey:r.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",n),this._state={status:"conversation_created",userId:r.userId,userKey:r.userKey,conversationId:n,signalEmitter:i},this._state}}const tS=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new M4({apiUrl:t,clientId:e}),L4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[r]=N.useState(tS({clientId:e,apiUrl:t}));return r},F4=(e,t={})=>new Promise((r,n)=>{if(typeof window>"u")return n("Window is not defined");if(!e)return n("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),r({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),n(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>n("Timeout"),t.timeout))});let B4={data:""},U4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||B4,z4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,W4=/\/\*[^]*?\*\/| +/g,rS=/\n+/g,yi=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?yi(o,a):a+"{"+yi(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=yi(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=yi.p?yi.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Wn={},nS=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+nS(e[r]);return t}return e},H4=(e,t,r,n,i)=>{let a=nS(e),o=Wn[a]||(Wn[a]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(a));if(!Wn[o]){let u=a!==e?e:(l=>{let c,f,d=[{}];for(;c=z4.exec(l.replace(W4,""));)c[4]?d.shift():c[3]?(f=c[3].replace(rS," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(rS," ").trim();return d[0]})(e);Wn[o]=yi(i?{["@keyframes "+o]:u}:u,r?"":"."+o)}let s=r&&Wn.g?Wn.g:null;return r&&(Wn.g=Wn[o]),((u,l,c,f)=>{f?l.data=l.data.replace(f,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(Wn[o],t,n,s),o},V4=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let s=o(r),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=u?"."+u:s&&typeof s=="object"?s.props?"":yi(s,""):s===!1?"":s}return n+i+(o??"")},"");function _u(e){let t=this||{},r=e.call?e(t.p):e;return H4(r.unshift?r.raw?V4(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,U4(t.target),t.g,t.o,t.k)}let iS,zp,Wp;_u.bind({g:1});let Hn=_u.bind({k:1});function q4(e,t,r,n){yi.p=t,iS=e,zp=r,Wp=n}function gi(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let s=Object.assign({},a),u=s.className||i.className;r.p=Object.assign({theme:zp&&zp()},s),r.o=/ *go\d+/.test(u),s.className=_u.apply(r,n)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),Wp&&l[0]&&Wp(s),iS(l,s)}return i}}var Z4=e=>typeof e=="function",ku=(e,t)=>Z4(e)?e(t):e,K4=(()=>{let e=0;return()=>(++e).toString()})(),aS=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),G4=20,$u=new Map,Y4=1e3,oS=e=>{if($u.has(e))return;let t=setTimeout(()=>{$u.delete(e),Ji({type:4,toastId:e})},Y4);$u.set(e,t)},J4=e=>{let t=$u.get(e);t&&clearTimeout(t)},Hp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,G4)};case 1:return t.toast.id&&J4(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return e.toasts.find(a=>a.id===r.id)?Hp(e,{type:1,toast:r}):Hp(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?oS(n):e.toasts.forEach(a=>{oS(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Ou=[],Tu={toasts:[],pausedAt:void 0},Ji=e=>{Tu=Hp(Tu,e),Ou.forEach(t=>{t(Tu)})},X4={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Q4=(e={})=>{let[t,r]=N.useState(Tu);N.useEffect(()=>(Ou.push(r),()=>{let i=Ou.indexOf(r);i>-1&&Ou.splice(i,1)}),[t]);let n=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||X4[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:n}},eU=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||K4()}),ks=e=>(t,r)=>{let n=eU(t,e,r);return Ji({type:2,toast:n}),n.id},Mr=(e,t)=>ks("blank")(e,t);Mr.error=ks("error"),Mr.success=ks("success"),Mr.loading=ks("loading"),Mr.custom=ks("custom"),Mr.dismiss=e=>{Ji({type:3,toastId:e})},Mr.remove=e=>Ji({type:4,toastId:e}),Mr.promise=(e,t,r)=>{let n=Mr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(i=>(Mr.success(ku(t.success,i),{id:n,...r,...r==null?void 0:r.success}),i)).catch(i=>{Mr.error(ku(t.error,i),{id:n,...r,...r==null?void 0:r.error})}),e};var tU=(e,t)=>{Ji({type:1,toast:{id:e,height:t}})},rU=()=>{Ji({type:5,time:Date.now()})},nU=e=>{let{toasts:t,pausedAt:r}=Q4(e);N.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let u=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(u<0){s.visible&&Mr.dismiss(s.id);return}return setTimeout(()=>Mr.dismiss(s.id),u)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=N.useCallback(()=>{r&&Ji({type:6,time:Date.now()})},[r]),i=N.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=o||{},c=t.filter(p=>(p.position||l)===(a.position||l)&&p.height),f=c.findIndex(p=>p.id===a.id),d=c.filter((p,h)=>h<f&&p.visible).length;return c.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:tU,startPause:rU,endPause:n,calculateOffset:i}}},iU=Hn`
|
|
66
|
+
*/(function(e,t){(function(r){var n=r.setTimeout,i=r.clearTimeout,a=r.XMLHttpRequest,o=r.XDomainRequest,s=r.ActiveXObject,l=r.EventSource,u=r.document,c=r.Promise,f=r.fetch,d=r.Response,p=r.TextDecoder,h=r.TextEncoder,m=r.AbortController;if(typeof window<"u"&&typeof u<"u"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(R){u.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(R){function J(){}return J.prototype=R,new J}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var g=f;f=function(R,J){var ae=J.signal;return g(R,{headers:J.headers,credentials:J.credentials,cache:J.cache}).then(function(ee){var ke=ee.body.getReader();return ae._reader=ke,ae._aborted&&ae._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return ke}}}})},m=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(R){function J(Be,B,P){if(P===1)return Be>=128>>B&&Be<<B<=2047;if(P===2)return Be>=2048>>B&&Be<<B<=55295||Be>=57344>>B&&Be<<B<=65535;if(P===3)return Be>=65536>>B&&Be<<B<=1114111;throw new Error}function ae(Be,B){if(Be===6*1)return B>>6>15?3:B>31?2:1;if(Be===6*2)return B>15?3:2;if(Be===6*3)return 3;throw new Error}for(var ee=65533,ke="",xe=this.bitsNeeded,Re=this.codePoint,qe=0;qe<R.length;qe+=1){var Ae=R[qe];xe!==0&&(Ae<128||Ae>191||!J(Re<<6|Ae&63,xe-6,ae(xe,Re)))&&(xe=0,Re=ee,ke+=String.fromCharCode(Re)),xe===0?(Ae>=0&&Ae<=127?(xe=0,Re=Ae):Ae>=192&&Ae<=223?(xe=6*1,Re=Ae&31):Ae>=224&&Ae<=239?(xe=6*2,Re=Ae&15):Ae>=240&&Ae<=247?(xe=6*3,Re=Ae&7):(xe=0,Re=ee),xe!==0&&!J(Re,xe,ae(xe,Re))&&(xe=0,Re=ee)):(xe-=6,Re=Re<<6|Ae&63),xe===0&&(Re<=65535?ke+=String.fromCharCode(Re):(ke+=String.fromCharCode(55296+(Re-65535-1>>10)),ke+=String.fromCharCode(56320+(Re-65535-1&1023))))}return this.bitsNeeded=xe,this.codePoint=Re,ke};var y=function(){try{return new p().decode(new h().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(p==null||h==null||!y())&&(p=v);var b=function(){};function k(R){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=R,this._sendTimeout=0,this._abort=b}k.prototype.open=function(R,J){this._abort(!0);var ae=this,ee=this._xhr,ke=1,xe=0;this._abort=function(P){ae._sendTimeout!==0&&(i(ae._sendTimeout),ae._sendTimeout=0),(ke===1||ke===2||ke===3)&&(ke=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),xe!==0&&(i(xe),xe=0),P||(ae.readyState=4,ae.onabort(null),ae.onreadystatechange())),ke=0};var Re=function(){if(ke===1){var P=0,X="",ce=void 0;if("contentType"in ee)P=200,X="OK",ce=ee.contentType;else try{P=ee.status,X=ee.statusText,ce=ee.getResponseHeader("Content-Type")}catch{P=0,X="",ce=void 0}P!==0&&(ke=2,ae.readyState=2,ae.status=P,ae.statusText=X,ae._contentType=ce,ae.onreadystatechange())}},qe=function(){if(Re(),ke===2||ke===3){ke=3;var P="";try{P=ee.responseText}catch{}ae.readyState=3,ae.responseText=P,ae.onprogress()}},Ae=function(P,X){if((X==null||X.preventDefault==null)&&(X={preventDefault:b}),qe(),ke===1||ke===2||ke===3){if(ke=4,xe!==0&&(i(xe),xe=0),ae.readyState=4,P==="load")ae.onload(X);else if(P==="error")ae.onerror(X);else if(P==="abort")ae.onabort(X);else throw new TypeError;ae.onreadystatechange()}},Be=function(P){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Ae(ee.responseText===""?"error":"load",P):ee.readyState===3?"onprogress"in ee||qe():ee.readyState===2&&Re())},B=function(){xe=n(function(){B()},500),ee.readyState===3&&qe()};"onload"in ee&&(ee.onload=function(P){Ae("load",P)}),"onerror"in ee&&(ee.onerror=function(P){Ae("error",P)}),"onabort"in ee&&(ee.onabort=function(P){Ae("abort",P)}),"onprogress"in ee&&(ee.onprogress=qe),"onreadystatechange"in ee&&(ee.onreadystatechange=function(P){Be(P)}),("contentType"in ee||!("ontimeout"in a.prototype))&&(J+=(J.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(R,J,!0),"readyState"in ee&&(xe=n(function(){B()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(R){return this._contentType},k.prototype.setRequestHeader=function(R,J){var ae=this._xhr;"setRequestHeader"in ae&&ae.setRequestHeader(R,J)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var R=this;R._sendTimeout=n(function(){R._sendTimeout=0,R.send()},4);return}var J=this._xhr;"withCredentials"in J&&(J.withCredentials=this.withCredentials);try{J.send(void 0)}catch(ae){throw ae}};function S(R){return R.replace(/[A-Z]/g,function(J){return String.fromCharCode(J.charCodeAt(0)+32)})}function _(R){for(var J=Object.create(null),ae=R.split(`\r
|
|
67
|
+
`),ee=0;ee<ae.length;ee+=1){var ke=ae[ee],xe=ke.split(": "),Re=xe.shift(),qe=xe.join(": ");J[S(Re)]=qe}this._map=J}_.prototype.get=function(R){return this._map[S(R)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function $(){}$.prototype.open=function(R,J,ae,ee,ke,xe,Re){R.open("GET",ke);var qe=0;R.onprogress=function(){var Be=R.responseText,B=Be.slice(qe);qe+=B.length,ae(B)},R.onerror=function(Be){Be.preventDefault(),ee(new Error("NetworkError"))},R.onload=function(){ee(null)},R.onabort=function(){ee(null)},R.onreadystatechange=function(){if(R.readyState===a.HEADERS_RECEIVED){var Be=R.status,B=R.statusText,P=R.getResponseHeader("Content-Type"),X=R.getAllResponseHeaders();J(Be,B,P,new _(X))}},R.withCredentials=xe;for(var Ae in Re)Object.prototype.hasOwnProperty.call(Re,Ae)&&R.setRequestHeader(Ae,Re[Ae]);return R.send(),R};function N(R){this._headers=R}N.prototype.get=function(R){return this._headers.get(R)};function z(){}z.prototype.open=function(R,J,ae,ee,ke,xe,Re){var qe=null,Ae=new m,Be=Ae.signal,B=new p;return f(ke,{headers:Re,credentials:xe?"include":"same-origin",signal:Be,cache:"no-store"}).then(function(P){return qe=P.body.getReader(),J(P.status,P.statusText,P.headers.get("Content-Type"),new N(P.headers)),new c(function(X,ce){var _e=function(){qe.read().then(function(Oe){if(Oe.done)X(void 0);else{var Xe=B.decode(Oe.value,{stream:!0});ae(Xe),_e()}}).catch(function(Oe){ce(Oe)})};_e()})}).catch(function(P){if(P.name!=="AbortError")return P}).then(function(P){ee(P)}),{abort:function(){qe!=null&&qe.cancel(),Ae.abort()}}};function O(){this._listeners=Object.create(null)}function D(R){n(function(){throw R},0)}O.prototype.dispatchEvent=function(R){R.target=this;var J=this._listeners[R.type];if(J!=null)for(var ae=J.length,ee=0;ee<ae;ee+=1){var ke=J[ee];try{typeof ke.handleEvent=="function"?ke.handleEvent(R):ke.call(this,R)}catch(xe){D(xe)}}},O.prototype.addEventListener=function(R,J){R=String(R);var ae=this._listeners,ee=ae[R];ee==null&&(ee=[],ae[R]=ee);for(var ke=!1,xe=0;xe<ee.length;xe+=1)ee[xe]===J&&(ke=!0);ke||ee.push(J)},O.prototype.removeEventListener=function(R,J){R=String(R);var ae=this._listeners,ee=ae[R];if(ee!=null){for(var ke=[],xe=0;xe<ee.length;xe+=1)ee[xe]!==J&&ke.push(ee[xe]);ke.length===0?delete ae[R]:ae[R]=ke}};function H(R){this.type=R,this.target=void 0}function L(R,J){H.call(this,R),this.data=J.data,this.lastEventId=J.lastEventId}L.prototype=Object.create(H.prototype);function W(R,J){H.call(this,R),this.status=J.status,this.statusText=J.statusText,this.headers=J.headers}W.prototype=Object.create(H.prototype);function M(R,J){H.call(this,R),this.error=J.error}M.prototype=Object.create(H.prototype);var I=-1,V=0,U=1,A=2,w=-1,F=0,Z=1,E=2,Y=3,oe=/^text\/event\-stream(;.*)?$/i,re=1e3,le=18e6,pe=function(R,J){var ae=R==null?J:parseInt(R,10);return ae!==ae&&(ae=J),he(ae)},he=function(R){return Math.min(Math.max(R,re),le)},ue=function(R,J,ae){try{typeof J=="function"&&J.call(R,ae)}catch(ee){D(ee)}};function Q(R,J){O.call(this),J=J||{},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,ve(this,R,J)}function K(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var de=f!=null&&d!=null&&"body"in d.prototype;function ve(R,J,ae){J=String(J);var ee=!!ae.withCredentials,ke=ae.lastEventIdQueryParameterName||"lastEventId",xe=he(1e3),Re=pe(ae.heartbeatTimeout,45e3),qe="",Ae=xe,Be=!1,B=0,P=ae.headers||{},X=ae.Transport,ce=de&&X==null?void 0:new k(X!=null?new X:K()),_e=X!=null&&typeof X!="string"?new X:ce==null?new z:new $,Oe=void 0,Xe=0,ut=I,zt="",Tt="",Ge="",Ct="",rt=F,wr=0,Ir=0,ln=function(mt,St,Wt,Ht){if(ut===V)if(mt===200&&Wt!=null&&oe.test(Wt)){ut=U,Be=Date.now(),Ae=xe,R.readyState=U;var Qt=new W("open",{status:mt,statusText:St,headers:Ht});R.dispatchEvent(Qt),ue(R,R.onopen,Qt)}else{var Vt="";mt!==200?(St&&(St=St.replace(/\s+/g," ")),Vt="EventSource's response has a status "+mt+" "+St+" that is not 200. Aborting the connection."):Vt="EventSource's response has a Content-Type specifying an unsupported type: "+(Wt==null?"-":Wt.replace(/\s+/g," "))+". Aborting the connection.",un();var Qt=new W("error",{status:mt,statusText:St,headers:Ht});R.dispatchEvent(Qt),ue(R,R.onerror,Qt),console.error(Vt)}},Qn=function(mt){if(ut===U){for(var St=-1,Wt=0;Wt<mt.length;Wt+=1){var Ht=mt.charCodeAt(Wt);(Ht===10||Ht===13)&&(St=Wt)}var Qt=(St!==-1?Ct:"")+mt.slice(0,St+1);Ct=(St===-1?Ct:"")+mt.slice(St+1),mt!==""&&(Be=Date.now(),B+=mt.length);for(var Vt=0;Vt<Qt.length;Vt+=1){var Ht=Qt.charCodeAt(Vt);if(rt===w&&Ht===10)rt=F;else if(rt===w&&(rt=F),Ht===13||Ht===10){if(rt!==F){rt===Z&&(Ir=Vt+1);var Ur=Qt.slice(wr,Ir-1),zr=Qt.slice(Ir+(Ir<Vt&&Qt.charCodeAt(Ir)===32?1:0),Vt);Ur==="data"?(zt+=`
|
|
68
|
+
`,zt+=zr):Ur==="id"?Tt=zr:Ur==="event"?Ge=zr:Ur==="retry"?(xe=pe(zr,xe),Ae=xe):Ur==="heartbeatTimeout"&&(Re=pe(zr,Re),Xe!==0&&(i(Xe),Xe=n(function(){ei()},Re)))}if(rt===F){if(zt!==""){qe=Tt,Ge===""&&(Ge="message");var Ni=new L(Ge,{data:zt.slice(1),lastEventId:Tt});if(R.dispatchEvent(Ni),Ge==="open"?ue(R,R.onopen,Ni):Ge==="message"?ue(R,R.onmessage,Ni):Ge==="error"&&ue(R,R.onerror,Ni),ut===A)return}zt="",Ge=""}rt=Ht===13?w:F}else rt===F&&(wr=Vt,rt=Z),rt===Z?Ht===58&&(Ir=Vt+1,rt=E):rt===E&&(rt=Y)}}},jn=function(mt){if(ut===U||ut===V){ut=I,Xe!==0&&(i(Xe),Xe=0),Xe=n(function(){ei()},Ae),Ae=he(Math.min(xe*16,Ae*2)),R.readyState=V;var St=new M("error",{error:mt});R.dispatchEvent(St),ue(R,R.onerror,St),mt!=null&&console.error(mt)}},un=function(){ut=A,Oe!=null&&(Oe.abort(),Oe=void 0),Xe!==0&&(i(Xe),Xe=0),R.readyState=A},ei=function(){if(Xe=0,ut!==I){if(!Be&&Oe!=null)jn(new Error("No activity within "+Re+" milliseconds. "+(ut===V?"No response received.":B+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var mt=Math.max((Be||Date.now())+Re-Date.now(),1);Be=!1,Xe=n(function(){ei()},mt)}return}Be=!1,B=0,Xe=n(function(){ei()},Re),ut=V,zt="",Ge="",Tt=qe,Ct="",wr=0,Ir=0,rt=F;var St=J;if(J.slice(0,5)!=="data:"&&J.slice(0,5)!=="blob:"&&qe!==""){var Wt=J.indexOf("?");St=Wt===-1?J:J.slice(0,Wt+1)+J.slice(Wt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(zr,Ni){return Ni===ke?"":zr}),St+=(J.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(qe)}var Ht=R.withCredentials,Qt={};Qt.Accept="text/event-stream";var Vt=R.headers;if(Vt!=null)for(var Ur in Vt)Object.prototype.hasOwnProperty.call(Vt,Ur)&&(Qt[Ur]=Vt[Ur]);try{Oe=_e.open(ce,ln,Qn,jn,St,Ht,Qt)}catch(zr){throw un(),zr}};R.url=J,R.readyState=V,R.withCredentials=ee,R.headers=P,R._close=un,ei()}Q.prototype=Object.create(O.prototype),Q.prototype.CONNECTING=V,Q.prototype.OPEN=U,Q.prototype.CLOSED=A,Q.prototype.close=function(){this._close()},Q.CONNECTING=V,Q.OPEN=U,Q.CLOSED=A,Q.prototype.withCredentials=void 0;var Ce=l;a!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ce=Q),function(R){{var J=R(t);J!==void 0&&(e.exports=J)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=l,R.EventSource=Ce})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ct:globalThis)})(Pp,Pp.exports);var TB=Pp.exports;const CB=Ze(TB);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,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 n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Np;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Np||(Np={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),di=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},ne=et.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"]),IB=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(a){return a.message},n={_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)n._errors.push(r(o));else{let s=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return i(this),n}static assert(t){if(!(t instanceof Er))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const Na=(e,t)=>{let r;switch(e.code){case ne.invalid_type:e.received===be.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ne.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:r=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ne.invalid_union:r="Invalid input";break;case ne.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ne.invalid_enum_value:r=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ne.invalid_arguments:r="Invalid function arguments";break;case ne.invalid_return_type:r="Invalid function return type";break;case ne.invalid_date:r="Invalid date";break;case ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ne.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ne.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ne.custom:r="Invalid input";break;case ne.invalid_intersection_types:r="Intersection results could not be merged";break;case ne.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ne.not_finite:r="Number must be finite";break;default:r=t.defaultError,et.assertNever(e)}return{message:r}};let D0=Na;function RB(e){D0=e}function mu(){return D0}const vu=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},AB=[];function me(e,t){const r=mu(),n=vu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Na?void 0:Na].filter(i=>!!i)});e.common.issues.push(n)}class nr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return je;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return nr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return je;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:t.value,value:n}}}const je=Object.freeze({status:"aborted"}),Da=e=>({status:"dirty",value:e}),ur=e=>({status:"valid",value:e}),Dp=e=>e.status==="aborted",jp=e=>e.status==="dirty",ss=e=>e.status==="valid",ls=e=>typeof Promise<"u"&&e instanceof Promise;function yu(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function j0(e,t,r,n,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,r),r}typeof SuppressedError=="function"&&SuppressedError;var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var us,cs;class bn{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,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 M0=(e,t)=>{if(ss(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 r=new Er(e.common.issues);return this._error=r,this._error}}};function We(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))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 l,u;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}},description:i}}class Ve{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 di(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new nr,ctx:{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(ls(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},a=this._parseSync({data:t,path:i.path,parent:i});return M0(i,a)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(ls(i)?i:Promise.resolve(i));return M0(n,a)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ne.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Gr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return xn.create(this,this._def)}nullable(){return vi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kr.create(this,this._def)}promise(){return Fa.create(this,this._def)}or(t){return hs.create([this,t],this._def)}and(t){return ms.create(this,t,this._def)}transform(t){return new Gr({...We(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new ws({...We(this._def),innerType:this,defaultValue:r,typeName:De.ZodDefault})}brand(){return new Fp({typeName:De.ZodBranded,type:this,...We(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new xs({...We(this._def),innerType:this,catchValue:r,typeName:De.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ss.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const PB=/^c[^\s-]{8,}$/i,NB=/^[0-9a-z]+$/,DB=/^[0-9A-HJKMNP-TV-Z]{26}$/,jB=/^[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,MB=/^[a-z0-9_-]{21}$/i,LB=/^[-+]?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)?)??$/,FB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mp;const UB=/^(?:(?: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])$/,zB=/^(([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})))$/,WB=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,L0="((\\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])))",HB=new RegExp(`^${L0}$`);function F0(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 VB(e){return new RegExp(`^${F0(e)}$`)}function B0(e){let t=`${L0}T${F0(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function qB(e,t){return!!((t==="v4"||!t)&&UB.test(e)||(t==="v6"||!t)&&zB.test(e))}class Zr extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.string,received:a.parsedType}),je}const n=new nr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.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?me(i,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")FB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Mp||(Mp=new RegExp(BB,"u")),Mp.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")jB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")MB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")PB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")NB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")DB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:ne.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:ne.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:ne.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.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),me(i,{code:ne.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?B0(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?HB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?VB(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:ne.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?LB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:ne.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?qB(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:ne.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?WB.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:ne.invalid_string,message:a.message}),n.dirty()):et.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:ne.invalid_string,...$e.errToObj(n)})}_addCheck(t){return new Zr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var r,n;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...$e.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,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...$e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...$e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...$e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...$e.errToObj(r)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new Zr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zr({...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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Zr.create=e=>{var t;return new Zr({checks:[],typeName:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...We(e)})};function ZB(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class pi 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)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.number,received:a.parsedType}),je}let n;const i=new nr;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),me(n,{code:ne.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.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)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?ZB(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}pi.create=e=>new pi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...We(e)});class hi extends Ve{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)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.bigint,received:a.parsedType}),je}let n;const i=new nr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.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)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),me(n,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,$e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,$e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,$e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,$e.toString(r))}setLimit(t,r,n,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}hi.create=e=>{var t;return new hi({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...We(e)})};class fs extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.boolean,received:n.parsedType}),je}return ur(t.data)}}fs.create=e=>new fs({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...We(e)});class Ki extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_type,expected:be.date,received:a.parsedType}),je}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:ne.invalid_date}),je}const n=new nr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:ne.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):et.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...We(e)});class gu extends Ve{_parse(t){if(this._getType(t)!==be.symbol){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.symbol,received:n.parsedType}),je}return ur(t.data)}}gu.create=e=>new gu({typeName:De.ZodSymbol,...We(e)});class ds extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.undefined,received:n.parsedType}),je}return ur(t.data)}}ds.create=e=>new ds({typeName:De.ZodUndefined,...We(e)});class ps extends Ve{_parse(t){if(this._getType(t)!==be.null){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.null,received:n.parsedType}),je}return ur(t.data)}}ps.create=e=>new ps({typeName:De.ZodNull,...We(e)});class ja extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return ur(t.data)}}ja.create=e=>new ja({typeName:De.ZodAny,...We(e)});class Gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ur(t.data)}}Gi.create=e=>new Gi({typeName:De.ZodUnknown,...We(e)});class Un extends Ve{_parse(t){const r=this._getOrReturnCtx(t);return me(r,{code:ne.invalid_type,expected:be.never,received:r.parsedType}),je}}Un.create=e=>new Un({typeName:De.ZodNever,...We(e)});class bu extends Ve{_parse(t){if(this._getType(t)!==be.undefined){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.void,received:n.parsedType}),je}return ur(t.data)}}bu.create=e=>new bu({typeName:De.ZodVoid,...We(e)});class Kr extends Ve{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==be.array)return me(r,{code:ne.invalid_type,expected:be.array,received:r.parsedType}),je;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(me(r,{code:o?ne.too_big:ne.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}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(me(r,{code:ne.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(me(r,{code:ne.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new bn(r,o,r.path,s)))).then(o=>nr.mergeArray(n,o));const a=[...r.data].map((o,s)=>i.type._parseSync(new bn(r,o,r.path,s)));return nr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new Kr({...this._def,minLength:{value:t,message:$e.toString(r)}})}max(t,r){return new Kr({...this._def,maxLength:{value:t,message:$e.toString(r)}})}length(t,r){return new Kr({...this._def,exactLength:{value:t,message:$e.toString(r)}})}nonempty(t){return this.min(1,t)}}Kr.create=(e,t)=>new Kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...We(t)});function Ma(e){if(e instanceof Et){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=xn.create(Ma(n))}return new Et({...e._def,shape:()=>t})}else return e instanceof Kr?new Kr({...e._def,type:Ma(e.element)}):e instanceof xn?xn.create(Ma(e.unwrap())):e instanceof vi?vi.create(Ma(e.unwrap())):e instanceof wn?wn.create(e.items.map(t=>Ma(t))):e}class Et 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(),r=et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==be.object){const u=this._getOrReturnCtx(t);return me(u,{code:ne.invalid_type,expected:be.object,received:u.parsedType}),je}const{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Un&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const c=a[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new bn(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Un){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(me(i,{code:ne.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new bn(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,d=await c.value;u.push({key:f,value:d,alwaysSet:c.alwaysSet})}return u}).then(u=>nr.mergeObjectSync(n,u)):nr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const r={};return et.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Et({...this._def,shape:()=>r})}omit(t){const r={};return et.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Et({...this._def,shape:()=>r})}deepPartial(){return Ma(this)}partial(t){const r={};return et.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new Et({...this._def,shape:()=>r})}required(t){const r={};return et.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof xn;)a=a._def.innerType;r[n]=a}}),new Et({...this._def,shape:()=>r})}keyof(){return U0(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Un.create(),typeName:De.ZodObject,...We(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Un.create(),typeName:De.ZodObject,...We(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Un.create(),typeName:De.ZodObject,...We(t)});class hs extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n=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 r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Er(s.ctx.common.issues));return me(r,{code:ne.invalid_union,unionErrors:o}),je}if(r.common.async)return Promise.all(n.map(async a=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new Er(l));return me(r,{code:ne.invalid_union,unionErrors:s}),je}}get options(){return this._def.options}}hs.create=(e,t)=>new hs({options:e,typeName:De.ZodUnion,...We(t)});const zn=e=>e instanceof ys?zn(e.schema):e instanceof Gr?zn(e.innerType()):e instanceof gs?[e.value]:e instanceof mi?e.options:e instanceof bs?et.objectValues(e.enum):e instanceof ws?zn(e._def.innerType):e instanceof ds?[void 0]:e instanceof ps?[null]:e instanceof xn?[void 0,...zn(e.unwrap())]:e instanceof vi?[null,...zn(e.unwrap())]:e instanceof Fp||e instanceof Es?zn(e.unwrap()):e instanceof xs?zn(e._def.innerType):[];class wu extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:ne.invalid_type,expected:be.object,received:r.parsedType}),je;const n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(me(r,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const a of r){const o=zn(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 wu({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...We(n)})}}function Lp(e,t){const r=di(e),n=di(t);if(e===t)return{valid:!0,data:e};if(r===be.object&&n===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=Lp(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(r===be.array&&n===be.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],l=Lp(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===be.date&&n===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ms extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(Dp(a)||Dp(o))return je;const s=Lp(a.value,o.value);return s.valid?((jp(a)||jp(o))&&r.dirty(),{status:r.value,value:s.data}):(me(n,{code:ne.invalid_intersection_types}),je)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ms.create=(e,t,r)=>new ms({left:e,right:t,typeName:De.ZodIntersection,...We(r)});class wn extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.array)return me(n,{code:ne.invalid_type,expected:be.array,received:n.parsedType}),je;if(n.data.length<this._def.items.length)return me(n,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&n.data.length>this._def.items.length&&(me(n,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new bn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>nr.mergeArray(r,o)):nr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new wn({...this._def,rest:t})}}wn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn({items:e,typeName:De.ZodTuple,rest:null,...We(t)})};class vs extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:ne.invalid_type,expected:be.object,received:n.parsedType}),je;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new bn(n,s,n.path,s)),value:o._parse(new bn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?nr.mergeObjectAsync(r,i):nr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ve?new vs({keyType:t,valueType:r,typeName:De.ZodRecord,...We(n)}):new vs({keyType:Zr.create(),valueType:t,typeName:De.ZodRecord,...We(r)})}}class xu extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.map)return me(n,{code:ne.invalid_type,expected:be.map,received:n.parsedType}),je;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,l],u)=>({key:i._parse(new bn(n,s,n.path,[u,"key"])),value:a._parse(new bn(n,l,n.path,[u,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return je;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return je;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}}}}xu.create=(e,t,r)=>new xu({valueType:t,keyType:e,typeName:De.ZodMap,...We(r)});class Yi extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==be.set)return me(n,{code:ne.invalid_type,expected:be.set,received:n.parsedType}),je;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(me(n,{code:ne.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(me(n,{code:ne.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const a=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return je;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}const s=[...n.data.values()].map((l,u)=>a._parse(new bn(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,r){return new Yi({...this._def,minSize:{value:t,message:$e.toString(r)}})}max(t,r){return new Yi({...this._def,maxSize:{value:t,message:$e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Yi.create=(e,t)=>new Yi({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...We(t)});class La extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.function)return me(r,{code:ne.invalid_type,expected:be.function,received:r.parsedType}),je;function n(s,l){return vu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mu(),Na].filter(u=>!!u),issueData:{code:ne.invalid_arguments,argumentsError:l}})}function i(s,l){return vu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mu(),Na].filter(u=>!!u),issueData:{code:ne.invalid_return_type,returnTypeError:l}})}const a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Fa){const s=this;return ur(async function(...l){const u=new Er([]),c=await s._def.args.parseAsync(l,a).catch(p=>{throw u.addIssue(n(l,p)),u}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw u.addIssue(i(f,p)),u})})}else{const s=this;return ur(function(...l){const u=s._def.args.safeParse(l,a);if(!u.success)throw new Er([n(l,u.error)]);const c=Reflect.apply(o,this,u.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Er([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new La({...this._def,args:wn.create(t).rest(Gi.create())})}returns(t){return new La({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new La({args:t||wn.create([]).rest(Gi.create()),returns:r||Gi.create(),typeName:De.ZodFunction,...We(n)})}}class ys extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ys.create=(e,t)=>new ys({getter:e,typeName:De.ZodLazy,...We(t)});class gs extends Ve{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return me(r,{received:r.data,code:ne.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}}gs.create=(e,t)=>new gs({value:e,typeName:De.ZodLiteral,...We(t)});function U0(e,t){return new mi({values:e,typeName:De.ZodEnum,...We(t)})}class mi extends Ve{constructor(){super(...arguments),us.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return me(r,{expected:et.joinValues(n),received:r.parsedType,code:ne.invalid_type}),je}if(yu(this,us)||j0(this,us,new Set(this._def.values)),!yu(this,us).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return me(r,{received:r.data,code:ne.invalid_enum_value,options:n}),je}return ur(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return mi.create(t,{...this._def,...r})}exclude(t,r=this._def){return mi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}us=new WeakMap,mi.create=U0;class bs extends Ve{constructor(){super(...arguments),cs.set(this,void 0)}_parse(t){const r=et.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==be.string&&n.parsedType!==be.number){const i=et.objectValues(r);return me(n,{expected:et.joinValues(i),received:n.parsedType,code:ne.invalid_type}),je}if(yu(this,cs)||j0(this,cs,new Set(et.getValidEnumValues(this._def.values))),!yu(this,cs).has(t.data)){const i=et.objectValues(r);return me(n,{received:n.data,code:ne.invalid_enum_value,options:i}),je}return ur(t.data)}get enum(){return this._def.values}}cs=new WeakMap,bs.create=(e,t)=>new bs({values:e,typeName:De.ZodNativeEnum,...We(t)});class Fa extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==be.promise&&r.common.async===!1)return me(r,{code:ne.invalid_type,expected:be.promise,received:r.parsedType}),je;const n=r.parsedType===be.promise?r.data:Promise.resolve(r.data);return ur(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Fa.create=(e,t)=>new Fa({type:e,typeName:De.ZodPromise,...We(t)});class Gr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return je;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?je:l.status==="dirty"||r.value==="dirty"?Da(l.value):l});{if(r.value==="aborted")return je;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?je:s.status==="dirty"||r.value==="dirty"?Da(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ss(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:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ss(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):o);et.assertNever(i)}}Gr.create=(e,t,r)=>new Gr({schema:e,typeName:De.ZodEffects,effect:t,...We(r)}),Gr.createWithPreprocess=(e,t,r)=>new Gr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...We(r)});class xn extends Ve{_parse(t){return this._getType(t)===be.undefined?ur(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}xn.create=(e,t)=>new xn({innerType:e,typeName:De.ZodOptional,...We(t)});class vi extends Ve{_parse(t){return this._getType(t)===be.null?ur(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vi.create=(e,t)=>new vi({innerType:e,typeName:De.ZodNullable,...We(t)});class ws extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===be.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ws.create=(e,t)=>new ws({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...We(t)});class xs extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ls(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Er(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Er(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}xs.create=(e,t)=>new xs({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...We(t)});class Su extends Ve{_parse(t){if(this._getType(t)!==be.nan){const n=this._getOrReturnCtx(t);return me(n,{code:ne.invalid_type,expected:be.nan,received:n.parsedType}),je}return{status:"valid",value:t.data}}}Su.create=e=>new Su({typeName:De.ZodNaN,...We(e)});const KB=Symbol("zod_brand");class Fp extends Ve{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ss extends Ve{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?je:a.status==="dirty"?(r.dirty(),Da(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?je:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new Ss({in:t,out:r,typeName:De.ZodPipeline})}}class Es extends Ve{_parse(t){const r=this._def.innerType._parse(t),n=i=>(ss(i)&&(i.value=Object.freeze(i.value)),i);return ls(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:De.ZodReadonly,...We(t)});function z0(e,t={},r){return e?ja.create().superRefine((n,i)=>{var a,o;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:r)!==null&&o!==void 0?o:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):ja.create()}const GB={object:Et.lazycreate};var De;(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"})(De||(De={}));const YB=(e,t={message:`Input not instance of ${e.name}`})=>z0(r=>r instanceof e,t),W0=Zr.create,H0=pi.create,JB=Su.create,XB=hi.create,V0=fs.create,QB=Ki.create,e3=gu.create,t3=ds.create,r3=ps.create,n3=ja.create,i3=Gi.create,a3=Un.create,o3=bu.create,s3=Kr.create,l3=Et.create,u3=Et.strictCreate,c3=hs.create,f3=wu.create,d3=ms.create,p3=wn.create,h3=vs.create,m3=xu.create,v3=Yi.create,y3=La.create,g3=ys.create,b3=gs.create,w3=mi.create,x3=bs.create,S3=Fa.create,q0=Gr.create,E3=xn.create,_3=vi.create,k3=Gr.createWithPreprocess,$3=Ss.create;var q=Object.freeze({__proto__:null,defaultErrorMap:Na,setErrorMap:RB,getErrorMap:mu,makeIssue:vu,EMPTY_PATH:AB,addIssueToContext:me,ParseStatus:nr,INVALID:je,DIRTY:Da,OK:ur,isAborted:Dp,isDirty:jp,isValid:ss,isAsync:ls,get util(){return et},get objectUtil(){return Np},ZodParsedType:be,getParsedType:di,ZodType:Ve,datetimeRegex:B0,ZodString:Zr,ZodNumber:pi,ZodBigInt:hi,ZodBoolean:fs,ZodDate:Ki,ZodSymbol:gu,ZodUndefined:ds,ZodNull:ps,ZodAny:ja,ZodUnknown:Gi,ZodNever:Un,ZodVoid:bu,ZodArray:Kr,ZodObject:Et,ZodUnion:hs,ZodDiscriminatedUnion:wu,ZodIntersection:ms,ZodTuple:wn,ZodRecord:vs,ZodMap:xu,ZodSet:Yi,ZodFunction:La,ZodLazy:ys,ZodLiteral:gs,ZodEnum:mi,ZodNativeEnum:bs,ZodPromise:Fa,ZodEffects:Gr,ZodTransformer:Gr,ZodOptional:xn,ZodNullable:vi,ZodDefault:ws,ZodCatch:xs,ZodNaN:Su,BRAND:KB,ZodBranded:Fp,ZodPipeline:Ss,ZodReadonly:Es,custom:z0,Schema:Ve,ZodSchema:Ve,late:GB,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>Zr.create({...e,coerce:!0}),number:e=>pi.create({...e,coerce:!0}),boolean:e=>fs.create({...e,coerce:!0}),bigint:e=>hi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},any:n3,array:s3,bigint:XB,boolean:V0,date:QB,discriminatedUnion:f3,effect:q0,enum:w3,function:y3,instanceof:YB,intersection:d3,lazy:g3,literal:b3,map:m3,nan:JB,nativeEnum:x3,never:a3,null:r3,nullable:_3,number:H0,object:l3,oboolean:()=>V0().optional(),onumber:()=>H0().optional(),optional:E3,ostring:()=>W0().optional(),pipeline:$3,preprocess:k3,promise:S3,record:h3,set:v3,strictObject:u3,string:W0,symbol:e3,transformer:q0,tuple:p3,undefined:t3,union:c3,unknown:i3,void:o3,NEVER:je,ZodIssueCode:ne,quotelessJson:IB,ZodError:Er}),O3=Object.defineProperty,T3=(e,t,r)=>t in e?O3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C3=(e,t,r)=>(T3(e,t+"",r),r),I3={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Bp=typeof window<"u"&&typeof window.document<"u"?window.crypto:qx;Bp.getRandomValues||(Bp=I3);var xt=class extends Error{constructor(t,r,n,i,a,o){super(i);Ee(this,"isApiError",!0);this.code=t,this.description=r,this.type=n,this.message=i,this.error=a,this.id=o,this.id||(this.id=xt.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}}static generateId(){const t=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,i=Array.from(Bp.getRandomValues(new Uint8Array(n))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},R3=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Up=e=>e instanceof xt||R3(e)&&e.isApiError===!0,_s=class extends xt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},A3=class extends xt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},P3=class extends xt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},N3=class extends xt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},D3=class extends xt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},j3=class extends xt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},M3=class extends xt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},L3=class extends xt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},F3=class extends xt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},B3=class extends xt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},U3=class extends xt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},z3=class extends xt{constructor(e,t,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,r)}},W3=class extends xt{constructor(e,t,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,r)}},H3=class extends xt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},V3=class extends xt{constructor(e,t,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,r)}},q3=class extends xt{constructor(e,t,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,r)}},Z3=class extends xt{constructor(e,t,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,r)}},K3=class extends xt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},G3=class extends xt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},Y3=class extends xt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},J3=class extends xt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},X3=class extends xt{constructor(e,t,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,r)}},Q3=class extends xt{constructor(e,t,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,r)}},e4=class extends xt{constructor(e,t,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,r)}},t4={Unknown:_s,Internal:A3,Unauthorized:P3,Forbidden:N3,PayloadTooLarge:D3,InvalidPayload:j3,UnsupportedMediaType:M3,MethodNotFound:L3,ResourceNotFound:F3,InvalidJsonSchema:B3,InvalidDataFormat:U3,InvalidIdentifier:z3,RelationConflict:W3,ReferenceConstraint:H3,ResourceLockedConflict:V3,ReferenceNotFound:q3,InvalidQuery:Z3,Runtime:K3,AlreadyExists:G3,RateLimited:Y3,PaymentRequired:J3,QuotaExceeded:X3,LimitExceeded:Q3,BreakingChanges:e4},Z0=e=>Up(e)?e:e instanceof Error?new _s(e.message,e):typeof e=="string"?new _s(e):r4(e);function r4(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=t4[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new _s(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new _s("An invalid error occurred: "+JSON.stringify(e))}var n4=e=>e[1]!==void 0,Pt=e=>{const{method:t,path:r,query:n,headers:i,body:a}=e,o=Object.entries(i).filter(n4),s=Object.fromEntries(o),l=OB.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=l?[r,l].join("?"):r;return{method:t,url:u,headers:s,data:a}},i4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),a4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),o4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),s4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),l4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),u4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),c4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),f4=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:{}}),d4=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:{}}),p4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),h4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),m4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),v4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),y4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),g4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),b4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),w4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),x4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),S4=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}}),E4=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}}),_4=class{constructor(e,t={}){Ee(this,"getConversation",async e=>{const{path:t,headers:r,query:n,body:i}=i4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createConversation",async e=>{const{path:t,headers:r,query:n,body:i}=a4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteConversation",async e=>{const{path:t,headers:r,query:n,body:i}=o4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listConversations",async e=>{const{path:t,headers:r,query:n,body:i}=s4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listenConversation",async e=>{const{path:t,headers:r,query:n,body:i}=l4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listConversationMessages",async e=>{const{path:t,headers:r,query:n,body:i}=u4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"addParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=c4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"removeParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=f4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getParticipant",async e=>{const{path:t,headers:r,query:n,body:i}=d4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"listParticipants",async e=>{const{path:t,headers:r,query:n,body:i}=p4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getMessage",async e=>{const{path:t,headers:r,query:n,body:i}=h4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createMessage",async e=>{const{path:t,headers:r,query:n,body:i}=m4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteMessage",async e=>{const{path:t,headers:r,query:n,body:i}=v4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getUser",async e=>{const{path:t,headers:r,query:n,body:i}=y4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createUser",async e=>{const{path:t,headers:r,query:n,body:i}=g4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"updateUser",async e=>{const{path:t,headers:r,query:n,body:i}=b4(e),o=(this.props.toAxiosRequest??Pt)({method:"put",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"deleteUser",async e=>{const{path:t,headers:r,query:n,body:i}=w4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"getEvent",async e=>{const{path:t,headers:r,query:n,body:i}=x4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createEvent",async e=>{const{path:t,headers:r,query:n,body:i}=S4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});Ee(this,"createFile",async e=>{const{path:t,headers:r,query:n,body:i}=E4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...r},query:{...n},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Nt(s)})});this.axiosInstance=e,this.props=t}};function Nt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Z0(e.response.data):Z0(e)}var K0=class{constructor(){Ee(this,"listeners",{})}emit(e,t){const r=this.listeners[e];if(r)for(const n of[...r])n(t)}onceOrMore(e,t){const r=n=>{t(n)==="stop-listening"&&this.off(e,r)};this.on(e,r)}once(e,t){const r=n=>{this.off(e,r),t(n)};this.on(e,r)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const r=this.listeners[e];if(!r)return;const n=r.indexOf(t);n!==-1&&r.splice(n,1)}cleanup(){this.listeners={}}},k4=(e,t)=>{const r=new CB.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),n=new K0;return r.onopen=i=>n.emit("open",i),r.onmessage=i=>n.emit("message",i),r.onerror=i=>n.emit("error",i),{emitter:n,source:r}},$4=async(e,t={})=>{const{emitter:r,source:n}=k4(e,t);return await new Promise((i,a)=>{r.on("open",()=>{i()}),r.on("error",o=>{a(o)})}).finally(()=>r.cleanup()),{on:r.on.bind(r),close:()=>{r.cleanup(),n.close()}}},O4=q.object({type:q.literal("message_created"),data:q.object({id:q.string().describe("Id of the [Message](#schema_message)"),createdAt:q.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:q.union([q.object({audioUrl:q.string().min(1),type:q.literal("audio")}),q.object({title:q.string().min(1),subtitle:q.string().min(1).optional(),imageUrl:q.string().min(1).optional(),actions:q.array(q.object({action:q.enum(["postback","url","say"]),label:q.string().min(1),value:q.string().min(1)})),type:q.literal("card")}),q.object({items:q.array(q.object({title:q.string().min(1),subtitle:q.string().min(1).optional(),imageUrl:q.string().min(1).optional(),actions:q.array(q.object({action:q.enum(["postback","url","say"]),label:q.string().min(1),value:q.string().min(1)}))})),type:q.literal("carousel")}),q.object({text:q.string().min(1),options:q.array(q.object({label:q.string().min(1),value:q.string().min(1)})),type:q.literal("choice"),disableFreeText:q.boolean().optional()}),q.object({text:q.string().min(1),options:q.array(q.object({label:q.string().min(1),value:q.string().min(1)})),type:q.literal("dropdown")}),q.object({fileUrl:q.string().min(1),title:q.string().min(1).optional(),type:q.literal("file")}),q.object({imageUrl:q.string().min(1),type:q.literal("image")}),q.object({latitude:q.number(),longitude:q.number(),address:q.string().optional(),title:q.string().optional(),type:q.literal("location")}),q.object({text:q.string().min(1),type:q.literal("text")}),q.object({videoUrl:q.string().min(1),type:q.literal("video")}),q.object({items:q.array(q.union([q.object({type:q.literal("text"),payload:q.object({text:q.string().min(1)})}),q.object({type:q.literal("markdown"),payload:q.object({markdown:q.string().min(1)})}),q.object({type:q.literal("image"),payload:q.object({imageUrl:q.string().min(1)})}),q.object({type:q.literal("audio"),payload:q.object({audioUrl:q.string().min(1)})}),q.object({type:q.literal("video"),payload:q.object({videoUrl:q.string().min(1)})}),q.object({type:q.literal("file"),payload:q.object({fileUrl:q.string().min(1),title:q.string().min(1).optional()})}),q.object({type:q.literal("location"),payload:q.object({latitude:q.number(),longitude:q.number(),address:q.string().optional(),title:q.string().optional()})})])),type:q.literal("bloc")}),q.object({markdown:q.string().min(1),type:q.literal("markdown")})]).describe("Payload is the content type of the message."),userId:q.string().describe("ID of the [User](#schema_user)"),conversationId:q.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:q.record(q.union([q.any(),q.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),T4=q.object({type:q.literal("webchat_visibility"),data:q.object({visibility:q.union([q.literal("show"),q.literal("hide"),q.literal("toggle")])})}),C4=q.object({type:q.literal("webchat_config"),data:q.object({config:q.record(q.union([q.any(),q.null()]))})}),I4=q.object({type:q.literal("custom"),data:q.object({event:q.record(q.union([q.any(),q.null()]))})}),R4=q.object({type:q.literal("typing_started"),data:q.object({timeout:q.number().optional()})}),A4=q.object({type:q.literal("typing_stopped"),data:q.record(q.never())}),P4={messageCreated:O4,webchatVisibility:T4,webchatConfig:C4,custom:I4,typingStarted:R4,typingStopped:A4},G0="unknown error",Y0=class extends K0{constructor(t){super();Ee(this,"_state",{status:"disconnected"});Ee(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});Ee(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)});Ee(this,"_connect",async()=>{const t=await $4(`${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});Ee(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});Ee(this,"_handleMessage",t=>{const r=this._parseSignal(t.data);this.emit(r.type,r.data)});Ee(this,"_handleError",t=>r=>{this._disconnectSync(t);const n=this._toError(r);this.emit("error",n)});Ee(this,"_parseSignal",t=>{for(const r of Object.values(P4)){const n=this._safeJsonParse(t),i=r.safeParse(n);if(i.success)return i.data}return{type:"unknown",data:t}});Ee(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});Ee(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(G0);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const r=JSON.stringify(t);return new Error(r)}catch{return new Error(G0)}});this._props=t}get status(){return this._state.status}},J0=Y0;C3(J0,"listen",async e=>{const t=new Y0(e);return await t.connect(),t});var X0=100*1024*1024,N4=X0,D4=X0,j4=6e4,M4=class{constructor(e){Ee(this,"_auto");Ee(this,"createConversation",e=>this._auto.createConversation(e));Ee(this,"getConversation",e=>this._auto.getConversation(e));Ee(this,"deleteConversation",e=>this._auto.deleteConversation(e));Ee(this,"listConversations",e=>this._auto.listConversations(e));Ee(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));Ee(this,"addParticipant",e=>this._auto.addParticipant(e));Ee(this,"removeParticipant",e=>this._auto.removeParticipant(e));Ee(this,"getParticipant",e=>this._auto.getParticipant(e));Ee(this,"listParticipants",e=>this._auto.listParticipants(e));Ee(this,"createMessage",e=>this._auto.createMessage(e));Ee(this,"getMessage",e=>this._auto.getMessage(e));Ee(this,"deleteMessage",e=>this._auto.deleteMessage(e));Ee(this,"createFile",e=>this._auto.createFile(e));Ee(this,"createUser",e=>this._auto.createUser(e));Ee(this,"getUser",e=>this._auto.getUser(e));Ee(this,"updateUser",e=>this._auto.updateUser(e));Ee(this,"deleteUser",e=>this._auto.deleteUser(e));Ee(this,"createEvent",e=>this._auto.createEvent(e));Ee(this,"getEvent",e=>this._auto.getEvent(e));Ee(this,"listenConversation",async({id:e,"x-user-key":t})=>await J0.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,r={...e.headers},n=this.props.timeout??j4,i=At.create({baseURL:t,headers:r,withCredentials:!0,timeout:n,maxBodyLength:N4,maxContentLength:D4});this._auto=new _4(i)}};const Eu={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},mr=(e,t)=>e.status===t,Sn=(e,t)=>Eu[e.status]<Eu[t],Q0=(e,t)=>Eu[e.status]>=Eu[t];class En extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const eS=["audio","file","image","video"],tS=e=>eS.includes(e),L4=6e4;class F4 extends Fg{constructor(r){super();Ee(this,"_client");Ee(this,"_webhookId");Ee(this,"_apiUrl");Ee(this,"_state",{status:"disconnected"});Ee(this,"mode","pushpin");Ee(this,"_initialConnect",async({data:r,name:n,pictureUrl:i})=>{if(Q0(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(mr(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:n,pictureUrl:i,userData:r});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});Ee(this,"_reConnect",async(r,{data:n,name:i,pictureUrl:a})=>{if(Q0(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return mr(this._state,"user_creating")||(this._state={status:"user_created",userId:r.userId,userKey:r.userToken},await this._client.updateUser({"x-user-key":r.userToken,name:i,pictureUrl:a,userData:n})),r});Ee(this,"_mapMessage",r=>{const{metadata:n}=r,{payload:i,disableInput:a}=_o(r.payload);return{id:r.id,conversationId:r.conversationId,authorId:r.userId,sentOn:new Date(r.createdAt),payload:i,disableInput:a,metadata:n}});const n=`${r.apiUrl}/${r.clientId}`;this._webhookId=r.clientId,this._apiUrl=n,this._client=new M4({apiUrl:n,sseTimeout:L4})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Sn(this._state,"user_created"))return this._state.userId}async getUser(){if(Sn(this._state,"user_created"))throw new En(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(Sn(this._state,"user_created"))throw new En(this._state);const{user:n}=await this._client.updateUser({"x-user-key":this._state.userKey,name:r.name,pictureUrl:r.pictureUrl,userData:r.data});return n}get conversationId(){if(!Sn(this._state,"conversation_created"))return this._state.conversationId}async connect(r,n,i={}){const a={data:n,...i};return r?await this.userExists(r)?this._reConnect(r,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){mr(this._state,"conversation_created")?this._state.signalEmitter.cleanup():mr(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state));const{size:i,name:a}=r,s=await(h=>new Promise((m,g)=>{const v=new FileReader;v.onload=y=>{var b;return m((b=y.target)==null?void 0:b.result)},v.onerror=y=>{var b;return g((b=y.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(r),{file:{uploadUrl:l,contentType:u,url:c}}=await this._client.createFile({"x-user-key":n.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(l,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=u.split("/").shift()??"",d=tS(f)?f:"file",p=d==="image"?{type:d,imageUrl:c}:d==="audio"?{type:d,audioUrl:c}:d==="video"?{type:d,videoUrl:c}:{type:d,fileUrl:c};return await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:c,name:a,type:d}}async sendMessage(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:r}),this.emit("messageSent",r)}async sendEvent(r){if(Sn(this._state,"user_created"))throw new En(this._state);if(mr(this._state,"conversation_creating"))throw new En(this._state);let n;mr(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"custom",data:r}})}async switchConversation(r){if(Sn(this._state,"user_created"))throw new En(this._state);mr(this._state,"conversation_created")&&this._state.conversationId===r||mr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,r))}async conversationExists(r){if(Sn(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(Up(n)&&n.code===404)return!1;throw n}}async userExists({userToken:r}){try{return await this._client.getUser({"x-user-key":r}),!0}catch(n){const i=a=>a.code===404||a.code===401;if(Up(n)&&i(n))return!1;throw n}}async newConversation(){if(Sn(this._state,"user_created"))throw new En(this._state);mr(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(r){const{conversation:{id:n}}=await this._client.createConversation({"x-user-key":r.userKey}),i=await this._connectConversation(r,n);return await this._client.createEvent({"x-user-key":r.userKey,conversationId:n,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!mr(this._state,"conversation_created"))return[];const{conversationId:r,userKey:n}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(r,n){const i=await this._client.listenConversation({id:n,"x-user-key":r.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId!==r.userId&&this.emit("message",this._mapMessage(a))}),i.on("error",a=>{this._state={status:"user_created",userId:r.userId,userKey:r.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",n),this._state={status:"conversation_created",userId:r.userId,userKey:r.userKey,conversationId:n,signalEmitter:i},this._state}}const rS=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new F4({apiUrl:t,clientId:e}),B4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[r]=j.useState(rS({clientId:e,apiUrl:t}));return r},U4=(e,t={})=>new Promise((r,n)=>{if(typeof window>"u")return n("Window is not defined");if(!e)return n("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),r({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),n(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>n("Timeout"),t.timeout))});let z4={data:""},W4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||z4,H4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,V4=/\/\*[^]*?\*\/| +/g,nS=/\n+/g,yi=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?yi(o,a):a+"{"+yi(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=yi(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=yi.p?yi.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Wn={},iS=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+iS(e[r]);return t}return e},q4=(e,t,r,n,i)=>{let a=iS(e),o=Wn[a]||(Wn[a]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(a));if(!Wn[o]){let l=a!==e?e:(u=>{let c,f,d=[{}];for(;c=H4.exec(u.replace(V4,""));)c[4]?d.shift():c[3]?(f=c[3].replace(nS," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(nS," ").trim();return d[0]})(e);Wn[o]=yi(i?{["@keyframes "+o]:l}:l,r?"":"."+o)}let s=r&&Wn.g?Wn.g:null;return r&&(Wn.g=Wn[o]),((l,u,c,f)=>{f?u.data=u.data.replace(f,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Wn[o],t,n,s),o},Z4=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let s=o(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":yi(s,""):s===!1?"":s}return n+i+(o??"")},"");function _u(e){let t=this||{},r=e.call?e(t.p):e;return q4(r.unshift?r.raw?Z4(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,W4(t.target),t.g,t.o,t.k)}let aS,zp,Wp;_u.bind({g:1});let Hn=_u.bind({k:1});function K4(e,t,r,n){yi.p=t,aS=e,zp=r,Wp=n}function gi(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;r.p=Object.assign({theme:zp&&zp()},s),r.o=/ *go\d+/.test(l),s.className=_u.apply(r,n)+(l?" "+l:"");let u=e;return e[0]&&(u=s.as||e,delete s.as),Wp&&u[0]&&Wp(s),aS(u,s)}return i}}var G4=e=>typeof e=="function",ku=(e,t)=>G4(e)?e(t):e,Y4=(()=>{let e=0;return()=>(++e).toString()})(),oS=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),J4=20,$u=new Map,X4=1e3,sS=e=>{if($u.has(e))return;let t=setTimeout(()=>{$u.delete(e),Ji({type:4,toastId:e})},X4);$u.set(e,t)},Q4=e=>{let t=$u.get(e);t&&clearTimeout(t)},Hp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,J4)};case 1:return t.toast.id&&Q4(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return e.toasts.find(a=>a.id===r.id)?Hp(e,{type:1,toast:r}):Hp(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?sS(n):e.toasts.forEach(a=>{sS(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Ou=[],Tu={toasts:[],pausedAt:void 0},Ji=e=>{Tu=Hp(Tu,e),Ou.forEach(t=>{t(Tu)})},eU={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},tU=(e={})=>{let[t,r]=j.useState(Tu);j.useEffect(()=>(Ou.push(r),()=>{let i=Ou.indexOf(r);i>-1&&Ou.splice(i,1)}),[t]);let n=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||eU[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:n}},rU=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||Y4()}),ks=e=>(t,r)=>{let n=rU(t,e,r);return Ji({type:2,toast:n}),n.id},Mr=(e,t)=>ks("blank")(e,t);Mr.error=ks("error"),Mr.success=ks("success"),Mr.loading=ks("loading"),Mr.custom=ks("custom"),Mr.dismiss=e=>{Ji({type:3,toastId:e})},Mr.remove=e=>Ji({type:4,toastId:e}),Mr.promise=(e,t,r)=>{let n=Mr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(i=>(Mr.success(ku(t.success,i),{id:n,...r,...r==null?void 0:r.success}),i)).catch(i=>{Mr.error(ku(t.error,i),{id:n,...r,...r==null?void 0:r.error})}),e};var nU=(e,t)=>{Ji({type:1,toast:{id:e,height:t}})},iU=()=>{Ji({type:5,time:Date.now()})},aU=e=>{let{toasts:t,pausedAt:r}=tU(e);j.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&Mr.dismiss(s.id);return}return setTimeout(()=>Mr.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=j.useCallback(()=>{r&&Ji({type:6,time:Date.now()})},[r]),i=j.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:u}=o||{},c=t.filter(p=>(p.position||u)===(a.position||u)&&p.height),f=c.findIndex(p=>p.id===a.id),d=c.filter((p,h)=>h<f&&p.visible).length;return c.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:nU,startPause:iU,endPause:n,calculateOffset:i}}},oU=Hn`
|
|
69
69
|
from {
|
|
70
70
|
transform: scale(0) rotate(45deg);
|
|
71
71
|
opacity: 0;
|
|
@@ -73,7 +73,7 @@ from {
|
|
|
73
73
|
to {
|
|
74
74
|
transform: scale(1) rotate(45deg);
|
|
75
75
|
opacity: 1;
|
|
76
|
-
}`,
|
|
76
|
+
}`,sU=Hn`
|
|
77
77
|
from {
|
|
78
78
|
transform: scale(0);
|
|
79
79
|
opacity: 0;
|
|
@@ -81,7 +81,7 @@ from {
|
|
|
81
81
|
to {
|
|
82
82
|
transform: scale(1);
|
|
83
83
|
opacity: 1;
|
|
84
|
-
}`,
|
|
84
|
+
}`,lU=Hn`
|
|
85
85
|
from {
|
|
86
86
|
transform: scale(0) rotate(90deg);
|
|
87
87
|
opacity: 0;
|
|
@@ -89,7 +89,7 @@ from {
|
|
|
89
89
|
to {
|
|
90
90
|
transform: scale(1) rotate(90deg);
|
|
91
91
|
opacity: 1;
|
|
92
|
-
}`,
|
|
92
|
+
}`,uU=gi("div")`
|
|
93
93
|
width: 20px;
|
|
94
94
|
opacity: 0;
|
|
95
95
|
height: 20px;
|
|
@@ -98,14 +98,14 @@ to {
|
|
|
98
98
|
position: relative;
|
|
99
99
|
transform: rotate(45deg);
|
|
100
100
|
|
|
101
|
-
animation: ${
|
|
101
|
+
animation: ${oU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
102
102
|
forwards;
|
|
103
103
|
animation-delay: 100ms;
|
|
104
104
|
|
|
105
105
|
&:after,
|
|
106
106
|
&:before {
|
|
107
107
|
content: '';
|
|
108
|
-
animation: ${
|
|
108
|
+
animation: ${sU} 0.15s ease-out forwards;
|
|
109
109
|
animation-delay: 150ms;
|
|
110
110
|
position: absolute;
|
|
111
111
|
border-radius: 3px;
|
|
@@ -118,18 +118,18 @@ to {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
&:before {
|
|
121
|
-
animation: ${
|
|
121
|
+
animation: ${lU} 0.15s ease-out forwards;
|
|
122
122
|
animation-delay: 180ms;
|
|
123
123
|
transform: rotate(90deg);
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,cU=Hn`
|
|
126
126
|
from {
|
|
127
127
|
transform: rotate(0deg);
|
|
128
128
|
}
|
|
129
129
|
to {
|
|
130
130
|
transform: rotate(360deg);
|
|
131
131
|
}
|
|
132
|
-
`,
|
|
132
|
+
`,fU=gi("div")`
|
|
133
133
|
width: 12px;
|
|
134
134
|
height: 12px;
|
|
135
135
|
box-sizing: border-box;
|
|
@@ -137,8 +137,8 @@ to {
|
|
|
137
137
|
border-radius: 100%;
|
|
138
138
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
139
139
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
140
|
-
animation: ${
|
|
141
|
-
`,
|
|
140
|
+
animation: ${cU} 1s linear infinite;
|
|
141
|
+
`,dU=Hn`
|
|
142
142
|
from {
|
|
143
143
|
transform: scale(0) rotate(45deg);
|
|
144
144
|
opacity: 0;
|
|
@@ -146,7 +146,7 @@ from {
|
|
|
146
146
|
to {
|
|
147
147
|
transform: scale(1) rotate(45deg);
|
|
148
148
|
opacity: 1;
|
|
149
|
-
}`,
|
|
149
|
+
}`,pU=Hn`
|
|
150
150
|
0% {
|
|
151
151
|
height: 0;
|
|
152
152
|
width: 0;
|
|
@@ -160,7 +160,7 @@ to {
|
|
|
160
160
|
100% {
|
|
161
161
|
opacity: 1;
|
|
162
162
|
height: 10px;
|
|
163
|
-
}`,
|
|
163
|
+
}`,hU=gi("div")`
|
|
164
164
|
width: 20px;
|
|
165
165
|
opacity: 0;
|
|
166
166
|
height: 20px;
|
|
@@ -169,13 +169,13 @@ to {
|
|
|
169
169
|
position: relative;
|
|
170
170
|
transform: rotate(45deg);
|
|
171
171
|
|
|
172
|
-
animation: ${
|
|
172
|
+
animation: ${dU} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
173
173
|
forwards;
|
|
174
174
|
animation-delay: 100ms;
|
|
175
175
|
&:after {
|
|
176
176
|
content: '';
|
|
177
177
|
box-sizing: border-box;
|
|
178
|
-
animation: ${
|
|
178
|
+
animation: ${pU} 0.2s ease-out forwards;
|
|
179
179
|
opacity: 0;
|
|
180
180
|
animation-delay: 200ms;
|
|
181
181
|
position: absolute;
|
|
@@ -187,16 +187,16 @@ to {
|
|
|
187
187
|
height: 10px;
|
|
188
188
|
width: 6px;
|
|
189
189
|
}
|
|
190
|
-
`,
|
|
190
|
+
`,mU=gi("div")`
|
|
191
191
|
position: absolute;
|
|
192
|
-
`,
|
|
192
|
+
`,vU=gi("div")`
|
|
193
193
|
position: relative;
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: center;
|
|
196
196
|
align-items: center;
|
|
197
197
|
min-width: 20px;
|
|
198
198
|
min-height: 20px;
|
|
199
|
-
`,
|
|
199
|
+
`,yU=Hn`
|
|
200
200
|
from {
|
|
201
201
|
transform: scale(0.6);
|
|
202
202
|
opacity: 0.4;
|
|
@@ -204,20 +204,20 @@ from {
|
|
|
204
204
|
to {
|
|
205
205
|
transform: scale(1);
|
|
206
206
|
opacity: 1;
|
|
207
|
-
}`,
|
|
207
|
+
}`,gU=gi("div")`
|
|
208
208
|
position: relative;
|
|
209
209
|
transform: scale(0.6);
|
|
210
210
|
opacity: 0.4;
|
|
211
211
|
min-width: 20px;
|
|
212
|
-
animation: ${
|
|
212
|
+
animation: ${yU} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
213
213
|
forwards;
|
|
214
|
-
`,
|
|
214
|
+
`,bU=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?x.createElement(gU,null,t):t:r==="blank"?null:x.createElement(vU,null,x.createElement(fU,{...n}),r!=="loading"&&x.createElement(mU,null,r==="error"?x.createElement(uU,{...n}):x.createElement(hU,{...n})))},wU=e=>`
|
|
215
215
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
216
216
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
217
|
-
`,
|
|
217
|
+
`,xU=e=>`
|
|
218
218
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
219
219
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
220
|
-
`,
|
|
220
|
+
`,SU="0%{opacity:0;} 100%{opacity:1;}",EU="0%{opacity:1;} 100%{opacity:0;}",_U=gi("div")`
|
|
221
221
|
display: flex;
|
|
222
222
|
align-items: center;
|
|
223
223
|
background: #fff;
|
|
@@ -229,22 +229,22 @@ to {
|
|
|
229
229
|
pointer-events: auto;
|
|
230
230
|
padding: 8px 10px;
|
|
231
231
|
border-radius: 8px;
|
|
232
|
-
`,
|
|
232
|
+
`,kU=gi("div")`
|
|
233
233
|
display: flex;
|
|
234
234
|
justify-content: center;
|
|
235
235
|
margin: 4px 10px;
|
|
236
236
|
color: inherit;
|
|
237
237
|
flex: 1 1 auto;
|
|
238
238
|
white-space: pre-line;
|
|
239
|
-
|
|
239
|
+
`,$U=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=oS()?[SU,EU]:[wU(r),xU(r)];return{animation:t?`${Hn(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Hn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},OU=x.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?$U(e.position||t||"top-center",e.visible):{opacity:0},a=x.createElement(bU,{toast:e}),o=x.createElement(kU,{...e.ariaProps},ku(e.message,e));return x.createElement(_U,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):x.createElement(x.Fragment,null,a,o))});K4(x.createElement);var TU=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=x.useCallback(o=>{if(o){let s=()=>{let l=o.getBoundingClientRect().height;n(e,l)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return x.createElement("div",{ref:a,className:t,style:r},i)},CU=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:oS()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},IU=_u`
|
|
240
240
|
z-index: 9999;
|
|
241
241
|
> * {
|
|
242
242
|
pointer-events: auto;
|
|
243
243
|
}
|
|
244
|
-
`,Cu=16,
|
|
244
|
+
`,Cu=16,RU=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=aU(r);return x.createElement("div",{style:{position:"fixed",zIndex:9999,top:Cu,left:Cu,right:Cu,bottom:Cu,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(u=>{let c=u.position||t,f=l.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),d=CU(c,f);return x.createElement(TU,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?IU:"",style:d},u.type==="custom"?ku(u.message,u):i?i(u):x.createElement(OU,{toast:u,position:c}))}))};function lS(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=lS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vp(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=lS(e))&&(n&&(n+=" "),n+=t);return n}function Iu(){return typeof window<"u"}function Ba(e){return uS(e)?(e.nodeName||"").toLowerCase():"#document"}function _r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _n(e){var t;return(t=(uS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uS(e){return Iu()?e instanceof Node||e instanceof _r(e).Node:!1}function Yr(e){return Iu()?e instanceof Element||e instanceof _r(e).Element:!1}function kn(e){return Iu()?e instanceof HTMLElement||e instanceof _r(e).HTMLElement:!1}function cS(e){return!Iu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _r(e).ShadowRoot}function $s(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function AU(e){return["table","td","th"].includes(Ba(e))}function Ru(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qp(e){const t=Zp(),r=Yr(e)?Jr(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function PU(e){let t=bi(e);for(;kn(t)&&!Ua(t);){if(qp(t))return t;if(Ru(t))return null;t=bi(t)}return null}function Zp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ua(e){return["html","body","#document"].includes(Ba(e))}function Jr(e){return _r(e).getComputedStyle(e)}function Au(e){return Yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bi(e){if(Ba(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cS(e)&&e.host||_n(e);return cS(t)?t.host:t}function fS(e){const t=bi(e);return Ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:kn(t)&&$s(t)?t:fS(t)}function wi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=fS(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=_r(i);if(a){const s=Kp(o);return t.concat(o,o.visualViewport||[],$s(i)?i:[],s&&r?wi(s):[])}return t.concat(i,wi(i,[],r))}function Kp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const za=Math.min,kr=Math.max,Pu=Math.round,Nu=Math.floor,xi=e=>({x:e,y:e});function dS(e,t,r){return kr(e,za(t,r))}function Du(e,t){return typeof e=="function"?e(t):e}function Os(e){return e.split("-")[0]}function Gp(e){return e.split("-")[1]}function pS(e){return e==="x"?"y":"x"}function NU(e){return e==="y"?"height":"width"}function Ts(e){return["top","bottom"].includes(Os(e))?"y":"x"}function DU(e){return pS(Ts(e))}function jU(e){return{top:0,right:0,bottom:0,left:0,...e}}function MU(e){return typeof e!="number"?jU(e):{top:e,right:e,bottom:e,left:e}}function ju(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}/*!
|
|
245
245
|
* tabbable 6.2.0
|
|
246
246
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
247
|
-
*/var jU=["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])"],Gp=jU.join(","),dS=typeof Element>"u",Cs=dS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mu=!dS&&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},Lu=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=i===""||i==="true",o=a||r&&t&&e(t.parentNode);return o},MU=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},LU=function(t,r,n){if(Lu(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Gp));return r&&Cs.call(t,Gp)&&i.unshift(t),i=i.filter(n),i},FU=function e(t,r,n){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Lu(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Cs.call(o,Gp);c&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!Lu(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},pS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||MU(t))&&!pS(t)?0:t.tabIndex},BU=function(t,r){var n=hS(t);return n<0&&r&&!pS(t)?0:n},UU=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},mS=function(t){return t.tagName==="INPUT"},zU=function(t){return mS(t)&&t.type==="hidden"},WU=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},HU=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},VU=function(t){if(!t.name)return!0;var r=t.form||Mu(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(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=HU(i,t.form);return!a||a===t},qU=function(t){return mS(t)&&t.type==="radio"},ZU=function(t){return qU(t)&&!VU(t)},KU=function(t){var r,n=t&&Mu(t),i=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var o,s,u;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!a&&i;){var l,c,f;n=Mu(i),i=(l=n)===null||l===void 0?void 0:l.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},vS=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},GU=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Cs.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Cs.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=Mu(t);if(u&&!u.shadowRoot&&i(u)===!0)return vS(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(KU(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return vS(t);return!1},YU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return Cs.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},JU=function(t,r){return!(r.disabled||Lu(r)||zU(r)||GU(r,t)||WU(r)||YU(r))},yS=function(t,r){return!(ZU(r)||hS(r)<0||!JU(t,r))},XU=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},QU=function e(t){var r=[],n=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=BU(s,o),l=o?e(i.candidates):s;u===0?o?r.push.apply(r,l):r.push(s):n.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),n.sort(UU).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(r)},Yp=function(t,r){r=r||{};var n;return r.getShadowRoot?n=FU([t],r.includeContainer,{filter:yS.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:XU}):n=LU(t,r.includeContainer,yS.bind(null,r)),QU(n)};function gS(e,t,r){let{reference:n,floating:i}=e;const a=Ts(t),o=PU(t),s=AU(o),u=Os(t),l=a==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-i.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Kp(t)){case"start":p[o]-=d*(r&&l?-1:1);break;case"end":p[o]+=d*(r&&l?-1:1);break}return p}const ez=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=gS(l,n,u),d=n,p={},h=0;for(let m=0;m<s.length;m++){const{name:g,fn:v}=s[m],{x:b,y,data:k,reset:S}=await v({x:c,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=b??c,f=y??f,p={...p,[g]:{...p[g],...k}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=gS(l,d,u)),m=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function bS(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Du(t,e),h=DU(p),g=s[d?f==="floating"?"reference":"floating":f],v=ju(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),b=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},S=ju(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:u}):b);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function tz(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Os(r),s=Kp(r),u=Ts(r)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=Du(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),u?{x:p*c,y:d*l}:{x:d*l,y:p*c}}const rz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await tz(t,e);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},nz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:g=>{let{x:v,y:b}=g;return{x:v,y:b}}},...u}=Du(e,t),l={x:r,y:n},c=await bS(t,u),f=Ts(Os(i)),d=fS(f);let p=l[d],h=l[f];if(a){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+c[g],y=p-c[v];p=cS(b,p,y)}if(o){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+c[g],y=h-c[v];h=cS(b,h,y)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[d]:a,[f]:o}}}}}},iz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=Du(e,t),c=await bS(t,l),f=Os(i),d=Kp(i),p=Ts(i)==="y",{width:h,height:m}=a.floating;let g,v;f==="top"||f==="bottom"?(g=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,g=d==="end"?"top":"bottom");const b=m-c.top-c.bottom,y=h-c.left-c.right,k=za(m-c[g],b),S=za(h-c[v],y),E=!t.middlewareData.shift;let $=k,M=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(M=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=b),E&&!d){const O=kr(c.left,0),D=kr(c.right,0),H=kr(c.top,0),L=kr(c.bottom,0);p?M=h-2*(O!==0||D!==0?O+D:kr(c.left,c.right)):$=m-2*(H!==0||L!==0?H+L:kr(c.top,c.bottom))}await u({...t,availableWidth:M,availableHeight:$});const z=await o.getDimensions(s.floating);return h!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function wS(e){const t=Jr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=kn(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,s=Pu(r)!==a||Pu(n)!==o;return s&&(r=a,n=o),{width:r,height:n,$:s}}function Jp(e){return Yr(e)?e:e.contextElement}function Wa(e){const t=Jp(e);if(!kn(t))return xi(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=wS(t);let o=(a?Pu(r.width):r.width)/n,s=(a?Pu(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const az=xi(0);function xS(e){const t=_r(e);return!qp()||!t.visualViewport?az:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oz(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==_r(e)?!1:t}function Xi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=Jp(e);let o=xi(1);t&&(n?Yr(n)&&(o=Wa(n)):o=Wa(e));const s=oz(a,r,n)?xS(a):xi(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=_r(a),p=n&&Yr(n)?_r(n):n;let h=d,m=Zp(h);for(;m&&n&&p!==h;){const g=Wa(m),v=m.getBoundingClientRect(),b=Jr(m),y=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,k=v.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;u*=g.x,l*=g.y,c*=g.x,f*=g.y,u+=y,l+=k,h=_r(m),m=Zp(h)}}return ju({width:c,height:f,x:u,y:l})}function sz(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=_n(n),s=t?Ru(t.floating):!1;if(n===o||s&&a)return r;let u={scrollLeft:0,scrollTop:0},l=xi(1);const c=xi(0),f=kn(n);if((f||!f&&!a)&&((Ba(n)!=="body"||$s(o))&&(u=Au(n)),kn(n))){const d=Xi(n);l=Wa(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-u.scrollLeft*l.x+c.x,y:r.y*l.y-u.scrollTop*l.y+c.y}}function lz(e){return Array.from(e.getClientRects())}function Xp(e,t){const r=Au(e).scrollLeft;return t?t.left+r:Xi(_n(e)).left+r}function uz(e){const t=_n(e),r=Au(e),n=e.ownerDocument.body,i=kr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=kr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Xp(e);const s=-r.scrollTop;return Jr(n).direction==="rtl"&&(o+=kr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function cz(e,t){const r=_r(e),n=_n(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=qp();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function fz(e,t){const r=Xi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=kn(e)?Wa(e):xi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=n*a.y;return{width:o,height:s,x:u,y:l}}function SS(e,t,r){let n;if(t==="viewport")n=cz(e,r);else if(t==="document")n=uz(_n(e));else if(Yr(t))n=fz(t,r);else{const i=xS(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return ju(n)}function ES(e,t){const r=bi(e);return r===t||!Yr(r)||Ua(r)?!1:Jr(r).position==="fixed"||ES(r,t)}function dz(e,t){const r=t.get(e);if(r)return r;let n=wi(e,[],!1).filter(s=>Yr(s)&&Ba(s)!=="body"),i=null;const a=Jr(e).position==="fixed";let o=a?bi(e):e;for(;Yr(o)&&!Ua(o);){const s=Jr(o),u=Vp(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||$s(o)&&!u&&ES(e,o))?n=n.filter(c=>c!==o):i=s,o=bi(o)}return t.set(e,n),n}function pz(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?Ru(t)?[]:dz(t,this._c):[].concat(r),n],s=o[0],u=o.reduce((l,c)=>{const f=SS(t,c,i);return l.top=kr(f.top,l.top),l.right=za(f.right,l.right),l.bottom=za(f.bottom,l.bottom),l.left=kr(f.left,l.left),l},SS(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function hz(e){const{width:t,height:r}=wS(e);return{width:t,height:r}}function mz(e,t,r){const n=kn(t),i=_n(t),a=r==="fixed",o=Xi(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=xi(0);if(n||!n&&!a)if((Ba(t)!=="body"||$s(i))&&(s=Au(t)),n){const p=Xi(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=Xp(i));let l=0,c=0;if(i&&!n&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-Xp(i,p)}const f=o.left+s.scrollLeft-u.x-l,d=o.top+s.scrollTop-u.y-c;return{x:f,y:d,width:o.width,height:o.height}}function Qp(e){return Jr(e).position==="static"}function _S(e,t){if(!kn(e)||Jr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _n(e)===r&&(r=r.ownerDocument.body),r}function kS(e,t){const r=_r(e);if(Ru(e))return r;if(!kn(e)){let i=bi(e);for(;i&&!Ua(i);){if(Yr(i)&&!Qp(i))return i;i=bi(i)}return r}let n=_S(e,t);for(;n&&IU(n)&&Qp(n);)n=_S(n,t);return n&&Ua(n)&&Qp(n)&&!Vp(n)?r:n||RU(e)||r}const vz=async function(e){const t=this.getOffsetParent||kS,r=this.getDimensions,n=await r(e.floating);return{reference:mz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function yz(e){return Jr(e).direction==="rtl"}const gz={convertOffsetParentRelativeRectToViewportRelativeRect:sz,getDocumentElement:_n,getClippingRect:pz,getOffsetParent:kS,getElementRects:vz,getClientRects:lz,getDimensions:hz,getScale:Wa,isElement:Yr,isRTL:yz};function bz(e,t){let r=null,n;const i=_n(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=Nu(c),h=Nu(i.clientWidth-(l+f)),m=Nu(i.clientHeight-(c+d)),g=Nu(l),b={rootMargin:-p+"px "+-h+"px "+-m+"px "+-g+"px",threshold:kr(0,za(1,u))||1};let y=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!y)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(k,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(e)}return o(!0),a}function wz(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,l=Jp(e),c=i||a?[...l?wi(l):[],...wi(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const f=l&&s?bz(l,r):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 y;(y=p)==null||y.observe(t)})),r()}),l&&!u&&p.observe(l),p.observe(t));let h,m=u?Xi(e):null;u&&g();function g(){const v=Xi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,h=requestAnimationFrame(g)}return r(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const xz=rz,Sz=nz,Ez=iz,_z=(e,t,r)=>{const n=new Map,i={platform:gz,...r},a={...i.platform,_c:n};return ez(e,t,{...i,platform:a})};var Fu=typeof document<"u"?N.useLayoutEffect:N.useEffect;function Bu(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 r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Bu(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Bu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $S(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function OS(e,t){const r=$S(e);return Math.round(t*r)/r}function eh(e){const t=x.useRef(e);return Fu(()=>{t.current=e}),t}function kz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=x.useState(n);Bu(d,n)||p(n);const[h,m]=x.useState(null),[g,v]=x.useState(null),b=x.useCallback(U=>{U!==E.current&&(E.current=U,m(U))},[]),y=x.useCallback(U=>{U!==$.current&&($.current=U,v(U))},[]),k=a||h,S=o||g,E=x.useRef(null),$=x.useRef(null),M=x.useRef(c),z=u!=null,O=eh(u),D=eh(i),H=eh(l),L=x.useCallback(()=>{if(!E.current||!$.current)return;const U={placement:t,strategy:r,middleware:d};D.current&&(U.platform=D.current),_z(E.current,$.current,U).then(P=>{const w={...P,isPositioned:H.current!==!1};I.current&&!Bu(M.current,w)&&(M.current=w,mg.flushSync(()=>{f(w)}))})},[d,t,r,D,H]);Fu(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[l]);const I=x.useRef(!1);Fu(()=>(I.current=!0,()=>{I.current=!1}),[]),Fu(()=>{if(k&&(E.current=k),S&&($.current=S),k&&S){if(O.current)return O.current(k,S,L);L()}},[k,S,L,O,z]);const j=x.useMemo(()=>({reference:E,floating:$,setReference:b,setFloating:y}),[b,y]),F=x.useMemo(()=>({reference:k,floating:S}),[k,S]),q=x.useMemo(()=>{const U={position:r,left:0,top:0};if(!F.floating)return U;const P=OS(F.floating,c.x),w=OS(F.floating,c.y);return s?{...U,transform:"translate("+P+"px, "+w+"px)",...$S(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:w}},[r,s,F.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:L,refs:j,elements:F,floatingStyles:q}),[c,L,j,F,q])}const $z=(e,t)=>({...xz(e),options:[e,t]}),Oz=(e,t)=>({...Sz(e),options:[e,t]}),Tz=(e,t)=>({...Ez(e),options:[e,t]});var Lr=function(){return Lr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lr.apply(this,arguments)};function TS(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Cz(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function Iz(){var e=N.useRef(!1),t=N.useCallback(function(){return e.current},[]);return N.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function Rz(e,t,r){t===void 0&&(t=[]),r===void 0&&(r={loading:!1});var n=N.useRef(0),i=Iz(),a=N.useState(r),o=a[0],s=a[1],u=N.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++n.current;return o.loading||s(function(d){return Lr(Lr({},d),{loading:!0})}),e.apply(void 0,l).then(function(d){return i()&&f===n.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===n.current&&s({error:d,loading:!1}),d})},t);return[o,u]}function th(e,t){t===void 0&&(t=[]);var r=Rz(e,t,{loading:!0}),n=r[0],i=r[1];return N.useEffect(function(){i()},[i]),n}function Az(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Pz(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Nz=function(e){N.useEffect(e,[])},Dz=function(e){var t=N.useRef(e);t.current=e,Nz(function(){return function(){return t.current()}})},jz=function(e){var t=N.useRef(0),r=N.useState(e),n=r[0],i=r[1],a=N.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Dz(function(){cancelAnimationFrame(t.current)}),[n,a]},Mz=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=jz({x:0,y:0}),r=t[0],n=t[1];return N.useEffect(function(){var i=function(){e.current&&n({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&Az(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&Pz(e.current,"scroll",i)}},[e]),r};const Lz={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},CS=e=>{let t;const r=new Set,n=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Lz?"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."),r.clear()}},l=t=e(n,i,u);return u},IS=e=>e?CS(e):CS;var rh={exports:{}},nh={},Uu={exports:{}},ih={};/**
|
|
247
|
+
*/var LU=["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])"],Yp=LU.join(","),hS=typeof Element>"u",Cs=hS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mu=!hS&&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},Lu=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=i===""||i==="true",o=a||r&&t&&e(t.parentNode);return o},FU=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},BU=function(t,r,n){if(Lu(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Yp));return r&&Cs.call(t,Yp)&&i.unshift(t),i=i.filter(n),i},UU=function e(t,r,n){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Lu(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),l=s.length?s:o.children,u=e(l,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var c=Cs.call(o,Yp);c&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!Lu(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},mS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||FU(t))&&!mS(t)?0:t.tabIndex},zU=function(t,r){var n=vS(t);return n<0&&r&&!mS(t)?0:n},WU=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},yS=function(t){return t.tagName==="INPUT"},HU=function(t){return yS(t)&&t.type==="hidden"},VU=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},qU=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},ZU=function(t){if(!t.name)return!0;var r=t.form||Mu(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(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=qU(i,t.form);return!a||a===t},KU=function(t){return yS(t)&&t.type==="radio"},GU=function(t){return KU(t)&&!ZU(t)},YU=function(t){var r,n=t&&Mu(t),i=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var o,s,l;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var u,c,f;n=Mu(i),i=(u=n)===null||u===void 0?void 0:u.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},gS=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},JU=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Cs.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Cs.call(o,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=Mu(t);if(l&&!l.shadowRoot&&i(l)===!0)return gS(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(YU(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return gS(t);return!1},XU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return Cs.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},QU=function(t,r){return!(r.disabled||Lu(r)||HU(r)||JU(r,t)||VU(r)||XU(r))},bS=function(t,r){return!(GU(r)||vS(r)<0||!QU(t,r))},ez=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},tz=function e(t){var r=[],n=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,l=zU(s,o),u=o?e(i.candidates):s;l===0?o?r.push.apply(r,u):r.push(s):n.push({documentOrder:a,tabIndex:l,item:i,isScope:o,content:u})}),n.sort(WU).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(r)},Jp=function(t,r){r=r||{};var n;return r.getShadowRoot?n=UU([t],r.includeContainer,{filter:bS.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:ez}):n=BU(t,r.includeContainer,bS.bind(null,r)),tz(n)};function wS(e,t,r){let{reference:n,floating:i}=e;const a=Ts(t),o=DU(t),s=NU(o),l=Os(t),u=a==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[s]/2-i[s]/2;let p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-i.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Gp(t)){case"start":p[o]-=d*(r&&u?-1:1);break;case"end":p[o]+=d*(r&&u?-1:1);break}return p}const rz=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=wS(u,n,l),d=n,p={},h=0;for(let m=0;m<s.length;m++){const{name:g,fn:v}=s[m],{x:y,y:b,data:k,reset:S}=await v({x:c,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});c=y??c,f=b??f,p={...p,[g]:{...p[g],...k}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=wS(u,d,l)),m=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function xS(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Du(t,e),h=MU(p),g=s[d?f==="floating"?"reference":"floating":f],v=ju(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=ju(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function nz(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Os(r),s=Gp(r),l=Ts(r)==="y",u=["left","top"].includes(o)?-1:1,c=a&&l?-1:1,f=Du(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:d*u}:{x:d*u,y:p*c}}const iz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await nz(t,e);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},az=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:g=>{let{x:v,y}=g;return{x:v,y}}},...l}=Du(e,t),u={x:r,y:n},c=await xS(t,l),f=Ts(Os(i)),d=pS(f);let p=u[d],h=u[f];if(a){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=p+c[g],b=p-c[v];p=dS(y,p,b)}if(o){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[g],b=h-c[v];h=dS(y,h,b)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[d]:a,[f]:o}}}}}},oz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...u}=Du(e,t),c=await xS(t,u),f=Os(i),d=Gp(i),p=Ts(i)==="y",{width:h,height:m}=a.floating;let g,v;f==="top"||f==="bottom"?(g=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,g=d==="end"?"top":"bottom");const y=m-c.top-c.bottom,b=h-c.left-c.right,k=za(m-c[g],y),S=za(h-c[v],b),_=!t.middlewareData.shift;let $=k,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=y),_&&!d){const O=kr(c.left,0),D=kr(c.right,0),H=kr(c.top,0),L=kr(c.bottom,0);p?N=h-2*(O!==0||D!==0?O+D:kr(c.left,c.right)):$=m-2*(H!==0||L!==0?H+L:kr(c.top,c.bottom))}await l({...t,availableWidth:N,availableHeight:$});const z=await o.getDimensions(s.floating);return h!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function SS(e){const t=Jr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=kn(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,s=Pu(r)!==a||Pu(n)!==o;return s&&(r=a,n=o),{width:r,height:n,$:s}}function Xp(e){return Yr(e)?e:e.contextElement}function Wa(e){const t=Xp(e);if(!kn(t))return xi(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=SS(t);let o=(a?Pu(r.width):r.width)/n,s=(a?Pu(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const sz=xi(0);function ES(e){const t=_r(e);return!Zp()||!t.visualViewport?sz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lz(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==_r(e)?!1:t}function Xi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=Xp(e);let o=xi(1);t&&(n?Yr(n)&&(o=Wa(n)):o=Wa(e));const s=lz(a,r,n)?ES(a):xi(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=_r(a),p=n&&Yr(n)?_r(n):n;let h=d,m=Kp(h);for(;m&&n&&p!==h;){const g=Wa(m),v=m.getBoundingClientRect(),y=Jr(m),b=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,k=v.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=b,u+=k,h=_r(m),m=Kp(h)}}return ju({width:c,height:f,x:l,y:u})}function uz(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=_n(n),s=t?Ru(t.floating):!1;if(n===o||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=xi(1);const c=xi(0),f=kn(n);if((f||!f&&!a)&&((Ba(n)!=="body"||$s(o))&&(l=Au(n)),kn(n))){const d=Xi(n);u=Wa(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}}function cz(e){return Array.from(e.getClientRects())}function Qp(e,t){const r=Au(e).scrollLeft;return t?t.left+r:Xi(_n(e)).left+r}function fz(e){const t=_n(e),r=Au(e),n=e.ownerDocument.body,i=kr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=kr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Qp(e);const s=-r.scrollTop;return Jr(n).direction==="rtl"&&(o+=kr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function dz(e,t){const r=_r(e),n=_n(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const u=Zp();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function pz(e,t){const r=Xi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=kn(e)?Wa(e):xi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,u=n*a.y;return{width:o,height:s,x:l,y:u}}function _S(e,t,r){let n;if(t==="viewport")n=dz(e,r);else if(t==="document")n=fz(_n(e));else if(Yr(t))n=pz(t,r);else{const i=ES(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return ju(n)}function kS(e,t){const r=bi(e);return r===t||!Yr(r)||Ua(r)?!1:Jr(r).position==="fixed"||kS(r,t)}function hz(e,t){const r=t.get(e);if(r)return r;let n=wi(e,[],!1).filter(s=>Yr(s)&&Ba(s)!=="body"),i=null;const a=Jr(e).position==="fixed";let o=a?bi(e):e;for(;Yr(o)&&!Ua(o);){const s=Jr(o),l=qp(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||$s(o)&&!l&&kS(e,o))?n=n.filter(c=>c!==o):i=s,o=bi(o)}return t.set(e,n),n}function mz(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?Ru(t)?[]:hz(t,this._c):[].concat(r),n],s=o[0],l=o.reduce((u,c)=>{const f=_S(t,c,i);return u.top=kr(f.top,u.top),u.right=za(f.right,u.right),u.bottom=za(f.bottom,u.bottom),u.left=kr(f.left,u.left),u},_S(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vz(e){const{width:t,height:r}=SS(e);return{width:t,height:r}}function yz(e,t,r){const n=kn(t),i=_n(t),a=r==="fixed",o=Xi(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=xi(0);if(n||!n&&!a)if((Ba(t)!=="body"||$s(i))&&(s=Au(t)),n){const p=Xi(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Qp(i));let u=0,c=0;if(i&&!n&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,u=p.left+s.scrollLeft-Qp(i,p)}const f=o.left+s.scrollLeft-l.x-u,d=o.top+s.scrollTop-l.y-c;return{x:f,y:d,width:o.width,height:o.height}}function eh(e){return Jr(e).position==="static"}function $S(e,t){if(!kn(e)||Jr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return _n(e)===r&&(r=r.ownerDocument.body),r}function OS(e,t){const r=_r(e);if(Ru(e))return r;if(!kn(e)){let i=bi(e);for(;i&&!Ua(i);){if(Yr(i)&&!eh(i))return i;i=bi(i)}return r}let n=$S(e,t);for(;n&&AU(n)&&eh(n);)n=$S(n,t);return n&&Ua(n)&&eh(n)&&!qp(n)?r:n||PU(e)||r}const gz=async function(e){const t=this.getOffsetParent||OS,r=this.getDimensions,n=await r(e.floating);return{reference:yz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bz(e){return Jr(e).direction==="rtl"}const wz={convertOffsetParentRelativeRectToViewportRelativeRect:uz,getDocumentElement:_n,getClippingRect:mz,getOffsetParent:OS,getElementRects:gz,getClientRects:cz,getDimensions:vz,getScale:Wa,isElement:Yr,isRTL:bz};function xz(e,t){let r=null,n;const i=_n(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=Nu(c),h=Nu(i.clientWidth-(u+f)),m=Nu(i.clientHeight-(c+d)),g=Nu(u),y={rootMargin:-p+"px "+-h+"px "+-m+"px "+-g+"px",threshold:kr(0,za(1,l))||1};let b=!0;function k(S){const _=S[0].intersectionRatio;if(_!==l){if(!b)return o();_?o(!1,_):n=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{r=new IntersectionObserver(k,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,y)}r.observe(e)}return o(!0),a}function Sz(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Xp(e),c=i||a?[...u?wi(u):[],...wi(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const f=u&&s?xz(u,r):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let h,m=l?Xi(e):null;l&&g();function g(){const v=Xi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,h=requestAnimationFrame(g)}return r(),()=>{var v;c.forEach(y=>{i&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const Ez=iz,_z=az,kz=oz,$z=(e,t,r)=>{const n=new Map,i={platform:wz,...r},a={...i.platform,_c:n};return rz(e,t,{...i,platform:a})};var Fu=typeof document<"u"?j.useLayoutEffect:j.useEffect;function Bu(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 r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Bu(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Bu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function TS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function CS(e,t){const r=TS(e);return Math.round(t*r)/r}function th(e){const t=x.useRef(e);return Fu(()=>{t.current=e}),t}function Oz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=x.useState(n);Bu(d,n)||p(n);const[h,m]=x.useState(null),[g,v]=x.useState(null),y=x.useCallback(U=>{U!==_.current&&(_.current=U,m(U))},[]),b=x.useCallback(U=>{U!==$.current&&($.current=U,v(U))},[]),k=a||h,S=o||g,_=x.useRef(null),$=x.useRef(null),N=x.useRef(c),z=l!=null,O=th(l),D=th(i),H=th(u),L=x.useCallback(()=>{if(!_.current||!$.current)return;const U={placement:t,strategy:r,middleware:d};D.current&&(U.platform=D.current),$z(_.current,$.current,U).then(A=>{const w={...A,isPositioned:H.current!==!1};W.current&&!Bu(N.current,w)&&(N.current=w,vg.flushSync(()=>{f(w)}))})},[d,t,r,D,H]);Fu(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const W=x.useRef(!1);Fu(()=>(W.current=!0,()=>{W.current=!1}),[]),Fu(()=>{if(k&&(_.current=k),S&&($.current=S),k&&S){if(O.current)return O.current(k,S,L);L()}},[k,S,L,O,z]);const M=x.useMemo(()=>({reference:_,floating:$,setReference:y,setFloating:b}),[y,b]),I=x.useMemo(()=>({reference:k,floating:S}),[k,S]),V=x.useMemo(()=>{const U={position:r,left:0,top:0};if(!I.floating)return U;const A=CS(I.floating,c.x),w=CS(I.floating,c.y);return s?{...U,transform:"translate("+A+"px, "+w+"px)",...TS(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:w}},[r,s,I.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:L,refs:M,elements:I,floatingStyles:V}),[c,L,M,I,V])}const Tz=(e,t)=>({...Ez(e),options:[e,t]}),Cz=(e,t)=>({..._z(e),options:[e,t]}),Iz=(e,t)=>({...kz(e),options:[e,t]});var Lr=function(){return Lr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lr.apply(this,arguments)};function IS(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Rz(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function Az(){var e=j.useRef(!1),t=j.useCallback(function(){return e.current},[]);return j.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function Pz(e,t,r){t===void 0&&(t=[]),r===void 0&&(r={loading:!1});var n=j.useRef(0),i=Az(),a=j.useState(r),o=a[0],s=a[1],l=j.useCallback(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var f=++n.current;return o.loading||s(function(d){return Lr(Lr({},d),{loading:!0})}),e.apply(void 0,u).then(function(d){return i()&&f===n.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===n.current&&s({error:d,loading:!1}),d})},t);return[o,l]}function rh(e,t){t===void 0&&(t=[]);var r=Pz(e,t,{loading:!0}),n=r[0],i=r[1];return j.useEffect(function(){i()},[i]),n}function Nz(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Dz(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var jz=function(e){j.useEffect(e,[])},Mz=function(e){var t=j.useRef(e);t.current=e,jz(function(){return function(){return t.current()}})},Lz=function(e){var t=j.useRef(0),r=j.useState(e),n=r[0],i=r[1],a=j.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Mz(function(){cancelAnimationFrame(t.current)}),[n,a]},Fz=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=Lz({x:0,y:0}),r=t[0],n=t[1];return j.useEffect(function(){var i=function(){e.current&&n({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&Nz(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&Dz(e.current,"scroll",i)}},[e]),r};const Bz={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},RS=e=>{let t;const r=new Set,n=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,p))}},i=()=>t,l={setState:n,getState:i,getInitialState:()=>u,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Bz?"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."),r.clear()}},u=t=e(n,i,l);return l},AS=e=>e?RS(e):RS;var nh={exports:{}},ih={},Uu={exports:{}},ah={};/**
|
|
248
248
|
* @license React
|
|
249
249
|
* use-sync-external-store-shim.production.min.js
|
|
250
250
|
*
|
|
@@ -252,7 +252,7 @@ to {
|
|
|
252
252
|
*
|
|
253
253
|
* This source code is licensed under the MIT license found in the
|
|
254
254
|
* LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/var
|
|
255
|
+
*/var PS;function Uz(){if(PS)return ah;PS=1;var e=j;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var p=d(),h=n({inst:{value:p,getSnapshot:d}}),m=h[0].inst,g=h[1];return a(function(){m.value=p,m.getSnapshot=d,l(m)&&g({inst:m})},[f,p,d]),i(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),o(p),p}function l(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!r(f,p)}catch{return!0}}function u(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,ah}var oh={};/**
|
|
256
256
|
* @license React
|
|
257
257
|
* use-sync-external-store-shim.development.js
|
|
258
258
|
*
|
|
@@ -260,7 +260,7 @@ to {
|
|
|
260
260
|
*
|
|
261
261
|
* This source code is licensed under the MIT license found in the
|
|
262
262
|
* LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/var
|
|
263
|
+
*/var NS;function zz(){return NS||(NS=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=j,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),_=1;_<k;_++)S[_-1]=arguments[_];n("error",b,S)}}function n(b,k,S){{var _=t.ReactDebugCurrentFrame,$=_.getStackAddendum();$!==""&&(k+="%s",S=S.concat([$]));var N=S.map(function(z){return String(z)});N.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,N)}}function i(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var a=typeof Object.is=="function"?Object.is:i,o=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,c=!1,f=!1;function d(b,k,S){c||e.startTransition!==void 0&&(c=!0,r("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 _=k();if(!f){var $=k();a(_,$)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var N=o({inst:{value:_,getSnapshot:k}}),z=N[0].inst,O=N[1];return l(function(){z.value=_,z.getSnapshot=k,p(z)&&O({inst:z})},[b,_,k]),s(function(){p(z)&&O({inst:z});var D=function(){p(z)&&O({inst:z})};return b(D)},[b]),u(_),_}function p(b){var k=b.getSnapshot,S=b.value;try{var _=k();return!a(S,_)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?h:d,y=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;oh.useSyncExternalStore=y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),oh}var DS;function jS(){return DS||(DS=1,process.env.NODE_ENV==="production"?Uu.exports=Uz():Uu.exports=zz()),Uu.exports}/**
|
|
264
264
|
* @license React
|
|
265
265
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
266
266
|
*
|
|
@@ -268,7 +268,7 @@ to {
|
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the MIT license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/var
|
|
271
|
+
*/var MS;function Wz(){if(MS)return ih;MS=1;var e=j,t=jS();function r(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return ih.useSyncExternalStoreWithSelector=function(u,c,f,d,p){var h=a(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function v(_){if(!y){if(y=!0,b=_,_=d(_),p!==void 0&&m.hasValue){var $=m.value;if(p($,_))return k=$}return k=_}if($=k,n(b,_))return $;var N=d(_);return p!==void 0&&p($,N)?$:(b=_,k=N)}var y=!1,b,k,S=f===void 0?null:f;return[function(){return v(c())},S===null?void 0:function(){return v(S())}]},[c,f,d,p]);var g=i(u,h[0],h[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},ih}var sh={};/**
|
|
272
272
|
* @license React
|
|
273
273
|
* use-sync-external-store-shim/with-selector.development.js
|
|
274
274
|
*
|
|
@@ -276,13 +276,13 @@ to {
|
|
|
276
276
|
*
|
|
277
277
|
* This source code is licensed under the MIT license found in the
|
|
278
278
|
* LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/var
|
|
279
|
+
*/var LS;function Hz(){return LS||(LS=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=j,t=jS();function r(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(c,f,d,p,h){var m=a(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=s(function(){var S=!1,_,$,N=function(H){if(!S){S=!0,_=H;var L=p(H);if(h!==void 0&&g.hasValue){var W=g.value;if(h(W,L))return $=W,W}return $=L,L}var M=_,I=$;if(n(M,H))return I;var V=p(H);return h!==void 0&&h(I,V)?I:(_=H,$=V,V)},z=d===void 0?null:d,O=function(){return N(f())},D=z===null?void 0:function(){return N(z())};return[O,D]},[f,d,p,h]),y=v[0],b=v[1],k=i(c,y,b);return o(function(){g.hasValue=!0,g.value=k},[k]),l(k),k}sh.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),sh}process.env.NODE_ENV==="production"?nh.exports=Wz():nh.exports=Hz();var Vz=nh.exports;const qz=Ze(Vz),FS={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Zz}=j,{useSyncExternalStoreWithSelector:Kz}=qz;let BS=!1;const Gz=e=>e;function US(e,t=Gz,r){(FS?"production":void 0)!=="production"&&r&&!BS&&(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"),BS=!0);const n=Kz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Zz(n),n}const Yz=e=>{(FS?"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"?AS(e):e,r=(n,i)=>US(t,n,i);return Object.assign(r,t),r},Jz=e=>Yz,zu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},lh=new Map,Wu=e=>{const t=lh.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},Xz=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=lh.get(r.name);if(n)return{type:"tracked",store:e,...n};const i={connection:t.connect(r),stores:{}};return lh.set(r.name,i),{type:"tracked",store:e,...i}},zS=(e,t={})=>(r,n,i)=>{const{enabled:a,anonymousActionType:o,store:s,...l}=t;let u;try{u=(a??(zu?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(zu?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,n,i);const{connection:c,...f}=Xz(s,u,l);let d=!0;i.setState=(m,g,v)=>{const y=r(m,g);if(!d)return y;const b=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(b,n()),y):(c==null||c.send({...b,type:`${s}/${b.type}`},{...Wu(l.name),[s]:i.getState()}),y)};const p=(...m)=>{const g=d;d=!1,r(...m),d=g},h=e(i.setState,n,i);if(f.type==="untracked"?c==null||c.init(h):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([m,g])=>[m,m===f.store?h:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const g=i.dispatch;i.dispatch=(...v)=>{(zu?"production":void 0)!=="production"&&v[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),g(...v)}}return c.subscribe(m=>{var g;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return uh(m.payload,v=>{if(v.type==="__setState"){if(s===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
|
|
280
280
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
281
281
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
282
282
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
283
|
-
`);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(m.payload.type){case"RESET":return p(h),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Wu(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Wu(u.name));case"ROLLBACK":return lh(m.state,v=>{if(s===void 0){p(v),c==null||c.init(i.getState());return}p(v[s]),c==null||c.init(Wu(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return lh(m.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}=m.payload,b=(g=v.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;p(s===void 0?b:b[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),h},lh=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function Jz(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=r.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const Is=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Is(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Is(n)(r)}}}},Xz=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,v)=>({...v,...g}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...g)},n,i);const c=Is(a.serialize),f=()=>{const g=a.partialize({...n()});let v;const b=c({state:g,version:a.version}).then(y=>l.setItem(a.name,y)).catch(y=>{v=y});if(v)throw v;return b},d=i.setState;i.setState=(g,v)=>{d(g,v),f()};const p=e((...g)=>{r(...g),f()},n,i);let h;const m=()=>{var g;if(!l)return;o=!1,s.forEach(b=>b(n()));const v=((g=a.onRehydrateStorage)==null?void 0:g.call(a,n()))||void 0;return Is(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 y;return h=a.merge(b,(y=n())!=null?y:p),r(h,!0),f()}).then(()=>{v==null||v(h,void 0),o=!0,u.forEach(b=>b(h))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:g=>{a={...a,...g},g.getStorage&&(l=g.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},m(),h||p},Qz=(e,t)=>(r,n,i)=>{let a={storage:Jz(()=>localStorage),partialize:m=>m,version:0,merge:(m,g)=>({...g,...m}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...m)},n,i);const c=()=>{const m=a.partialize({...n()});return l.setItem(a.name,{state:m,version:a.version})},f=i.setState;i.setState=(m,g)=>{f(m,g),c()};const d=e((...m)=>{r(...m),c()},n,i);i.getInitialState=()=>d;let p;const h=()=>{var m,g;if(!l)return;o=!1,s.forEach(b=>{var y;return b((y=n())!=null?y:d)});const v=((g=a.onRehydrateStorage)==null?void 0:g.call(a,(m=n())!=null?m:d))||void 0;return Is(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 y;const[k,S]=b;if(p=a.merge(S,(y=n())!=null?y:d),r(p,!0),k)return c()}).then(()=>{v==null||v(p,void 0),p=n(),o=!0,u.forEach(b=>b(p))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:m=>{a={...a,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(u.add(m),()=>{u.delete(m)})},a.skipHydration||h(),p||d},e6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((zu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Xz(e,t)):Qz(e,t),$r=Gz()(BS(e6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:r,message:n})=>e(i=>({...i,messageHistory:{...i.messageHistory,[r]:[n,...(i.messageHistory[r]??[]).slice(0,100)]}})),clientMode:"",setClientMode:r=>{const{clearAll:n,clientMode:i}=t();i!==r&&n(),e(a=>({...a,clientMode:r}))},setUser:r=>e(n=>({...n,user:r})),setConversationId:r=>e(n=>({...n,conversationId:r})),clearAll:()=>{e(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),US=N.createContext(null),t6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,i=$r.getState().setClientMode,a=$r.getState().setConversationId;return r&&i(r.mode),N.useEffect(()=>{n&&a(n)},[n]),IS()(BS((o,s)=>{const u=f=>{const d=$r.getState().conversationId;if(d)return o(p=>{const h=p.messages[d]??[];return{...p,messages:{...p.messages,[d]:[...h.filter(m=>m.id!==f.id),{id:So(),...f}]}}})},l=f=>{const d=$r.getState().conversationId;if(d)return o(p=>({...p,messages:{...p.messages,[d]:f}}))},c=$r.getState().addMessageToHistory;return{...t,...e,eventEmitter:AR,client:r,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const d=s().client;u({id:So(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),d&&await d.sendMessage({type:"text",text:f}),d!=null&&d.userId&&c({message:f,userId:d.userId})},sendMessage:async f=>{const d=s().client;u({id:So(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:_o(f).payload}),d&&await d.sendMessage(f),d!=null&&d.userId&&f.type==="text"&&c({message:f.text,userId:d.userId})},on:(f,d)=>{const p=s().client;return p?p.on(f,d):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>o({headerMessage:f}),setDisableComposer:f=>o({disableComposer:f}),setState:f=>o(d=>({...d,...f})),setMessages:l,getMessages:()=>s().messages[$r.getState().conversationId??""]??[],setIsTyping:(f,d)=>{o(p=>({...p,isTyping:f})),f&&(o(p=>({...p,lastTypingHeartbeat:new Date})),d&&setTimeout(()=>{const p=s().lastTypingHeartbeat;p&&new Date().getTime()-p.getTime()>d&&o(h=>({...h,isTyping:!1}))},d+100))},setLastTypingHeartbeat:f=>o(d=>({...d,lastTypingHeartbeat:f})),addMessage:u,setConnected:f=>o(d=>({...d,connected:f})),restartConversation:async()=>{const f=s().client,d=s().setMessages;f&&(await f.newConversation(),d([]))}}},{name:"webchatStore"}))};function Me(e){const t=N.useContext(US);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return FS(t,e)}const r6=({text:e,buttonValue:t,type:r,variant:n,groupId:i,reusable:a,...o})=>{const s=Me(b=>b.eventEmitter),u=Me(b=>b.sendTextMessage),l=Me(b=>b.isReadOnly),[c,f]=N.useState(!1),[d,p]=N.useState(!1),[h,m]=N.useState(!1),{message:{blocks:{button:g}}}=gt;N.useEffect(()=>{if(i)return s.on(`button-group-${i}-click`,()=>{p(!0),a||m(!0)})},[s,i,a]);function v(){i&&s.emit(`button-group-${i}-click`),f(!0),a||m(!0),n!=="link"&&u(t)}return C.jsx(n6,{...o,variant:n,onClick:v,disabled:h||l,"data-activated":c?"":void 0,"data-group-activated":d?"":void 0,"data-type":n,value:t,...g,children:e})},n6=e=>{if(e.variant==="link"){const{value:n,variant:i,...a}=e;return C.jsx("a",{...a,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return C.jsx("button",{type:"button",...r})},i6=N.forwardRef(({block:e,type:t,direction:r,timestamp:n,sender:i,metadata:a,...o},s)=>{const{message:{blocks:{bubble:u}}}=gt;return C.jsx("div",{...o,...u,ref:s,children:C.jsx(Ga,{direction:r,timestamp:n,sender:i,block:e,metadata:a})})}),zS=N.createContext(null);function a6(){const e=N.useContext(zS);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const WS=N.createContext(null);function HS(){const e=N.useContext(WS);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const VS=N.createContext(null);function qS(){const e=N.useContext(VS);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const o6=N.forwardRef(({url:e,type:t,orientation:r="auto",...n},i)=>{const a=N.useId(),{setIsLoading:o}=a6(),[s,u]=N.useState(r),[l,c]=N.useState(!1),{message:{blocks:{image:f}}}=gt;return N.useLayoutEffect(()=>{o(d=>[...d,a])},[]),th(async()=>{if(e&&s==="auto"){try{const{width:d,height:p}=await F4(e);u(s6(d,p))}catch(d){u("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),C.jsxs(C.Fragment,{children:[l?null:C.jsx("div",{"data-orientation":s,...f.placeholder}),C.jsx("img",{"data-orientation":s,"data-loaded":l,...n,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});function s6(e,t){const r={square:1,portrait:.75,landscape:1.3333333333333333},n=e/t;return Object.keys(r).reduce((a,o)=>Math.abs(r[o]-n)<Math.abs(r[a]-n)?o:a)}const l6=N.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:i}}}=gt;return C.jsx("div",{children:C.jsx("video",{...r,controls:!0,src:e,...i,ref:n})})}),u6=N.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:i}}}=gt;return C.jsx("div",{children:C.jsx("audio",{...r,controls:!0,src:e,...i,ref:n})})});function c6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const f6=x.forwardRef(c6);function d6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 p6=x.forwardRef(d6);function h6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 m6=x.forwardRef(h6);function v6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 y6=x.forwardRef(v6);function g6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 b6=x.forwardRef(g6),w6=N.forwardRef(({type:e,latitude:t,longitude:r,title:n,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${r}`,{message:{blocks:{location:s}}}=gt;return C.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[C.jsx("p",{...s.title,children:n}),C.jsx(b6,{...s.icon})]})}),x6=N.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,direction:i,sender:a,timestamp:o,metadata:s,...u},l)=>{const{message:{blocks:{column:c}}}=gt;return C.jsx("div",{"data-horizontal":r,"data-vertical":n,...u,...c,ref:l,children:e.map((f,d)=>C.jsx(Ga,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})}),S6=N.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,direction:i,sender:a,timestamp:o,metadata:s,...u},l)=>{const{message:{blocks:{row:c}}}=gt;return C.jsx("div",{"data-horizontal":r,"data-vertical":n,...u,...c,ref:l,children:e.map((f,d)=>C.jsx(Ga,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})});function E6(e){return Object.prototype.toString.call(e)==="[object Object]"}function ZS(e){return E6(e)||Array.isArray(e)}function _6(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function uh(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:r.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!ZS(s)||!ZS(u)?s===u:uh(s,u)})}function KS(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function k6(e,t){if(e.length!==t.length)return!1;const r=KS(e),n=KS(t);return r.every((i,a)=>{const o=n[a];return uh(i,o)})}function ch(e){return typeof e=="number"}function GS(e){return typeof e=="string"}function fh(e){return typeof e=="boolean"}function YS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ot(e){return Math.abs(e)}function dh(e){return Math.sign(e)}function Hu(e,t){return Ot(e-t)}function $6(e,t){if(e===0||t===0||Ot(e)<=Ot(t))return 0;const r=Hu(Ot(e),Ot(t));return Ot(r/e)}function Rs(e){return qu(e).map(Number)}function Vn(e){return e[Vu(e)]}function Vu(e){return Math.max(0,e.length-1)}function qu(e){return Object.keys(e)}function JS(e,t){return[e,t].reduce((r,n)=>(qu(n).forEach(i=>{const a=r[i],o=n[i],s=YS(a)&&YS(o);r[i]=s?JS(a,o):o}),r),{})}function XS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function O6(e,t){const r={start:n,center:i,end:a};function n(){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 ch(e)?o():r[e](l)}return{measure:s}}function T6(e,t){const r=e==="y"?"y":"x",n=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:d}=c;return r==="x"?f:d}function s(){return r==="y"?"top":t==="rtl"?"right":"left"}function u(){return r==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:r,cross:n,startEdge:i,endEdge:a,measureSize:o}}function Si(e,t){const r=Ot(e-t);function n(l){return l<e}function i(l){return l>t}function a(l){return n(l)||i(l)}function o(l){return a(l)?n(l)?e:t:l}function s(l){return r?l-r*Math.ceil((l-t)/r):l}return{length:r,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:n,removeOffset:s}}function QS(e,t,r){const{constrain:n}=Si(0,e),i=e+1;let a=o(t);function o(d){return r?Ot((i+d)%i):n(d)}function s(){return a}function u(d){return a=o(d),f}function l(d){return c().set(s()+d)}function c(){return QS(e,s(),r)}const f={get:s,set:u,add:l,clone:c};return f}function C6(e){const t=e==="rtl"?-1:1;function r(i){return i*t}return{apply:r}}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)),n}function r(){e=e.filter(i=>i())}const n={add:t,clear:r};return n}function I6(e,t,r,n,i,a,o,s,u,l,c,f,d,p,h,m,g,v,b){const{cross:y}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=As(),$=As(),M=Si(50,225).constrain(h.measure(20)),z={mouse:300,touch:400},O={mouse:500,touch:600},D=m?43:25;let H=!1,L=0,I=0,j=!1,F=!1,q=!1,U=!1;function P(Q,K){if(!K)return;function de(Ce){(fh(K)||K(Q,Ce))&&oe(Ce)}const ve=r;E.add(ve,"dragstart",Ce=>Ce.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){E.clear(),$.clear()}function W(){const Q=U?n:r;$.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function Z(Q){const K=Q.nodeName||"";return k.includes(K)}function _(){return(m?O:z)[U?"mouse":"touch"]}function Y(Q,K){const de=d.add(dh(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||Ot(Q)<M?ve:v&&K?ve*.5:f.byIndex(de.get(),0).distance}function oe(Q){const K=XS(Q,i);U=K,!(K&&Q.button!==0)&&(Z(Q.target)||(q=m&&K&&!Q.buttons&&H,H=Hu(a.get(),s.get())>=2,j=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),W(),L=o.readPoint(Q),I=o.readPoint(Q,y),p.emit("pointerDown")))}function re(Q){const K=o.readPoint(Q),de=o.readPoint(Q,y),ve=Hu(K,L),Ce=Hu(de,I);if(!F&&!U&&(!Q.cancelable||(F=ve>Ce,!F)))return le(Q);const R=o.pointerMove(Q);ve>g&&(q=!0),c.useFriction(.3).useDuration(1),u.start(),a.add(t.apply(R)),Q.preventDefault()}function le(Q){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(Q)*_(),Ce=Y(t.apply(ve),de),R=$6(ve,Ce),J=D-10*R,ae=b+R/50;F=!1,j=!1,$.clear(),c.useDuration(J).useFriction(ae),l.distance(Ce,!m),U=!1,p.emit("pointerUp")}function pe(Q){q&&(Q.stopPropagation(),Q.preventDefault())}function he(){return j}return{init:P,pointerDown:he,destroy:w}}function R6(e,t){let n,i;function a(f){return f.timeStamp}function o(f,d){const h=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(XS(f,t)?f:f.touches[0])[h]}function s(f){return n=f,i=f,o(f)}function u(f){const d=o(f)-o(i),p=a(f)-a(n)>170;return i=f,p&&(n=f),d}function l(f){if(!n||!i)return 0;const d=o(i)-o(n),p=a(f)-a(n),h=a(f)-a(i)>170,m=d/p;return p&&!h&&Ot(m)>.1?m:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function A6(e){function t(n){return e*(n/100)}return{measure:t}}function P6(e,t,r,n,i){let a,o,s=[],u=!1;function l(p){return i.measureSize(p.getBoundingClientRect())}function c(p,h){if(!h)return;o=l(e),s=n.map(l);function m(v){for(const b of v){const y=b.target===e,k=n.indexOf(b.target),S=y?o:s[k],E=l(y?e:n[k]);if(S!==E){r.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(fh(h)||h(p,v))&&m(v)}),[e].concat(n).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function N6(e,t,r,n){let i=!0,a=0,o=0,s=r,u=n,l=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let $=0;return E?(a=0,e.set(t),$=S):(a+=S/s,a*=u,l+=a,e.add(a),$=l-c),o=dh($),c=l,i=Ot(S)<.001,k}function d(){return i}function p(){return s}function h(){return o}function m(){return a}function g(){return b(r)}function v(){return y(n)}function b(S){return s=S,k}function y(S){return u=S,k}const k={direction:h,duration:p,velocity:m,seek:f,settled:d,useBaseFriction:v,useBaseDuration:g,useFriction:y,useDuration:b};return k}function D6(e,t,r,n,i){const a=i.measure(10),o=i.measure(50),s=Si(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=Ot(e[h]-t.get()),g=r.get()-t.get(),v=s.constrain(m/o);r.subtract(g*v),!p&&Ot(g)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function f(p){u=!p}return{constrain:c,toggleActive:f}}function j6(e,t,r,n){const i=Si(-t+e,r[0]),a=u(),o=l();function s(){const f=a[0],d=Vn(a),p=a.lastIndexOf(f),h=a.indexOf(d)+1;return Si(p,h)}function u(){return r.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(n==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function M6(e,t,r){const n=t[0],i=r?n-e:Vn(t);return{limit:Si(i,n)}}function L6(e,t,r,n){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=Si(a,o);function l(d){return d===1?u(r.get()):d===-1?s(r.get()):!1}function c(d){if(!l(d))return;const p=e*(d*-1);n.forEach(h=>h.add(p))}return{loop:c}}function F6(e){const{max:t,length:r}=e;function n(a){return(a-t)/-r}return{get:n}}function B6(e,t,r,n,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=p().map(t.measure),f=h(),d=m();function p(){return l(n).map(v=>Vn(v)[u]-v[0][s]).map(Ot)}function h(){return n.map(v=>r[s]-v[s]).map(v=>-Ot(v))}function m(){const b=Vn(f)-Vn(i);return l(f).map(y=>y[0]).map((y,k,S)=>{const E=!k,$=k===Vu(S);return o&&E?0:o&&$?b:y+c[k]})}return{snaps:f,snapsAligned:d}}function U6(e,t,r,n,i){const{reachedAny:a,removeOffset:o,constrain:s}=n;function u(h){return h.concat().sort((m,g)=>Ot(m)-Ot(g))[0]}function l(h){const m=e?o(h):s(h),g=t.map(b=>b-m).map(b=>c(b,0)).map((b,y)=>({diff:b,index:y})).sort((b,y)=>Ot(b.diff)-Ot(y.diff)),{index:v}=g[0];return{index:v,distance:m}}function c(h,m){const g=[h,h+r,h-r];if(!e)return g[0];if(!m)return u(g);const v=g.filter(b=>dh(b)===m);return u(v)}function f(h,m){const g=t[h]-i.get(),v=c(g,m);return{index:h,distance:v}}function d(h,m){const g=i.get()+h,{index:v,distance:b}=l(g),y=!e&&a(g);if(!m||y)return{index:v,distance:h};const k=t[v]-b,S=h+c(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:c}}function z6(e,t,r,n,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&&(r.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,d){const p=n.byDistance(f,d);s(p)}function l(f,d){const p=t.clone().set(f),h=n.byIndex(p.get(),d);s(h)}return{distance:u,index:l}}function Zu(e){let t=e;function r(){return t}function n(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return ch(u)?u:u.get()}return{get:r,set:n,add:i,subtract:a}}function e1(e,t,r){const n=e.scroll==="x"?o:s,i=r.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function u(d){a||(i.transform=n(t.apply(d)))}function l(d){a=!d}function c(){a||(i.transform="",r.getAttribute("style")||r.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function W6(e,t,r,n,i,a,o,s,u){const l=Rs(i),c=Rs(i).reverse(),f=m().concat(g());function d(S,E){return S.reduce(($,M)=>$-i[M],E)}function p(S,E){return S.reduce(($,M)=>d($,E)>0?$.concat([M]):$,[])}function h(S,E){const $=E==="start",M=$?-n:n,z=o.findSlideBounds([M]);return S.map(O=>{const D=$?0:-n,H=$?n:0,I=z.filter(j=>j.index===O)[0][$?"end":"start"];return{index:O,slideLocation:Zu(-1),translate:e1(e,t,u[O]),target:()=>s.get()>I?D:H}})}function m(){const S=a[0]-1,E=p(c,S);return h(E,"end")}function g(){const S=r-a[0]-1,E=p(l,S);return h(E,"start")}function v(){return f.every(({index:S})=>{const E=l.filter($=>$!==S);return d(E,r)<=.1})}function b(){f.forEach(S=>{const{target:E,translate:$,slideLocation:M}=S,z=E();z!==M.get()&&($.to(z),M.set(z))})}function y(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:y,loop:b,loopPoints:f}}function H6(e,t){let r,n=!1;function i(s,u){if(!u)return;function l(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{n||(fh(u)||u(s,c))&&l(c)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),n=!0}return{init:i,destroy:a}}function V6(e,t,r,n,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=p(c,o);function d(g){const v=g||0;return r.map(b=>Si(l,b-l).constrain(b*v))}function p(g,v){const b=g||c,y=d(v);return b.reduce((k,S)=>{const E=n.map(($,M)=>({start:$-r[M]+y[M]+S,end:$+e-y[M]+S,index:M}));return k.concat(E)},[])}function h(g,v){const b=a?s(g):u(g);return(v||f).reduce((k,S)=>{const{index:E,start:$,end:M}=S,z=k.includes(E),O=$<b&&M>b;return!z&&O?k.concat([E]):k},[])}return{check:h,findSlideBounds:p}}function q6(e,t,r,n,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=r[0]&&i,c=h(),f=m(),d=r.map(o),p=g();function h(){if(!l)return 0;const b=r[0];return Ot(t[s]-b[s])}function m(){if(!l)return 0;const b=a.getComputedStyle(Vn(n));return parseFloat(b.getPropertyValue(`margin-${u}`))}function g(){return r.map((b,y,k)=>{const S=!y,E=y===Vu(k);return S?d[y]+c:E?d[y]+f:k[y+1][s]-b[s]}).map(Ot)}return{slideSizes:d,slideSizesWithGaps:p}}function Z6(e,t,r){const n=ch(r);function i(u,l){return Rs(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return Rs(u).reduce((l,c)=>{const d=t.slice(Vn(l),c+1).reduce((p,h)=>p+h,0);return!c||d>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return n?i(u,r):a(u)}return{groupSlides:o}}function K6(e,t,r,n,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:d,loop:p,duration:h,dragFree:m,dragThreshold:g,slidesToScroll:v,skipSnaps:b,containScroll:y}=a,k=t.getBoundingClientRect(),S=r.map(ae=>ae.getBoundingClientRect()),E=C6(c),$=T6(l,c),M=$.measureSize(k),z=A6(M),O=O6(u,M),D=!p&&!!y,H=p||!!y,{slideSizes:L,slideSizesWithGaps:I}=q6($,k,S,r,H,i),j=Z6(M,I,v),{snaps:F,snapsAligned:q}=B6($,O,k,S,I,j,D),U=-Vn(F)+Vn(I),{snapsContained:P}=j6(M,U,q,y),w=D?P:q,{limit:W}=M6(U,w,p),Z=QS(Vu(w),f,p),_=Z.clone(),Y=Rs(r),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:xe,animation:Re,options:{loop:qe}})=>{const Ae=ae.pointerDown();qe||ke.constrain(Ae);const Be=ee.seek().settled();Be&&!Ae&&(Re.stop(),xe.emit("settle")),Be||xe.emit("scroll")},re=({scrollBody:ae,translate:ee,location:ke,offsetLocation:xe,scrollLooper:Re,slideLooper:qe,options:{loop:Ae}},Be)=>{const B=ae.velocity();xe.set(ke.get()-B+B*Be),Ae&&(Re.loop(ae.direction()),qe.loop()),ee.to(xe.get())},le={start:()=>s.start(J),stop:()=>s.stop(J),update:()=>oe(J),render:ae=>re(J,ae)},pe=.68,he=w[Z.get()],ue=Zu(he),Q=Zu(he),K=Zu(he),de=N6(ue,K,h,pe),ve=U6(p,w,U,W,K),Ce=z6(le,Z,_,ve,de,K,o),R=V6(M,U,L,F,W,p,d),J={ownerDocument:n,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:$,direction:E,dragHandler:I6($,E,e,n,i,K,R6($,i),ue,le,Ce,de,ve,Z,o,z,m,g,b,pe),eventStore:As(),percentOfView:z,index:Z,indexPrevious:_,limit:W,location:ue,offsetLocation:Q,options:a,resizeHandler:P6(t,o,i,r,$),scrollBody:de,scrollBounds:D6(W,ue,K,de,z),scrollLooper:L6(U,W,Q,[ue,Q,K]),scrollProgress:F6(W),scrollSnaps:w,scrollTarget:ve,scrollTo:Ce,slideLooper:W6($,E,M,U,I,w,R,Q,r),slidesHandler:H6(t,o),slidesInView:R,slideIndexes:Y,slidesToScroll:j,target:K,translate:e1($,E,t)};return J}function G6(e){const t=16.666666666666668;let r=[],n=null,i=0,a=0;function o(f){n||(n=f);const d=f-n;for(n=f,i+=d;i>=t;)r.forEach(({animation:h})=>h.update()),i-=t;const p=Ot(i/t);r.forEach(({animation:h})=>h.render(p)),a&&e.requestAnimationFrame(o)}function s(f){r.includes(f)||r.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){r=r.filter(d=>d!==f),!r.length&&(e.cancelAnimationFrame(a),n=null,i=0,a=0)}function l(){n=null,i=0}return{start:s,stop:u,reset:l,window:e}}function Y6(){const e={};let t;function r(u){t=u}function n(u){return e[u]||[]}function i(u){return n(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=n(u).concat([l]),s}function o(u,l){return e[u]=n(u).filter(c=>c!==l),s}const s={init:r,emit:i,off:o,on:a};return s}const J6={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 X6(e){function t(a,o){return JS(a,o||{})}function r(a){const o=a.breakpoints||{},s=qu(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function n(a){return a.map(o=>qu(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function Q6(e){let t=[];function r(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Ha(e,t,r){const n=e.ownerDocument,i=n.defaultView,a=X6(i),o=Q6(a),s=As(),u=As(),l=Y6(),{animationRealms:c}=Ha,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:h,off:m,emit:g}=l,v=L;let b=!1,y,k=f(J6,Ha.globalOptions),S=f(k),E=[],$,M,z;function O(){const{container:de,slides:ve}=S;M=(GS(de)?e.querySelector(de):de)||e.children[0];const R=GS(ve)?M.querySelectorAll(ve):ve;z=[].slice.call(R||M.children)}function D(de,ve){const Ce=K6(e,M,z,n,i,de,l,ve);if(de.loop&&!Ce.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return D(R,ve)}return Ce}function H(de,ve){if(b)return;const Ce=c.find(J=>J.window===i),R=Ce||G6(i);Ce||c.push(R),k=f(k,de),S=d(k),E=ve||E,O(),y=D(S,R),p([k,...E.map(({options:J})=>J)]).forEach(J=>s.add(J,"change",L)),S.active&&(y.translate.to(y.location.get()),y.eventHandler.init(K),y.resizeHandler.init(K,S.watchResize),y.slidesHandler.init(K,S.watchSlides),u.add(n,"visibilitychange",()=>{n.hidden&&R.reset()}),y.options.loop&&y.slideLooper.loop(),M.offsetParent&&z.length&&y.dragHandler.init(K,S.watchDrag),$=o.init(E,K))}function L(de,ve){const Ce=oe();I(),H(f({startIndex:Ce},de),ve),l.emit("reInit")}function I(){y.dragHandler.destroy(),y.animation.stop(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),o.destroy(),s.clear(),u.clear()}function j(){b||(b=!0,s.clear(),I(),l.emit("destroy"))}function F(de){const ve=y[de?"target":"location"].get(),Ce=S.loop?"removeOffset":"constrain";return y.slidesInView.check(y.limit[Ce](ve))}function q(de){const ve=F(de);return y.slideIndexes.filter(Ce=>!ve.includes(Ce))}function U(de,ve,Ce){!S.active||b||(y.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),y.scrollTo.index(de,Ce||0))}function P(de){const ve=y.index.add(1).get();U(ve,de===!0,-1)}function w(de){const ve=y.index.add(-1).get();U(ve,de===!0,1)}function W(){return y.index.add(1).get()!==oe()}function Z(){return y.index.add(-1).get()!==oe()}function _(){return y.scrollSnaps.map(y.scrollProgress.get)}function Y(){return y.scrollProgress.get(y.location.get())}function oe(){return y.index.get()}function re(){return y.indexPrevious.get()}function le(){return $}function pe(){return y}function he(){return e}function ue(){return M}function Q(){return z}const K={canScrollNext:W,canScrollPrev:Z,containerNode:ue,internalEngine:pe,destroy:j,off:m,on:h,emit:g,plugins:le,previousScrollSnap:re,reInit:v,rootNode:he,scrollNext:P,scrollPrev:w,scrollProgress:Y,scrollSnapList:_,scrollTo:U,selectedScrollSnap:oe,slideNodes:Q,slidesInView:F,slidesNotInView:q};return H(t,r),setTimeout(()=>l.emit("init"),0),K}Ha.animationRealms=[],Ha.globalOptions=void 0;function ph(e={},t=[]){const r=N.useRef(e),n=N.useRef(t),[i,a]=N.useState(),[o,s]=N.useState(),u=N.useCallback(()=>{i&&i.reInit(r.current,n.current)},[i]);return N.useEffect(()=>{if(_6()&&o){Ha.globalOptions=ph.globalOptions;const l=Ha(o,r.current,n.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),N.useEffect(()=>{uh(r.current,e)||(r.current=e,u())},[e,u]),N.useEffect(()=>{k6(n.current,t)||(n.current=t,u())},[t,u]),[s,i]}ph.globalOptions=void 0;function e7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 t7=x.forwardRef(e7);function r7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 n7=x.forwardRef(r7);function i7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 a7=x.forwardRef(i7);function o7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 s7=x.forwardRef(o7);function l7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 u7=x.forwardRef(l7);function c7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 f7=x.forwardRef(c7);function d7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 p7=x.forwardRef(d7);function h7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 m7=x.forwardRef(h7),v7=N.forwardRef(({blocks:e,direction:t,sender:r,timestamp:n,metadata:i},a)=>{const[o,s]=ph({skipSnaps:!0}),[u,l]=N.useState(!0),[c,f]=N.useState(!0),d=N.useCallback(()=>s==null?void 0:s.scrollPrev(),[s]),p=N.useCallback(()=>s==null?void 0:s.scrollNext(),[s]),{message:{blocks:{carousel:h}}}=gt,m=N.useCallback(g=>{l(!g.canScrollPrev()),f(!g.canScrollNext())},[]);return N.useEffect(()=>{s&&(m(s),s.on("reInit",m),s.on("select",m))},[s,m]),C.jsxs("div",{...h==null?void 0:h.container,"data-container":"carousel",ref:o,children:[C.jsx("div",{ref:a,...h==null?void 0:h.slidesContainer,children:e.map((g,v)=>C.jsx(Ga,{block:g,direction:t,sender:r,timestamp:n,metadata:i},v))}),C.jsx(n7,{...h==null?void 0:h.backButton,"data-disabled":u?"":void 0,onClick:d}),C.jsx(a7,{...h==null?void 0:h.nextButton,"data-disabled":c?"":void 0,onClick:p})]})}),t1=Math.floor;function r1(e){return n1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ps(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function y7(e){var t;return(t=(n1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function n1(e){return e instanceof Node||e instanceof Ps(e).Node}function Fr(e){return e instanceof Element||e instanceof Ps(e).Element}function Va(e){return e instanceof HTMLElement||e instanceof Ps(e).HTMLElement}function hh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ps(e).ShadowRoot}function g7(e){return["html","body","#document"].includes(r1(e))}function b7(e){return Ps(e).getComputedStyle(e)}function w7(e){if(r1(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hh(e)&&e.host||y7(e);return hh(t)?t.host:t}function Ei(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function vr(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&hh(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function i1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function x7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function a1(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(i1())||t.test(x7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function o1(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 s1(){return/apple/i.test(navigator.vendor)}function S7(){return i1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function l1(e,t){return["mouse","pen"].includes(e)}function E7(e){return"nativeEvent"in e}function _7(e){return e.matches("html,body")}function Xr(e){return(e==null?void 0:e.ownerDocument)||document}function mh(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function u1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const k7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function c1(e){return Va(e)&&e.matches(k7)}function Yt(e){e.preventDefault(),e.stopPropagation()}const vh="ArrowUp",Ku="ArrowDown",qa="ArrowLeft",Ns="ArrowRight";function Gu(e,t,r){return Math.floor(e/t)!==r}function Ds(e,t){return t<0||t>=e.current.length}function yh(e,t){return ir(e,{disabledIndices:t})}function f1(e,t){return ir(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ir(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=r;do{var u,l;s=s+(n?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(u=o[s])!=null&&u.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function $7(e,t){let{event:r,orientation:n,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(r.key===vh){if(c&&Yt(r),l===-1)f=u;else if(f=ir(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const d=l%a,p=u%a,h=u-(p-d);p===d?f=u:f=p>d?h:h-a}Ds(e,f)&&(f=l)}if(r.key===Ku&&(c&&Yt(r),l===-1?f=s:(f=ir(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=ir(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Ds(e,f)&&(f=l)),n==="both"){const d=t1(l/a);r.key===Ns&&(c&&Yt(r),l%a!==a-1?(f=ir(e,{startingIndex:l,disabledIndices:o}),i&&Gu(f,a,d)&&(f=ir(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=ir(e,{startingIndex:l-l%a-1,disabledIndices:o})),Gu(f,a,d)&&(f=l)),r.key===qa&&(c&&Yt(r),l%a!==0?(f=ir(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&Gu(f,a,d)&&(f=ir(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=ir(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),Gu(f,a,d)&&(f=l));const p=t1(u/a)===d;Ds(e,f)&&(i&&p?f=r.key===qa?u:ir(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let d1=0;function qn(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(d1);const a=()=>e==null?void 0:e.focus({preventScroll:r});i?a():d1=requestAnimationFrame(a)}var Ft=typeof document<"u"?N.useLayoutEffect:N.useEffect;function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yu.apply(this,arguments)}let gh=!1,O7=0;const p1=()=>"floating-ui-"+O7++;function T7(){const[e,t]=x.useState(()=>gh?p1():void 0);return Ft(()=>{e==null&&t(p1())},[]),x.useEffect(()=>{gh||(gh=!0)},[]),e}const bh=x.useId||T7;function C7(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(i=>i!==r))||[])}}}const I7=x.createContext(null),R7=x.createContext(null),h1=()=>{var e;return((e=x.useContext(I7))==null?void 0:e.id)||null},Ju=()=>x.useContext(R7);function js(e){return"data-floating-ui-"+e}function _i(e){const t=N.useRef(e);return Ft(()=>{t.current=e}),t}function A7(e,t){var r;let n=[],i=(r=e.find(a=>a.id===t))==null?void 0:r.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function Za(e,t){let r=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),n=r;for(;n.length;)n=e.filter(i=>{var a;return(a=n)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),r=r.concat(n);return r}function P7(e,t){let r,n=-1;function i(a,o){o>n&&(r=a,n=o),Za(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===r)}let Ka=new WeakMap,Xu=new WeakSet,Qu={},wh=0;const N7=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,m1=e=>e&&(e.host||m1(e.parentNode)),D7=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=m1(r);return e.contains(n)?n:null}).filter(r=>r!=null);function j7(e,t,r,n){const i="data-floating-ui-inert",a=n?"inert":r?"aria-hidden":null,o=D7(t,e),s=new Set,u=new Set(o),l=[];Qu[i]||(Qu[i]=new WeakMap);const c=Qu[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||u.has(p)||Array.prototype.forEach.call(p.children,h=>{if(s.has(h))d(h);else{const m=a?h.getAttribute(a):null,g=m!==null&&m!=="false",v=(Ka.get(h)||0)+1,b=(c.get(h)||0)+1;Ka.set(h,v),c.set(h,b),l.push(h),v===1&&g&&Xu.add(h),b===1&&h.setAttribute(i,""),!g&&a&&h.setAttribute(a,"true")}})}return wh++,()=>{l.forEach(p=>{const h=(Ka.get(p)||0)-1,m=(c.get(p)||0)-1;Ka.set(p,h),c.set(p,m),h||(!Xu.has(p)&&a&&p.removeAttribute(a),Xu.delete(p)),m||p.removeAttribute(i)}),wh--,wh||(Ka=new WeakMap,Ka=new WeakMap,Xu=new WeakSet,Qu={})}}function v1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Xr(e[0]).body;return j7(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const xh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function y1(e,t){const r=Yp(e,xh());t==="prev"&&r.reverse();const n=r.indexOf(Ei(Xr(e)));return r.slice(n+1)[0]}function g1(){return y1(document.body,"next")}function b1(){return y1(document.body,"prev")}function Ms(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!vr(r,n)}function M7(e){Yp(e,xh()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function L7(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const Sh={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 F7;function w1(e){e.key==="Tab"&&(e.target,clearTimeout(F7))}const ec=x.forwardRef(function(t,r){const[n,i]=x.useState();Ft(()=>(s1()&&i("button"),document.addEventListener("keydown",w1),()=>{document.removeEventListener("keydown",w1)}),[]);const a={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[js("focus-guard")]:"",style:Sh};return x.createElement("span",Yu({},t,a))}),x1=x.createContext(null);function B7(e){let{id:t,root:r}=e===void 0?{}:e;const[n,i]=x.useState(null),a=bh(),o=S1(),s=x.useMemo(()=>({id:t,root:r,portalContext:o,uniqueId:a}),[t,r,o,a]),u=x.useRef();return Ft(()=>()=>{n==null||n.remove()},[n,s]),Ft(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:d}=s,p=l?document.getElementById(l):null,h=js("portal");if(p){const m=document.createElement("div");m.id=d,m.setAttribute(h,""),p.appendChild(m),i(m)}else{let m=c||(f==null?void 0:f.portalNode);m&&!Fr(m)&&(m=m.current),m=m||document.body;let g=null;l&&(g=document.createElement("div"),g.id=l,m.appendChild(g));const v=document.createElement("div");v.id=d,v.setAttribute(h,""),m=g||m,m.appendChild(v),i(v)}},[s]),n}function U7(e){let{children:t,id:r,root:n=null,preserveTabOrder:i=!0}=e;const a=B7({id:r,root:n}),[o,s]=x.useState(null),u=x.useRef(null),l=x.useRef(null),c=x.useRef(null),f=x.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(n||a);return x.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(h){a&&Ms(h)&&(h.type==="focusin"?L7:M7)(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(x1.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&x.createElement(ec,{"data-type":"outside",ref:u,onFocus:p=>{if(Ms(p,a)){var h;(h=c.current)==null||h.focus()}else{const m=b1()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus()}}}),d&&a&&x.createElement("span",{"aria-owns":a.id,style:Sh}),a&&Di.createPortal(t,a),d&&a&&x.createElement(ec,{"data-type":"outside",ref:l,onFocus:p=>{if(Ms(p,a)){var h;(h=f.current)==null||h.focus()}else{const m=g1()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const S1=()=>x.useContext(x1),z7=x.forwardRef(function(t,r){return x.createElement("button",Yu({},t,{type:"button",ref:r,tabIndex:-1,style:Sh}))});function W7(e){const{context:t,children:r,disabled:n=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:u=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:v,floating:b}}=t,y=N7()?a:!0,k=_i(i),S=_i(o),E=_i(s),$=Ju(),M=S1(),z=typeof o=="number"&&o<0,O=x.useRef(null),D=x.useRef(null),H=x.useRef(!1),L=x.useRef(null),I=x.useRef(!1),j=M!=null,F=v&&v.getAttribute("role")==="combobox"&&c1(v)&&z,q=x.useCallback(function(W){return W===void 0&&(W=b),W?Yp(W,xh()):[]},[b]),U=x.useCallback(W=>{const Z=q(W);return k.current.map(_=>v&&_==="reference"?v:b&&_==="floating"?b:Z).filter(Boolean).flat()},[v,b,k,q]);x.useEffect(()=>{if(n||!u)return;function W(_){if(_.key==="Tab"){vr(b,Ei(Xr(b)))&&q().length===0&&!F&&Yt(_);const Y=U(),oe=u1(_);k.current[0]==="reference"&&oe===v&&(Yt(_),_.shiftKey?qn(Y[Y.length-1]):qn(Y[1])),k.current[1]==="floating"&&oe===b&&_.shiftKey&&(Yt(_),qn(Y[0]))}}const Z=Xr(b);return Z.addEventListener("keydown",W),()=>{Z.removeEventListener("keydown",W)}},[n,v,b,u,k,d,F,q,U]),x.useEffect(()=>{if(n||!c)return;function W(){I.current=!0,setTimeout(()=>{I.current=!1})}function Z(_){const Y=_.relatedTarget;queueMicrotask(()=>{const oe=!(vr(v,Y)||vr(b,Y)||vr(Y,b)||vr(M==null?void 0:M.portalNode,Y)||Y!=null&&Y.hasAttribute(js("focus-guard"))||$&&(Za($.nodesRef.current,p).find(re=>{var le,pe;return vr((le=re.context)==null?void 0:le.elements.floating,Y)||vr((pe=re.context)==null?void 0:pe.elements.domReference,Y)})||A7($.nodesRef.current,p).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===Y||((pe=re.context)==null?void 0:pe.elements.domReference)===Y})));Y&&oe&&!I.current&&Y!==L.current&&(H.current=!0,h(!1,_))})}if(b&&Va(v))return v.addEventListener("focusout",Z),v.addEventListener("pointerdown",W),!u&&b.addEventListener("focusout",Z),()=>{v.removeEventListener("focusout",Z),v.removeEventListener("pointerdown",W),!u&&b.removeEventListener("focusout",Z)}},[n,v,b,u,p,$,M,h,c]),x.useEffect(()=>{var W;if(n)return;const Z=Array.from((M==null||(W=M.portalNode)==null?void 0:W.querySelectorAll("["+js("portal")+"]"))||[]);if(b){const _=[b,...Z,O.current,D.current,k.current.includes("reference")||F?v:null].filter(oe=>oe!=null),Y=u?v1(_,y,!y):v1(_);return()=>{Y()}}},[n,v,b,u,k,M,F,y]),Ft(()=>{if(n||!b)return;const W=Xr(b),Z=Ei(W);queueMicrotask(()=>{const _=U(b),Y=S.current,oe=(typeof Y=="number"?_[Y]:Y.current)||b,re=vr(b,Z);!z&&!re&&f&&qn(oe,{preventScroll:oe===b})})},[n,f,b,z,U,S]),Ft(()=>{if(n||!b)return;let W=!1;const Z=Xr(b),_=Ei(Z),Y=g.current;L.current=_;function oe(re){if(re.type==="escapeKey"&&d.domReference.current&&(L.current=d.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(H.current=!1,W=le.preventScroll):H.current=!le}return m.on("dismiss",oe),()=>{m.off("dismiss",oe);const re=Ei(Z);(vr(b,re)||$&&Za($.nodesRef.current,p).some(pe=>{var he;return vr((he=pe.context)==null?void 0:he.elements.floating,re)})||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&d.domReference.current&&(L.current=d.domReference.current),E.current&&Va(L.current)&&!H.current&&qn(L.current,{cancelPrevious:!1,preventScroll:W})}},[n,b,E,g,d,m,$,p]),Ft(()=>{if(!(n||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:h,refs:d}),()=>{M.setFocusManagerState(null)}},[n,M,u,f,h,d,c]),Ft(()=>{if(!n&&b&&typeof MutationObserver=="function"&&!z){const W=()=>{const _=b.getAttribute("tabindex");k.current.includes("floating")||Ei(Xr(b))!==d.domReference.current&&q().length===0?_!=="0"&&b.setAttribute("tabindex","0"):_!=="-1"&&b.setAttribute("tabindex","-1")};W();const Z=new MutationObserver(W);return Z.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{Z.disconnect()}}},[n,b,d,k,q,z]);function P(W){return n||!l||!u?null:x.createElement(z7,{ref:W==="start"?O:D,onClick:Z=>h(!1,Z.nativeEvent)},typeof l=="string"?l:"Dismiss")}const w=!n&&y&&!F&&(j||u);return x.createElement(x.Fragment,null,w&&x.createElement(ec,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:W=>{if(u){const _=U();qn(i[0]==="reference"?_[0]:_[_.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(H.current=!1,Ms(W,M.portalNode)){const _=g1()||v;_==null||_.focus()}else{var Z;(Z=M.beforeOutsideRef.current)==null||Z.focus()}}}),!F&&P("start"),r,P("end"),w&&x.createElement(ec,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:W=>{if(u)qn(U()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(c&&(H.current=!0),Ms(W,M.portalNode)){const _=b1()||v;_==null||_.focus()}else{var Z;(Z=M.afterOutsideRef.current)==null||Z.focus()}}}))}function E1(e){return Va(e.target)&&e.target.tagName==="BUTTON"}function _1(e){return c1(e)}function H7(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!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&&(l1(f.current)&&l||s!=="click"&&(r&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?n(!1,p.nativeEvent):(p.preventDefault(),n(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}l1(f.current)&&l||(r&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?n(!1,p.nativeEvent):n(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!c||E1(p))&&(p.key===" "&&!_1(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&n(!(r&&u),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!c||E1(p)||_1(a)||p.key===" "&&d.current&&(d.current=!1,n(!(r&&u),p.nativeEvent))}}}:{},[o,i,s,l,c,a,u,r,n])}const V7=x.useInsertionEffect||(e=>e());function ki(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return V7(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}const q7={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Z7={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},K7=e=>{var t,r;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function G7(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:v}=t,b=Ju(),y=h1()!=null,k=ki(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,E=x.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:M}=K7(v),z=ki(D=>{if(!r||!c||!f||D.key!=="Escape")return;const H=b?Za(b.nodesRef.current,a):[];if(!$&&(D.stopPropagation(),H.length>0)){let L=!0;if(H.forEach(I=>{var j;if((j=I.context)!=null&&j.open&&!I.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,E7(D)?D.nativeEvent:D)}),O=ki(D=>{const H=E.current;if(E.current=!1,H||typeof S=="function"&&!S(D))return;const L=u1(D),I="["+js("inert")+"]",j=Xr(u).querySelectorAll(I);let F=Fr(L)?L:null;for(;F&&!g7(F);){const P=w7(F);if(P===Xr(u).body||!Fr(P))break;F=P}if(j.length&&Fr(L)&&!_7(L)&&!vr(L,u)&&Array.from(j).every(P=>!vr(F,P)))return;if(Va(L)&&u){const P=L.clientWidth>0&&L.scrollWidth>L.clientWidth,w=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let W=w&&D.offsetX>L.clientWidth;if(w&&b7(L).direction==="rtl"&&(W=D.offsetX<=L.offsetWidth-L.clientWidth),W||P&&D.offsetY>L.clientHeight)return}const q=b&&Za(b.nodesRef.current,a).some(P=>{var w;return mh(D,(w=P.context)==null?void 0:w.elements.floating)});if(mh(D,u)||mh(D,s)||q)return;const U=b?Za(b.nodesRef.current,a):[];if(U.length>0){let P=!0;if(U.forEach(w=>{var W;if((W=w.context)!=null&&W.open&&!w.context.dataRef.current.__outsidePressBubbles){P=!1;return}}),!P)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:y?{preventScroll:!0}:a1(D)||o1(D)}}),n(!1,D)});return x.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=$,l.current.__outsidePressBubbles=M;function D(I){n(!1,I)}const H=Xr(u);f&&H.addEventListener("keydown",z),S&&H.addEventListener(p,O);let L=[];return g&&(Fr(s)&&(L=wi(s)),Fr(u)&&(L=L.concat(wi(u))),!Fr(o)&&o&&o.contextElement&&(L=L.concat(wi(o.contextElement)))),L=L.filter(I=>{var j;return I!==((j=H.defaultView)==null?void 0:j.visualViewport)}),L.forEach(I=>{I.addEventListener("scroll",D,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",z),S&&H.removeEventListener(p,O),L.forEach(I=>{I.removeEventListener("scroll",D)})}},[l,u,s,o,f,S,p,r,n,g,c,$,M,z,O]),x.useEffect(()=>{E.current=!1},[S,p]),x.useMemo(()=>c?{reference:{onKeyDown:z,[q7[m]]:D=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,D.nativeEvent))}},floating:{onKeyDown:z,[Z7[p]]:()=>{E.current=!0}}}:{},[c,i,h,p,m,n,z])}let Eh;process.env.NODE_ENV!=="production"&&(Eh=new Set);function Y7(e){var t;e===void 0&&(e={});const{open:r=!1,onOpenChange:n,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&&!Fr(e.elements.reference)){var o;if(!((o=Eh)!=null&&o.has($))){var s;(s=Eh)==null||s.add($),console.error($)}}}const[u,l]=x.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=kz(e),d=Ju(),p=ki(($,M)=>{$&&(m.current.openEvent=M),n==null||n($,M)}),h=x.useRef(null),m=x.useRef({}),g=x.useState(()=>C7())[0],v=bh(),b=x.useCallback($=>{const M=Fr($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(M)},[f.refs]),y=x.useCallback($=>{(Fr($)||$===null)&&(h.current=$,l($)),(Fr(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Fr($))&&f.refs.setReference($)},[f.refs]),k=x.useMemo(()=>({...f.refs,setReference:y,setPositionReference:b,domReference:h}),[f.refs,y,b]),S=x.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=x.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:i,floatingId:v,events:g,open:r,onOpenChange:p}),[f,i,v,g,r,p,k,S]);return Ft(()=>{const $=d==null?void 0:d.nodesRef.current.find(M=>M.id===i);$&&($.context=E)}),x.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function _h(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[r]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof u=="function"){var l;(l=n.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(c=n.get(s))==null?void 0:c.map(h=>h(...d)).find(h=>h!==void 0)}}}else i[s]=u}),i),{})}}function J7(e){e===void 0&&(e=[]);const t=e,r=x.useCallback(a=>_h(a,e,"reference"),t),n=x.useCallback(a=>_h(a,e,"floating"),t),i=x.useCallback(a=>_h(a,e,"item"),e.map(a=>a==null?void 0:a.item));return x.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:i}),[r,n,i])}let k1=!1;function tc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function $1(e,t){return tc(t,e===vh||e===Ku,e===qa||e===Ns)}function kh(e,t,r){return tc(t,e===Ku,r?e===qa:e===Ns)||e==="Enter"||e==" "||e===""}function X7(e,t,r){return tc(t,r?e===qa:e===Ns,e===Ku)}function O1(e,t,r){return tc(t,r?e===Ns:e===qa,e===vh)}function Q7(e,t){const{open:r,onOpenChange:n,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:h=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:v="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:y=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:$=!0,virtualItemRef:M}=t;process.env.NODE_ENV!=="production"&&(d&&(p||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 z=h1(),O=Ju(),D=ki(l),H=x.useRef(v),L=x.useRef(f??-1),I=x.useRef(null),j=x.useRef(!0),F=x.useRef(D),q=x.useRef(!!o),U=x.useRef(!1),P=x.useRef(!1),w=_i(k),W=_i(r),Z=_i($),[_,Y]=x.useState(),[oe,re]=x.useState(),le=ki(function(ue,Q,K){K===void 0&&(K=!1);const de=ue.current[Q.current];de&&(g?(Y(de.id),O==null||O.events.emit("virtualfocus",de),M&&(M.current=de)):qn(de,{preventScroll:!0,sync:S7()&&s1()?k1||U.current:!1}),requestAnimationFrame(()=>{const ve=Z.current;ve&&de&&(K||!j.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Ft(()=>{document.createElement("div").focus({get preventScroll(){return k1=!0,!1}})},[]),Ft(()=>{c&&(r&&o?H.current&&f!=null&&(P.current=!0,D(f)):q.current&&(L.current=-1,F.current(null)))},[c,r,o,f,D]),Ft(()=>{if(c&&r&&o)if(u==null){if(U.current=!1,f!=null)return;if(q.current&&(L.current=-1,le(s,L)),!q.current&&H.current&&(I.current!=null||H.current===!0&&I.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):(L.current=I.current==null||kh(I.current,S,m)||h?yh(s,w.current):f1(s,w.current),I.current=null,D(L.current))};Q()}}else Ds(s,u)||(L.current=u,le(s,L,P.current),P.current=!1)},[c,r,o,u,f,h,s,S,m,D,le,w]),Ft(()=>{var ue,Q;if(!c||o||!O||g||!q.current)return;const K=O.nodesRef.current,de=(ue=K.find(R=>R.id===z))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=Ei(Xr(o)),Ce=K.some(R=>R.context&&vr(R.context.elements.floating,ve));de&&!Ce&&j.current&&de.focus({preventScroll:!0})},[c,o,O,z,g]),Ft(()=>{if(!c||!O||!g||z)return;function ue(Q){re(Q.id),M&&(M.current=Q)}return O.events.on("virtualfocus",ue),()=>{O.events.off("virtualfocus",ue)}},[c,O,g,z,M]),Ft(()=>{F.current=D,q.current=!!o}),Ft(()=>{r||(I.current=null)},[r]);const pe=u!=null,he=x.useMemo(()=>{function ue(K){if(!r)return;const de=s.current.indexOf(K);de!==-1&&D(de)}return{onFocus(K){let{currentTarget:de}=K;ue(de)},onClick:K=>{let{currentTarget:de}=K;return de.focus({preventScroll:!0})},...b&&{onMouseMove(K){let{currentTarget:de}=K;ue(de)},onPointerLeave(K){let{pointerType:de}=K;!j.current||de==="touch"||(L.current=-1,le(s,L),D(null),g||qn(i.floating.current,{preventScroll:!0}))}}}},[r,i,le,b,s,D,g]);return x.useMemo(()=>{if(!c)return{};const ue=w.current;function Q(R){if(j.current=!1,U.current=!0,!W.current&&R.currentTarget===i.floating.current)return;if(h&&O1(R.key,S,m)){Yt(R),n(!1,R.nativeEvent),Va(a)&&!g&&a.focus();return}const J=L.current,ae=yh(s,ue),ee=f1(s,ue);if(R.key==="Home"&&(Yt(R),L.current=ae,D(L.current)),R.key==="End"&&(Yt(R),L.current=ee,D(L.current)),!(E>1&&(L.current=$7(s,{event:R,orientation:S,loop:p,cols:E,disabledIndices:ue,minIndex:ae,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),D(L.current),S==="both"))&&$1(R.key,S)){if(Yt(R),r&&!g&&Ei(R.currentTarget.ownerDocument)===R.currentTarget){L.current=kh(R.key,S,m)?ae:ee,D(L.current);return}kh(R.key,S,m)?p?L.current=J>=ee?d&&J!==s.current.length?-1:ae:ir(s,{startingIndex:J,disabledIndices:ue}):L.current=Math.min(ee,ir(s,{startingIndex:J,disabledIndices:ue})):p?L.current=J<=ae?d&&J!==-1?s.current.length:ee:ir(s,{startingIndex:J,decrement:!0,disabledIndices:ue}):L.current=Math.max(ae,ir(s,{startingIndex:J,decrement:!0,disabledIndices:ue})),Ds(s,L.current)?D(null):D(L.current)}}function K(R){v==="auto"&&a1(R.nativeEvent)&&(H.current=!0)}function de(R){H.current=v,v==="auto"&&o1(R.nativeEvent)&&(H.current=!0)}const ve=g&&r&&pe&&{"aria-activedescendant":oe||_},Ce=s.current.find(R=>(R==null?void 0:R.id)===_);return{reference:{...ve,onKeyDown(R){j.current=!1;const J=R.key.indexOf("Arrow")===0,ae=X7(R.key,S,m),ee=O1(R.key,S,m),ke=$1(R.key,S),xe=(h?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(g&&r){const Be=O==null?void 0:O.nodesRef.current.find(A=>A.parentId==null),B=O&&Be?P7(O.nodesRef.current,Be.id):null;if(J&&B&&M){const A=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Re,qe;const X=((Re=B.context)==null?void 0:Re.elements.domReference)===R.currentTarget,ce=ee&&!X?(qe=B.context)==null?void 0:qe.elements.domReference:ae?Ce:null;ce&&(Yt(R),ce.dispatchEvent(A),re(void 0))}if(ke&&B.context&&B.context.open&&B.parentId&&R.currentTarget!==B.context.elements.domReference){var Ae;Yt(R),(Ae=B.context.elements.domReference)==null||Ae.dispatchEvent(A);return}}return Q(R)}if(!(!r&&!y&&J)){if(xe&&(I.current=h&&ke?null:R.key),h){ae&&(Yt(R),r?(L.current=yh(s,ue),D(L.current)):n(!0,R.nativeEvent));return}ke&&(f!=null&&(L.current=f),Yt(R),!r&&y?n(!0,R.nativeEvent):Q(R),r&&D(L.current))}},onFocus(){r&&D(null)},onPointerDown:de,onMouseDown:K,onClick:K},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){j.current=!0}},item:he}},[a,i,_,oe,w,W,s,c,S,m,g,r,pe,h,f,y,d,E,p,v,D,n,he,O,M])}function e9(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:i=!0,role:a="dialog"}=t,o=bh();return x.useMemo(()=>{const s={id:n,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?n:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,r,n,o])}function t9(e,t){var r;const{open:n,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=x.useRef(),m=x.useRef(""),g=x.useRef((r=p??o)!=null?r:-1),v=x.useRef(null),b=ki(s),y=ki(u),k=_i(c),S=_i(d);return Ft(()=>{n&&(clearTimeout(h.current),v.current=null,m.current="")},[n]),Ft(()=>{if(n&&m.current===""){var E;g.current=(E=p??o)!=null?E:-1}},[n,p,o]),x.useMemo(()=>{if(!l)return{};function E(z){z?i.current.typing||(i.current.typing=z,y(z)):i.current.typing&&(i.current.typing=z,y(z))}function $(z,O,D){const H=k.current?k.current(O,D):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return H?z.indexOf(H):-1}function M(z){const O=a.current;if(m.current.length>0&&m.current[0]!==" "&&($(O,O,m.current)===-1?E(!1):z.key===" "&&Yt(z)),O==null||S.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;n&&z.key!==" "&&(Yt(z),E(!0)),O.every(I=>{var j,F;return I?((j=I[0])==null?void 0:j.toLocaleLowerCase())!==((F=I[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===z.key&&(m.current="",g.current=v.current),m.current+=z.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},f);const H=g.current,L=$(O,[...O.slice((H||0)+1),...O.slice(0,(H||0)+1)],m.current);L!==-1?(b(L),v.current=L):z.key!==" "&&(m.current="",E(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(z){z.key===" "&&E(!1)}}}},[l,n,i,a,f,S,k,b,y])}const r9=({options:e,label:t,reusable:r})=>{var F,q,U,P,w;const n=Me(W=>W.sendTextMessage),i=Me(W=>W.messageContainerRef),a=Me(W=>W.isReadOnly),[o,s]=x.useState(!1),[u,l]=x.useState(null),[c,f]=x.useState(null),{message:{blocks:{dropdown:d}}}=gt,p=e.reduce((W,Z)=>(W[Z.label]=Z.value,W),{}),h=p?Object.keys(p):[],m=W=>{s(c!==null&&!r?!1:W)},{refs:g,floatingStyles:v,context:b}=Y7({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:wz,middleware:[$z(5),Oz({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),Tz({apply({rects:W,elements:Z,availableHeight:_}){Object.assign(Z.floating.style,{maxHeight:`${_}px`,minWidth:`${W.reference.width}px`})},padding:10})]}),y=x.useRef([]),k=x.useRef(h),S=x.useRef(!1),E=H7(b,{event:"mousedown"}),$=G7(b),M=e9(b,{role:"listbox"}),z=Q7(b,{listRef:y,activeIndex:u,selectedIndex:c,onNavigate:l,loop:!0}),O=t9(b,{listRef:k,activeIndex:u,selectedIndex:c,onMatch:o?l:f,onTypingChange(W){S.current=W}}),{getReferenceProps:D,getFloatingProps:H,getItemProps:L}=J7([$,M,z,O,E]),I=W=>{f(W),h[W]!==void 0&&n(p[h[W]]??""),s(!1)},j=c!==null?h[c]:void 0;return C.jsxs(C.Fragment,{children:[C.jsxs("div",{tabIndex:0,ref:g.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!r?"":void 0,...(F=d.button)==null?void 0:F.container,...D(),children:[C.jsx("span",{...(q=d.button)==null?void 0:q.text,children:j||t||"Select..."}),C.jsx(m6,{...(U=d.button)==null?void 0:U.icon})]}),o&&C.jsx(U7,{children:C.jsx(W7,{context:b,modal:!1,children:C.jsx("div",{ref:g.setFloating,className:(w=(P=d.content)==null?void 0:P.container)==null?void 0:w.className,style:{...v},...H(),children:h.map((W,Z)=>{var _;return C.jsx("div",{ref:Y=>{y.current[Z]=Y},role:"option",tabIndex:Z===u?0:-1,"aria-selected":Z===c&&Z===u,"data-active":Z===u?"":void 0,...(_=d.content)==null?void 0:_.item,...L({onClick(){a||I(Z)},onKeyDown(Y){a||(Y.key==="Enter"&&(Y.preventDefault(),I(Z)),Y.key===" "&&!S.current&&(Y.preventDefault(),I(Z)))}}),children:W},W)})})})})]})},n9=N.forwardRef(({type:e,title:t,url:r,...n},i)=>{const{message:{blocks:{file:a}}}=gt;return C.jsxs("a",{...n,...a.container,href:r,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...a.title,children:t||r}),C.jsx(y6,{...a.icon})]})}),T1={audio:u6,bubble:i6,button:r6,carousel:v7,column:x6,dropdown:r9,file:n9,image:o6,location:w6,row:S6,text:fL,video:l6},Ga=({block:e,...t})=>{const n=Me(a=>a.renderers)[e.type]??T1[e.type],i={...t,...e};return C.jsx(n,{...i})};function i9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 a9=x.forwardRef(i9);function o9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 s9=x.forwardRef(o9);function l9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const u9=x.forwardRef(l9);function $h(){return $h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$h.apply(null,arguments)}function c9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var f9=N.useLayoutEffect,d9=function(t){var r=x.useRef(t);return f9(function(){r.current=t}),r},C1=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},p9=function(t,r){var n=N.useRef();return N.useCallback(function(i){t.current=i,n.current&&C1(n.current,null),n.current=r,r&&C1(r,i)},[r])},I1={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},h9=function(t){Object.keys(I1).forEach(function(r){t.style.setProperty(r,I1[r],"important")})},R1=h9,cr=null,A1=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function m9(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),cr||(cr=document.createElement("textarea"),cr.setAttribute("tabindex","-1"),cr.setAttribute("aria-hidden","true"),R1(cr)),cr.parentNode===null&&document.body.appendChild(cr);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;cr.style[p]=o[p]}),R1(cr),cr.value=t;var u=A1(cr,e);cr.value=t,u=A1(cr,e),cr.value="x";var l=cr.scrollHeight-i,c=l*r;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*n;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var P1=function(){},v9=function(t,r){return t.reduce(function(n,i){return n[i]=r[i],n},{})},y9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],g9=!!document.documentElement.currentStyle,b9=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=v9(y9,r),i=n.boxSizing;if(i==="")return null;g9&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),o=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:o}},w9=b9;function N1(e,t,r){var n=d9(r);x.useLayoutEffect(function(){var i=function(o){return n.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var x9=function(t){N1(window,"resize",t)},S9=function(t){N1(document.fonts,"loadingdone",t)},E9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],_9=function(t,r){var n=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?P1:o,u=t.onHeightChange,l=u===void 0?P1:u,c=c9(t,E9),f=c.value!==void 0,d=x.useRef(null),p=p9(d,r),h=x.useRef(0),m=x.useRef(),g=function(){var y=d.current,k=n&&m.current?m.current:w9(y);if(k){m.current=k;var S=m9(k,y.value||y.placeholder||"x",a,i),E=S[0],$=S[1];h.current!==E&&(h.current=E,y.style.setProperty("height",E+"px","important"),l(E,{rowHeight:$}))}},v=function(y){f||g(),s(y)};return x.useLayoutEffect(g),x9(g),S9(g),x.createElement("textarea",$h({},c,{onChange:v,ref:p}))},k9=x.forwardRef(_9);const D1=N.memo(N.forwardRef(({children:e,...t},r)=>{const{composer:n}=gt,i=Me(I=>I.disableComposer),a=Me(I=>I.setIsTyping),o=Me(I=>I.isReadOnly),s=Me(I=>I.sendFile),u=Me(I=>I.addMessage),l=Me(I=>I.sendTextMessage),c=Me(I=>I.allowFileUpload),f=Me(I=>I.connected),{composerPlaceholder:d,showPoweredBy:p}=qS(),[h,m]=N.useState(""),[g,v]=N.useState(-1),[b,y]=N.useState(!1),k=N.useRef(null),S=N.useRef(null),E=$r(I=>I.user),$=$r(I=>I.messageHistory);if(o)return null;const M=()=>{var I;k.current&&((I=k.current)==null||I.click())},z=i||o||!f,O=async I=>{var F;const j=(F=I.target.files)==null?void 0:F[0];if(j)try{const{fileUrl:q,type:U}=await s(j)??"";u({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:U,url:q}})}catch(q){console.error("Error sending file:",q)}},D=window.SpeechRecognition||window.webkitSpeechRecognition,H=()=>{S.current||(S.current=new D);const I=S.current;I&&(I.continuous=!0,I.onresult=j=>{var q,U,P;const F=((P=(U=(q=j.results)==null?void 0:q[0])==null?void 0:U[0])==null?void 0:P.transcript)??"";m(F??""),I.stop(),y(!1)},b?(I.stop(),y(!1)):(I.start(),y(!0)))},L=()=>{h&&(l(h),setTimeout(()=>a(!0,9e3),500),m(""),v(-1))};return C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":z,...t,...n.container,ref:r,children:[c&&C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",disabled:z,...n.uploadButton.container,onClick:M,children:C.jsx(u9,{...n.uploadButton.icon})}),C.jsx("input",{type:"file",ref:k,style:{display:"none"},onChange:O})]}),C.jsx(k9,{...n==null?void 0:n.input,placeholder:d??"Type your message...",disabled:z,value:h,"data-has-value":!!h,onChange:I=>m(I.target.value),maxRows:5,onKeyDown:I=>{if(!z){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),m(`${h}
|
|
284
|
-
`)):I.key==="Enter"&&(I.preventDefault(),L()),I.key==="ArrowUp"){I.preventDefault();const j=$[(E==null?void 0:E.userId)??""]??[];g<j.length-1&&m(j[g+1]??""),v(()=>Math.min(g+1,j.length-1))}if(I.key==="ArrowDown"){I.preventDefault();const j=$[(E==null?void 0:E.userId)??""]??[];m(g===0?"":j[g-1]??""),v(()=>Math.max(g-1,-1))}}}}),h&&C.jsx("button",{type:"button","aria-label":"Send message",...n.button.container,disabled:!h||z,onClick:L,children:C.jsx(a9,{...n.button.icon})}),!h&&D&&C.jsx("button",{type:"button","aria-label":"Activate voice input",...n.voiceButton.container,disabled:!!h,onClick:H,"data-listens":!!b,children:C.jsx(s9,{...n.voiceButton.icon})})]}),C.jsx("a",{...n.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),j1=({children:e})=>{const[t,r]=N.useState(!1),[n,i]=N.useState(""),[a,o]=N.useState(null),s=({title:l,content:c})=>{i(l),o(c),r(!0)},u=()=>{r(!1)};return C.jsxs(WS.Provider,{value:{hideModal:u,showModal:s,title:n,content:a,open:t},children:[C.jsx(Oi,{open:t,onOpenChange:r,children:C.jsx(Oi.Content,{title:n,children:a})}),e]})};var M1={},Oh={},rc=ct&&ct.__assign||function(){return rc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},rc.apply(this,arguments)};Object.defineProperty(Oh,"__esModule",{value:!0});var $9={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function O9(e){var t=rc(rc({},$9),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Oh.getSanitizedOptions=O9;var Th={},Ch={},nc={},Ih={},Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});function T9(e){var t=Math.random()*e;return Math.round(t)}Rh.fullJitter=T9;var Ah={};Object.defineProperty(Ah,"__esModule",{value:!0});function C9(e){return e}Ah.noJitter=C9,Object.defineProperty(Ih,"__esModule",{value:!0});var I9=Rh,R9=Ah;function A9(e){switch(e.jitter){case"full":return I9.fullJitter;case"none":default:return R9.noJitter}}Ih.JitterFactory=A9,Object.defineProperty(nc,"__esModule",{value:!0});var P9=Ih,N9=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=P9.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,i=t*Math.pow(r,n);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}();nc.Delay=N9;var D9=ct&&ct.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j9=ct&&ct.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})},M9=ct&&ct.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,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(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=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 r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ch,"__esModule",{value:!0});var L9=nc,F9=function(e){D9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return j9(this,void 0,void 0,function(){return M9(this,function(r){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}(L9.Delay);Ch.SkipFirstDelay=F9;var Ph={},B9=ct&&ct.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ph,"__esModule",{value:!0});var U9=nc,z9=function(e){B9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(U9.Delay);Ph.AlwaysDelay=z9,Object.defineProperty(Th,"__esModule",{value:!0});var W9=Ch,H9=Ph;function V9(e,t){var r=q9(e);return r.setAttemptNumber(t),r}Th.DelayFactory=V9;function q9(e){return e.delayFirstAttempt?new H9.AlwaysDelay(e):new W9.SkipFirstDelay(e)}var Nh=ct&&ct.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})},Dh=ct&&ct.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,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(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=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 r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(M1,"__esModule",{value:!0});var Z9=Oh,K9=Th;function G9(e,t){return t===void 0&&(t={}),Nh(this,void 0,void 0,function(){var r,n;return Dh(this,function(i){switch(i.label){case 0:return r=Z9.getSanitizedOptions(t),n=new J9(e,r),[4,n.execute()];case 1:return[2,i.sent()]}})})}var Y9=M1.backOff=G9,J9=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Nh(this,void 0,void 0,function(){var t,r;return Dh(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||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 Nh(this,void 0,void 0,function(){var t;return Dh(this,function(r){switch(r.label){case 0:return t=K9.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}(),L1=Object.prototype.toString,F1=function(t){var r=L1.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&L1.call(t.callee)==="[object Function]"),n},jh,B1;function X9(){if(B1)return jh;B1=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=F1,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(d){var p=d.constructor;return p&&p.prototype===d},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!l["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{u(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return u(d);try{return u(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",m=r.call(p)==="[object Function]",g=n(p),v=h&&r.call(p)==="[object String]",b=[];if(!h&&!m&&!g)throw new TypeError("Object.keys called on a non-object");var y=o&&m;if(v&&p.length>0&&!t.call(p,0))for(var k=0;k<p.length;++k)b.push(String(k));if(g&&p.length>0)for(var S=0;S<p.length;++S)b.push(String(S));else for(var E in p)!(y&&E==="prototype")&&t.call(p,E)&&b.push(String(E));if(a)for(var $=f(p),M=0;M<s.length;++M)!($&&s[M]==="constructor")&&t.call(p,s[M])&&b.push(s[M]);return b}}return jh=e,jh}var Q9=Array.prototype.slice,eW=F1,U1=Object.keys,ic=U1?function(t){return U1(t)}:X9(),z1=Object.keys;ic.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return eW(n)?z1(Q9.call(n)):z1(n)})}else Object.keys=ic;return Object.keys||ic};var Mh=ic,tW=Mh,rW=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",nW=Object.prototype.toString,iW=Array.prototype.concat,W1=cp,aW=function(e){return typeof e=="function"&&nW.call(e)==="[object Function]"},H1=dp(),oW=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!aW(n)||!n())return}H1?W1(e,t,r,!0):W1(e,t,r)},V1=function(e,t){var r=arguments.length>2?arguments[2]:{},n=tW(t);rW&&(n=iW.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)oW(e,n[i],t[n[i]],r[n[i]])};V1.supportsDescriptors=!!H1;var Qi=V1,sW=Mh,q1=iu(),Z1=jr,K1=Object,lW=Z1("Array.prototype.push"),G1=Z1("Object.prototype.propertyIsEnumerable"),uW=q1?Object.getOwnPropertySymbols:null,Y1=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=K1(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=K1(arguments[i]),o=sW(a),s=q1&&(Object.getOwnPropertySymbols||uW);if(s)for(var u=s(a),l=0;l<u.length;++l){var c=u[l];G1(a,c)&&lW(o,c)}for(var f=0;f<o.length;++f){var d=o[f];if(G1(a,d)){var p=a[d];n[d]=p}}}return n},Lh=Y1,cW=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a="";for(var o in i)a+=o;return e!==a},fW=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},J1=function(){return!Object.assign||cW()||fW()?Lh:Object.assign},dW=Qi,pW=J1,hW=function(){var t=pW();return dW(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},mW=Qi,vW=Ia,yW=Y1,X1=J1,gW=hW,bW=vW.apply(X1()),Q1=function(t,r){return bW(Object,arguments)};mW(Q1,{getPolyfill:X1,implementation:yW,shim:gW});var wW=Q1,Ls=function(){return typeof(function(){}).name=="string"},Fs=Object.getOwnPropertyDescriptor;if(Fs)try{Fs([],"length")}catch{Fs=null}Ls.functionsHaveConfigurableNames=function(){if(!Ls()||!Fs)return!1;var t=Fs(function(){},"name");return!!t&&!!t.configurable};var xW=Function.prototype.bind;Ls.boundFunctionsHaveNames=function(){return Ls()&&typeof xW=="function"&&(function(){}).bind().name!==""};var SW=Ls,eE=cp,EW=dp(),_W=SW.functionsHaveConfigurableNames(),kW=li,$W=function(t,r){if(typeof t!="function")throw new kW("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||_W)&&(EW?eE(t,"name",r,!0,!0):eE(t,"name",r)),t},OW=$W,TW=li,CW=Object,tE=OW(function(){if(this==null||this!==CW(this))throw new TW("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),IW=tE,RW=Qi.supportsDescriptors,AW=Object.getOwnPropertyDescriptor,rE=function(){if(RW&&/a/mig.flags==="gim"){var t=AW(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return IW},PW=Qi.supportsDescriptors,NW=rE,DW=Object.getOwnPropertyDescriptor,jW=Object.defineProperty,MW=TypeError,nE=Object.getPrototypeOf,LW=/a/,FW=function(){if(!PW||!nE)throw new MW("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=NW(),r=nE(LW),n=DW(r,"flags");return(!n||n.get!==t)&&jW(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},BW=Qi,UW=Ia,zW=tE,iE=rE,WW=FW,aE=UW(iE());BW(aE,{getPolyfill:iE,implementation:zW,shim:WW});var HW=aE,ac={exports:{}},VW=iu,ea=function(){return VW()&&!!Symbol.toStringTag},qW=ea(),ZW=jr,Fh=ZW("Object.prototype.toString"),oc=function(t){return qW&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Fh(t)==="[object Arguments]"},oE=function(t){return oc(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Fh(t)!=="[object Array]"&&Fh(t.callee)==="[object Function]"},KW=function(){return oc(arguments)}();oc.isLegacyArguments=oE;var sE=KW?oc:oE,GW=Gx,Bs=$p(),Zn=li,Bh={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");if(Bs.assert(e),!Bh.has(e,t))throw new Zn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Bs.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Bs.get(e);return!!r&&GW(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var n=Bs.get(e);n||(n={},Bs.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(Bh);var YW=Bh,Us=YW,JW=SyntaxError,lE=typeof StopIteration=="object"?StopIteration:null,XW=function(t){if(!lE)throw new JW("this environment lacks StopIteration");Us.set(t,"[[Done]]",!1);var r={next:function(){var i=Us.get(this,"[[Iterator]]"),a=Us.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Us.set(i,"[[Done]]",!0),o!==lE)throw o;return{done:!0,value:void 0}}}};return Us.set(r,"[[Iterator]]",t),r},QW={}.toString,uE=Array.isArray||function(e){return QW.call(e)=="[object Array]"},eH=String.prototype.valueOf,tH=function(t){try{return eH.call(t),!0}catch{return!1}},rH=Object.prototype.toString,nH="[object String]",iH=ea(),cE=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:iH?tH(t):rH.call(t)===nH},Uh=typeof Map=="function"&&Map.prototype?Map:null,aH=typeof Set=="function"&&Set.prototype?Set:null,sc;Uh||(sc=function(t){return!1});var fE=Uh?Map.prototype.has:null,dE=aH?Set.prototype.has:null;!sc&&!fE&&(sc=function(t){return!1});var pE=sc||function(t){if(!t||typeof t!="object")return!1;try{if(fE.call(t),dE)try{dE.call(t)}catch{return!0}return t instanceof Uh}catch{}return!1},oH=typeof Map=="function"&&Map.prototype?Map:null,zh=typeof Set=="function"&&Set.prototype?Set:null,lc;zh||(lc=function(t){return!1});var hE=oH?Map.prototype.has:null,mE=zh?Set.prototype.has:null;!lc&&!mE&&(lc=function(t){return!1});var vE=lc||function(t){if(!t||typeof t!="object")return!1;try{if(mE.call(t),hE)try{hE.call(t)}catch{return!0}return t instanceof zh}catch{}return!1},yE=sE,gE=XW;if(np()||iu()){var Wh=Symbol.iterator;ac.exports=function(t){if(t!=null&&typeof t[Wh]<"u")return t[Wh]();if(yE(t))return Array.prototype[Wh].call(t)}}else{var sH=uE,lH=cE,bE=mn,uH=bE("%Map%",!0),cH=bE("%Set%",!0),Qr=jr,wE=Qr("Array.prototype.push"),xE=Qr("String.prototype.charCodeAt"),fH=Qr("String.prototype.slice"),dH=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=xE(t,r);if(i<55296||i>56319)return r+1;var a=xE(t,r+1);return a<56320||a>57343?r+1:r+2},Hh=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},SE=function(t,r){if(sH(t)||yE(t))return Hh(t);if(lH(t)){var n=0;return{next:function(){var a=dH(t,n),o=fH(t,n,a);return n=a,{done:a>t.length,value:o}}}}if(r&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!uH&&!cH)ac.exports=function(t){if(t!=null)return SE(t,!0)};else{var pH=pE,hH=vE,EE=Qr("Map.prototype.forEach",!0),_E=Qr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var kE=Qr("Map.prototype.iterator",!0),$E=Qr("Set.prototype.iterator",!0);var OE=Qr("Map.prototype.@@iterator",!0)||Qr("Map.prototype._es6-shim iterator_",!0),TE=Qr("Set.prototype.@@iterator",!0)||Qr("Set.prototype._es6-shim iterator_",!0),mH=function(t){if(pH(t)){if(kE)return gE(kE(t));if(OE)return OE(t);if(EE){var r=[];return EE(t,function(i,a){wE(r,[a,i])}),Hh(r)}}if(hH(t)){if($E)return gE($E(t));if(TE)return TE(t);if(_E){var n=[];return _E(t,function(i){wE(n,i)}),Hh(n)}}};ac.exports=function(t){return mH(t)||SE(t)}}}var vH=ac.exports,CE=function(e){return e!==e},IE=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||CE(t)&&CE(r))},yH=IE,RE=function(){return typeof Object.is=="function"?Object.is:yH},gH=RE,bH=Qi,wH=function(){var t=gH();return bH(Object,{is:t},{is:function(){return Object.is!==t}}),t},xH=Qi,SH=Ia,EH=IE,AE=RE,_H=wH,PE=SH(AE(),Object);xH(PE,{getPolyfill:AE,implementation:EH,shim:_H});var kH=PE,$H=Ia,NE=jr,OH=mn,Vh=OH("%ArrayBuffer%",!0),uc=NE("ArrayBuffer.prototype.byteLength",!0),TH=NE("Object.prototype.toString"),DE=!!Vh&&!uc&&new Vh(0).slice,jE=!!DE&&$H(DE),ME=uc||jE?function(t){if(!t||typeof t!="object")return!1;try{return uc?uc(t):jE(t,0),!0}catch{return!1}}:Vh?function(t){return TH(t)==="[object ArrayBuffer]"}:function(t){return!1},CH=Date.prototype.getDay,IH=function(t){try{return CH.call(t),!0}catch{return!1}},RH=Object.prototype.toString,AH="[object Date]",PH=ea(),NH=function(t){return typeof t!="object"||t===null?!1:PH?IH(t):RH.call(t)===AH},qh=jr,LE=ea(),FE,BE,Zh,Kh;if(LE){FE=qh("Object.prototype.hasOwnProperty"),BE=qh("RegExp.prototype.exec"),Zh={};var Gh=function(){throw Zh};Kh={toString:Gh,valueOf:Gh},typeof Symbol.toPrimitive=="symbol"&&(Kh[Symbol.toPrimitive]=Gh)}var DH=qh("Object.prototype.toString"),jH=Object.getOwnPropertyDescriptor,MH="[object RegExp]",LH=LE?function(t){if(!t||typeof t!="object")return!1;var r=jH(t,"lastIndex"),n=r&&FE(r,"value");if(!n)return!1;try{BE(t,Kh)}catch(i){return i===Zh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:DH(t)===MH},FH=jr,UE=FH("SharedArrayBuffer.prototype.byteLength",!0),BH=UE?function(t){if(!t||typeof t!="object")return!1;try{return UE(t),!0}catch{return!1}}:function(t){return!1},UH=Number.prototype.toString,zH=function(t){try{return UH.call(t),!0}catch{return!1}},WH=Object.prototype.toString,HH="[object Number]",VH=ea(),qH=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:VH?zH(t):WH.call(t)===HH},zE=jr,ZH=zE("Boolean.prototype.toString"),KH=zE("Object.prototype.toString"),GH=function(t){try{return ZH(t),!0}catch{return!1}},YH="[object Boolean]",JH=ea(),XH=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:JH&&Symbol.toStringTag in t?GH(t):KH(t)===YH},Yh={exports:{}},QH=Object.prototype.toString,eV=np();if(eV){var tV=Symbol.prototype.toString,rV=/^Symbol\(.*\)$/,nV=function(t){return typeof t.valueOf()!="symbol"?!1:rV.test(tV.call(t))};Yh.exports=function(t){if(typeof t=="symbol")return!0;if(QH.call(t)!=="[object Symbol]")return!1;try{return nV(t)}catch{return!1}}}else Yh.exports=function(t){return!1};var iV=Yh.exports,Jh={exports:{}},WE=typeof BigInt<"u"&&BigInt,aV=function(){return typeof WE=="function"&&typeof BigInt=="function"&&typeof WE(42)=="bigint"&&typeof BigInt(42)=="bigint"},oV=aV();if(oV){var sV=BigInt.prototype.valueOf,lV=function(t){try{return sV.call(t),!0}catch{}return!1};Jh.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:lV(t)}}else Jh.exports=function(t){return!1};var uV=Jh.exports,cV=cE,fV=qH,dV=XH,pV=iV,hV=uV,mV=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(cV(t))return"String";if(fV(t))return"Number";if(dV(t))return"Boolean";if(pV(t))return"Symbol";if(hV(t))return"BigInt"},cc=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,HE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,fc;cc||(fc=function(t){return!1});var Xh=cc?cc.prototype.has:null,Qh=HE?HE.prototype.has:null;!fc&&!Xh&&(fc=function(t){return!1});var vV=fc||function(t){if(!t||typeof t!="object")return!1;try{if(Xh.call(t,Xh),Qh)try{Qh.call(t,Qh)}catch{return!0}return t instanceof cc}catch{}return!1},em={exports:{}},yV=mn,VE=jr,gV=yV("%WeakSet%",!0),tm=VE("WeakSet.prototype.has",!0);if(tm){var rm=VE("WeakMap.prototype.has",!0);em.exports=function(t){if(!t||typeof t!="object")return!1;try{if(tm(t,tm),rm)try{rm(t,rm)}catch{return!0}return t instanceof gV}catch{}return!1}}else em.exports=function(t){return!1};var bV=em.exports,wV=pE,xV=vE,SV=vV,EV=bV,_V=function(t){if(t&&typeof t=="object"){if(wV(t))return"Map";if(xV(t))return"Set";if(SV(t))return"WeakMap";if(EV(t))return"WeakSet"}return!1},qE=Function.prototype.toString,Ya=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,nm,dc;if(typeof Ya=="function"&&typeof Object.defineProperty=="function")try{nm=Object.defineProperty({},"length",{get:function(){throw dc}}),dc={},Ya(function(){throw 42},null,nm)}catch(e){e!==dc&&(Ya=null)}else Ya=null;var kV=/^\s*class\b/,im=function(t){try{var r=qE.call(t);return kV.test(r)}catch{return!1}},am=function(t){try{return im(t)?!1:(qE.call(t),!0)}catch{return!1}},pc=Object.prototype.toString,$V="[object Object]",OV="[object Function]",TV="[object GeneratorFunction]",CV="[object HTMLAllCollection]",IV="[object HTML document.all class]",RV="[object HTMLCollection]",AV=typeof Symbol=="function"&&!!Symbol.toStringTag,PV=!(0 in[,]),om=function(){return!1};if(typeof document=="object"){var NV=document.all;pc.call(NV)===pc.call(document.all)&&(om=function(t){if((PV||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=pc.call(t);return(r===CV||r===IV||r===RV||r===$V)&&t("")==null}catch{}return!1})}var DV=Ya?function(t){if(om(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Ya(t,null,nm)}catch(r){if(r!==dc)return!1}return!im(t)&&am(t)}:function(t){if(om(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(AV)return am(t);if(im(t))return!1;var r=pc.call(t);return r!==OV&&r!==TV&&!/^\[object HTML/.test(r)?!1:am(t)},jV=DV,MV=Object.prototype.toString,ZE=Object.prototype.hasOwnProperty,LV=function(t,r,n){for(var i=0,a=t.length;i<a;i++)ZE.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},FV=function(t,r,n){for(var i=0,a=t.length;i<a;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},BV=function(t,r,n){for(var i in t)ZE.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},UV=function(t,r,n){if(!jV(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),MV.call(t)==="[object Array]"?LV(t,r,i):typeof t=="string"?FV(t,r,i):BV(t,r,i)},zV=UV,WV=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],sm=WV,HV=typeof globalThis>"u"?ct:globalThis,VV=function(){for(var t=[],r=0;r<sm.length;r++)typeof HV[sm[r]]=="function"&&(t[t.length]=sm[r]);return t},hc=zV,qV=VV,KE=Ia,lm=jr,mc=up,ZV=lm("Object.prototype.toString"),GE=ea(),YE=typeof globalThis>"u"?ct:globalThis,um=qV(),cm=lm("String.prototype.slice"),fm=Object.getPrototypeOf,KV=lm("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},vc={__proto__:null};GE&&mc&&fm?hc(um,function(e){var t=new YE[e];if(Symbol.toStringTag in t){var r=fm(t),n=mc(r,Symbol.toStringTag);if(!n){var i=fm(r);n=mc(i,Symbol.toStringTag)}vc["$"+e]=KE(n.get)}}):hc(um,function(e){var t=new YE[e],r=t.slice||t.set;r&&(vc["$"+e]=KE(r))});var GV=function(t){var r=!1;return hc(vc,function(n,i){if(!r)try{"$"+n(t)===i&&(r=cm(i,1))}catch{}}),r},YV=function(t){var r=!1;return hc(vc,function(n,i){if(!r)try{n(t),r=cm(i,1)}catch{}}),r},JV=function(t){if(!t||typeof t!="object")return!1;if(!GE){var r=cm(ZV(t),8,-1);return KV(um,r)>-1?r:r!=="Object"?!1:YV(t)}return mc?GV(t):null},XV=jr,JE=XV("ArrayBuffer.prototype.byteLength",!0),QV=ME,eq=function(t){return QV(t)?JE?JE(t):t.byteLength:NaN},XE=wW,$n=jr,QE=HW,tq=mn,Ja=vH,rq=$p,e_=kH,t_=sE,r_=uE,n_=ME,i_=NH,a_=LH,o_=BH,s_=Mh,l_=mV,u_=_V,c_=JV,f_=eq,d_=$n("SharedArrayBuffer.prototype.byteLength",!0),p_=$n("Date.prototype.getTime"),dm=Object.getPrototypeOf,h_=$n("Object.prototype.toString"),yc=tq("%Set%",!0),pm=$n("Map.prototype.has",!0),gc=$n("Map.prototype.get",!0),m_=$n("Map.prototype.size",!0),bc=$n("Set.prototype.add",!0),v_=$n("Set.prototype.delete",!0),wc=$n("Set.prototype.has",!0),xc=$n("Set.prototype.size",!0);function y_(e,t,r,n){for(var i=Ja(e),a;(a=i.next())&&!a.done;)if(en(t,a.value,r,n))return v_(e,a.value),!0;return!1}function g_(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function nq(e,t,r,n,i,a){var o=g_(r);if(o!=null)return o;var s=gc(t,o),u=XE({},i,{strict:!1});return typeof s>"u"&&!pm(t,o)||!en(n,s,u,a)?!1:!pm(e,o)&&en(n,s,u,a)}function iq(e,t,r){var n=g_(r);return n??(wc(t,n)&&!wc(e,n))}function b_(e,t,r,n,i,a){for(var o=Ja(e),s,u;(s=o.next())&&!s.done;)if(u=s.value,en(r,u,i,a)&&en(n,gc(t,u),i,a))return v_(e,u),!0;return!1}function en(e,t,r,n){var i=r||{};if(i.strict?e_(e,t):e===t)return!0;var a=l_(e),o=l_(t);if(a!==o)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?e_(e,t):e==t;var s=n.has(e),u=n.has(t),l;if(s&&u){if(n.get(e)===n.get(t))return!0}else l={};return s||n.set(e,l),u||n.set(t,l),sq(e,t,i,n)}function w_(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function aq(e,t,r,n){if(xc(e)!==xc(t))return!1;for(var i=Ja(e),a=Ja(t),o,s,u;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")u||(u=new yc),bc(u,o.value);else if(!wc(t,o.value)){if(r.strict||!iq(e,t,o.value))return!1;u||(u=new yc),bc(u,o.value)}if(u){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!y_(u,s.value,r.strict,n))return!1}else if(!r.strict&&!wc(e,s.value)&&!y_(u,s.value,r.strict,n))return!1;return xc(u)===0}return!0}function oq(e,t,r,n){if(m_(e)!==m_(t))return!1;for(var i=Ja(e),a=Ja(t),o,s,u,l,c,f;(o=i.next())&&!o.done;)if(l=o.value[0],c=o.value[1],l&&typeof l=="object")u||(u=new yc),bc(u,l);else if(f=gc(t,l),typeof f>"u"&&!pm(t,l)||!en(c,f,r,n)){if(r.strict||!nq(e,t,l,c,r,n))return!1;u||(u=new yc),bc(u,l)}if(u){for(;(s=a.next())&&!s.done;)if(l=s.value[0],f=s.value[1],l&&typeof l=="object"){if(!b_(u,e,l,f,r,n))return!1}else if(!r.strict&&(!e.has(l)||!en(gc(e,l),f,r,n))&&!b_(u,e,l,f,XE({},r,{strict:!1}),n))return!1;return xc(u)===0}return!0}function sq(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||h_(e)!==h_(t)||t_(e)!==t_(t))return!1;var o=r_(e),s=r_(t);if(o!==s)return!1;var u=e instanceof Error,l=t instanceof Error;if(u!==l||(u||l)&&(e.name!==t.name||e.message!==t.message))return!1;var c=a_(e),f=a_(t);if(c!==f||(c||f)&&(e.source!==t.source||QE(e)!==QE(t)))return!1;var d=i_(e),p=i_(t);if(d!==p||(d||p)&&p_(e)!==p_(t)||r.strict&&dm&&dm(e)!==dm(t))return!1;var h=c_(e),m=c_(t);if(h!==m)return!1;if(h||m){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var g=w_(e),v=w_(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var b=n_(e),y=n_(t);if(b!==y)return!1;if(b||y)return f_(e)!==f_(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);var k=o_(e),S=o_(t);if(k!==S)return!1;if(k||S)return d_(e)!==d_(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);if(typeof e!=typeof t)return!1;var E=s_(e),$=s_(t);if(E.length!==$.length)return!1;for(E.sort(),$.sort(),i=E.length-1;i>=0;i--)if(E[i]!=$[i])return!1;for(i=E.length-1;i>=0;i--)if(a=E[i],!en(e[a],t[a],r,n))return!1;var M=u_(e),z=u_(t);return M!==z?!1:M==="Set"||z==="Set"?aq(e,t,r,n):M==="Map"?oq(e,t,r,n):!0}var lq=function(t,r,n){return en(t,r,n,rq())};const uq=Ze(lq),cq=({children:e,...t})=>{const r=N.useRef(),n=N.useRef(null),i=t6({...t,messageContainerRef:n});return r.current||(r.current=i),C.jsx(VS.Provider,{value:{...t.configuration},children:C.jsx(US.Provider,{value:r.current,children:C.jsx(fq,{children:e})})})},fq=({children:e})=>{const t=Me(y=>y.client),r=Me(y=>y.addMessage),n=Me(y=>y.setMessages),i=Me(y=>y.configuration),a=Me(y=>y.setConnected),o=Me(y=>y.userData),s=Me(y=>y.userName),u=Me(y=>y.userPictureUrl),l=Me(y=>y.setIsTyping),c=Me(y=>y.getMessages),f=Me(y=>y.setHeaderMessage),d=Me(y=>y.setDisableComposer),p=$r(y=>y.setConversationId),h=$r(y=>y.user),m=$r(y=>y.conversationId),g=$r(y=>y.setUser),[v,b]=N.useState(0);return N.useEffect(()=>{if(t)return t.on("messageSent",y=>{const k=c(),S=k[k.length-1];(k.length===0||!uq(S==null?void 0:S.block,_o(y).payload))&&r({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:_o(y).payload,disableInput:!1})})},[m]),N.useEffect(()=>{if(t)return t.on("message",y=>{try{const{payload:k,disableInput:S,conversationId:E,sentOn:$,...M}=y;if(m!==E)return;l(!1,0),r({...M,direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date($),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),N.useEffect(()=>{if(t)return t.on("conversation",y=>{p(y)})},[]),th(async()=>{if(t)return t.on("error",y=>{console.error("Connection Error",y),b(k=>k+1)})}),th(async()=>{if(!t||m&&t.conversationId===m)return;let y;try{f("Connecting..."),d(!0),y=await Y9(()=>t.connect(h,o,{name:s,pictureUrl:u}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),d(!1),a(!0)}catch(S){console.warn(S),f("Connection failed. Please try again later."),a(!1);return}g(y),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:E,authorId:$,sentOn:M,disableInput:z,...O}=S,D=$===t.userId?"outgoing":"incoming";k.push({...O,direction:D,sender:D==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(M),block:E,disableInput:z})}catch{console.error("Invalid message payload")}return n(k.reverse()),()=>{t.disconnect()}},[v,m]),C.jsx(C.Fragment,{children:e})};function Kn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function dq(e,t){const r=x.createContext(t),n=a=>{const{children:o,...s}=a,u=x.useMemo(()=>s,Object.values(s));return C.jsx(r.Provider,{value:u,children:o})};n.displayName=e+"Provider";function i(a){const o=x.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function x_(e,t=[]){let r=[];function n(a,o){const s=x.createContext(o),u=r.length;r=[...r,o];const l=f=>{var v;const{scope:d,children:p,...h}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[u])||s,g=x.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:g,children:p})};l.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[u])||s,h=x.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=r.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[n,pq(i,...t)]}function pq(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var hq=x.useId||(()=>{}),mq=0;function Sc(e){const[t,r]=x.useState(hq());return fa(()=>{e||r(n=>n??String(mq++))},[e]),e||(t?`radix-${t}`:"")}function S_({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=vq({defaultProp:t,onChange:r}),a=e!==void 0,o=a?e:n,s=ti(r),u=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,u]}function vq({defaultProp:e,onChange:t}){const r=x.useState(e),[n]=r,i=x.useRef(n),a=ti(t);return x.useEffect(()=>{i.current!==n&&(a(n),i.current=n)},[n,i,a]),r}function yq(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var gq="DismissableLayer",hm="dismissableLayer.update",bq="dismissableLayer.pointerDownOutside",wq="dismissableLayer.focusOutside",E_,__=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k_=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=x.useContext(__),[c,f]=x.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),h=ri(t,$=>f($)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),b=c?m.indexOf(c):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,k=b>=v,S=Eq($=>{const M=$.target,z=[...l.branches].some(O=>O.contains(M));!k||z||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},d),E=_q($=>{const M=$.target;[...l.branches].some(O=>O.contains(M))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},d);return yq($=>{b===l.layers.size-1&&(n==null||n($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},d),x.useEffect(()=>{if(c)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(E_=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),$_(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=E_)}},[c,d,r,l]),x.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),$_())},[c,l]),x.useEffect(()=>{const $=()=>p({});return document.addEventListener(hm,$),()=>document.removeEventListener(hm,$)},[]),C.jsx(dr.div,{...u,ref:h,style:{pointerEvents:y?k?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,S.onPointerDownCapture)})});k_.displayName=gq;var xq="DismissableLayerBranch",Sq=x.forwardRef((e,t)=>{const r=x.useContext(__),n=x.useRef(null),i=ri(t,n);return x.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),C.jsx(dr.div,{...e,ref:i})});Sq.displayName=xq;function Eq(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let u=function(){O_(bq,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _q(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e),n=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!n.current&&O_(wq,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function $_(){const e=new CustomEvent(hm);document.dispatchEvent(e)}function O_(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?fR(i,a):i.dispatchEvent(a)}var mm="focusScope.autoFocusOnMount",vm="focusScope.autoFocusOnUnmount",T_={bubbles:!1,cancelable:!0},kq="FocusScope",C_=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=x.useState(null),l=ti(i),c=ti(a),f=x.useRef(null),d=ri(t,m=>u(m)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let m=function(y){if(p.paused||!s)return;const k=y.target;s.contains(k)?f.current=k:$i(f.current,{select:!0})},g=function(y){if(p.paused||!s)return;const k=y.relatedTarget;k!==null&&(s.contains(k)||$i(f.current,{select:!0}))},v=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&$i(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,s,p.paused]),x.useEffect(()=>{if(s){A_.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(mm,T_);s.addEventListener(mm,l),s.dispatchEvent(v),v.defaultPrevented||($q(Rq(I_(s)),{select:!0}),document.activeElement===m&&$i(s))}return()=>{s.removeEventListener(mm,l),setTimeout(()=>{const v=new CustomEvent(vm,T_);s.addEventListener(vm,c),s.dispatchEvent(v),v.defaultPrevented||$i(m??document.body,{select:!0}),s.removeEventListener(vm,c),A_.remove(p)},0)}}},[s,l,c,p]);const h=x.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){const b=m.currentTarget,[y,k]=Oq(b);y&&k?!m.shiftKey&&v===k?(m.preventDefault(),r&&$i(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&$i(k,{select:!0})):v===b&&m.preventDefault()}},[r,n,p.paused]);return C.jsx(dr.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});C_.displayName=kq;function $q(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if($i(n,{select:t}),document.activeElement!==r)return}function Oq(e){const t=I_(e),r=R_(t,e),n=R_(t.reverse(),e);return[r,n]}function I_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function R_(e,t){for(const r of e)if(!Tq(r,{upTo:t}))return r}function Tq(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 Cq(e){return e instanceof HTMLInputElement&&"select"in e}function $i(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cq(e)&&t&&e.select()}}var A_=Iq();function Iq(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=P_(e,t),e.unshift(t)},remove(t){var r;e=P_(e,t),(r=e[0])==null||r.resume()}}}function P_(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Rq(e){return e.filter(t=>t.tagName!=="A")}function Aq(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var Ec=e=>{const{present:t,children:r}=e,n=Pq(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),a=ri(n.ref,Nq(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:a}):null};Ec.displayName="Presence";function Pq(e){const[t,r]=x.useState(),n=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,u]=Aq(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=_c(n.current);a.current=s==="mounted"?l:"none"},[s]),fa(()=>{const l=n.current,c=i.current;if(c!==e){const d=a.current,p=_c(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),fa(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const m=_c(n.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=p=>{p.target===t&&(a.current=_c(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function _c(e){return(e==null?void 0:e.animationName)||"none"}function Nq(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ym=0;function Dq(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??N_()),document.body.insertAdjacentElement("beforeend",e[1]??N_()),ym++,()=>{ym===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ym--}},[])}function N_(){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 kc="right-scroll-bar-position",$c="width-before-scroll-bar",jq="with-scroll-bars-hidden",Mq="--removed-body-scroll-bar-size";function gm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lq(e,t){var r=N.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var Fq=typeof window<"u"?x.useLayoutEffect:x.useEffect,D_=new WeakMap;function Bq(e,t){var r=Lq(null,function(n){return e.forEach(function(i){return gm(i,n)})});return Fq(function(){var n=D_.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;i.forEach(function(s){a.has(s)||gm(s,null)}),a.forEach(function(s){i.has(s)||gm(s,o)})}D_.set(r,e)},[e]),r}function Uq(e){return e}function zq(e,t){t===void 0&&(t=Uq);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(a),o=r}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),r={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),r}}}};return i}function Wq(e){e===void 0&&(e={});var t=zq(null);return t.options=Lr({async:!0,ssr:!1},e),t}var j_=function(e){var t=e.sideCar,r=TS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return x.createElement(n,Lr({},r))};j_.isSideCarExport=!0;function Hq(e,t){return e.useMedium(t),j_}var M_=Wq(),bm=function(){},Oc=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:bm,onWheelCapture:bm,onTouchMoveCapture:bm}),i=n[0],a=n[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,b=e.gapMode,y=TS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=Bq([r,t]),E=Lr(Lr({},y),i);return x.createElement(x.Fragment,null,c&&x.createElement(k,{sideCar:M_,removeScrollBar:l,shards:f,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:r,gapMode:b}),o?x.cloneElement(x.Children.only(s),Lr(Lr({},E),{ref:S})):x.createElement(v,Lr({},E,{className:u,ref:S}),s))});Oc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Oc.classNames={fullWidth:$c,zeroRight:kc};var Vq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Vq();return t&&e.setAttribute("nonce",t),e}function Zq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Kq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gq=function(){var e=0,t=null;return{add:function(r){e==0&&(t=qq())&&(Zq(t,r),Kq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yq=function(){var e=Gq();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},L_=function(){var e=Yq(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Jq={left:0,top:0,right:0,gap:0},wm=function(e){return parseInt(e||"",10)||0},Xq=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[wm(r),wm(n),wm(i)]},Qq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jq;var t=Xq(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},e8=L_(),Xa="data-scroll-locked",t8=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
285
|
-
.`.concat(
|
|
283
|
+
`);const y=v.state[s];if(y==null)return;JSON.stringify(i.getState())!==JSON.stringify(y)&&p(y);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(m.payload.type){case"RESET":return p(h),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Wu(l.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Wu(l.name));case"ROLLBACK":return uh(m.state,v=>{if(s===void 0){p(v),c==null||c.init(i.getState());return}p(v[s]),c==null||c.init(Wu(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return uh(m.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}=m.payload,y=(g=v.computedStates.slice(-1)[0])==null?void 0:g.state;if(!y)return;p(s===void 0?y:y[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),h},uh=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function Qz(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const o=l=>l===null?null:JSON.parse(l,void 0),s=(a=r.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const Is=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Is(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Is(n)(r)}}}},e6=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,v)=>({...v,...g}),...t},o=!1;const s=new Set,l=new Set;let u;try{u=a.getStorage()}catch{}if(!u)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...g)},n,i);const c=Is(a.serialize),f=()=>{const g=a.partialize({...n()});let v;const y=c({state:g,version:a.version}).then(b=>u.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return y},d=i.setState;i.setState=(g,v)=>{d(g,v),f()};const p=e((...g)=>{r(...g),f()},n,i);let h;const m=()=>{var g;if(!u)return;o=!1,s.forEach(y=>y(n()));const v=((g=a.onRehydrateStorage)==null?void 0:g.call(a,n()))||void 0;return Is(u.getItem.bind(u))(a.name).then(y=>{if(y)return a.deserialize(y)}).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==a.version){if(a.migrate)return a.migrate(y.state,y.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return y.state}).then(y=>{var b;return h=a.merge(y,(b=n())!=null?b:p),r(h,!0),f()}).then(()=>{v==null||v(h,void 0),o=!0,l.forEach(y=>y(h))}).catch(y=>{v==null||v(void 0,y)})};return i.persist={setOptions:g=>{a={...a,...g},g.getStorage&&(u=g.getStorage())},clearStorage:()=>{u==null||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},m(),h||p},t6=(e,t)=>(r,n,i)=>{let a={storage:Qz(()=>localStorage),partialize:m=>m,version:0,merge:(m,g)=>({...g,...m}),...t},o=!1;const s=new Set,l=new Set;let u=a.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...m)},n,i);const c=()=>{const m=a.partialize({...n()});return u.setItem(a.name,{state:m,version:a.version})},f=i.setState;i.setState=(m,g)=>{f(m,g),c()};const d=e((...m)=>{r(...m),c()},n,i);i.getInitialState=()=>d;let p;const h=()=>{var m,g;if(!u)return;o=!1,s.forEach(y=>{var b;return y((b=n())!=null?b:d)});const v=((g=a.onRehydrateStorage)==null?void 0:g.call(a,(m=n())!=null?m:d))||void 0;return Is(u.getItem.bind(u))(a.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==a.version){if(a.migrate)return[!0,a.migrate(y.state,y.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var b;const[k,S]=y;if(p=a.merge(S,(b=n())!=null?b:d),r(p,!0),k)return c()}).then(()=>{v==null||v(p,void 0),p=n(),o=!0,l.forEach(y=>y(p))}).catch(y=>{v==null||v(void 0,y)})};return i.persist={setOptions:m=>{a={...a,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u==null||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},a.skipHydration||h(),p||d},r6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((zu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),e6(e,t)):t6(e,t),$r=Jz()(zS(r6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:r,message:n})=>e(i=>({...i,messageHistory:{...i.messageHistory,[r]:[n,...(i.messageHistory[r]??[]).slice(0,100)]}})),clientMode:"",setClientMode:r=>{const{clearAll:n,clientMode:i}=t();i!==r&&n(),e(a=>({...a,clientMode:r}))},setUser:r=>e(n=>({...n,user:r})),setConversationId:r=>e(n=>({...n,conversationId:r})),clearAll:()=>{e(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),WS=j.createContext(null),n6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,i=$r.getState().setClientMode,a=$r.getState().setConversationId;return r&&i(r.mode),j.useEffect(()=>{n&&a(n)},[n]),AS()(zS((o,s)=>{const l=f=>{const d=$r.getState().conversationId;if(d)return o(p=>{const h=p.messages[d]??[];return{...p,messages:{...p.messages,[d]:[...h.filter(m=>m.id!==f.id),{id:So(),...f}]}}})},u=f=>{const d=$r.getState().conversationId;if(d)return o(p=>({...p,messages:{...p.messages,[d]:f}}))},c=$r.getState().addMessageToHistory;return{...t,...e,eventEmitter:NR,client:r,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const d=s().client;l({id:So(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),d&&await d.sendMessage({type:"text",text:f}),d!=null&&d.userId&&c({message:f,userId:d.userId})},sendMessage:async f=>{const d=s().client;l({id:So(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:_o(f).payload}),d&&await d.sendMessage(f),d!=null&&d.userId&&f.type==="text"&&c({message:f.text,userId:d.userId})},on:(f,d)=>{const p=s().client;return p?p.on(f,d):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>o({headerMessage:f}),setDisableComposer:f=>o({disableComposer:f}),setState:f=>o(d=>({...d,...f})),setMessages:u,getMessages:()=>s().messages[$r.getState().conversationId??""]??[],setIsTyping:(f,d)=>{o(p=>({...p,isTyping:f})),f&&(o(p=>({...p,lastTypingHeartbeat:new Date})),d&&setTimeout(()=>{const p=s().lastTypingHeartbeat;p&&new Date().getTime()-p.getTime()>d&&o(h=>({...h,isTyping:!1}))},d+100))},setLastTypingHeartbeat:f=>o(d=>({...d,lastTypingHeartbeat:f})),addMessage:l,setConnected:f=>o(d=>({...d,connected:f})),restartConversation:async()=>{const f=s().client,d=s().setMessages;f&&(await f.newConversation(),d([]))}}},{name:"webchatStore"}))};function Me(e){const t=j.useContext(WS);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return US(t,e)}const i6=({text:e,buttonValue:t,type:r,variant:n,groupId:i,reusable:a,...o})=>{const s=Me(y=>y.eventEmitter),l=Me(y=>y.sendTextMessage),u=Me(y=>y.isReadOnly),[c,f]=j.useState(!1),[d,p]=j.useState(!1),[h,m]=j.useState(!1),{message:{blocks:{button:g}}}=gt;j.useEffect(()=>{if(i)return s.on(`button-group-${i}-click`,()=>{p(!0),a||m(!0)})},[s,i,a]);function v(){i&&s.emit(`button-group-${i}-click`),f(!0),a||m(!0),n!=="link"&&l(t)}return C.jsx(a6,{...o,variant:n,onClick:v,disabled:h||u,"data-activated":c?"":void 0,"data-group-activated":d?"":void 0,"data-type":n,value:t,...g,children:e})},a6=e=>{if(e.variant==="link"){const{value:n,variant:i,...a}=e;return C.jsx("a",{...a,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return C.jsx("button",{type:"button",...r})},o6=j.forwardRef(({block:e,type:t,direction:r,timestamp:n,sender:i,metadata:a,...o},s)=>{const{message:{blocks:{bubble:l}}}=gt;return C.jsx("div",{...o,...l,ref:s,children:C.jsx(Ga,{direction:r,timestamp:n,sender:i,block:e,metadata:a})})}),HS=j.createContext(null);function s6(){const e=j.useContext(HS);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const VS=j.createContext(null);function qS(){const e=j.useContext(VS);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const ZS=j.createContext(null);function KS(){const e=j.useContext(ZS);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const l6=j.forwardRef(({url:e,type:t,orientation:r="auto",...n},i)=>{const a=j.useId(),{setIsLoading:o}=s6(),[s,l]=j.useState(r),[u,c]=j.useState(!1),{message:{blocks:{image:f}}}=gt;return j.useLayoutEffect(()=>{o(d=>[...d,a])},[]),rh(async()=>{if(e&&s==="auto"){try{const{width:d,height:p}=await U4(e);l(u6(d,p))}catch(d){l("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),C.jsxs(C.Fragment,{children:[u?null:C.jsx("div",{"data-orientation":s,...f.placeholder}),C.jsx("img",{"data-orientation":s,"data-loaded":u,...n,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});function u6(e,t){const r={square:1,portrait:.75,landscape:1.3333333333333333},n=e/t;return Object.keys(r).reduce((a,o)=>Math.abs(r[o]-n)<Math.abs(r[a]-n)?o:a)}const c6=j.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:i}}}=gt;return C.jsx("div",{children:C.jsx("video",{...r,controls:!0,src:e,...i,ref:n})})}),f6=j.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:i}}}=gt;return C.jsx("div",{children:C.jsx("audio",{...r,controls:!0,src:e,...i,ref:n})})});function d6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const p6=x.forwardRef(d6);function h6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 m6=x.forwardRef(h6);function v6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 y6=x.forwardRef(v6);function g6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 b6=x.forwardRef(g6);function w6({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 x6=x.forwardRef(w6),S6=j.forwardRef(({type:e,latitude:t,longitude:r,title:n,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${r}`,{message:{blocks:{location:s}}}=gt;return C.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[C.jsx("p",{...s.title,children:n}),C.jsx(x6,{...s.icon})]})}),E6=j.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,direction:i,sender:a,timestamp:o,metadata:s,...l},u)=>{const{message:{blocks:{column:c}}}=gt;return C.jsx("div",{"data-horizontal":r,"data-vertical":n,...l,...c,ref:u,children:e.map((f,d)=>C.jsx(Ga,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})}),_6=j.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,direction:i,sender:a,timestamp:o,metadata:s,...l},u)=>{const{message:{blocks:{row:c}}}=gt;return C.jsx("div",{"data-horizontal":r,"data-vertical":n,...l,...c,ref:u,children:e.map((f,d)=>C.jsx(Ga,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})});function k6(e){return Object.prototype.toString.call(e)==="[object Object]"}function GS(e){return k6(e)||Array.isArray(e)}function $6(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ch(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:r.every(o=>{const s=e[o],l=t[o];return typeof s=="function"?`${s}`==`${l}`:!GS(s)||!GS(l)?s===l:ch(s,l)})}function YS(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function O6(e,t){if(e.length!==t.length)return!1;const r=YS(e),n=YS(t);return r.every((i,a)=>{const o=n[a];return ch(i,o)})}function fh(e){return typeof e=="number"}function JS(e){return typeof e=="string"}function dh(e){return typeof e=="boolean"}function XS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ot(e){return Math.abs(e)}function ph(e){return Math.sign(e)}function Hu(e,t){return Ot(e-t)}function T6(e,t){if(e===0||t===0||Ot(e)<=Ot(t))return 0;const r=Hu(Ot(e),Ot(t));return Ot(r/e)}function Rs(e){return qu(e).map(Number)}function Vn(e){return e[Vu(e)]}function Vu(e){return Math.max(0,e.length-1)}function qu(e){return Object.keys(e)}function QS(e,t){return[e,t].reduce((r,n)=>(qu(n).forEach(i=>{const a=r[i],o=n[i],s=XS(a)&&XS(o);r[i]=s?QS(a,o):o}),r),{})}function e1(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function C6(e,t){const r={start:n,center:i,end:a};function n(){return 0}function i(u){return a(u)/2}function a(u){return t-u}function o(){return t*Number(e)}function s(u){return fh(e)?o():r[e](u)}return{measure:s}}function I6(e,t){const r=e==="y"?"y":"x",n=e==="y"?"x":"y",i=s(),a=l();function o(c){const{width:f,height:d}=c;return r==="x"?f:d}function s(){return r==="y"?"top":t==="rtl"?"right":"left"}function l(){return r==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:r,cross:n,startEdge:i,endEdge:a,measureSize:o}}function Si(e,t){const r=Ot(e-t);function n(u){return u<e}function i(u){return u>t}function a(u){return n(u)||i(u)}function o(u){return a(u)?n(u)?e:t:u}function s(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:n,removeOffset:s}}function t1(e,t,r){const{constrain:n}=Si(0,e),i=e+1;let a=o(t);function o(d){return r?Ot((i+d)%i):n(d)}function s(){return a}function l(d){return a=o(d),f}function u(d){return c().set(s()+d)}function c(){return t1(e,s(),r)}const f={get:s,set:l,add:u,clone:c};return f}function R6(e){const t=e==="rtl"?-1:1;function r(i){return i*t}return{apply:r}}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)),n}function r(){e=e.filter(i=>i())}const n={add:t,clear:r};return n}function A6(e,t,r,n,i,a,o,s,l,u,c,f,d,p,h,m,g,v,y){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},_=As(),$=As(),N=Si(50,225).constrain(h.measure(20)),z={mouse:300,touch:400},O={mouse:500,touch:600},D=m?43:25;let H=!1,L=0,W=0,M=!1,I=!1,V=!1,U=!1;function A(Q,K){if(!K)return;function de(Ce){(dh(K)||K(Q,Ce))&&oe(Ce)}const ve=r;_.add(ve,"dragstart",Ce=>Ce.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){_.clear(),$.clear()}function F(){const Q=U?n:r;$.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function Z(Q){const K=Q.nodeName||"";return k.includes(K)}function E(){return(m?O:z)[U?"mouse":"touch"]}function Y(Q,K){const de=d.add(ph(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||Ot(Q)<N?ve:v&&K?ve*.5:f.byIndex(de.get(),0).distance}function oe(Q){const K=e1(Q,i);U=K,!(K&&Q.button!==0)&&(Z(Q.target)||(V=m&&K&&!Q.buttons&&H,H=Hu(a.get(),s.get())>=2,M=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),F(),L=o.readPoint(Q),W=o.readPoint(Q,b),p.emit("pointerDown")))}function re(Q){const K=o.readPoint(Q),de=o.readPoint(Q,b),ve=Hu(K,L),Ce=Hu(de,W);if(!I&&!U&&(!Q.cancelable||(I=ve>Ce,!I)))return le(Q);const R=o.pointerMove(Q);ve>g&&(V=!0),c.useFriction(.3).useDuration(1),l.start(),a.add(t.apply(R)),Q.preventDefault()}function le(Q){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(Q)*E(),Ce=Y(t.apply(ve),de),R=T6(ve,Ce),J=D-10*R,ae=y+R/50;I=!1,M=!1,$.clear(),c.useDuration(J).useFriction(ae),u.distance(Ce,!m),U=!1,p.emit("pointerUp")}function pe(Q){V&&(Q.stopPropagation(),Q.preventDefault())}function he(){return M}return{init:A,pointerDown:he,destroy:w}}function P6(e,t){let n,i;function a(f){return f.timeStamp}function o(f,d){const h=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(e1(f,t)?f:f.touches[0])[h]}function s(f){return n=f,i=f,o(f)}function l(f){const d=o(f)-o(i),p=a(f)-a(n)>170;return i=f,p&&(n=f),d}function u(f){if(!n||!i)return 0;const d=o(i)-o(n),p=a(f)-a(n),h=a(f)-a(i)>170,m=d/p;return p&&!h&&Ot(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:o}}function N6(e){function t(n){return e*(n/100)}return{measure:t}}function D6(e,t,r,n,i){let a,o,s=[],l=!1;function u(p){return i.measureSize(p.getBoundingClientRect())}function c(p,h){if(!h)return;o=u(e),s=n.map(u);function m(v){for(const y of v){const b=y.target===e,k=n.indexOf(y.target),S=b?o:s[k],_=u(b?e:n[k]);if(S!==_){r.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{l||(dh(h)||h(p,v))&&m(v)}),[e].concat(n).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),l=!0}return{init:c,destroy:f}}function j6(e,t,r,n){let i=!0,a=0,o=0,s=r,l=n,u=e.get(),c=0;function f(){const S=t.get()-e.get(),_=!s;let $=0;return _?(a=0,e.set(t),$=S):(a+=S/s,a*=l,u+=a,e.add(a),$=u-c),o=ph($),c=u,i=Ot(S)<.001,k}function d(){return i}function p(){return s}function h(){return o}function m(){return a}function g(){return y(r)}function v(){return b(n)}function y(S){return s=S,k}function b(S){return l=S,k}const k={direction:h,duration:p,velocity:m,seek:f,settled:d,useBaseFriction:v,useBaseDuration:g,useFriction:b,useDuration:y};return k}function M6(e,t,r,n,i){const a=i.measure(10),o=i.measure(50),s=Si(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;const h=e.reachedMin(t.get())?"min":"max",m=Ot(e[h]-t.get()),g=r.get()-t.get(),v=s.constrain(m/o);r.subtract(g*v),!p&&Ot(g)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function f(p){l=!p}return{constrain:c,toggleActive:f}}function L6(e,t,r,n){const i=Si(-t+e,r[0]),a=l(),o=u();function s(){const f=a[0],d=Vn(a),p=a.lastIndexOf(f),h=a.indexOf(d)+1;return Si(p,h)}function l(){return r.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function u(){if(t<=e)return[i.max];if(n==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function F6(e,t,r){const n=t[0],i=r?n-e:Vn(t);return{limit:Si(i,n)}}function B6(e,t,r,n){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:l}=Si(a,o);function u(d){return d===1?l(r.get()):d===-1?s(r.get()):!1}function c(d){if(!u(d))return;const p=e*(d*-1);n.forEach(h=>h.add(p))}return{loop:c}}function U6(e){const{max:t,length:r}=e;function n(a){return(a-t)/-r}return{get:n}}function z6(e,t,r,n,i,a,o){const{startEdge:s,endEdge:l}=e,{groupSlides:u}=a,c=p().map(t.measure),f=h(),d=m();function p(){return u(n).map(v=>Vn(v)[l]-v[0][s]).map(Ot)}function h(){return n.map(v=>r[s]-v[s]).map(v=>-Ot(v))}function m(){const y=Vn(f)-Vn(i);return u(f).map(b=>b[0]).map((b,k,S)=>{const _=!k,$=k===Vu(S);return o&&_?0:o&&$?y:b+c[k]})}return{snaps:f,snapsAligned:d}}function W6(e,t,r,n,i){const{reachedAny:a,removeOffset:o,constrain:s}=n;function l(h){return h.concat().sort((m,g)=>Ot(m)-Ot(g))[0]}function u(h){const m=e?o(h):s(h),g=t.map(y=>y-m).map(y=>c(y,0)).map((y,b)=>({diff:y,index:b})).sort((y,b)=>Ot(y.diff)-Ot(b.diff)),{index:v}=g[0];return{index:v,distance:m}}function c(h,m){const g=[h,h+r,h-r];if(!e)return g[0];if(!m)return l(g);const v=g.filter(y=>ph(y)===m);return l(v)}function f(h,m){const g=t[h]-i.get(),v=c(g,m);return{index:h,distance:v}}function d(h,m){const g=i.get()+h,{index:v,distance:y}=u(g),b=!e&&a(g);if(!m||b)return{index:v,distance:h};const k=t[v]-y,S=h+c(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:c}}function H6(e,t,r,n,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&&(r.set(t.get()),t.set(f.index),o.emit("select"))}function l(f,d){const p=n.byDistance(f,d);s(p)}function u(f,d){const p=t.clone().set(f),h=n.byIndex(p.get(),d);s(h)}return{distance:l,index:u}}function Zu(e){let t=e;function r(){return t}function n(l){t=o(l)}function i(l){t+=o(l)}function a(l){t-=o(l)}function o(l){return fh(l)?l:l.get()}return{get:r,set:n,add:i,subtract:a}}function r1(e,t,r){const n=e.scroll==="x"?o:s,i=r.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function l(d){a||(i.transform=n(t.apply(d)))}function u(d){a=!d}function c(){a||(i.transform="",r.getAttribute("style")||r.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function V6(e,t,r,n,i,a,o,s,l){const u=Rs(i),c=Rs(i).reverse(),f=m().concat(g());function d(S,_){return S.reduce(($,N)=>$-i[N],_)}function p(S,_){return S.reduce(($,N)=>d($,_)>0?$.concat([N]):$,[])}function h(S,_){const $=_==="start",N=$?-n:n,z=o.findSlideBounds([N]);return S.map(O=>{const D=$?0:-n,H=$?n:0,W=z.filter(M=>M.index===O)[0][$?"end":"start"];return{index:O,slideLocation:Zu(-1),translate:r1(e,t,l[O]),target:()=>s.get()>W?D:H}})}function m(){const S=a[0]-1,_=p(c,S);return h(_,"end")}function g(){const S=r-a[0]-1,_=p(u,S);return h(_,"start")}function v(){return f.every(({index:S})=>{const _=u.filter($=>$!==S);return d(_,r)<=.1})}function y(){f.forEach(S=>{const{target:_,translate:$,slideLocation:N}=S,z=_();z!==N.get()&&($.to(z),N.set(z))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:y,loopPoints:f}}function q6(e,t){let r,n=!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}}r=new MutationObserver(c=>{n||(dh(l)||l(s,c))&&u(c)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),n=!0}return{init:i,destroy:a}}function Z6(e,t,r,n,i,a,o){const{removeOffset:s,constrain:l}=i,u=.5,c=a?[0,t,-t]:[0],f=p(c,o);function d(g){const v=g||0;return r.map(y=>Si(u,y-u).constrain(y*v))}function p(g,v){const y=g||c,b=d(v);return y.reduce((k,S)=>{const _=n.map(($,N)=>({start:$-r[N]+b[N]+S,end:$+e-b[N]+S,index:N}));return k.concat(_)},[])}function h(g,v){const y=a?s(g):l(g);return(v||f).reduce((k,S)=>{const{index:_,start:$,end:N}=S,z=k.includes(_),O=$<y&&N>y;return!z&&O?k.concat([_]):k},[])}return{check:h,findSlideBounds:p}}function K6(e,t,r,n,i,a){const{measureSize:o,startEdge:s,endEdge:l}=e,u=r[0]&&i,c=h(),f=m(),d=r.map(o),p=g();function h(){if(!u)return 0;const y=r[0];return Ot(t[s]-y[s])}function m(){if(!u)return 0;const y=a.getComputedStyle(Vn(n));return parseFloat(y.getPropertyValue(`margin-${l}`))}function g(){return r.map((y,b,k)=>{const S=!b,_=b===Vu(k);return S?d[b]+c:_?d[b]+f:k[b+1][s]-y[s]}).map(Ot)}return{slideSizes:d,slideSizesWithGaps:p}}function G6(e,t,r){const n=fh(r);function i(l,u){return Rs(l).filter(c=>c%u===0).map(c=>l.slice(c,c+u))}function a(l){return Rs(l).reduce((u,c)=>{const d=t.slice(Vn(u),c+1).reduce((p,h)=>p+h,0);return!c||d>e?u.concat(c):u},[]).map((u,c,f)=>l.slice(u,f[c+1]))}function o(l){return n?i(l,r):a(l)}return{groupSlides:o}}function Y6(e,t,r,n,i,a,o,s){const{align:l,axis:u,direction:c,startIndex:f,inViewThreshold:d,loop:p,duration:h,dragFree:m,dragThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b}=a,k=t.getBoundingClientRect(),S=r.map(ae=>ae.getBoundingClientRect()),_=R6(c),$=I6(u,c),N=$.measureSize(k),z=N6(N),O=C6(l,N),D=!p&&!!b,H=p||!!b,{slideSizes:L,slideSizesWithGaps:W}=K6($,k,S,r,H,i),M=G6(N,W,v),{snaps:I,snapsAligned:V}=z6($,O,k,S,W,M,D),U=-Vn(I)+Vn(W),{snapsContained:A}=L6(N,U,V,b),w=D?A:V,{limit:F}=F6(U,w,p),Z=t1(Vu(w),f,p),E=Z.clone(),Y=Rs(r),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:xe,animation:Re,options:{loop:qe}})=>{const Ae=ae.pointerDown();qe||ke.constrain(Ae);const Be=ee.seek().settled();Be&&!Ae&&(Re.stop(),xe.emit("settle")),Be||xe.emit("scroll")},re=({scrollBody:ae,translate:ee,location:ke,offsetLocation:xe,scrollLooper:Re,slideLooper:qe,options:{loop:Ae}},Be)=>{const B=ae.velocity();xe.set(ke.get()-B+B*Be),Ae&&(Re.loop(ae.direction()),qe.loop()),ee.to(xe.get())},le={start:()=>s.start(J),stop:()=>s.stop(J),update:()=>oe(J),render:ae=>re(J,ae)},pe=.68,he=w[Z.get()],ue=Zu(he),Q=Zu(he),K=Zu(he),de=j6(ue,K,h,pe),ve=W6(p,w,U,F,K),Ce=H6(le,Z,E,ve,de,K,o),R=Z6(N,U,L,I,F,p,d),J={ownerDocument:n,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:$,direction:_,dragHandler:A6($,_,e,n,i,K,P6($,i),ue,le,Ce,de,ve,Z,o,z,m,g,y,pe),eventStore:As(),percentOfView:z,index:Z,indexPrevious:E,limit:F,location:ue,offsetLocation:Q,options:a,resizeHandler:D6(t,o,i,r,$),scrollBody:de,scrollBounds:M6(F,ue,K,de,z),scrollLooper:B6(U,F,Q,[ue,Q,K]),scrollProgress:U6(F),scrollSnaps:w,scrollTarget:ve,scrollTo:Ce,slideLooper:V6($,_,N,U,W,w,R,Q,r),slidesHandler:q6(t,o),slidesInView:R,slideIndexes:Y,slidesToScroll:M,target:K,translate:r1($,_,t)};return J}function J6(e){const t=16.666666666666668;let r=[],n=null,i=0,a=0;function o(f){n||(n=f);const d=f-n;for(n=f,i+=d;i>=t;)r.forEach(({animation:h})=>h.update()),i-=t;const p=Ot(i/t);r.forEach(({animation:h})=>h.render(p)),a&&e.requestAnimationFrame(o)}function s(f){r.includes(f)||r.push(f),!a&&(a=e.requestAnimationFrame(o))}function l(f){r=r.filter(d=>d!==f),!r.length&&(e.cancelAnimationFrame(a),n=null,i=0,a=0)}function u(){n=null,i=0}return{start:s,stop:l,reset:u,window:e}}function X6(){const e={};let t;function r(l){t=l}function n(l){return e[l]||[]}function i(l){return n(l).forEach(u=>u(t,l)),s}function a(l,u){return e[l]=n(l).concat([u]),s}function o(l,u){return e[l]=n(l).filter(c=>c!==u),s}const s={init:r,emit:i,off:o,on:a};return s}const Q6={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 e7(e){function t(a,o){return QS(a,o||{})}function r(a){const o=a.breakpoints||{},s=qu(o).filter(l=>e.matchMedia(l).matches).map(l=>o[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function n(a){return a.map(o=>qu(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function t7(e){let t=[];function r(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Ha(e,t,r){const n=e.ownerDocument,i=n.defaultView,a=e7(i),o=t7(a),s=As(),l=As(),u=X6(),{animationRealms:c}=Ha,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:h,off:m,emit:g}=u,v=L;let y=!1,b,k=f(Q6,Ha.globalOptions),S=f(k),_=[],$,N,z;function O(){const{container:de,slides:ve}=S;N=(JS(de)?e.querySelector(de):de)||e.children[0];const R=JS(ve)?N.querySelectorAll(ve):ve;z=[].slice.call(R||N.children)}function D(de,ve){const Ce=Y6(e,N,z,n,i,de,u,ve);if(de.loop&&!Ce.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return D(R,ve)}return Ce}function H(de,ve){if(y)return;const Ce=c.find(J=>J.window===i),R=Ce||J6(i);Ce||c.push(R),k=f(k,de),S=d(k),_=ve||_,O(),b=D(S,R),p([k,..._.map(({options:J})=>J)]).forEach(J=>s.add(J,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(K),b.resizeHandler.init(K,S.watchResize),b.slidesHandler.init(K,S.watchSlides),l.add(n,"visibilitychange",()=>{n.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),N.offsetParent&&z.length&&b.dragHandler.init(K,S.watchDrag),$=o.init(_,K))}function L(de,ve){const Ce=oe();W(),H(f({startIndex:Ce},de),ve),u.emit("reInit")}function W(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),o.destroy(),s.clear(),l.clear()}function M(){y||(y=!0,s.clear(),W(),u.emit("destroy"))}function I(de){const ve=b[de?"target":"location"].get(),Ce=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ce](ve))}function V(de){const ve=I(de);return b.slideIndexes.filter(Ce=>!ve.includes(Ce))}function U(de,ve,Ce){!S.active||y||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,Ce||0))}function A(de){const ve=b.index.add(1).get();U(ve,de===!0,-1)}function w(de){const ve=b.index.add(-1).get();U(ve,de===!0,1)}function F(){return b.index.add(1).get()!==oe()}function Z(){return b.index.add(-1).get()!==oe()}function E(){return b.scrollSnaps.map(b.scrollProgress.get)}function Y(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return $}function pe(){return b}function he(){return e}function ue(){return N}function Q(){return z}const K={canScrollNext:F,canScrollPrev:Z,containerNode:ue,internalEngine:pe,destroy:M,off:m,on:h,emit:g,plugins:le,previousScrollSnap:re,reInit:v,rootNode:he,scrollNext:A,scrollPrev:w,scrollProgress:Y,scrollSnapList:E,scrollTo:U,selectedScrollSnap:oe,slideNodes:Q,slidesInView:I,slidesNotInView:V};return H(t,r),setTimeout(()=>u.emit("init"),0),K}Ha.animationRealms=[],Ha.globalOptions=void 0;function hh(e={},t=[]){const r=j.useRef(e),n=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),l=j.useCallback(()=>{i&&i.reInit(r.current,n.current)},[i]);return j.useEffect(()=>{if($6()&&o){Ha.globalOptions=hh.globalOptions;const u=Ha(o,r.current,n.current);return a(u),()=>u.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{ch(r.current,e)||(r.current=e,l())},[e,l]),j.useEffect(()=>{O6(n.current,t)||(n.current=t,l())},[t,l]),[s,i]}hh.globalOptions=void 0;function r7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 n7=x.forwardRef(r7);function i7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 a7=x.forwardRef(i7);function o7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 s7=x.forwardRef(o7);function l7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 u7=x.forwardRef(l7);function c7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 f7=x.forwardRef(c7);function d7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 p7=x.forwardRef(d7);function h7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 m7=x.forwardRef(h7);function v7({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 y7=x.forwardRef(v7),g7=j.forwardRef(({blocks:e,direction:t,sender:r,timestamp:n,metadata:i},a)=>{const[o,s]=hh({skipSnaps:!0}),[l,u]=j.useState(!0),[c,f]=j.useState(!0),d=j.useCallback(()=>s==null?void 0:s.scrollPrev(),[s]),p=j.useCallback(()=>s==null?void 0:s.scrollNext(),[s]),{message:{blocks:{carousel:h}}}=gt,m=j.useCallback(g=>{u(!g.canScrollPrev()),f(!g.canScrollNext())},[]);return j.useEffect(()=>{s&&(m(s),s.on("reInit",m),s.on("select",m))},[s,m]),C.jsxs("div",{...h==null?void 0:h.container,"data-container":"carousel",ref:o,children:[C.jsx("div",{ref:a,...h==null?void 0:h.slidesContainer,children:e.map((g,v)=>C.jsx(Ga,{block:g,direction:t,sender:r,timestamp:n,metadata:i},v))}),C.jsx(a7,{...h==null?void 0:h.backButton,"data-disabled":l?"":void 0,onClick:d}),C.jsx(s7,{...h==null?void 0:h.nextButton,"data-disabled":c?"":void 0,onClick:p})]})}),n1=Math.floor;function i1(e){return a1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ps(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function b7(e){var t;return(t=(a1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function a1(e){return e instanceof Node||e instanceof Ps(e).Node}function Fr(e){return e instanceof Element||e instanceof Ps(e).Element}function Va(e){return e instanceof HTMLElement||e instanceof Ps(e).HTMLElement}function mh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ps(e).ShadowRoot}function w7(e){return["html","body","#document"].includes(i1(e))}function x7(e){return Ps(e).getComputedStyle(e)}function S7(e){if(i1(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mh(e)&&e.host||b7(e);return mh(t)?t.host:t}function Ei(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function vr(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&mh(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function o1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function s1(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(o1())||t.test(E7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function l1(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 u1(){return/apple/i.test(navigator.vendor)}function _7(){return o1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function c1(e,t){return["mouse","pen"].includes(e)}function k7(e){return"nativeEvent"in e}function $7(e){return e.matches("html,body")}function Xr(e){return(e==null?void 0:e.ownerDocument)||document}function vh(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function f1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const O7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function d1(e){return Va(e)&&e.matches(O7)}function Yt(e){e.preventDefault(),e.stopPropagation()}const yh="ArrowUp",Ku="ArrowDown",qa="ArrowLeft",Ns="ArrowRight";function Gu(e,t,r){return Math.floor(e/t)!==r}function Ds(e,t){return t<0||t>=e.current.length}function gh(e,t){return ir(e,{disabledIndices:t})}function p1(e,t){return ir(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ir(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=r;do{var l,u;s=s+(n?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(l=o[s])!=null&&l.hasAttribute("disabled")||((u=o[s])==null?void 0:u.getAttribute("aria-disabled"))==="true"));return s}function T7(e,t){let{event:r,orientation:n,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:l,prevIndex:u,stopEvent:c=!1}=t,f=u;if(r.key===yh){if(c&&Yt(r),u===-1)f=l;else if(f=ir(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(u-a<s||f<0)){const d=u%a,p=l%a,h=l-(p-d);p===d?f=l:f=p>d?h:h-a}Ds(e,f)&&(f=u)}if(r.key===Ku&&(c&&Yt(r),u===-1?f=s:(f=ir(e,{startingIndex:u,amount:a,disabledIndices:o}),i&&u+a>l&&(f=ir(e,{startingIndex:u%a-a,amount:a,disabledIndices:o}))),Ds(e,f)&&(f=u)),n==="both"){const d=n1(u/a);r.key===Ns&&(c&&Yt(r),u%a!==a-1?(f=ir(e,{startingIndex:u,disabledIndices:o}),i&&Gu(f,a,d)&&(f=ir(e,{startingIndex:u-u%a-1,disabledIndices:o}))):i&&(f=ir(e,{startingIndex:u-u%a-1,disabledIndices:o})),Gu(f,a,d)&&(f=u)),r.key===qa&&(c&&Yt(r),u%a!==0?(f=ir(e,{startingIndex:u,disabledIndices:o,decrement:!0}),i&&Gu(f,a,d)&&(f=ir(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:o}))):i&&(f=ir(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:o})),Gu(f,a,d)&&(f=u));const p=n1(l/a)===d;Ds(e,f)&&(i&&p?f=r.key===qa?l:ir(e,{startingIndex:u-u%a-1,disabledIndices:o}):f=u)}return f}let h1=0;function qn(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(h1);const a=()=>e==null?void 0:e.focus({preventScroll:r});i?a():h1=requestAnimationFrame(a)}var Ft=typeof document<"u"?j.useLayoutEffect:j.useEffect;function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yu.apply(this,arguments)}let bh=!1,C7=0;const m1=()=>"floating-ui-"+C7++;function I7(){const[e,t]=x.useState(()=>bh?m1():void 0);return Ft(()=>{e==null&&t(m1())},[]),x.useEffect(()=>{bh||(bh=!0)},[]),e}const wh=x.useId||I7;function R7(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(i=>i!==r))||[])}}}const A7=x.createContext(null),P7=x.createContext(null),v1=()=>{var e;return((e=x.useContext(A7))==null?void 0:e.id)||null},Ju=()=>x.useContext(P7);function js(e){return"data-floating-ui-"+e}function _i(e){const t=j.useRef(e);return Ft(()=>{t.current=e}),t}function N7(e,t){var r;let n=[],i=(r=e.find(a=>a.id===t))==null?void 0:r.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function Za(e,t){let r=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),n=r;for(;n.length;)n=e.filter(i=>{var a;return(a=n)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),r=r.concat(n);return r}function D7(e,t){let r,n=-1;function i(a,o){o>n&&(r=a,n=o),Za(e,a).forEach(l=>{i(l.id,o+1)})}return i(t,0),e.find(a=>a.id===r)}let Ka=new WeakMap,Xu=new WeakSet,Qu={},xh=0;const j7=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,y1=e=>e&&(e.host||y1(e.parentNode)),M7=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=y1(r);return e.contains(n)?n:null}).filter(r=>r!=null);function L7(e,t,r,n){const i="data-floating-ui-inert",a=n?"inert":r?"aria-hidden":null,o=M7(t,e),s=new Set,l=new Set(o),u=[];Qu[i]||(Qu[i]=new WeakMap);const c=Qu[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||l.has(p)||Array.prototype.forEach.call(p.children,h=>{if(s.has(h))d(h);else{const m=a?h.getAttribute(a):null,g=m!==null&&m!=="false",v=(Ka.get(h)||0)+1,y=(c.get(h)||0)+1;Ka.set(h,v),c.set(h,y),u.push(h),v===1&&g&&Xu.add(h),y===1&&h.setAttribute(i,""),!g&&a&&h.setAttribute(a,"true")}})}return xh++,()=>{u.forEach(p=>{const h=(Ka.get(p)||0)-1,m=(c.get(p)||0)-1;Ka.set(p,h),c.set(p,m),h||(!Xu.has(p)&&a&&p.removeAttribute(a),Xu.delete(p)),m||p.removeAttribute(i)}),xh--,xh||(Ka=new WeakMap,Ka=new WeakMap,Xu=new WeakSet,Qu={})}}function g1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Xr(e[0]).body;return L7(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const Sh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function b1(e,t){const r=Jp(e,Sh());t==="prev"&&r.reverse();const n=r.indexOf(Ei(Xr(e)));return r.slice(n+1)[0]}function w1(){return b1(document.body,"next")}function x1(){return b1(document.body,"prev")}function Ms(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!vr(r,n)}function F7(e){Jp(e,Sh()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function B7(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const Eh={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 U7;function S1(e){e.key==="Tab"&&(e.target,clearTimeout(U7))}const ec=x.forwardRef(function(t,r){const[n,i]=x.useState();Ft(()=>(u1()&&i("button"),document.addEventListener("keydown",S1),()=>{document.removeEventListener("keydown",S1)}),[]);const a={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[js("focus-guard")]:"",style:Eh};return x.createElement("span",Yu({},t,a))}),E1=x.createContext(null);function z7(e){let{id:t,root:r}=e===void 0?{}:e;const[n,i]=x.useState(null),a=wh(),o=_1(),s=x.useMemo(()=>({id:t,root:r,portalContext:o,uniqueId:a}),[t,r,o,a]),l=x.useRef();return Ft(()=>()=>{n==null||n.remove()},[n,s]),Ft(()=>{if(l.current===s)return;l.current=s;const{id:u,root:c,portalContext:f,uniqueId:d}=s,p=u?document.getElementById(u):null,h=js("portal");if(p){const m=document.createElement("div");m.id=d,m.setAttribute(h,""),p.appendChild(m),i(m)}else{let m=c||(f==null?void 0:f.portalNode);m&&!Fr(m)&&(m=m.current),m=m||document.body;let g=null;u&&(g=document.createElement("div"),g.id=u,m.appendChild(g));const v=document.createElement("div");v.id=d,v.setAttribute(h,""),m=g||m,m.appendChild(v),i(v)}},[s]),n}function W7(e){let{children:t,id:r,root:n=null,preserveTabOrder:i=!0}=e;const a=z7({id:r,root:n}),[o,s]=x.useState(null),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),f=x.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(n||a);return x.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(h){a&&Ms(h)&&(h.type==="focusin"?B7:F7)(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(E1.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&x.createElement(ec,{"data-type":"outside",ref:l,onFocus:p=>{if(Ms(p,a)){var h;(h=c.current)==null||h.focus()}else{const m=x1()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus()}}}),d&&a&&x.createElement("span",{"aria-owns":a.id,style:Eh}),a&&Di.createPortal(t,a),d&&a&&x.createElement(ec,{"data-type":"outside",ref:u,onFocus:p=>{if(Ms(p,a)){var h;(h=f.current)==null||h.focus()}else{const m=w1()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const _1=()=>x.useContext(E1),H7=x.forwardRef(function(t,r){return x.createElement("button",Yu({},t,{type:"button",ref:r,tabIndex:-1,style:Eh}))});function V7(e){const{context:t,children:r,disabled:n=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:h,events:m,dataRef:g,elements:{domReference:v,floating:y}}=t,b=j7()?a:!0,k=_i(i),S=_i(o),_=_i(s),$=Ju(),N=_1(),z=typeof o=="number"&&o<0,O=x.useRef(null),D=x.useRef(null),H=x.useRef(!1),L=x.useRef(null),W=x.useRef(!1),M=N!=null,I=v&&v.getAttribute("role")==="combobox"&&d1(v)&&z,V=x.useCallback(function(F){return F===void 0&&(F=y),F?Jp(F,Sh()):[]},[y]),U=x.useCallback(F=>{const Z=V(F);return k.current.map(E=>v&&E==="reference"?v:y&&E==="floating"?y:Z).filter(Boolean).flat()},[v,y,k,V]);x.useEffect(()=>{if(n||!l)return;function F(E){if(E.key==="Tab"){vr(y,Ei(Xr(y)))&&V().length===0&&!I&&Yt(E);const Y=U(),oe=f1(E);k.current[0]==="reference"&&oe===v&&(Yt(E),E.shiftKey?qn(Y[Y.length-1]):qn(Y[1])),k.current[1]==="floating"&&oe===y&&E.shiftKey&&(Yt(E),qn(Y[0]))}}const Z=Xr(y);return Z.addEventListener("keydown",F),()=>{Z.removeEventListener("keydown",F)}},[n,v,y,l,k,d,I,V,U]),x.useEffect(()=>{if(n||!c)return;function F(){W.current=!0,setTimeout(()=>{W.current=!1})}function Z(E){const Y=E.relatedTarget;queueMicrotask(()=>{const oe=!(vr(v,Y)||vr(y,Y)||vr(Y,y)||vr(N==null?void 0:N.portalNode,Y)||Y!=null&&Y.hasAttribute(js("focus-guard"))||$&&(Za($.nodesRef.current,p).find(re=>{var le,pe;return vr((le=re.context)==null?void 0:le.elements.floating,Y)||vr((pe=re.context)==null?void 0:pe.elements.domReference,Y)})||N7($.nodesRef.current,p).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===Y||((pe=re.context)==null?void 0:pe.elements.domReference)===Y})));Y&&oe&&!W.current&&Y!==L.current&&(H.current=!0,h(!1,E))})}if(y&&Va(v))return v.addEventListener("focusout",Z),v.addEventListener("pointerdown",F),!l&&y.addEventListener("focusout",Z),()=>{v.removeEventListener("focusout",Z),v.removeEventListener("pointerdown",F),!l&&y.removeEventListener("focusout",Z)}},[n,v,y,l,p,$,N,h,c]),x.useEffect(()=>{var F;if(n)return;const Z=Array.from((N==null||(F=N.portalNode)==null?void 0:F.querySelectorAll("["+js("portal")+"]"))||[]);if(y){const E=[y,...Z,O.current,D.current,k.current.includes("reference")||I?v:null].filter(oe=>oe!=null),Y=l?g1(E,b,!b):g1(E);return()=>{Y()}}},[n,v,y,l,k,N,I,b]),Ft(()=>{if(n||!y)return;const F=Xr(y),Z=Ei(F);queueMicrotask(()=>{const E=U(y),Y=S.current,oe=(typeof Y=="number"?E[Y]:Y.current)||y,re=vr(y,Z);!z&&!re&&f&&qn(oe,{preventScroll:oe===y})})},[n,f,y,z,U,S]),Ft(()=>{if(n||!y)return;let F=!1;const Z=Xr(y),E=Ei(Z),Y=g.current;L.current=E;function oe(re){if(re.type==="escapeKey"&&d.domReference.current&&(L.current=d.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(H.current=!1,F=le.preventScroll):H.current=!le}return m.on("dismiss",oe),()=>{m.off("dismiss",oe);const re=Ei(Z);(vr(y,re)||$&&Za($.nodesRef.current,p).some(pe=>{var he;return vr((he=pe.context)==null?void 0:he.elements.floating,re)})||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&d.domReference.current&&(L.current=d.domReference.current),_.current&&Va(L.current)&&!H.current&&qn(L.current,{cancelPrevious:!1,preventScroll:F})}},[n,y,_,g,d,m,$,p]),Ft(()=>{if(!(n||!N))return N.setFocusManagerState({modal:l,closeOnFocusOut:c,open:f,onOpenChange:h,refs:d}),()=>{N.setFocusManagerState(null)}},[n,N,l,f,h,d,c]),Ft(()=>{if(!n&&y&&typeof MutationObserver=="function"&&!z){const F=()=>{const E=y.getAttribute("tabindex");k.current.includes("floating")||Ei(Xr(y))!==d.domReference.current&&V().length===0?E!=="0"&&y.setAttribute("tabindex","0"):E!=="-1"&&y.setAttribute("tabindex","-1")};F();const Z=new MutationObserver(F);return Z.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{Z.disconnect()}}},[n,y,d,k,V,z]);function A(F){return n||!u||!l?null:x.createElement(H7,{ref:F==="start"?O:D,onClick:Z=>h(!1,Z.nativeEvent)},typeof u=="string"?u:"Dismiss")}const w=!n&&b&&!I&&(M||l);return x.createElement(x.Fragment,null,w&&x.createElement(ec,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:F=>{if(l){const E=U();qn(i[0]==="reference"?E[0]:E[E.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(H.current=!1,Ms(F,N.portalNode)){const E=w1()||v;E==null||E.focus()}else{var Z;(Z=N.beforeOutsideRef.current)==null||Z.focus()}}}),!I&&A("start"),r,A("end"),w&&x.createElement(ec,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:F=>{if(l)qn(U()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(c&&(H.current=!0),Ms(F,N.portalNode)){const E=x1()||v;E==null||E.focus()}else{var Z;(Z=N.afterOutsideRef.current)==null||Z.focus()}}}))}function k1(e){return Va(e.target)&&e.target.tagName==="BUTTON"}function $1(e){return d1(e)}function q7(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!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&&(c1(f.current)&&u||s!=="click"&&(r&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?n(!1,p.nativeEvent):(p.preventDefault(),n(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}c1(f.current)&&u||(r&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?n(!1,p.nativeEvent):n(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!c||k1(p))&&(p.key===" "&&!$1(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&n(!(r&&l),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!c||k1(p)||$1(a)||p.key===" "&&d.current&&(d.current=!1,n(!(r&&l),p.nativeEvent))}}}:{},[o,i,s,u,c,a,l,r,n])}const Z7=x.useInsertionEffect||(e=>e());function ki(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Z7(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}const K7={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},G7={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Y7=e=>{var t,r;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function J7(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:v}=t,y=Ju(),b=v1()!=null,k=ki(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,_=x.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:N}=Y7(v),z=ki(D=>{if(!r||!c||!f||D.key!=="Escape")return;const H=y?Za(y.nodesRef.current,a):[];if(!$&&(D.stopPropagation(),H.length>0)){let L=!0;if(H.forEach(W=>{var M;if((M=W.context)!=null&&M.open&&!W.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,k7(D)?D.nativeEvent:D)}),O=ki(D=>{const H=_.current;if(_.current=!1,H||typeof S=="function"&&!S(D))return;const L=f1(D),W="["+js("inert")+"]",M=Xr(l).querySelectorAll(W);let I=Fr(L)?L:null;for(;I&&!w7(I);){const A=S7(I);if(A===Xr(l).body||!Fr(A))break;I=A}if(M.length&&Fr(L)&&!$7(L)&&!vr(L,l)&&Array.from(M).every(A=>!vr(I,A)))return;if(Va(L)&&l){const A=L.clientWidth>0&&L.scrollWidth>L.clientWidth,w=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let F=w&&D.offsetX>L.clientWidth;if(w&&x7(L).direction==="rtl"&&(F=D.offsetX<=L.offsetWidth-L.clientWidth),F||A&&D.offsetY>L.clientHeight)return}const V=y&&Za(y.nodesRef.current,a).some(A=>{var w;return vh(D,(w=A.context)==null?void 0:w.elements.floating)});if(vh(D,l)||vh(D,s)||V)return;const U=y?Za(y.nodesRef.current,a):[];if(U.length>0){let A=!0;if(U.forEach(w=>{var F;if((F=w.context)!=null&&F.open&&!w.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:s1(D)||l1(D)}}),n(!1,D)});return x.useEffect(()=>{if(!r||!c)return;u.current.__escapeKeyBubbles=$,u.current.__outsidePressBubbles=N;function D(W){n(!1,W)}const H=Xr(l);f&&H.addEventListener("keydown",z),S&&H.addEventListener(p,O);let L=[];return g&&(Fr(s)&&(L=wi(s)),Fr(l)&&(L=L.concat(wi(l))),!Fr(o)&&o&&o.contextElement&&(L=L.concat(wi(o.contextElement)))),L=L.filter(W=>{var M;return W!==((M=H.defaultView)==null?void 0:M.visualViewport)}),L.forEach(W=>{W.addEventListener("scroll",D,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",z),S&&H.removeEventListener(p,O),L.forEach(W=>{W.removeEventListener("scroll",D)})}},[u,l,s,o,f,S,p,r,n,g,c,$,N,z,O]),x.useEffect(()=>{_.current=!1},[S,p]),x.useMemo(()=>c?{reference:{onKeyDown:z,[K7[m]]:D=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,D.nativeEvent))}},floating:{onKeyDown:z,[G7[p]]:()=>{_.current=!0}}}:{},[c,i,h,p,m,n,z])}let _h;process.env.NODE_ENV!=="production"&&(_h=new Set);function X7(e){var t;e===void 0&&(e={});const{open:r=!1,onOpenChange:n,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&&!Fr(e.elements.reference)){var o;if(!((o=_h)!=null&&o.has($))){var s;(s=_h)==null||s.add($),console.error($)}}}const[l,u]=x.useState(null),c=((t=e.elements)==null?void 0:t.reference)||l,f=Oz(e),d=Ju(),p=ki(($,N)=>{$&&(m.current.openEvent=N),n==null||n($,N)}),h=x.useRef(null),m=x.useRef({}),g=x.useState(()=>R7())[0],v=wh(),y=x.useCallback($=>{const N=Fr($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(N)},[f.refs]),b=x.useCallback($=>{(Fr($)||$===null)&&(h.current=$,u($)),(Fr(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Fr($))&&f.refs.setReference($)},[f.refs]),k=x.useMemo(()=>({...f.refs,setReference:b,setPositionReference:y,domReference:h}),[f.refs,b,y]),S=x.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),_=x.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:i,floatingId:v,events:g,open:r,onOpenChange:p}),[f,i,v,g,r,p,k,S]);return Ft(()=>{const $=d==null?void 0:d.nodesRef.current.find(N=>N.id===i);$&&($.context=_)}),x.useMemo(()=>({...f,context:_,refs:k,elements:S}),[f,k,S,_])}function kh(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[r]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,l]=o;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var u;(u=n.get(s))==null||u.push(l),i[s]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(c=n.get(s))==null?void 0:c.map(h=>h(...d)).find(h=>h!==void 0)}}}else i[s]=l}),i),{})}}function Q7(e){e===void 0&&(e=[]);const t=e,r=x.useCallback(a=>kh(a,e,"reference"),t),n=x.useCallback(a=>kh(a,e,"floating"),t),i=x.useCallback(a=>kh(a,e,"item"),e.map(a=>a==null?void 0:a.item));return x.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:i}),[r,n,i])}let O1=!1;function tc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function T1(e,t){return tc(t,e===yh||e===Ku,e===qa||e===Ns)}function $h(e,t,r){return tc(t,e===Ku,r?e===qa:e===Ns)||e==="Enter"||e==" "||e===""}function e9(e,t,r){return tc(t,r?e===qa:e===Ns,e===Ku)}function C1(e,t,r){return tc(t,r?e===Ns:e===qa,e===yh)}function t9(e,t){const{open:r,onOpenChange:n,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:l,onNavigate:u=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:h=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:_=1,scrollItemIntoView:$=!0,virtualItemRef:N}=t;process.env.NODE_ENV!=="production"&&(d&&(p||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"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=v1(),O=Ju(),D=ki(u),H=x.useRef(v),L=x.useRef(f??-1),W=x.useRef(null),M=x.useRef(!0),I=x.useRef(D),V=x.useRef(!!o),U=x.useRef(!1),A=x.useRef(!1),w=_i(k),F=_i(r),Z=_i($),[E,Y]=x.useState(),[oe,re]=x.useState(),le=ki(function(ue,Q,K){K===void 0&&(K=!1);const de=ue.current[Q.current];de&&(g?(Y(de.id),O==null||O.events.emit("virtualfocus",de),N&&(N.current=de)):qn(de,{preventScroll:!0,sync:_7()&&u1()?O1||U.current:!1}),requestAnimationFrame(()=>{const ve=Z.current;ve&&de&&(K||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Ft(()=>{document.createElement("div").focus({get preventScroll(){return O1=!0,!1}})},[]),Ft(()=>{c&&(r&&o?H.current&&f!=null&&(A.current=!0,D(f)):V.current&&(L.current=-1,I.current(null)))},[c,r,o,f,D]),Ft(()=>{if(c&&r&&o)if(l==null){if(U.current=!1,f!=null)return;if(V.current&&(L.current=-1,le(s,L)),!V.current&&H.current&&(W.current!=null||H.current===!0&&W.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):(L.current=W.current==null||$h(W.current,S,m)||h?gh(s,w.current):p1(s,w.current),W.current=null,D(L.current))};Q()}}else Ds(s,l)||(L.current=l,le(s,L,A.current),A.current=!1)},[c,r,o,l,f,h,s,S,m,D,le,w]),Ft(()=>{var ue,Q;if(!c||o||!O||g||!V.current)return;const K=O.nodesRef.current,de=(ue=K.find(R=>R.id===z))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=Ei(Xr(o)),Ce=K.some(R=>R.context&&vr(R.context.elements.floating,ve));de&&!Ce&&M.current&&de.focus({preventScroll:!0})},[c,o,O,z,g]),Ft(()=>{if(!c||!O||!g||z)return;function ue(Q){re(Q.id),N&&(N.current=Q)}return O.events.on("virtualfocus",ue),()=>{O.events.off("virtualfocus",ue)}},[c,O,g,z,N]),Ft(()=>{I.current=D,V.current=!!o}),Ft(()=>{r||(W.current=null)},[r]);const pe=l!=null,he=x.useMemo(()=>{function ue(K){if(!r)return;const de=s.current.indexOf(K);de!==-1&&D(de)}return{onFocus(K){let{currentTarget:de}=K;ue(de)},onClick:K=>{let{currentTarget:de}=K;return de.focus({preventScroll:!0})},...y&&{onMouseMove(K){let{currentTarget:de}=K;ue(de)},onPointerLeave(K){let{pointerType:de}=K;!M.current||de==="touch"||(L.current=-1,le(s,L),D(null),g||qn(i.floating.current,{preventScroll:!0}))}}}},[r,i,le,y,s,D,g]);return x.useMemo(()=>{if(!c)return{};const ue=w.current;function Q(R){if(M.current=!1,U.current=!0,!F.current&&R.currentTarget===i.floating.current)return;if(h&&C1(R.key,S,m)){Yt(R),n(!1,R.nativeEvent),Va(a)&&!g&&a.focus();return}const J=L.current,ae=gh(s,ue),ee=p1(s,ue);if(R.key==="Home"&&(Yt(R),L.current=ae,D(L.current)),R.key==="End"&&(Yt(R),L.current=ee,D(L.current)),!(_>1&&(L.current=T7(s,{event:R,orientation:S,loop:p,cols:_,disabledIndices:ue,minIndex:ae,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),D(L.current),S==="both"))&&T1(R.key,S)){if(Yt(R),r&&!g&&Ei(R.currentTarget.ownerDocument)===R.currentTarget){L.current=$h(R.key,S,m)?ae:ee,D(L.current);return}$h(R.key,S,m)?p?L.current=J>=ee?d&&J!==s.current.length?-1:ae:ir(s,{startingIndex:J,disabledIndices:ue}):L.current=Math.min(ee,ir(s,{startingIndex:J,disabledIndices:ue})):p?L.current=J<=ae?d&&J!==-1?s.current.length:ee:ir(s,{startingIndex:J,decrement:!0,disabledIndices:ue}):L.current=Math.max(ae,ir(s,{startingIndex:J,decrement:!0,disabledIndices:ue})),Ds(s,L.current)?D(null):D(L.current)}}function K(R){v==="auto"&&s1(R.nativeEvent)&&(H.current=!0)}function de(R){H.current=v,v==="auto"&&l1(R.nativeEvent)&&(H.current=!0)}const ve=g&&r&&pe&&{"aria-activedescendant":oe||E},Ce=s.current.find(R=>(R==null?void 0:R.id)===E);return{reference:{...ve,onKeyDown(R){M.current=!1;const J=R.key.indexOf("Arrow")===0,ae=e9(R.key,S,m),ee=C1(R.key,S,m),ke=T1(R.key,S),xe=(h?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(g&&r){const Be=O==null?void 0:O.nodesRef.current.find(P=>P.parentId==null),B=O&&Be?D7(O.nodesRef.current,Be.id):null;if(J&&B&&N){const P=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Re,qe;const X=((Re=B.context)==null?void 0:Re.elements.domReference)===R.currentTarget,ce=ee&&!X?(qe=B.context)==null?void 0:qe.elements.domReference:ae?Ce:null;ce&&(Yt(R),ce.dispatchEvent(P),re(void 0))}if(ke&&B.context&&B.context.open&&B.parentId&&R.currentTarget!==B.context.elements.domReference){var Ae;Yt(R),(Ae=B.context.elements.domReference)==null||Ae.dispatchEvent(P);return}}return Q(R)}if(!(!r&&!b&&J)){if(xe&&(W.current=h&&ke?null:R.key),h){ae&&(Yt(R),r?(L.current=gh(s,ue),D(L.current)):n(!0,R.nativeEvent));return}ke&&(f!=null&&(L.current=f),Yt(R),!r&&b?n(!0,R.nativeEvent):Q(R),r&&D(L.current))}},onFocus(){r&&D(null)},onPointerDown:de,onMouseDown:K,onClick:K},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){M.current=!0}},item:he}},[a,i,E,oe,w,F,s,c,S,m,g,r,pe,h,f,b,d,_,p,v,D,n,he,O,N])}function r9(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:i=!0,role:a="dialog"}=t,o=wh();return x.useMemo(()=>{const s={id:n,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?n:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,r,n,o])}function n9(e,t){var r;const{open:n,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=x.useRef(),m=x.useRef(""),g=x.useRef((r=p??o)!=null?r:-1),v=x.useRef(null),y=ki(s),b=ki(l),k=_i(c),S=_i(d);return Ft(()=>{n&&(clearTimeout(h.current),v.current=null,m.current="")},[n]),Ft(()=>{if(n&&m.current===""){var _;g.current=(_=p??o)!=null?_:-1}},[n,p,o]),x.useMemo(()=>{if(!u)return{};function _(z){z?i.current.typing||(i.current.typing=z,b(z)):i.current.typing&&(i.current.typing=z,b(z))}function $(z,O,D){const H=k.current?k.current(O,D):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return H?z.indexOf(H):-1}function N(z){const O=a.current;if(m.current.length>0&&m.current[0]!==" "&&($(O,O,m.current)===-1?_(!1):z.key===" "&&Yt(z)),O==null||S.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;n&&z.key!==" "&&(Yt(z),_(!0)),O.every(W=>{var M,I;return W?((M=W[0])==null?void 0:M.toLocaleLowerCase())!==((I=W[1])==null?void 0:I.toLocaleLowerCase()):!0})&&m.current===z.key&&(m.current="",g.current=v.current),m.current+=z.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=v.current,_(!1)},f);const H=g.current,L=$(O,[...O.slice((H||0)+1),...O.slice(0,(H||0)+1)],m.current);L!==-1?(y(L),v.current=L):z.key!==" "&&(m.current="",_(!1))}return{reference:{onKeyDown:N},floating:{onKeyDown:N,onKeyUp(z){z.key===" "&&_(!1)}}}},[u,n,i,a,f,S,k,y,b])}const i9=({options:e,label:t,reusable:r})=>{var I,V,U,A,w;const n=Me(F=>F.sendTextMessage),i=Me(F=>F.messageContainerRef),a=Me(F=>F.isReadOnly),[o,s]=x.useState(!1),[l,u]=x.useState(null),[c,f]=x.useState(null),{message:{blocks:{dropdown:d}}}=gt,p=e.reduce((F,Z)=>(F[Z.label]=Z.value,F),{}),h=p?Object.keys(p):[],m=F=>{s(c!==null&&!r?!1:F)},{refs:g,floatingStyles:v,context:y}=X7({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:Sz,middleware:[Tz(5),Cz({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),Iz({apply({rects:F,elements:Z,availableHeight:E}){Object.assign(Z.floating.style,{maxHeight:`${E}px`,minWidth:`${F.reference.width}px`})},padding:10})]}),b=x.useRef([]),k=x.useRef(h),S=x.useRef(!1),_=q7(y,{event:"mousedown"}),$=J7(y),N=r9(y,{role:"listbox"}),z=t9(y,{listRef:b,activeIndex:l,selectedIndex:c,onNavigate:u,loop:!0}),O=n9(y,{listRef:k,activeIndex:l,selectedIndex:c,onMatch:o?u:f,onTypingChange(F){S.current=F}}),{getReferenceProps:D,getFloatingProps:H,getItemProps:L}=Q7([$,N,z,O,_]),W=F=>{f(F),h[F]!==void 0&&n(p[h[F]]??""),s(!1)},M=c!==null?h[c]:void 0;return C.jsxs(C.Fragment,{children:[C.jsxs("div",{tabIndex:0,ref:g.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!r?"":void 0,...(I=d.button)==null?void 0:I.container,...D(),children:[C.jsx("span",{...(V=d.button)==null?void 0:V.text,children:M||t||"Select..."}),C.jsx(y6,{...(U=d.button)==null?void 0:U.icon})]}),o&&C.jsx(W7,{children:C.jsx(V7,{context:y,modal:!1,children:C.jsx("div",{ref:g.setFloating,className:(w=(A=d.content)==null?void 0:A.container)==null?void 0:w.className,style:{...v},...H(),children:h.map((F,Z)=>{var E;return C.jsx("div",{ref:Y=>{b.current[Z]=Y},role:"option",tabIndex:Z===l?0:-1,"aria-selected":Z===c&&Z===l,"data-active":Z===l?"":void 0,...(E=d.content)==null?void 0:E.item,...L({onClick(){a||W(Z)},onKeyDown(Y){a||(Y.key==="Enter"&&(Y.preventDefault(),W(Z)),Y.key===" "&&!S.current&&(Y.preventDefault(),W(Z)))}}),children:F},F)})})})})]})},a9=j.forwardRef(({type:e,title:t,url:r,...n},i)=>{const{message:{blocks:{file:a}}}=gt;return C.jsxs("a",{...n,...a.container,href:r,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...a.title,children:t||r}),C.jsx(b6,{...a.icon})]})}),I1={audio:f6,bubble:o6,button:i6,carousel:g7,column:E6,dropdown:i9,file:a9,image:l6,location:S6,row:_6,text:pL,video:c6},Ga=({block:e,...t})=>{const n=Me(a=>a.renderers)[e.type]??I1[e.type],i={...t,...e};return C.jsx(n,{...i})};function o9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 s9=x.forwardRef(o9);function l9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),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 u9=x.forwardRef(l9);function c9({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const f9=x.forwardRef(c9);function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oh.apply(null,arguments)}function d9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var p9=j.useLayoutEffect,h9=function(t){var r=x.useRef(t);return p9(function(){r.current=t}),r},R1=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},m9=function(t,r){var n=j.useRef();return j.useCallback(function(i){t.current=i,n.current&&R1(n.current,null),n.current=r,r&&R1(r,i)},[r])},A1={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},v9=function(t){Object.keys(A1).forEach(function(r){t.style.setProperty(r,A1[r],"important")})},P1=v9,cr=null,N1=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function y9(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),cr||(cr=document.createElement("textarea"),cr.setAttribute("tabindex","-1"),cr.setAttribute("aria-hidden","true"),P1(cr)),cr.parentNode===null&&document.body.appendChild(cr);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;cr.style[p]=o[p]}),P1(cr),cr.value=t;var l=N1(cr,e);cr.value=t,l=N1(cr,e),cr.value="x";var u=cr.scrollHeight-i,c=u*r;s==="border-box"&&(c=c+i+a),l=Math.max(c,l);var f=u*n;return s==="border-box"&&(f=f+i+a),l=Math.min(f,l),[l,u]}var D1=function(){},g9=function(t,r){return t.reduce(function(n,i){return n[i]=r[i],n},{})},b9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],w9=!!document.documentElement.currentStyle,x9=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=g9(b9,r),i=n.boxSizing;if(i==="")return null;w9&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),o=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:o}},S9=x9;function j1(e,t,r){var n=h9(r);x.useLayoutEffect(function(){var i=function(o){return n.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var E9=function(t){j1(window,"resize",t)},_9=function(t){j1(document.fonts,"loadingdone",t)},k9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],$9=function(t,r){var n=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?D1:o,l=t.onHeightChange,u=l===void 0?D1:l,c=d9(t,k9),f=c.value!==void 0,d=x.useRef(null),p=m9(d,r),h=x.useRef(0),m=x.useRef(),g=function(){var b=d.current,k=n&&m.current?m.current:S9(b);if(k){m.current=k;var S=y9(k,b.value||b.placeholder||"x",a,i),_=S[0],$=S[1];h.current!==_&&(h.current=_,b.style.setProperty("height",_+"px","important"),u(_,{rowHeight:$}))}},v=function(b){f||g(),s(b)};return x.useLayoutEffect(g),E9(g),_9(g),x.createElement("textarea",Oh({},c,{onChange:v,ref:p}))},O9=x.forwardRef($9);const M1=j.memo(j.forwardRef(({children:e,className:t,inputRef:r,...n},i)=>{const{composer:a}=gt,o=Me(I=>I.disableComposer),s=Me(I=>I.setIsTyping),l=Me(I=>I.isReadOnly),u=Me(I=>I.sendFile),c=Me(I=>I.addMessage),f=Me(I=>I.sendTextMessage),d=Me(I=>I.allowFileUpload),p=Me(I=>I.connected),{composerPlaceholder:h,showPoweredBy:m}=KS(),[g,v]=j.useState(""),[y,b]=j.useState(-1),[k,S]=j.useState(!1),_=j.useRef(null),$=j.useRef(null),N=$r(I=>I.user),z=$r(I=>I.messageHistory);if(l)return null;const O=()=>{var I;_.current&&((I=_.current)==null||I.click())},D=o||l||!p,H=async I=>{var U;const V=(U=I.target.files)==null?void 0:U[0];if(V)try{const{fileUrl:A,type:w}=await u(V)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:w,url:A}})}catch(A){console.error("Error sending file:",A)}},L=window.SpeechRecognition||window.webkitSpeechRecognition,W=()=>{$.current||($.current=new L);const I=$.current;I&&(I.continuous=!0,I.onresult=V=>{var A,w,F;const U=((F=(w=(A=V.results)==null?void 0:A[0])==null?void 0:w[0])==null?void 0:F.transcript)??"";v(U??""),I.stop(),S(!1)},k?(I.stop(),S(!1)):(I.start(),S(!0)))},M=()=>{g&&(f(g),setTimeout(()=>s(!0,9e3),500),v(""),b(-1))};return C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":D,...n,className:Vp(a.container.className,t),ref:i,children:[d&&C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",disabled:D,...a.uploadButton.container,onClick:O,children:C.jsx(f9,{...a.uploadButton.icon})}),C.jsx("input",{type:"file",ref:_,style:{display:"none"},onChange:H})]}),C.jsx(O9,{...a==null?void 0:a.input,ref:r,placeholder:h??"Type your message...",disabled:D,value:g,"data-has-value":!!g,onChange:I=>v(I.target.value),maxRows:5,onKeyDown:I=>{if(!D){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),v(`${g}
|
|
284
|
+
`)):I.key==="Enter"&&(I.preventDefault(),M()),I.key==="ArrowUp"){I.preventDefault();const V=z[(N==null?void 0:N.userId)??""]??[];y<V.length-1&&v(V[y+1]??""),b(()=>Math.min(y+1,V.length-1))}if(I.key==="ArrowDown"){I.preventDefault();const V=z[(N==null?void 0:N.userId)??""]??[];v(y===0?"":V[y-1]??""),b(()=>Math.max(y-1,-1))}}}}),g&&C.jsx("button",{type:"button","aria-label":"Send message",...a.button.container,disabled:!g||D,onClick:M,children:C.jsx(s9,{...a.button.icon})}),!g&&L&&C.jsx("button",{type:"button","aria-label":"Activate voice input",...a.voiceButton.container,disabled:!!g,onClick:W,"data-listens":!!k,children:C.jsx(u9,{...a.voiceButton.icon})})]}),C.jsx("a",{...a.poweredBy,"data-hidden":m===!1,hidden:m===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),L1=({children:e})=>{const[t,r]=j.useState(!1),[n,i]=j.useState(""),[a,o]=j.useState(null),s=({title:u,content:c})=>{i(u),o(c),r(!0)},l=()=>{r(!1)};return C.jsxs(VS.Provider,{value:{hideModal:l,showModal:s,title:n,content:a,open:t},children:[C.jsx(Oi,{open:t,onOpenChange:r,children:C.jsx(Oi.Content,{title:n,children:a})}),e]})};var F1={},Th={},rc=ct&&ct.__assign||function(){return rc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},rc.apply(this,arguments)};Object.defineProperty(Th,"__esModule",{value:!0});var T9={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function C9(e){var t=rc(rc({},T9),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Th.getSanitizedOptions=C9;var Ch={},Ih={},nc={},Rh={},Ah={};Object.defineProperty(Ah,"__esModule",{value:!0});function I9(e){var t=Math.random()*e;return Math.round(t)}Ah.fullJitter=I9;var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0});function R9(e){return e}Ph.noJitter=R9,Object.defineProperty(Rh,"__esModule",{value:!0});var A9=Ah,P9=Ph;function N9(e){switch(e.jitter){case"full":return A9.fullJitter;case"none":default:return P9.noJitter}}Rh.JitterFactory=N9,Object.defineProperty(nc,"__esModule",{value:!0});var D9=Rh,j9=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=D9.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,i=t*Math.pow(r,n);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}();nc.Delay=j9;var M9=ct&&ct.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),L9=ct&&ct.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})},F9=ct&&ct.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,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(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Ih,"__esModule",{value:!0});var B9=nc,U9=function(e){M9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return L9(this,void 0,void 0,function(){return F9(this,function(r){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}(B9.Delay);Ih.SkipFirstDelay=U9;var Nh={},z9=ct&&ct.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Nh,"__esModule",{value:!0});var W9=nc,H9=function(e){z9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(W9.Delay);Nh.AlwaysDelay=H9,Object.defineProperty(Ch,"__esModule",{value:!0});var V9=Ih,q9=Nh;function Z9(e,t){var r=K9(e);return r.setAttemptNumber(t),r}Ch.DelayFactory=Z9;function K9(e){return e.delayFirstAttempt?new q9.AlwaysDelay(e):new V9.SkipFirstDelay(e)}var Dh=ct&&ct.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})},jh=ct&&ct.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,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(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(F1,"__esModule",{value:!0});var G9=Th,Y9=Ch;function J9(e,t){return t===void 0&&(t={}),Dh(this,void 0,void 0,function(){var r,n;return jh(this,function(i){switch(i.label){case 0:return r=G9.getSanitizedOptions(t),n=new Q9(e,r),[4,n.execute()];case 1:return[2,i.sent()]}})})}var X9=F1.backOff=J9,Q9=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Dh(this,void 0,void 0,function(){var t,r;return jh(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||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 Dh(this,void 0,void 0,function(){var t;return jh(this,function(r){switch(r.label){case 0:return t=Y9.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}(),B1=Object.prototype.toString,U1=function(t){var r=B1.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&B1.call(t.callee)==="[object Function]"),n},Mh,z1;function eW(){if(z1)return Mh;z1=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=U1,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",m=r.call(p)==="[object Function]",g=n(p),v=h&&r.call(p)==="[object String]",y=[];if(!h&&!m&&!g)throw new TypeError("Object.keys called on a non-object");var b=o&&m;if(v&&p.length>0&&!t.call(p,0))for(var k=0;k<p.length;++k)y.push(String(k));if(g&&p.length>0)for(var S=0;S<p.length;++S)y.push(String(S));else for(var _ in p)!(b&&_==="prototype")&&t.call(p,_)&&y.push(String(_));if(a)for(var $=f(p),N=0;N<s.length;++N)!($&&s[N]==="constructor")&&t.call(p,s[N])&&y.push(s[N]);return y}}return Mh=e,Mh}var tW=Array.prototype.slice,rW=U1,W1=Object.keys,ic=W1?function(t){return W1(t)}:eW(),H1=Object.keys;ic.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return rW(n)?H1(tW.call(n)):H1(n)})}else Object.keys=ic;return Object.keys||ic};var Lh=ic,nW=Lh,iW=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",aW=Object.prototype.toString,oW=Array.prototype.concat,V1=cp,sW=function(e){return typeof e=="function"&&aW.call(e)==="[object Function]"},q1=dp(),lW=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!sW(n)||!n())return}q1?V1(e,t,r,!0):V1(e,t,r)},Z1=function(e,t){var r=arguments.length>2?arguments[2]:{},n=nW(t);iW&&(n=oW.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)lW(e,n[i],t[n[i]],r[n[i]])};Z1.supportsDescriptors=!!q1;var Qi=Z1,uW=Lh,K1=iu(),G1=jr,Y1=Object,cW=G1("Array.prototype.push"),J1=G1("Object.prototype.propertyIsEnumerable"),fW=K1?Object.getOwnPropertySymbols:null,X1=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=Y1(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=Y1(arguments[i]),o=uW(a),s=K1&&(Object.getOwnPropertySymbols||fW);if(s)for(var l=s(a),u=0;u<l.length;++u){var c=l[u];J1(a,c)&&cW(o,c)}for(var f=0;f<o.length;++f){var d=o[f];if(J1(a,d)){var p=a[d];n[d]=p}}}return n},Fh=X1,dW=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a="";for(var o in i)a+=o;return e!==a},pW=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},Q1=function(){return!Object.assign||dW()||pW()?Fh:Object.assign},hW=Qi,mW=Q1,vW=function(){var t=mW();return hW(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},yW=Qi,gW=Ia,bW=X1,eE=Q1,wW=vW,xW=gW.apply(eE()),tE=function(t,r){return xW(Object,arguments)};yW(tE,{getPolyfill:eE,implementation:bW,shim:wW});var SW=tE,Ls=function(){return typeof(function(){}).name=="string"},Fs=Object.getOwnPropertyDescriptor;if(Fs)try{Fs([],"length")}catch{Fs=null}Ls.functionsHaveConfigurableNames=function(){if(!Ls()||!Fs)return!1;var t=Fs(function(){},"name");return!!t&&!!t.configurable};var EW=Function.prototype.bind;Ls.boundFunctionsHaveNames=function(){return Ls()&&typeof EW=="function"&&(function(){}).bind().name!==""};var _W=Ls,rE=cp,kW=dp(),$W=_W.functionsHaveConfigurableNames(),OW=li,TW=function(t,r){if(typeof t!="function")throw new OW("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||$W)&&(kW?rE(t,"name",r,!0,!0):rE(t,"name",r)),t},CW=TW,IW=li,RW=Object,nE=CW(function(){if(this==null||this!==RW(this))throw new IW("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),AW=nE,PW=Qi.supportsDescriptors,NW=Object.getOwnPropertyDescriptor,iE=function(){if(PW&&/a/mig.flags==="gim"){var t=NW(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return AW},DW=Qi.supportsDescriptors,jW=iE,MW=Object.getOwnPropertyDescriptor,LW=Object.defineProperty,FW=TypeError,aE=Object.getPrototypeOf,BW=/a/,UW=function(){if(!DW||!aE)throw new FW("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=jW(),r=aE(BW),n=MW(r,"flags");return(!n||n.get!==t)&&LW(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},zW=Qi,WW=Ia,HW=nE,oE=iE,VW=UW,sE=WW(oE());zW(sE,{getPolyfill:oE,implementation:HW,shim:VW});var qW=sE,ac={exports:{}},ZW=iu,ea=function(){return ZW()&&!!Symbol.toStringTag},KW=ea(),GW=jr,Bh=GW("Object.prototype.toString"),oc=function(t){return KW&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Bh(t)==="[object Arguments]"},lE=function(t){return oc(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Bh(t)!=="[object Array]"&&Bh(t.callee)==="[object Function]"},YW=function(){return oc(arguments)}();oc.isLegacyArguments=lE;var uE=YW?oc:lE,JW=Yx,Bs=$p(),Zn=li,Uh={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");if(Bs.assert(e),!Uh.has(e,t))throw new Zn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Bs.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Bs.get(e);return!!r&&JW(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var n=Bs.get(e);n||(n={},Bs.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(Uh);var XW=Uh,Us=XW,QW=SyntaxError,cE=typeof StopIteration=="object"?StopIteration:null,eH=function(t){if(!cE)throw new QW("this environment lacks StopIteration");Us.set(t,"[[Done]]",!1);var r={next:function(){var i=Us.get(this,"[[Iterator]]"),a=Us.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Us.set(i,"[[Done]]",!0),o!==cE)throw o;return{done:!0,value:void 0}}}};return Us.set(r,"[[Iterator]]",t),r},tH={}.toString,fE=Array.isArray||function(e){return tH.call(e)=="[object Array]"},rH=String.prototype.valueOf,nH=function(t){try{return rH.call(t),!0}catch{return!1}},iH=Object.prototype.toString,aH="[object String]",oH=ea(),dE=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:oH?nH(t):iH.call(t)===aH},zh=typeof Map=="function"&&Map.prototype?Map:null,sH=typeof Set=="function"&&Set.prototype?Set:null,sc;zh||(sc=function(t){return!1});var pE=zh?Map.prototype.has:null,hE=sH?Set.prototype.has:null;!sc&&!pE&&(sc=function(t){return!1});var mE=sc||function(t){if(!t||typeof t!="object")return!1;try{if(pE.call(t),hE)try{hE.call(t)}catch{return!0}return t instanceof zh}catch{}return!1},lH=typeof Map=="function"&&Map.prototype?Map:null,Wh=typeof Set=="function"&&Set.prototype?Set:null,lc;Wh||(lc=function(t){return!1});var vE=lH?Map.prototype.has:null,yE=Wh?Set.prototype.has:null;!lc&&!yE&&(lc=function(t){return!1});var gE=lc||function(t){if(!t||typeof t!="object")return!1;try{if(yE.call(t),vE)try{vE.call(t)}catch{return!0}return t instanceof Wh}catch{}return!1},bE=uE,wE=eH;if(np()||iu()){var Hh=Symbol.iterator;ac.exports=function(t){if(t!=null&&typeof t[Hh]<"u")return t[Hh]();if(bE(t))return Array.prototype[Hh].call(t)}}else{var uH=fE,cH=dE,xE=mn,fH=xE("%Map%",!0),dH=xE("%Set%",!0),Qr=jr,SE=Qr("Array.prototype.push"),EE=Qr("String.prototype.charCodeAt"),pH=Qr("String.prototype.slice"),hH=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=EE(t,r);if(i<55296||i>56319)return r+1;var a=EE(t,r+1);return a<56320||a>57343?r+1:r+2},Vh=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},_E=function(t,r){if(uH(t)||bE(t))return Vh(t);if(cH(t)){var n=0;return{next:function(){var a=hH(t,n),o=pH(t,n,a);return n=a,{done:a>t.length,value:o}}}}if(r&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!fH&&!dH)ac.exports=function(t){if(t!=null)return _E(t,!0)};else{var mH=mE,vH=gE,kE=Qr("Map.prototype.forEach",!0),$E=Qr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var OE=Qr("Map.prototype.iterator",!0),TE=Qr("Set.prototype.iterator",!0);var CE=Qr("Map.prototype.@@iterator",!0)||Qr("Map.prototype._es6-shim iterator_",!0),IE=Qr("Set.prototype.@@iterator",!0)||Qr("Set.prototype._es6-shim iterator_",!0),yH=function(t){if(mH(t)){if(OE)return wE(OE(t));if(CE)return CE(t);if(kE){var r=[];return kE(t,function(i,a){SE(r,[a,i])}),Vh(r)}}if(vH(t)){if(TE)return wE(TE(t));if(IE)return IE(t);if($E){var n=[];return $E(t,function(i){SE(n,i)}),Vh(n)}}};ac.exports=function(t){return yH(t)||_E(t)}}}var gH=ac.exports,RE=function(e){return e!==e},AE=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||RE(t)&&RE(r))},bH=AE,PE=function(){return typeof Object.is=="function"?Object.is:bH},wH=PE,xH=Qi,SH=function(){var t=wH();return xH(Object,{is:t},{is:function(){return Object.is!==t}}),t},EH=Qi,_H=Ia,kH=AE,NE=PE,$H=SH,DE=_H(NE(),Object);EH(DE,{getPolyfill:NE,implementation:kH,shim:$H});var OH=DE,TH=Ia,jE=jr,CH=mn,qh=CH("%ArrayBuffer%",!0),uc=jE("ArrayBuffer.prototype.byteLength",!0),IH=jE("Object.prototype.toString"),ME=!!qh&&!uc&&new qh(0).slice,LE=!!ME&&TH(ME),FE=uc||LE?function(t){if(!t||typeof t!="object")return!1;try{return uc?uc(t):LE(t,0),!0}catch{return!1}}:qh?function(t){return IH(t)==="[object ArrayBuffer]"}:function(t){return!1},RH=Date.prototype.getDay,AH=function(t){try{return RH.call(t),!0}catch{return!1}},PH=Object.prototype.toString,NH="[object Date]",DH=ea(),jH=function(t){return typeof t!="object"||t===null?!1:DH?AH(t):PH.call(t)===NH},Zh=jr,BE=ea(),UE,zE,Kh,Gh;if(BE){UE=Zh("Object.prototype.hasOwnProperty"),zE=Zh("RegExp.prototype.exec"),Kh={};var Yh=function(){throw Kh};Gh={toString:Yh,valueOf:Yh},typeof Symbol.toPrimitive=="symbol"&&(Gh[Symbol.toPrimitive]=Yh)}var MH=Zh("Object.prototype.toString"),LH=Object.getOwnPropertyDescriptor,FH="[object RegExp]",BH=BE?function(t){if(!t||typeof t!="object")return!1;var r=LH(t,"lastIndex"),n=r&&UE(r,"value");if(!n)return!1;try{zE(t,Gh)}catch(i){return i===Kh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:MH(t)===FH},UH=jr,WE=UH("SharedArrayBuffer.prototype.byteLength",!0),zH=WE?function(t){if(!t||typeof t!="object")return!1;try{return WE(t),!0}catch{return!1}}:function(t){return!1},WH=Number.prototype.toString,HH=function(t){try{return WH.call(t),!0}catch{return!1}},VH=Object.prototype.toString,qH="[object Number]",ZH=ea(),KH=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:ZH?HH(t):VH.call(t)===qH},HE=jr,GH=HE("Boolean.prototype.toString"),YH=HE("Object.prototype.toString"),JH=function(t){try{return GH(t),!0}catch{return!1}},XH="[object Boolean]",QH=ea(),eV=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:QH&&Symbol.toStringTag in t?JH(t):YH(t)===XH},Jh={exports:{}},tV=Object.prototype.toString,rV=np();if(rV){var nV=Symbol.prototype.toString,iV=/^Symbol\(.*\)$/,aV=function(t){return typeof t.valueOf()!="symbol"?!1:iV.test(nV.call(t))};Jh.exports=function(t){if(typeof t=="symbol")return!0;if(tV.call(t)!=="[object Symbol]")return!1;try{return aV(t)}catch{return!1}}}else Jh.exports=function(t){return!1};var oV=Jh.exports,Xh={exports:{}},VE=typeof BigInt<"u"&&BigInt,sV=function(){return typeof VE=="function"&&typeof BigInt=="function"&&typeof VE(42)=="bigint"&&typeof BigInt(42)=="bigint"},lV=sV();if(lV){var uV=BigInt.prototype.valueOf,cV=function(t){try{return uV.call(t),!0}catch{}return!1};Xh.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:cV(t)}}else Xh.exports=function(t){return!1};var fV=Xh.exports,dV=dE,pV=KH,hV=eV,mV=oV,vV=fV,yV=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(dV(t))return"String";if(pV(t))return"Number";if(hV(t))return"Boolean";if(mV(t))return"Symbol";if(vV(t))return"BigInt"},cc=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,qE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,fc;cc||(fc=function(t){return!1});var Qh=cc?cc.prototype.has:null,em=qE?qE.prototype.has:null;!fc&&!Qh&&(fc=function(t){return!1});var gV=fc||function(t){if(!t||typeof t!="object")return!1;try{if(Qh.call(t,Qh),em)try{em.call(t,em)}catch{return!0}return t instanceof cc}catch{}return!1},tm={exports:{}},bV=mn,ZE=jr,wV=bV("%WeakSet%",!0),rm=ZE("WeakSet.prototype.has",!0);if(rm){var nm=ZE("WeakMap.prototype.has",!0);tm.exports=function(t){if(!t||typeof t!="object")return!1;try{if(rm(t,rm),nm)try{nm(t,nm)}catch{return!0}return t instanceof wV}catch{}return!1}}else tm.exports=function(t){return!1};var xV=tm.exports,SV=mE,EV=gE,_V=gV,kV=xV,$V=function(t){if(t&&typeof t=="object"){if(SV(t))return"Map";if(EV(t))return"Set";if(_V(t))return"WeakMap";if(kV(t))return"WeakSet"}return!1},KE=Function.prototype.toString,Ya=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,im,dc;if(typeof Ya=="function"&&typeof Object.defineProperty=="function")try{im=Object.defineProperty({},"length",{get:function(){throw dc}}),dc={},Ya(function(){throw 42},null,im)}catch(e){e!==dc&&(Ya=null)}else Ya=null;var OV=/^\s*class\b/,am=function(t){try{var r=KE.call(t);return OV.test(r)}catch{return!1}},om=function(t){try{return am(t)?!1:(KE.call(t),!0)}catch{return!1}},pc=Object.prototype.toString,TV="[object Object]",CV="[object Function]",IV="[object GeneratorFunction]",RV="[object HTMLAllCollection]",AV="[object HTML document.all class]",PV="[object HTMLCollection]",NV=typeof Symbol=="function"&&!!Symbol.toStringTag,DV=!(0 in[,]),sm=function(){return!1};if(typeof document=="object"){var jV=document.all;pc.call(jV)===pc.call(document.all)&&(sm=function(t){if((DV||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=pc.call(t);return(r===RV||r===AV||r===PV||r===TV)&&t("")==null}catch{}return!1})}var MV=Ya?function(t){if(sm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Ya(t,null,im)}catch(r){if(r!==dc)return!1}return!am(t)&&om(t)}:function(t){if(sm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(NV)return om(t);if(am(t))return!1;var r=pc.call(t);return r!==CV&&r!==IV&&!/^\[object HTML/.test(r)?!1:om(t)},LV=MV,FV=Object.prototype.toString,GE=Object.prototype.hasOwnProperty,BV=function(t,r,n){for(var i=0,a=t.length;i<a;i++)GE.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},UV=function(t,r,n){for(var i=0,a=t.length;i<a;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},zV=function(t,r,n){for(var i in t)GE.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},WV=function(t,r,n){if(!LV(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),FV.call(t)==="[object Array]"?BV(t,r,i):typeof t=="string"?UV(t,r,i):zV(t,r,i)},HV=WV,VV=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],lm=VV,qV=typeof globalThis>"u"?ct:globalThis,ZV=function(){for(var t=[],r=0;r<lm.length;r++)typeof qV[lm[r]]=="function"&&(t[t.length]=lm[r]);return t},hc=HV,KV=ZV,YE=Ia,um=jr,mc=up,GV=um("Object.prototype.toString"),JE=ea(),XE=typeof globalThis>"u"?ct:globalThis,cm=KV(),fm=um("String.prototype.slice"),dm=Object.getPrototypeOf,YV=um("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},vc={__proto__:null};JE&&mc&&dm?hc(cm,function(e){var t=new XE[e];if(Symbol.toStringTag in t){var r=dm(t),n=mc(r,Symbol.toStringTag);if(!n){var i=dm(r);n=mc(i,Symbol.toStringTag)}vc["$"+e]=YE(n.get)}}):hc(cm,function(e){var t=new XE[e],r=t.slice||t.set;r&&(vc["$"+e]=YE(r))});var JV=function(t){var r=!1;return hc(vc,function(n,i){if(!r)try{"$"+n(t)===i&&(r=fm(i,1))}catch{}}),r},XV=function(t){var r=!1;return hc(vc,function(n,i){if(!r)try{n(t),r=fm(i,1)}catch{}}),r},QV=function(t){if(!t||typeof t!="object")return!1;if(!JE){var r=fm(GV(t),8,-1);return YV(cm,r)>-1?r:r!=="Object"?!1:XV(t)}return mc?JV(t):null},eq=jr,QE=eq("ArrayBuffer.prototype.byteLength",!0),tq=FE,rq=function(t){return tq(t)?QE?QE(t):t.byteLength:NaN},e_=SW,$n=jr,t_=qW,nq=mn,Ja=gH,iq=$p,r_=OH,n_=uE,i_=fE,a_=FE,o_=jH,s_=BH,l_=zH,u_=Lh,c_=yV,f_=$V,d_=QV,p_=rq,h_=$n("SharedArrayBuffer.prototype.byteLength",!0),m_=$n("Date.prototype.getTime"),pm=Object.getPrototypeOf,v_=$n("Object.prototype.toString"),yc=nq("%Set%",!0),hm=$n("Map.prototype.has",!0),gc=$n("Map.prototype.get",!0),y_=$n("Map.prototype.size",!0),bc=$n("Set.prototype.add",!0),g_=$n("Set.prototype.delete",!0),wc=$n("Set.prototype.has",!0),xc=$n("Set.prototype.size",!0);function b_(e,t,r,n){for(var i=Ja(e),a;(a=i.next())&&!a.done;)if(en(t,a.value,r,n))return g_(e,a.value),!0;return!1}function w_(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function aq(e,t,r,n,i,a){var o=w_(r);if(o!=null)return o;var s=gc(t,o),l=e_({},i,{strict:!1});return typeof s>"u"&&!hm(t,o)||!en(n,s,l,a)?!1:!hm(e,o)&&en(n,s,l,a)}function oq(e,t,r){var n=w_(r);return n??(wc(t,n)&&!wc(e,n))}function x_(e,t,r,n,i,a){for(var o=Ja(e),s,l;(s=o.next())&&!s.done;)if(l=s.value,en(r,l,i,a)&&en(n,gc(t,l),i,a))return g_(e,l),!0;return!1}function en(e,t,r,n){var i=r||{};if(i.strict?r_(e,t):e===t)return!0;var a=c_(e),o=c_(t);if(a!==o)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?r_(e,t):e==t;var s=n.has(e),l=n.has(t),u;if(s&&l){if(n.get(e)===n.get(t))return!0}else u={};return s||n.set(e,u),l||n.set(t,u),uq(e,t,i,n)}function S_(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function sq(e,t,r,n){if(xc(e)!==xc(t))return!1;for(var i=Ja(e),a=Ja(t),o,s,l;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")l||(l=new yc),bc(l,o.value);else if(!wc(t,o.value)){if(r.strict||!oq(e,t,o.value))return!1;l||(l=new yc),bc(l,o.value)}if(l){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!b_(l,s.value,r.strict,n))return!1}else if(!r.strict&&!wc(e,s.value)&&!b_(l,s.value,r.strict,n))return!1;return xc(l)===0}return!0}function lq(e,t,r,n){if(y_(e)!==y_(t))return!1;for(var i=Ja(e),a=Ja(t),o,s,l,u,c,f;(o=i.next())&&!o.done;)if(u=o.value[0],c=o.value[1],u&&typeof u=="object")l||(l=new yc),bc(l,u);else if(f=gc(t,u),typeof f>"u"&&!hm(t,u)||!en(c,f,r,n)){if(r.strict||!aq(e,t,u,c,r,n))return!1;l||(l=new yc),bc(l,u)}if(l){for(;(s=a.next())&&!s.done;)if(u=s.value[0],f=s.value[1],u&&typeof u=="object"){if(!x_(l,e,u,f,r,n))return!1}else if(!r.strict&&(!e.has(u)||!en(gc(e,u),f,r,n))&&!x_(l,e,u,f,e_({},r,{strict:!1}),n))return!1;return xc(l)===0}return!0}function uq(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||v_(e)!==v_(t)||n_(e)!==n_(t))return!1;var o=i_(e),s=i_(t);if(o!==s)return!1;var l=e instanceof Error,u=t instanceof Error;if(l!==u||(l||u)&&(e.name!==t.name||e.message!==t.message))return!1;var c=s_(e),f=s_(t);if(c!==f||(c||f)&&(e.source!==t.source||t_(e)!==t_(t)))return!1;var d=o_(e),p=o_(t);if(d!==p||(d||p)&&m_(e)!==m_(t)||r.strict&&pm&&pm(e)!==pm(t))return!1;var h=d_(e),m=d_(t);if(h!==m)return!1;if(h||m){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var g=S_(e),v=S_(t);if(g!==v)return!1;if(g||v){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var y=a_(e),b=a_(t);if(y!==b)return!1;if(y||b)return p_(e)!==p_(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);var k=l_(e),S=l_(t);if(k!==S)return!1;if(k||S)return h_(e)!==h_(t)?!1:typeof Uint8Array=="function"&&en(new Uint8Array(e),new Uint8Array(t),r,n);if(typeof e!=typeof t)return!1;var _=u_(e),$=u_(t);if(_.length!==$.length)return!1;for(_.sort(),$.sort(),i=_.length-1;i>=0;i--)if(_[i]!=$[i])return!1;for(i=_.length-1;i>=0;i--)if(a=_[i],!en(e[a],t[a],r,n))return!1;var N=f_(e),z=f_(t);return N!==z?!1:N==="Set"||z==="Set"?sq(e,t,r,n):N==="Map"?lq(e,t,r,n):!0}var cq=function(t,r,n){return en(t,r,n,iq())};const fq=Ze(cq),dq=({children:e,...t})=>{const r=j.useRef(),n=j.useRef(null),i=n6({...t,messageContainerRef:n});return r.current||(r.current=i),C.jsx(ZS.Provider,{value:{...t.configuration},children:C.jsx(WS.Provider,{value:r.current,children:C.jsx(pq,{children:e})})})},pq=({children:e})=>{const t=Me(b=>b.client),r=Me(b=>b.addMessage),n=Me(b=>b.setMessages),i=Me(b=>b.configuration),a=Me(b=>b.setConnected),o=Me(b=>b.userData),s=Me(b=>b.userName),l=Me(b=>b.userPictureUrl),u=Me(b=>b.setIsTyping),c=Me(b=>b.getMessages),f=Me(b=>b.setHeaderMessage),d=Me(b=>b.setDisableComposer),p=$r(b=>b.setConversationId),h=$r(b=>b.user),m=$r(b=>b.conversationId),g=$r(b=>b.setUser),[v,y]=j.useState(0);return j.useEffect(()=>{if(t)return t.on("messageSent",b=>{const k=c(),S=k[k.length-1];(k.length===0||!fq(S==null?void 0:S.block,_o(b).payload))&&r({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:_o(b).payload,disableInput:!1})})},[m]),j.useEffect(()=>{if(t)return t.on("message",b=>{try{const{payload:k,disableInput:S,conversationId:_,sentOn:$,...N}=b;if(m!==_)return;u(!1,0),r({...N,direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date($),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),j.useEffect(()=>{if(t)return t.on("conversation",b=>{p(b)})},[]),rh(async()=>{if(t)return t.on("error",b=>{console.error("Connection Error",b),y(k=>k+1)})}),rh(async()=>{if(!t||m&&t.conversationId===m)return;let b;try{f("Connecting..."),d(!0),b=await X9(()=>t.connect(h,o,{name:s,pictureUrl:l}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),d(!1),a(!0)}catch(S){console.warn(S),f("Connection failed. Please try again later."),a(!1);return}g(b),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:_,authorId:$,sentOn:N,disableInput:z,...O}=S,D=$===t.userId?"outgoing":"incoming";k.push({...O,direction:D,sender:D==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(N),block:_,disableInput:z})}catch{console.error("Invalid message payload")}return n(k.reverse()),()=>{t.disconnect()}},[v,m]),C.jsx(C.Fragment,{children:e})};function Kn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function hq(e,t){const r=x.createContext(t),n=a=>{const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return C.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=x.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function E_(e,t=[]){let r=[];function n(a,o){const s=x.createContext(o),l=r.length;r=[...r,o];const u=f=>{var v;const{scope:d,children:p,...h}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[l])||s,g=x.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:g,children:p})};u.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,h=x.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,mq(i,...t)]}function mq(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var vq=x.useId||(()=>{}),yq=0;function Sc(e){const[t,r]=x.useState(vq());return fa(()=>{e||r(n=>n??String(yq++))},[e]),e||(t?`radix-${t}`:"")}function __({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=gq({defaultProp:t,onChange:r}),a=e!==void 0,o=a?e:n,s=ti(r),l=x.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[a,e,i,s]);return[o,l]}function gq({defaultProp:e,onChange:t}){const r=x.useState(e),[n]=r,i=x.useRef(n),a=ti(t);return x.useEffect(()=>{i.current!==n&&(a(n),i.current=n)},[n,i,a]),r}function bq(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var wq="DismissableLayer",mm="dismissableLayer.update",xq="dismissableLayer.pointerDownOutside",Sq="dismissableLayer.focusOutside",k_,$_=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),O_=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=x.useContext($_),[c,f]=x.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),h=ri(t,$=>f($)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=v,S=kq($=>{const N=$.target,z=[...u.branches].some(O=>O.contains(N));!k||z||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},d),_=$q($=>{const N=$.target;[...u.branches].some(O=>O.contains(N))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},d);return bq($=>{y===u.layers.size-1&&(n==null||n($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},d),x.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(k_=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),T_(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=k_)}},[c,d,r,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),T_())},[c,u]),x.useEffect(()=>{const $=()=>p({});return document.addEventListener(mm,$),()=>document.removeEventListener(mm,$)},[]),C.jsx(dr.div,{...l,ref:h,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:Kn(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Kn(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Kn(e.onPointerDownCapture,S.onPointerDownCapture)})});O_.displayName=wq;var Eq="DismissableLayerBranch",_q=x.forwardRef((e,t)=>{const r=x.useContext($_),n=x.useRef(null),i=ri(t,n);return x.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),C.jsx(dr.div,{...e,ref:i})});_q.displayName=Eq;function kq(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){C_(xq,r,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);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function $q(e,t=globalThis==null?void 0:globalThis.document){const r=ti(e),n=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!n.current&&C_(Sq,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function T_(){const e=new CustomEvent(mm);document.dispatchEvent(e)}function C_(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?pR(i,a):i.dispatchEvent(a)}var vm="focusScope.autoFocusOnMount",ym="focusScope.autoFocusOnUnmount",I_={bubbles:!1,cancelable:!0},Oq="FocusScope",R_=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=x.useState(null),u=ti(i),c=ti(a),f=x.useRef(null),d=ri(t,m=>l(m)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let m=function(b){if(p.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:$i(f.current,{select:!0})},g=function(b){if(p.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||$i(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&$i(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(v);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[n,s,p.paused]),x.useEffect(()=>{if(s){N_.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(vm,I_);s.addEventListener(vm,u),s.dispatchEvent(v),v.defaultPrevented||(Tq(Pq(A_(s)),{select:!0}),document.activeElement===m&&$i(s))}return()=>{s.removeEventListener(vm,u),setTimeout(()=>{const v=new CustomEvent(ym,I_);s.addEventListener(ym,c),s.dispatchEvent(v),v.defaultPrevented||$i(m??document.body,{select:!0}),s.removeEventListener(ym,c),N_.remove(p)},0)}}},[s,u,c,p]);const h=x.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){const y=m.currentTarget,[b,k]=Cq(y);b&&k?!m.shiftKey&&v===k?(m.preventDefault(),r&&$i(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),r&&$i(k,{select:!0})):v===y&&m.preventDefault()}},[r,n,p.paused]);return C.jsx(dr.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});R_.displayName=Oq;function Tq(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if($i(n,{select:t}),document.activeElement!==r)return}function Cq(e){const t=A_(e),r=P_(t,e),n=P_(t.reverse(),e);return[r,n]}function A_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function P_(e,t){for(const r of e)if(!Iq(r,{upTo:t}))return r}function Iq(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 Rq(e){return e instanceof HTMLInputElement&&"select"in e}function $i(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Rq(e)&&t&&e.select()}}var N_=Aq();function Aq(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=D_(e,t),e.unshift(t)},remove(t){var r;e=D_(e,t),(r=e[0])==null||r.resume()}}}function D_(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Pq(e){return e.filter(t=>t.tagName!=="A")}function Nq(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var Ec=e=>{const{present:t,children:r}=e,n=Dq(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),a=ri(n.ref,jq(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:a}):null};Ec.displayName="Presence";function Dq(e){const[t,r]=x.useState(),n=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=Nq(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=_c(n.current);a.current=s==="mounted"?u:"none"},[s]),fa(()=>{const u=n.current,c=i.current;if(c!==e){const d=a.current,p=_c(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),fa(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=p=>{const m=_c(n.current).includes(p.animationName);if(p.target===t&&m&&(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)})}},d=p=>{p.target===t&&(a.current=_c(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function _c(e){return(e==null?void 0:e.animationName)||"none"}function jq(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var gm=0;function Mq(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??j_()),document.body.insertAdjacentElement("beforeend",e[1]??j_()),gm++,()=>{gm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),gm--}},[])}function j_(){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 kc="right-scroll-bar-position",$c="width-before-scroll-bar",Lq="with-scroll-bars-hidden",Fq="--removed-body-scroll-bar-size";function bm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bq(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var Uq=typeof window<"u"?x.useLayoutEffect:x.useEffect,M_=new WeakMap;function zq(e,t){var r=Bq(null,function(n){return e.forEach(function(i){return bm(i,n)})});return Uq(function(){var n=M_.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;i.forEach(function(s){a.has(s)||bm(s,null)}),a.forEach(function(s){i.has(s)||bm(s,o)})}M_.set(r,e)},[e]),r}function Wq(e){return e}function Hq(e,t){t===void 0&&(t=Wq);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(a),o=r}var l=function(){var c=o;o=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),r}}}};return i}function Vq(e){e===void 0&&(e={});var t=Hq(null);return t.options=Lr({async:!0,ssr:!1},e),t}var L_=function(e){var t=e.sideCar,r=IS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return x.createElement(n,Lr({},r))};L_.isSideCarExport=!0;function qq(e,t){return e.useMedium(t),L_}var F_=Vq(),wm=function(){},Oc=x.forwardRef(function(e,t){var r=x.useRef(null),n=x.useState({onScrollCapture:wm,onWheelCapture:wm,onTouchMoveCapture:wm}),i=n[0],a=n[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,y=e.gapMode,b=IS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=zq([r,t]),_=Lr(Lr({},b),i);return x.createElement(x.Fragment,null,c&&x.createElement(k,{sideCar:F_,removeScrollBar:u,shards:f,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:r,gapMode:y}),o?x.cloneElement(x.Children.only(s),Lr(Lr({},_),{ref:S})):x.createElement(v,Lr({},_,{className:l,ref:S}),s))});Oc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Oc.classNames={fullWidth:$c,zeroRight:kc};var Zq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Kq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zq();return t&&e.setAttribute("nonce",t),e}function Gq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Yq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jq=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Kq())&&(Gq(t,r),Yq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xq=function(){var e=Jq();return function(t,r){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},B_=function(){var e=Xq(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Qq={left:0,top:0,right:0,gap:0},xm=function(e){return parseInt(e||"",10)||0},e8=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[xm(r),xm(n),xm(i)]},t8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qq;var t=e8(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},r8=B_(),Xa="data-scroll-locked",n8=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
285
|
+
.`.concat(Lq,` {
|
|
286
286
|
overflow: hidden `).concat(n,`;
|
|
287
287
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
288
288
|
}
|
|
@@ -316,40 +316,40 @@ to {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
body[`).concat(Xa,`] {
|
|
319
|
-
`).concat(
|
|
319
|
+
`).concat(Fq,": ").concat(s,`px;
|
|
320
320
|
}
|
|
321
|
-
`)},
|
|
321
|
+
`)},U_=function(){var e=parseInt(document.body.getAttribute(Xa)||"0",10);return isFinite(e)?e:0},i8=function(){x.useEffect(function(){return document.body.setAttribute(Xa,(U_()+1).toString()),function(){var e=U_()-1;e<=0?document.body.removeAttribute(Xa):document.body.setAttribute(Xa,e.toString())}},[])},a8=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;i8();var a=x.useMemo(function(){return t8(i)},[i]);return x.createElement(r8,{styles:n8(a,!t,i,r?"":"!important")})},Sm=!1;if(typeof window<"u")try{var Tc=Object.defineProperty({},"passive",{get:function(){return Sm=!0,!0}});window.addEventListener("test",Tc,Tc),window.removeEventListener("test",Tc,Tc)}catch{Sm=!1}var Qa=Sm?{passive:!1}:!1,o8=function(e){return e.tagName==="TEXTAREA"},z_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!o8(e)&&r[t]==="visible")},s8=function(e){return z_(e,"overflowY")},l8=function(e){return z_(e,"overflowX")},W_=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=H_(e,n);if(i){var a=V_(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},u8=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},c8=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},H_=function(e,t){return e==="v"?s8(t):l8(t)},V_=function(e,t){return e==="v"?u8(t):c8(t)},f8=function(e,t){return e==="h"&&t==="rtl"?-1:1},d8=function(e,t,r,n,i){var a=f8(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,d=0;do{var p=V_(e,s),h=p[0],m=p[1],g=p[2],v=m-g-a*h;(h||v)&&H_(e,s)&&(f+=v,d+=h),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(d)<1||!i))&&(u=!0),u},Cc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},q_=function(e){return[e.deltaX,e.deltaY]},Z_=function(e){return e&&"current"in e?e.current:e},p8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h8=function(e){return`
|
|
322
322
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
323
323
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
324
|
-
`)},
|
|
324
|
+
`)},m8=0,eo=[];function v8(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(m8++)[0],a=x.useState(B_)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Rz([e.lockRef.current],(e.shards||[]).map(Z_),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=Cc(m),y=r.current,b="deltaX"in m?m.deltaX:y[0]-v[0],k="deltaY"in m?m.deltaY:y[1]-v[1],S,_=m.target,$=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&$==="h"&&_.type==="range")return!1;var N=W_($,_);if(!N)return!0;if(N?S=$:(S=$==="v"?"h":"v",N=W_($,_)),!N)return!1;if(!n.current&&"changedTouches"in m&&(b||k)&&(n.current=S),!S)return!0;var z=n.current||S;return d8(z,g,m,z==="h"?b:k,!0)},[]),l=x.useCallback(function(m){var g=m;if(!(!eo.length||eo[eo.length-1]!==a)){var v="deltaY"in g?q_(g):Cc(g),y=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&p8(S.delta,v)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(o.current.shards||[]).map(Z_).filter(Boolean).filter(function(S){return S.contains(g.target)}),k=b.length>0?s(g,b[0]):!o.current.noIsolation;k&&g.cancelable&&g.preventDefault()}}},[]),u=x.useCallback(function(m,g,v,y){var b={name:m,delta:g,target:v,should:y,shadowParent:y8(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),c=x.useCallback(function(m){r.current=Cc(m),n.current=void 0},[]),f=x.useCallback(function(m){u(m.type,q_(m),m.target,s(m,e.lockRef.current))},[]),d=x.useCallback(function(m){u(m.type,Cc(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return eo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Qa),document.addEventListener("touchmove",l,Qa),document.addEventListener("touchstart",c,Qa),function(){eo=eo.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Qa),document.removeEventListener("touchmove",l,Qa),document.removeEventListener("touchstart",c,Qa)}},[]);var p=e.removeScrollBar,h=e.inert;return x.createElement(x.Fragment,null,h?x.createElement(a,{styles:h8(i)}):null,p?x.createElement(a8,{gapMode:e.gapMode}):null)}function y8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const g8=qq(F_,v8);var K_=x.forwardRef(function(e,t){return x.createElement(Oc,Lr({},e,{ref:t,sideCar:g8}))});K_.classNames=Oc.classNames;var b8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},to=new WeakMap,Ic=new WeakMap,Rc={},Em=0,G_=function(e){return e&&(e.host||G_(e.parentNode))},w8=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=G_(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},x8=function(e,t,r,n){var i=w8(t,Array.isArray(e)?e:[e]);Rc[r]||(Rc[r]=new WeakMap);var a=Rc[r],o=[],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(d){if(s.has(d))c(d);else try{var p=d.getAttribute(n),h=p!==null&&p!=="false",m=(to.get(d)||0)+1,g=(a.get(d)||0)+1;to.set(d,m),a.set(d,g),o.push(d),m===1&&h&&Ic.set(d,!0),g===1&&d.setAttribute(r,"true"),h||d.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",d,v)}})};return c(t),s.clear(),Em++,function(){o.forEach(function(f){var d=to.get(f)-1,p=a.get(f)-1;to.set(f,d),a.set(f,p),d||(Ic.has(f)||f.removeAttribute(n),Ic.delete(f)),p||f.removeAttribute(r)}),Em--,Em||(to=new WeakMap,to=new WeakMap,Ic=new WeakMap,Rc={})}},S8=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=b8(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),x8(n,i,r,"aria-hidden")):function(){return null}},_m="Dialog",[Y_,jpe]=E_(_m),[E8,On]=Y_(_m),J_=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[u=!1,c]=__({prop:n,defaultProp:i,onChange:a});return C.jsx(E8,{scope:t,triggerRef:s,contentRef:l,contentId:Sc(),titleId:Sc(),descriptionId:Sc(),open:u,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};J_.displayName=_m;var X_="DialogTrigger",Q_=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=On(X_,r),a=ri(t,i.triggerRef);return C.jsx(dr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$m(i.open),...n,ref:a,onClick:Kn(e.onClick,i.onOpenToggle)})});Q_.displayName=X_;var _8="DialogPortal",[Mpe,ek]=Y_(_8,{forceMount:void 0}),Ac="DialogOverlay",tk=x.forwardRef((e,t)=>{const r=ek(Ac,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=On(Ac,e.__scopeDialog);return a.modal?C.jsx(Ec,{present:n||a.open,children:C.jsx(k8,{...i,ref:t})}):null});tk.displayName=Ac;var k8=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=On(Ac,r);return C.jsx(K_,{as:Uf,allowPinchZoom:!0,shards:[i.contentRef],children:C.jsx(dr.div,{"data-state":$m(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ta="DialogContent",rk=x.forwardRef((e,t)=>{const r=ek(ta,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=On(ta,e.__scopeDialog);return C.jsx(Ec,{present:n||a.open,children:a.modal?C.jsx($8,{...i,ref:t}):C.jsx(O8,{...i,ref:t})})});rk.displayName=ta;var $8=x.forwardRef((e,t)=>{const r=On(ta,e.__scopeDialog),n=x.useRef(null),i=ri(t,r.contentRef,n);return x.useEffect(()=>{const a=n.current;if(a)return S8(a)},[]),C.jsx(nk,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kn(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Kn(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Kn(e.onFocusOutside,a=>a.preventDefault())})}),O8=x.forwardRef((e,t)=>{const r=On(ta,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return C.jsx(nk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),nk=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=On(ta,r),l=x.useRef(null),u=ri(t,l);return Mq(),C.jsxs(C.Fragment,{children:[C.jsx(R_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:C.jsx(O_,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":$m(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(C8,{titleId:s.titleId}),C.jsx(R8,{contentRef:l,descriptionId:s.descriptionId})]})]})}),km="DialogTitle",ik=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=On(km,r);return C.jsx(dr.h2,{id:i.titleId,...n,ref:t})});ik.displayName=km;var ak="DialogDescription",T8=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=On(ak,r);return C.jsx(dr.p,{id:i.descriptionId,...n,ref:t})});T8.displayName=ak;var ok="DialogClose",sk=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=On(ok,r);return C.jsx(dr.button,{type:"button",...n,ref:t,onClick:Kn(e.onClick,()=>i.onOpenChange(!1))})});sk.displayName=ok;function $m(e){return e?"open":"closed"}var lk="DialogTitleWarning",[Lpe,uk]=hq(lk,{contentName:ta,titleName:km,docsSlug:"dialog"}),C8=({titleId:e})=>{const t=uk(lk),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
325
325
|
|
|
326
326
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
327
327
|
|
|
328
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},T8="DialogDescriptionWarning",C8=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sk(T8).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(n))},[n,e,t]),null},I8=G_,R8=J_,A8=Q_,P8=ek,N8=rk,lk=ak;function D8({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const uk=x.forwardRef(D8);function Oi({open:e,onOpenChange:t,children:r}){return C.jsx(I8,{open:e,onOpenChange:t,children:r})}function j8({title:e,children:t}){var n,i,a,o,s,u,l,c;const{modal:r}=gt;return C.jsxs(C.Fragment,{children:[C.jsx(A8,{...r==null?void 0:r.overlay}),C.jsx("div",{...r==null?void 0:r.container,children:C.jsxs(P8,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[C.jsxs("div",{...(a=(i=r==null?void 0:r.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[C.jsx(N8,{...(s=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),C.jsx(lk,{children:C.jsx(uk,{role:"button",tabIndex:0,...(l=(u=r==null?void 0:r.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),C.jsx("div",{...(c=r==null?void 0:r.dialog)==null?void 0:c.content,children:t})]})})]})}Oi.Button=R8,Oi.Close=lk,Oi.Content=j8;const ck=N.forwardRef(({children:e,...t},r)=>{const{container:n}=gt;return C.jsxs("div",{...t,...n,ref:r,children:[C.jsx(CU,{}),C.jsxs(j1,{children:[C.jsx(M8,{}),e]})]})}),M8=()=>{const{modal:e}=gt,t=Me(n=>n.connected),{showModal:r}=HS();return N.useEffect(()=>{var n,i,a,o;t||r({title:"Connection Error",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(i=(n=e==null?void 0:e.dialog)==null?void 0:n.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),C.jsx(Oi.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(o=(a=e==null?void 0:e.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),C.jsx(C.Fragment,{})},L8=N.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:i}=gt,{container:a,icon:o}=i??{};return C.jsx("div",{...r,...a,ref:n,onClick:t,children:C.jsx("div",{...o})})});var $m="Collapsible",[F8,Mpe]=x_($m),[B8,Om]=F8($m),fk=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=S_({prop:n,defaultProp:i,onChange:o});return C.jsx(B8,{scope:r,disabled:a,contentId:Sc(),open:u,onOpenToggle:x.useCallback(()=>l(c=>!c),[l]),children:C.jsx(dr.div,{"data-state":Cm(u),"data-disabled":a?"":void 0,...s,ref:t})})});fk.displayName=$m;var dk="CollapsibleTrigger",pk=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=Om(dk,r);return C.jsx(dr.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Cm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:Kn(e.onClick,i.onOpenToggle)})});pk.displayName=dk;var Tm="CollapsibleContent",hk=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Om(Tm,e.__scopeCollapsible);return C.jsx(Ec,{present:r||i.open,children:({present:a})=>C.jsx(U8,{...n,ref:t,present:a})})});hk.displayName=Tm;var U8=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...a}=e,o=Om(Tm,r),[s,u]=x.useState(n),l=x.useRef(null),c=ri(t,l),f=x.useRef(0),d=f.current,p=x.useRef(0),h=p.current,m=o.open||s,g=x.useRef(m),v=x.useRef();return x.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),fa(()=>{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 y=b.getBoundingClientRect();f.current=y.height,p.current=y.width,g.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),u(n)}},[o.open,n]),C.jsx(dr.div,{"data-state":Cm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&i})});function Cm(e){return e?"open":"closed"}var z8=fk,W8=hk;const mk=({...e})=>{var o,s;const{header:t,modal:r}=gt,n=Me(u=>u.restartConversation),{showModal:i}=HS(),a=u=>{var l,c,f,d;u.stopPropagation(),i({title:"Restart Conversation",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(c=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),C.jsx(Oi.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:n,children:"Restart"})})]})})};return C.jsx(p6,{...e,...(s=(o=t==null?void 0:t.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},H8=({...e})=>{const{header:t}=gt,r=Me(i=>i.closeWindow),n=i=>{i.stopPropagation(),r==null||r()};return C.jsx(uk,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{i.key==="Enter"&&n(i)}})},zs=({icon:e,title:t,link:r,...n})=>{var o,s,u,l,c,f,d,p,h,m,g,v;const{header:i}=gt,a=e??t7;return t?r?C.jsxs("a",{...n,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:r,target:"_blank",rel:"noreferrer noopener",children:[C.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),C.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...n,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[C.jsx(a,{...(m=(h=i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),C.jsx("p",{...(v=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:v.text,children:t})]}):null},vk=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var d,p,h,m,g,v,b,y,k,S,E,$,M,z,O,D,H,L,I,j,F,q;const{header:i}=gt,a=Me(U=>U.configuration),o=Me(U=>U.closeWindow),s=Me(U=>U.getClientId)(),u=Me(U=>!U.disableRestartConversation),[l,c]=N.useState(!!e),f=!!((d=a.email)!=null&&d.title)||!!((p=a.phone)!=null&&p.title)||!!((h=a.website)!=null&&h.title)||!!((m=a.termsOfService)!=null&&m.link)||!!((g=a.privacyPolicy)!=null&&g.link);return C.jsxs(z8,{open:f?l:!1,onOpenChange:c,"data-disabled":f?void 0:"",...i.container,...n,children:[C.jsxs(pk,{...i.content.container,children:[C.jsx(td,{...n,userId:s,src:a.botAvatar,...i.content.avatar,children:a.botName||"Bot"}),C.jsx("h2",{...i.content.title,children:a.botName||"Bot"}),a.botDescription&&C.jsx("p",{...i.content.description,children:a.botDescription}),C.jsxs("div",{...i.content.actions.container,children:[u&&C.jsx(mk,{}),o&&C.jsx(H8,{})]})]}),C.jsxs(W8,{...i.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...i.expandedContent.group,children:[C.jsx(zs,{"data-email":"",icon:u7,title:(v=a.email)==null?void 0:v.title,link:(y=(b=a.email)==null?void 0:b.link)!=null&&y.startsWith("mailto:")?(k=a.email)==null?void 0:k.link:`mailto:${(S=a.email)==null?void 0:S.link}`}),C.jsx(zs,{"data-phone":"",icon:m7,title:(E=a.phone)==null?void 0:E.title,link:(M=($=a.phone)==null?void 0:$.link)!=null&&M.startsWith("tel:")?(z=a.phone)==null?void 0:z.link:`tel:${(O=a.phone)==null?void 0:O.link}`}),C.jsx(zs,{"data-website":"",link:(D=a.website)==null?void 0:D.link,icon:f7,title:(H=a.website)==null?void 0:H.title})]}),C.jsxs("div",{"data-legal":"",...(L=i.expandedContent)==null?void 0:L.group,children:[C.jsx(zs,{"data-terms":"",link:(I=a.termsOfService)==null?void 0:I.link,icon:s7,title:(j=a.termsOfService)==null?void 0:j.title}),C.jsx(zs,{"data-privacy":"",link:(F=a.privacyPolicy)==null?void 0:F.link,icon:p7,title:(q=a.privacyPolicy)==null?void 0:q.title})]})]})]})},yk=N.memo(({...e})=>{const{typingIndicator:t}=gt;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})}),Im=N.memo(N.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:i,sender:a,id:o,metadata:s,...u},l)=>{var v,b,y,k;const[c,f]=N.useState([]),{message:d}=gt,{botAvatar:p,botName:h}=Me(S=>S.configuration),m=Me(S=>S.getClientId)(),g=Bg(m??"",15);return C.jsx(zS.Provider,{value:{isLoading:c,setIsLoading:f},children:C.jsxs("div",{...u,...d==null?void 0:d.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:l,children:[C.jsxs(Hf,{"data-color":g,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[C.jsx(Vf,{...(b=d==null?void 0:d.avatar)==null?void 0:b.image,src:(a==null?void 0:a.avatar)??p}),C.jsx(qf,{...(y=d==null?void 0:d.avatar)==null?void 0:y.fallback,children:(a==null?void 0:a.name[0])??((k=h??"Bot")==null?void 0:k[0])})]}),t&&C.jsx(Ga,{block:t,direction:e,sender:a,timestamp:u.timestamp,messageId:o,metadata:s}),i]})})}));function V8(){const e=Me(n=>n.getClientId)(),t=Me(n=>n.configuration),{messageList:{marquee:r}}=gt;return C.jsxs("li",{...r.container,children:[C.jsx(td,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),C.jsxs("div",{...r.content,children:[C.jsx("h1",{...r.title,children:t.botName||"Bot"}),C.jsx("p",{...r.description,children:t.botDescription})]})]})}function q8(e,t){try{var r=global,n=r.document;if(typeof n<"u"&&n.createElement&&n.head&&n.head.appendChild){var i=n.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||n.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),n.head.appendChild(i)}}catch{}}function Z8(){q8("react-scroll-to-bottom:version","4.2.0")}var Ws=function(e){return e&&e.Math===Math&&e},Bt=Ws(typeof globalThis=="object"&&globalThis)||Ws(typeof window=="object"&&window)||Ws(typeof self=="object"&&self)||Ws(typeof ct=="object"&&ct)||Ws(typeof ct=="object"&&ct)||function(){return this}()||Function("return this")(),Ut=function(e){try{return!!e()}catch{return!0}},K8=Ut,Pc=!K8(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),G8=Pc,gk=Function.prototype,bk=gk.apply,wk=gk.call,Rm=typeof Reflect=="object"&&Reflect.apply||(G8?wk.bind(bk):function(){return wk.apply(bk,arguments)}),xk=Pc,Sk=Function.prototype,Am=Sk.call,Y8=xk&&Sk.bind.bind(Am,Am),Dt=xk?Y8:function(e){return function(){return Am.apply(e,arguments)}},Ek=Dt,J8=Ek({}.toString),X8=Ek("".slice),ra=function(e){return X8(J8(e),8,-1)},Q8=ra,eZ=Dt,Pm=function(e){if(Q8(e)==="Function")return eZ(e)},Nm=typeof document=="object"&&document.all,ar=typeof Nm>"u"&&Nm!==void 0?function(e){return typeof e=="function"||e===Nm}:function(e){return typeof e=="function"},Hs={},tZ=Ut,yr=!tZ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rZ=Pc,Nc=Function.prototype.call,Tn=rZ?Nc.bind(Nc):function(){return Nc.apply(Nc,arguments)},Dm={},_k={}.propertyIsEnumerable,kk=Object.getOwnPropertyDescriptor,nZ=kk&&!_k.call({1:2},1);Dm.f=nZ?function(t){var r=kk(this,t);return!!r&&r.enumerable}:_k;var Vs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},iZ=Dt,aZ=Ut,oZ=ra,jm=Object,sZ=iZ("".split),$k=aZ(function(){return!jm("z").propertyIsEnumerable(0)})?function(e){return oZ(e)==="String"?sZ(e,""):jm(e)}:jm,Mm=function(e){return e==null},lZ=Mm,uZ=TypeError,Dc=function(e){if(lZ(e))throw new uZ("Can't call method on "+e);return e},cZ=$k,fZ=Dc,Cn=function(e){return cZ(fZ(e))},dZ=ar,tn=function(e){return typeof e=="object"?e!==null:dZ(e)},Jt={},Lm=Jt,Fm=Bt,pZ=ar,Ok=function(e){return pZ(e)?e:void 0},In=function(e,t){return arguments.length<2?Ok(Lm[e])||Ok(Fm[e]):Lm[e]&&Lm[e][t]||Fm[e]&&Fm[e][t]},hZ=Dt,Gn=hZ({}.isPrototypeOf),mZ=Bt,Tk=mZ.navigator,Ck=Tk&&Tk.userAgent,Bm=Ck?String(Ck):"",Ik=Bt,Um=Bm,Rk=Ik.process,Ak=Ik.Deno,Pk=Rk&&Rk.versions||Ak&&Ak.version,Nk=Pk&&Pk.v8,rn,jc;Nk&&(rn=Nk.split("."),jc=rn[0]>0&&rn[0]<4?1:+(rn[0]+rn[1])),!jc&&Um&&(rn=Um.match(/Edge\/(\d+)/),(!rn||rn[1]>=74)&&(rn=Um.match(/Chrome\/(\d+)/),rn&&(jc=+rn[1])));var zm=jc,Dk=zm,vZ=Ut,yZ=Bt,gZ=yZ.String,ro=!!Object.getOwnPropertySymbols&&!vZ(function(){var e=Symbol("symbol detection");return!gZ(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Dk&&Dk<41}),bZ=ro,jk=bZ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wZ=In,xZ=ar,SZ=Gn,EZ=jk,_Z=Object,qs=EZ?function(e){return typeof e=="symbol"}:function(e){var t=wZ("Symbol");return xZ(t)&&SZ(t.prototype,_Z(e))},kZ=String,Mc=function(e){try{return kZ(e)}catch{return"Object"}},$Z=ar,OZ=Mc,TZ=TypeError,Lc=function(e){if($Z(e))return e;throw new TZ(OZ(e)+" is not a function")},CZ=Lc,IZ=Mm,Wm=function(e,t){var r=e[t];return IZ(r)?void 0:CZ(r)},Hm=Tn,Vm=ar,qm=tn,RZ=TypeError,AZ=function(e,t){var r,n;if(t==="string"&&Vm(r=e.toString)&&!qm(n=Hm(r,e))||Vm(r=e.valueOf)&&!qm(n=Hm(r,e))||t!=="string"&&Vm(r=e.toString)&&!qm(n=Hm(r,e)))return n;throw new RZ("Can't convert object to primitive value")},Mk={exports:{}},Lk=Bt,PZ=Object.defineProperty,NZ=function(e,t){try{PZ(Lk,e,{value:t,configurable:!0,writable:!0})}catch{Lk[e]=t}return t},DZ=Bt,jZ=NZ,Fk="__core-js_shared__",Bk=Mk.exports=DZ[Fk]||jZ(Fk,{});(Bk.versions||(Bk.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 Zm=Mk.exports,Uk=Zm,no=function(e,t){return Uk[e]||(Uk[e]=t||{})},MZ=Dc,LZ=Object,Yn=function(e){return LZ(MZ(e))},FZ=Dt,BZ=Yn,UZ=FZ({}.hasOwnProperty),Or=Object.hasOwn||function(t,r){return UZ(BZ(t),r)},zZ=Dt,WZ=0,HZ=Math.random(),VZ=zZ(1 .toString),Km=function(e){return"Symbol("+(e===void 0?"":e)+")_"+VZ(++WZ+HZ,36)},qZ=Bt,ZZ=no,zk=Or,KZ=Km,GZ=ro,YZ=jk,io=qZ.Symbol,Gm=ZZ("wks"),JZ=YZ?io.for||io:io&&io.withoutSetter||KZ,Zt=function(e){return zk(Gm,e)||(Gm[e]=GZ&&zk(io,e)?io[e]:JZ("Symbol."+e)),Gm[e]},XZ=Tn,Wk=tn,Hk=qs,QZ=Wm,eK=AZ,tK=Zt,rK=TypeError,nK=tK("toPrimitive"),iK=function(e,t){if(!Wk(e)||Hk(e))return e;var r=QZ(e,nK),n;if(r){if(t===void 0&&(t="default"),n=XZ(r,e,t),!Wk(n)||Hk(n))return n;throw new rK("Can't convert object to primitive value")}return t===void 0&&(t="number"),eK(e,t)},aK=iK,oK=qs,Ym=function(e){var t=aK(e,"string");return oK(t)?t:t+""},sK=Bt,Vk=tn,Jm=sK.document,lK=Vk(Jm)&&Vk(Jm.createElement),qk=function(e){return lK?Jm.createElement(e):{}},uK=yr,cK=Ut,fK=qk,Zk=!uK&&!cK(function(){return Object.defineProperty(fK("div"),"a",{get:function(){return 7}}).a!==7}),dK=yr,pK=Tn,hK=Dm,mK=Vs,vK=Cn,yK=Ym,gK=Or,bK=Zk,Kk=Object.getOwnPropertyDescriptor;Hs.f=dK?Kk:function(t,r){if(t=vK(t),r=yK(r),bK)try{return Kk(t,r)}catch{}if(gK(t,r))return mK(!pK(hK.f,t,r),t[r])};var wK=Ut,xK=ar,SK=/#|\.prototype\./,Zs=function(e,t){var r=_K[EK(e)];return r===$K?!0:r===kK?!1:xK(t)?wK(t):!!t},EK=Zs.normalize=function(e){return String(e).replace(SK,".").toLowerCase()},_K=Zs.data={},kK=Zs.NATIVE="N",$K=Zs.POLYFILL="P",OK=Zs,Gk=Pm,TK=Lc,CK=Pc,IK=Gk(Gk.bind),Xm=function(e,t){return TK(e),t===void 0?e:CK?IK(e,t):function(){return e.apply(t,arguments)}},nn={},RK=yr,AK=Ut,Yk=RK&&AK(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),PK=tn,NK=String,DK=TypeError,Ti=function(e){if(PK(e))return e;throw new DK(NK(e)+" is not an object")},jK=yr,MK=Zk,LK=Yk,Fc=Ti,Jk=Ym,FK=TypeError,Qm=Object.defineProperty,BK=Object.getOwnPropertyDescriptor,ev="enumerable",tv="configurable",rv="writable";nn.f=jK?LK?function(t,r,n){if(Fc(t),r=Jk(r),Fc(n),typeof t=="function"&&r==="prototype"&&"value"in n&&rv in n&&!n[rv]){var i=BK(t,r);i&&i[rv]&&(t[r]=n.value,n={configurable:tv in n?n[tv]:i[tv],enumerable:ev in n?n[ev]:i[ev],writable:!1})}return Qm(t,r,n)}:Qm:function(t,r,n){if(Fc(t),r=Jk(r),Fc(n),MK)try{return Qm(t,r,n)}catch{}if("get"in n||"set"in n)throw new FK("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var UK=yr,zK=nn,WK=Vs,Bc=UK?function(e,t,r){return zK.f(e,t,WK(1,r))}:function(e,t,r){return e[t]=r,e},Ks=Bt,HK=Rm,VK=Pm,qK=ar,ZK=Hs.f,KK=OK,ao=Jt,GK=Xm,oo=Bc,Xk=Or,YK=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return HK(e,this,arguments)};return t.prototype=e.prototype,t},vt=function(e,t){var r=e.target,n=e.global,i=e.stat,a=e.proto,o=n?Ks:i?Ks[r]:Ks[r]&&Ks[r].prototype,s=n?ao:ao[r]||oo(ao,r,{})[r],u=s.prototype,l,c,f,d,p,h,m,g,v;for(d in t)l=KK(n?d:r+(i?".":"#")+d,e.forced),c=!l&&o&&Xk(o,d),h=s[d],c&&(e.dontCallGetSet?(v=ZK(o,d),m=v&&v.value):m=o[d]),p=c&&m?m:t[d],!(!l&&!a&&typeof h==typeof p)&&(e.bind&&c?g=GK(p,Ks):e.wrap&&c?g=YK(p):a&&qK(p)?g=VK(p):g=p,(e.sham||p&&p.sham||h&&h.sham)&&oo(g,"sham",!0),oo(s,d,g),a&&(f=r+"Prototype",Xk(ao,f)||oo(ao,f,{}),oo(ao[f],d,p),e.real&&u&&(l||!u[d])&&oo(u,d,p)))},JK=ra,so=Array.isArray||function(t){return JK(t)==="Array"},XK=vt,QK=so;XK({target:"Array",stat:!0},{isArray:QK});var eG=Jt,tG=eG.Array.isArray,rG=tG,Qk=rG,nG=Qk,iG=nG,aG=iG,oG=aG,sG=oG;const e$=Ze(sG);function lG(e){if(e$(e))return e}var uG=Math.ceil,cG=Math.floor,fG=Math.trunc||function(t){var r=+t;return(r>0?cG:uG)(r)},dG=fG,Uc=function(e){var t=+e;return t!==t||t===0?0:dG(t)},pG=Uc,hG=Math.min,mG=function(e){var t=pG(e);return t>0?hG(t,9007199254740991):0},vG=mG,na=function(e){return vG(e.length)},yG=TypeError,gG=9007199254740991,nv=function(e){if(e>gG)throw yG("Maximum allowed index exceeded");return e},bG=yr,wG=nn,xG=Vs,Gs=function(e,t,r){bG?wG.f(e,t,xG(0,r)):e[t]=r},SG=Zt,EG=SG("toStringTag"),t$={};t$[EG]="z";var iv=String(t$)==="[object z]",_G=iv,kG=ar,zc=ra,$G=Zt,OG=$G("toStringTag"),TG=Object,CG=zc(function(){return arguments}())==="Arguments",IG=function(e,t){try{return e[t]}catch{}},Ys=_G?zc:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=IG(t=TG(e),OG))=="string"?r:CG?zc(t):(n=zc(t))==="Object"&&kG(t.callee)?"Arguments":n},RG=Dt,AG=ar,av=Zm,PG=RG(Function.toString);AG(av.inspectSource)||(av.inspectSource=function(e){return PG(e)});var NG=av.inspectSource,DG=Dt,jG=Ut,r$=ar,MG=Ys,LG=In,FG=NG,n$=function(){},i$=LG("Reflect","construct"),ov=/^\s*(?:class|function)\b/,BG=DG(ov.exec),UG=!ov.test(n$),Js=function(t){if(!r$(t))return!1;try{return i$(n$,[],t),!0}catch{return!1}},a$=function(t){if(!r$(t))return!1;switch(MG(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return UG||!!BG(ov,FG(t))}catch{return!0}};a$.sham=!0;var sv=!i$||jG(function(){var e;return Js(Js.call)||!Js(Object)||!Js(function(){e=!0})||e})?a$:Js,o$=so,zG=sv,WG=tn,HG=Zt,VG=HG("species"),s$=Array,qG=function(e){var t;return o$(e)&&(t=e.constructor,zG(t)&&(t===s$||o$(t.prototype))?t=void 0:WG(t)&&(t=t[VG],t===null&&(t=void 0))),t===void 0?s$:t},ZG=qG,lv=function(e,t){return new(ZG(e))(t===0?0:t)},KG=Ut,GG=Zt,YG=zm,JG=GG("species"),Wc=function(e){return YG>=51||!KG(function(){var t=[],r=t.constructor={};return r[JG]=function(){return{foo:1}},t[e](Boolean).foo!==1})},XG=vt,QG=Ut,eY=so,tY=tn,rY=Yn,nY=na,l$=nv,u$=Gs,iY=lv,aY=Wc,oY=Zt,sY=zm,c$=oY("isConcatSpreadable"),lY=sY>=51||!QG(function(){var e=[];return e[c$]=!1,e.concat()[0]!==e}),uY=function(e){if(!tY(e))return!1;var t=e[c$];return t!==void 0?!!t:eY(e)},cY=!lY||!aY("concat");XG({target:"Array",proto:!0,arity:1,forced:cY},{concat:function(t){var r=rY(this),n=iY(r,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?r:arguments[a],uY(l))for(u=nY(l),l$(i+u),o=0;o<u;o++,i++)o in l&&u$(n,i,l[o]);else l$(i+1),u$(n,i++,l);return n.length=i,n}});var fY=Ys,dY=String,Xs=function(e){if(fY(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return dY(e)},Hc={},pY=Uc,hY=Math.max,mY=Math.min,uv=function(e,t){var r=pY(e);return r<0?hY(r+t,0):mY(r,t)},vY=Cn,yY=uv,gY=na,f$=function(e){return function(t,r,n){var i=vY(t),a=gY(i);if(a===0)return!e&&-1;var o=yY(n,a),s;if(e&&r!==r){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}},d$={includes:f$(!0),indexOf:f$(!1)},Vc={},bY=Dt,cv=Or,wY=Cn,xY=d$.indexOf,SY=Vc,p$=bY([].push),h$=function(e,t){var r=wY(e),n=0,i=[],a;for(a in r)!cv(SY,a)&&cv(r,a)&&p$(i,a);for(;t.length>n;)cv(r,a=t[n++])&&(~xY(i,a)||p$(i,a));return i},fv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],EY=h$,_Y=fv,dv=Object.keys||function(t){return EY(t,_Y)},kY=yr,$Y=Yk,OY=nn,TY=Ti,CY=Cn,IY=dv;Hc.f=kY&&!$Y?Object.defineProperties:function(t,r){TY(t);for(var n=CY(r),i=IY(r),a=i.length,o=0,s;a>o;)OY.f(t,s=i[o++],n[s]);return t};var RY=In,AY=RY("document","documentElement"),PY=no,NY=Km,m$=PY("keys"),qc=function(e){return m$[e]||(m$[e]=NY(e))},DY=Ti,jY=Hc,v$=fv,MY=Vc,LY=AY,FY=qk,BY=qc,y$=">",g$="<",pv="prototype",hv="script",b$=BY("IE_PROTO"),mv=function(){},w$=function(e){return g$+hv+y$+e+g$+"/"+hv+y$},x$=function(e){e.write(w$("")),e.close();var t=e.parentWindow.Object;return e=null,t},UY=function(){var e=FY("iframe"),t="java"+hv+":",r;return e.style.display="none",LY.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(w$("document.F=Object")),r.close(),r.F},Zc,Kc=function(){try{Zc=new ActiveXObject("htmlfile")}catch{}Kc=typeof document<"u"?document.domain&&Zc?x$(Zc):UY():x$(Zc);for(var e=v$.length;e--;)delete Kc[pv][v$[e]];return Kc()};MY[b$]=!0;var vv=Object.create||function(t,r){var n;return t!==null?(mv[pv]=DY(t),n=new mv,mv[pv]=null,n[b$]=t):n=Kc(),r===void 0?n:jY.f(n,r)},Gc={},zY=h$,WY=fv,HY=WY.concat("length","prototype");Gc.f=Object.getOwnPropertyNames||function(t){return zY(t,HY)};var S$={},VY=Dt,Yc=VY([].slice),qY=ra,ZY=Cn,E$=Gc.f,KY=Yc,_$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],GY=function(e){try{return E$(e)}catch{return KY(_$)}};S$.f=function(t){return _$&&qY(t)==="Window"?GY(t):E$(ZY(t))};var Jc={};Jc.f=Object.getOwnPropertySymbols;var YY=Bc,Xc=function(e,t,r,n){return n&&n.enumerable?e[t]=r:YY(e,t,r),e},JY=nn,XY=function(e,t,r){return JY.f(e,t,r)},Qs={},QY=Zt;Qs.f=QY;var k$=Jt,eJ=Or,tJ=Qs,rJ=nn.f,_t=function(e){var t=k$.Symbol||(k$.Symbol={});eJ(t,e)||rJ(t,e,{value:tJ.f(e)})},nJ=Tn,iJ=In,aJ=Zt,oJ=Xc,$$=function(){var e=iJ("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=aJ("toPrimitive");t&&!t[n]&&oJ(t,n,function(i){return nJ(r,this)},{arity:1})},sJ=iv,lJ=Ys,uJ=sJ?{}.toString:function(){return"[object "+lJ(this)+"]"},cJ=iv,fJ=nn.f,dJ=Bc,pJ=Or,hJ=uJ,mJ=Zt,O$=mJ("toStringTag"),lo=function(e,t,r,n){var i=r?e:e&&e.prototype;i&&(pJ(i,O$)||fJ(i,O$,{configurable:!0,value:t}),n&&!cJ&&dJ(i,"toString",hJ))},vJ=Bt,yJ=ar,T$=vJ.WeakMap,gJ=yJ(T$)&&/native code/.test(String(T$)),bJ=gJ,C$=Bt,wJ=tn,xJ=Bc,yv=Or,gv=Zm,SJ=qc,EJ=Vc,I$="Object already initialized",bv=C$.TypeError,_J=C$.WeakMap,Qc,el,ef,kJ=function(e){return ef(e)?el(e):Qc(e,{})},$J=function(e){return function(t){var r;if(!wJ(t)||(r=el(t)).type!==e)throw new bv("Incompatible receiver, "+e+" required");return r}};if(bJ||gv.state){var Rn=gv.state||(gv.state=new _J);Rn.get=Rn.get,Rn.has=Rn.has,Rn.set=Rn.set,Qc=function(e,t){if(Rn.has(e))throw new bv(I$);return t.facade=e,Rn.set(e,t),t},el=function(e){return Rn.get(e)||{}},ef=function(e){return Rn.has(e)}}else{var uo=SJ("state");EJ[uo]=!0,Qc=function(e,t){if(yv(e,uo))throw new bv(I$);return t.facade=e,xJ(e,uo,t),t},el=function(e){return yv(e,uo)?e[uo]:{}},ef=function(e){return yv(e,uo)}}var wv={set:Qc,get:el,has:ef,enforce:kJ,getterFor:$J},OJ=Xm,TJ=Dt,CJ=$k,IJ=Yn,RJ=na,AJ=lv,R$=TJ([].push),Ci=function(e){var t=e===1,r=e===2,n=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var d=IJ(u),p=CJ(d),h=RJ(p),m=OJ(l,c),g=0,v=f||AJ,b=t?v(u,h):r||o?v(u,0):void 0,y,k;h>g;g++)if((s||g in p)&&(y=p[g],k=m(y,g,d),e))if(t)b[g]=k;else if(k)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:R$(b,y)}else switch(e){case 4:return!1;case 7:R$(b,y)}return a?-1:n||i?i:b}},xv={forEach:Ci(0),map:Ci(1),filter:Ci(2),some:Ci(3),every:Ci(4),find:Ci(5),findIndex:Ci(6),filterReject:Ci(7)},tf=vt,tl=Bt,Sv=Tn,PJ=Dt,co=yr,fo=ro,NJ=Ut,Kt=Or,DJ=Gn,Ev=Ti,rf=Cn,_v=Ym,jJ=Xs,kv=Vs,po=vv,A$=dv,MJ=Gc,P$=S$,LJ=Jc,N$=Hs,D$=nn,FJ=Hc,j$=Dm,M$=Xc,BJ=XY,$v=no,UJ=qc,L$=Vc,F$=Km,zJ=Zt,WJ=Qs,HJ=_t,VJ=$$,qJ=lo,B$=wv,nf=xv.forEach,gr=UJ("hidden"),af="Symbol",rl="prototype",ZJ=B$.set,U$=B$.getterFor(af),an=Object[rl],ia=tl.Symbol,nl=ia&&ia[rl],KJ=tl.RangeError,GJ=tl.TypeError,Ov=tl.QObject,z$=N$.f,aa=D$.f,W$=P$.f,YJ=j$.f,H$=PJ([].push),Jn=$v("symbols"),il=$v("op-symbols"),JJ=$v("wks"),Tv=!Ov||!Ov[rl]||!Ov[rl].findChild,V$=function(e,t,r){var n=z$(an,t);n&&delete an[t],aa(e,t,r),n&&e!==an&&aa(an,t,n)},Cv=co&&NJ(function(){return po(aa({},"a",{get:function(){return aa(this,"a",{value:7}).a}})).a!==7})?V$:aa,Iv=function(e,t){var r=Jn[e]=po(nl);return ZJ(r,{type:af,tag:e,description:t}),co||(r.description=t),r},of=function(t,r,n){t===an&&of(il,r,n),Ev(t);var i=_v(r);return Ev(n),Kt(Jn,i)?(n.enumerable?(Kt(t,gr)&&t[gr][i]&&(t[gr][i]=!1),n=po(n,{enumerable:kv(0,!1)})):(Kt(t,gr)||aa(t,gr,kv(1,po(null))),t[gr][i]=!0),Cv(t,i,n)):aa(t,i,n)},Rv=function(t,r){Ev(t);var n=rf(r),i=A$(n).concat(G$(n));return nf(i,function(a){(!co||Sv(q$,n,a))&&of(t,a,n[a])}),t},XJ=function(t,r){return r===void 0?po(t):Rv(po(t),r)},q$=function(t){var r=_v(t),n=Sv(YJ,this,r);return this===an&&Kt(Jn,r)&&!Kt(il,r)?!1:n||!Kt(this,r)||!Kt(Jn,r)||Kt(this,gr)&&this[gr][r]?n:!0},Z$=function(t,r){var n=rf(t),i=_v(r);if(!(n===an&&Kt(Jn,i)&&!Kt(il,i))){var a=z$(n,i);return a&&Kt(Jn,i)&&!(Kt(n,gr)&&n[gr][i])&&(a.enumerable=!0),a}},K$=function(t){var r=W$(rf(t)),n=[];return nf(r,function(i){!Kt(Jn,i)&&!Kt(L$,i)&&H$(n,i)}),n},G$=function(e){var t=e===an,r=W$(t?il:rf(e)),n=[];return nf(r,function(i){Kt(Jn,i)&&(!t||Kt(an,i))&&H$(n,Jn[i])}),n};fo||(ia=function(){if(DJ(nl,this))throw new GJ("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:jJ(arguments[0]),r=F$(t),n=function(i){var a=this===void 0?tl:this;a===an&&Sv(n,il,i),Kt(a,gr)&&Kt(a[gr],r)&&(a[gr][r]=!1);var o=kv(1,i);try{Cv(a,r,o)}catch(s){if(!(s instanceof KJ))throw s;V$(a,r,o)}};return co&&Tv&&Cv(an,r,{configurable:!0,set:n}),Iv(r,t)},nl=ia[rl],M$(nl,"toString",function(){return U$(this).tag}),M$(ia,"withoutSetter",function(e){return Iv(F$(e),e)}),j$.f=q$,D$.f=of,FJ.f=Rv,N$.f=Z$,MJ.f=P$.f=K$,LJ.f=G$,WJ.f=function(e){return Iv(zJ(e),e)},co&&BJ(nl,"description",{configurable:!0,get:function(){return U$(this).description}})),tf({global:!0,constructor:!0,wrap:!0,forced:!fo,sham:!fo},{Symbol:ia}),nf(A$(JJ),function(e){HJ(e)}),tf({target:af,stat:!0,forced:!fo},{useSetter:function(){Tv=!0},useSimple:function(){Tv=!1}}),tf({target:"Object",stat:!0,forced:!fo,sham:!co},{create:XJ,defineProperty:of,defineProperties:Rv,getOwnPropertyDescriptor:Z$}),tf({target:"Object",stat:!0,forced:!fo},{getOwnPropertyNames:K$}),VJ(),qJ(ia,af),L$[gr]=!0;var QJ=ro,Y$=QJ&&!!Symbol.for&&!!Symbol.keyFor,eX=vt,tX=In,rX=Or,nX=Xs,J$=no,iX=Y$,Av=J$("string-to-symbol-registry"),aX=J$("symbol-to-string-registry");eX({target:"Symbol",stat:!0,forced:!iX},{for:function(e){var t=nX(e);if(rX(Av,t))return Av[t];var r=tX("Symbol")(t);return Av[t]=r,aX[r]=t,r}});var oX=vt,sX=Or,lX=qs,uX=Mc,cX=no,fX=Y$,X$=cX("symbol-to-string-registry");oX({target:"Symbol",stat:!0,forced:!fX},{keyFor:function(t){if(!lX(t))throw new TypeError(uX(t)+" is not a symbol");if(sX(X$,t))return X$[t]}});var dX=Dt,Q$=so,pX=ar,eO=ra,hX=Xs,tO=dX([].push),mX=function(e){if(pX(e))return e;if(Q$(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];typeof i=="string"?tO(r,i):(typeof i=="number"||eO(i)==="Number"||eO(i)==="String")&&tO(r,hX(i))}var a=r.length,o=!0;return function(s,u){if(o)return o=!1,u;if(Q$(this))return u;for(var l=0;l<a;l++)if(r[l]===s)return u}}},vX=vt,rO=In,nO=Rm,yX=Tn,al=Dt,iO=Ut,aO=ar,oO=qs,sO=Yc,gX=mX,bX=ro,wX=String,Ii=rO("JSON","stringify"),sf=al(/./.exec),lO=al("".charAt),xX=al("".charCodeAt),SX=al("".replace),EX=al(1 .toString),_X=/[\uD800-\uDFFF]/g,uO=/^[\uD800-\uDBFF]$/,cO=/^[\uDC00-\uDFFF]$/,fO=!bX||iO(function(){var e=rO("Symbol")("stringify detection");return Ii([e])!=="[null]"||Ii({a:e})!=="{}"||Ii(Object(e))!=="{}"}),dO=iO(function(){return Ii("\uDF06\uD834")!=='"\\udf06\\ud834"'||Ii("\uDEAD")!=='"\\udead"'}),kX=function(e,t){var r=sO(arguments),n=gX(t);if(!(!aO(n)&&(e===void 0||oO(e))))return r[1]=function(i,a){if(aO(n)&&(a=yX(n,this,wX(i),a)),!oO(a))return a},nO(Ii,null,r)},$X=function(e,t,r){var n=lO(r,t-1),i=lO(r,t+1);return sf(uO,e)&&!sf(cO,i)||sf(cO,e)&&!sf(uO,n)?"\\u"+EX(xX(e,0),16):e};Ii&&vX({target:"JSON",stat:!0,arity:3,forced:fO||dO},{stringify:function(t,r,n){var i=sO(arguments),a=nO(fO?kX:Ii,null,i);return dO&&typeof a=="string"?SX(a,_X,$X):a}});var OX=vt,TX=ro,CX=Ut,pO=Jc,IX=Yn,RX=!TX||CX(function(){pO.f(1)});OX({target:"Object",stat:!0,forced:RX},{getOwnPropertySymbols:function(t){var r=pO.f;return r?r(IX(t)):[]}});var AX=_t;AX("asyncIterator");var PX=_t;PX("hasInstance");var NX=_t;NX("isConcatSpreadable");var DX=_t;DX("iterator");var jX=_t;jX("match");var MX=_t;MX("matchAll");var LX=_t;LX("replace");var FX=_t;FX("search");var BX=_t;BX("species");var UX=_t;UX("split");var zX=_t,WX=$$;zX("toPrimitive"),WX();var HX=In,VX=_t,qX=lo;VX("toStringTag"),qX(HX("Symbol"),"Symbol");var ZX=_t;ZX("unscopables");var KX=Bt,GX=lo;GX(KX.JSON,"JSON",!0);var YX=Jt,JX=YX.Symbol,ho={},Pv=yr,XX=Or,hO=Function.prototype,QX=Pv&&Object.getOwnPropertyDescriptor,Nv=XX(hO,"name"),eQ=Nv&&(function(){}).name==="something",tQ=Nv&&(!Pv||Pv&&QX(hO,"name").configurable),rQ={EXISTS:Nv,PROPER:eQ,CONFIGURABLE:tQ},nQ=Ut,iQ=!nQ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),aQ=Or,oQ=ar,sQ=Yn,lQ=qc,uQ=iQ,mO=lQ("IE_PROTO"),Dv=Object,cQ=Dv.prototype,vO=uQ?Dv.getPrototypeOf:function(e){var t=sQ(e);if(aQ(t,mO))return t[mO];var r=t.constructor;return oQ(r)&&t instanceof r?r.prototype:t instanceof Dv?cQ:null},fQ=Ut,dQ=ar,pQ=tn,hQ=vv,yO=vO,mQ=Xc,vQ=Zt,jv=vQ("iterator"),gO=!1,Xn,Mv,Lv;[].keys&&(Lv=[].keys(),"next"in Lv?(Mv=yO(yO(Lv)),Mv!==Object.prototype&&(Xn=Mv)):gO=!0);var yQ=!pQ(Xn)||fQ(function(){var e={};return Xn[jv].call(e)!==e});yQ?Xn={}:Xn=hQ(Xn),dQ(Xn[jv])||mQ(Xn,jv,function(){return this});var bO={IteratorPrototype:Xn,BUGGY_SAFARI_ITERATORS:gO},gQ=bO.IteratorPrototype,bQ=vv,wQ=Vs,xQ=lo,SQ=ho,EQ=function(){return this},_Q=function(e,t,r,n){var i=t+" Iterator";return e.prototype=bQ(gQ,{next:wQ(+!n,r)}),xQ(e,i,!1,!0),SQ[i]=EQ,e},kQ=Dt,$Q=Lc,OQ=function(e,t,r){try{return kQ($Q(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},TQ=tn,CQ=function(e){return TQ(e)||e===null},IQ=CQ,RQ=String,AQ=TypeError,PQ=function(e){if(IQ(e))return e;throw new AQ("Can't set "+RQ(e)+" as a prototype")},NQ=OQ,DQ=tn,jQ=Dc,MQ=PQ;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},r;try{r=NQ(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(i,a){return jQ(i),MQ(a),DQ(i)&&(e?r(i,a):i.__proto__=a),i}}();var LQ=vt,FQ=Tn,wO=rQ,BQ=_Q,UQ=vO,zQ=lo,xO=Xc,WQ=Zt,SO=ho,EO=bO,HQ=wO.PROPER;wO.CONFIGURABLE,EO.IteratorPrototype;var lf=EO.BUGGY_SAFARI_ITERATORS,Fv=WQ("iterator"),_O="keys",uf="values",kO="entries",VQ=function(){return this},$O=function(e,t,r,n,i,a,o){BQ(r,t,n);var s=function(v){if(v===i&&d)return d;if(!lf&&v&&v in c)return c[v];switch(v){case _O:return function(){return new r(this,v)};case uf:return function(){return new r(this,v)};case kO:return function(){return new r(this,v)}}return function(){return new r(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Fv]||c["@@iterator"]||i&&c[i],d=!lf&&f||s(i),p=t==="Array"&&c.entries||f,h,m,g;if(p&&(h=UQ(p.call(new e)),h!==Object.prototype&&h.next&&(zQ(h,u,!0,!0),SO[u]=VQ)),HQ&&i===uf&&f&&f.name!==uf&&(l=!0,d=function(){return FQ(f,this)}),i)if(m={values:s(uf),keys:a?d:s(_O),entries:s(kO)},o)for(g in m)(lf||l||!(g in c))&&xO(c,g,m[g]);else LQ({target:t,proto:!0,forced:lf||l},m);return o&&c[Fv]!==d&&xO(c,Fv,d,{name:i}),SO[t]=d,m},OO=function(e,t){return{value:e,done:t}},qQ=Cn,TO=ho,CO=wv;nn.f;var ZQ=$O,cf=OO,IO="Array Iterator",KQ=CO.set,GQ=CO.getterFor(IO);ZQ(Array,"Array",function(e,t){KQ(this,{type:IO,target:qQ(e),index:0,kind:t})},function(){var e=GQ(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,cf(void 0,!0);switch(e.kind){case"keys":return cf(r,!1);case"values":return cf(t[r],!1)}return cf([r,t[r]],!1)},"values"),TO.Arguments=TO.Array;var YQ={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},JQ=YQ,XQ=Bt,QQ=lo,RO=ho;for(var Bv in JQ)QQ(XQ[Bv],Bv),RO[Bv]=RO.Array;var eee=JX,tee=eee,ree=Zt,nee=nn.f,AO=ree("metadata"),PO=Function.prototype;PO[AO]===void 0&&nee(PO,AO,{value:null});var iee=_t;iee("asyncDispose");var aee=_t;aee("dispose");var oee=_t;oee("metadata");var see=tee,lee=see,uee=In,cee=Dt,Uv=uee("Symbol"),fee=Uv.keyFor,dee=cee(Uv.prototype.valueOf),NO=Uv.isRegisteredSymbol||function(t){try{return fee(dee(t))!==void 0}catch{return!1}},pee=vt,hee=NO;pee({target:"Symbol",stat:!0},{isRegisteredSymbol:hee});for(var mee=no,DO=In,vee=Dt,yee=qs,gee=Zt,ff=DO("Symbol"),jO=ff.isWellKnownSymbol,MO=DO("Object","getOwnPropertyNames"),bee=vee(ff.prototype.valueOf),LO=mee("wks"),zv=0,FO=MO(ff),wee=FO.length;zv<wee;zv++)try{var BO=FO[zv];yee(ff[BO])&&gee(BO)}catch{}var UO=function(t){if(jO&&jO(t))return!0;try{for(var r=bee(t),n=0,i=MO(LO),a=i.length;n<a;n++)if(LO[i[n]]==r)return!0}catch{}return!1},xee=vt,See=UO;xee({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:See});var Eee=_t;Eee("customMatcher");var _ee=_t;_ee("observable");var kee=vt,$ee=NO;kee({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:$ee});var Oee=vt,Tee=UO;Oee({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Tee});var Cee=_t;Cee("matcher");var Iee=_t;Iee("metadataKey");var Ree=_t;Ree("patternMatch");var Aee=_t;Aee("replaceAll");var Pee=lee,Nee=Pee,Dee=Nee;const mo=Ze(Dee);var Wv=Dt,jee=Uc,Mee=Xs,Lee=Dc,Fee=Wv("".charAt),zO=Wv("".charCodeAt),Bee=Wv("".slice),WO=function(e){return function(t,r){var n=Mee(Lee(t)),i=jee(r),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=zO(n,i),o<55296||o>56319||i+1===a||(s=zO(n,i+1))<56320||s>57343?e?Fee(n,i):o:e?Bee(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Uee={codeAt:WO(!1),charAt:WO(!0)},zee=Uee.charAt,Wee=Xs,HO=wv,Hee=$O,VO=OO,qO="String Iterator",Vee=HO.set,qee=HO.getterFor(qO);Hee(String,"String",function(e){Vee(this,{type:qO,string:Wee(e),index:0})},function(){var t=qee(this),r=t.string,n=t.index,i;return n>=r.length?VO(void 0,!0):(i=zee(r,n),t.index+=i.length,VO(i,!1))});var Zee=Ys,ZO=Wm,Kee=Mm,Gee=ho,Yee=Zt,Jee=Yee("iterator"),Hv=function(e){if(!Kee(e))return ZO(e,Jee)||ZO(e,"@@iterator")||Gee[Zee(e)]},Xee=Hv,Qee=Xee,ete=Qee,tte=ete,rte=tte,nte=rte,ite=nte,ate=ite,ote=ate;const KO=Ze(ote);var ste=yr,lte=so,ute=TypeError,cte=Object.getOwnPropertyDescriptor,fte=ste&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),GO=fte?function(e,t){if(lte(e)&&!cte(e,"length").writable)throw new ute("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},dte=vt,pte=Yn,hte=na,mte=GO,vte=nv,yte=Ut,gte=yte(function(){return[].push.call({length:4294967296},1)!==4294967297}),bte=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},wte=gte||!bte();dte({target:"Array",proto:!0,arity:1,forced:wte},{push:function(t){var r=pte(this),n=hte(r),i=arguments.length;vte(n+i);for(var a=0;a<i;a++)r[n]=arguments[a],n++;return mte(r,n),n}});var xte=Bt,Ste=Jt,oa=function(e,t){var r=Ste[e+"Prototype"],n=r&&r[t];if(n)return n;var i=xte[e],a=i&&i.prototype;return a&&a[t]},Ete=oa,_te=Ete("Array","push"),kte=Gn,$te=_te,Vv=Array.prototype,Ote=function(e){var t=e.push;return e===Vv||kte(Vv,e)&&t===Vv.push?$te:t},Tte=Ote,Cte=Tte,Ite=Cte,Rte=Ite,Ate=Rte,Pte=Ate,Nte=Pte;const Dte=Ze(Nte);function jte(e,t){var r=e==null?null:typeof mo<"u"&&KO(e)||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(Dte(s).call(s,n.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Mte=vt,YO=so,Lte=sv,Fte=tn,JO=uv,Bte=na,Ute=Cn,zte=Gs,Wte=Zt,Hte=Wc,Vte=Yc,qte=Hte("slice"),Zte=Wte("species"),qv=Array,Kte=Math.max;Mte({target:"Array",proto:!0,forced:!qte},{slice:function(t,r){var n=Ute(this),i=Bte(n),a=JO(t,i),o=JO(r===void 0?i:r,i),s,u,l;if(YO(n)&&(s=n.constructor,Lte(s)&&(s===qv||YO(s.prototype))?s=void 0:Fte(s)&&(s=s[Zte],s===null&&(s=void 0)),s===qv||s===void 0))return Vte(n,a,o);for(u=new(s===void 0?qv:s)(Kte(o-a,0)),l=0;a<o;a++,l++)a in n&&zte(u,l,n[a]);return u.length=l,u}});var Gte=oa,Yte=Gte("Array","slice"),Jte=Gn,Xte=Yte,Zv=Array.prototype,Qte=function(e){var t=e.slice;return e===Zv||Jte(Zv,e)&&t===Zv.slice?Xte:t},ere=Qte,tre=ere,rre=tre,nre=rre,ire=nre,are=ire,ore=are;const sre=Ze(ore);var lre=Tn,XO=Ti,ure=Wm,cre=function(e,t,r){var n,i;XO(e);try{if(n=ure(e,"return"),!n){if(t==="throw")throw r;return r}n=lre(n,e)}catch(a){i=!0,n=a}if(t==="throw")throw r;if(i)throw n;return XO(n),r},fre=Ti,dre=cre,pre=function(e,t,r,n){try{return n?t(fre(r)[0],r[1]):t(r)}catch(i){dre(e,"throw",i)}},hre=Zt,mre=ho,vre=hre("iterator"),yre=Array.prototype,gre=function(e){return e!==void 0&&(mre.Array===e||yre[vre]===e)},bre=Tn,wre=Lc,xre=Ti,Sre=Mc,Ere=Hv,_re=TypeError,kre=function(e,t){var r=arguments.length<2?Ere(e):t;if(wre(r))return xre(bre(r,e));throw new _re(Sre(e)+" is not iterable")},$re=Xm,Ore=Tn,Tre=Yn,Cre=pre,Ire=gre,Rre=sv,Are=na,QO=Gs,Pre=kre,Nre=Hv,eT=Array,Dre=function(t){var r=Tre(t),n=Rre(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=$re(a,i>2?arguments[2]:void 0));var s=Nre(r),u=0,l,c,f,d,p,h;if(s&&!(this===eT&&Ire(s)))for(c=n?new this:[],d=Pre(r,s),p=d.next;!(f=Ore(p,d)).done;u++)h=o?Cre(d,a,[f.value,u],!0):f.value,QO(c,u,h);else for(l=Are(r),c=n?new this(l):eT(l);l>u;u++)h=o?a(r[u],u):r[u],QO(c,u,h);return c.length=u,c},jre=Zt,tT=jre("iterator"),rT=!1;try{var Mre=0,nT={next:function(){return{done:!!Mre++}},return:function(){rT=!0}};nT[tT]=function(){return this},Array.from(nT,function(){throw 2})}catch{}var Lre=function(e,t){try{if(!t&&!rT)return!1}catch{return!1}var r=!1;try{var n={};n[tT]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Fre=vt,Bre=Dre,Ure=Lre,zre=!Ure(function(e){Array.from(e)});Fre({target:"Array",stat:!0,forced:zre},{from:Bre});var Wre=Jt,Hre=Wre.Array.from,Vre=Hre,qre=Vre,Zre=qre,Kre=Zre,Gre=Kre,Yre=Gre,Jre=Yre;const iT=Ze(Jre);function Kv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function aT(e,t){if(e){var r;if(typeof e=="string")return Kv(e,t);var n=sre(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?iT(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kv(e,t):void 0}}function Xre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
329
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function An(e,t){return
|
|
328
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},I8="DialogDescriptionWarning",R8=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uk(I8).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(n))},[n,e,t]),null},A8=J_,P8=Q_,N8=tk,D8=rk,j8=ik,ck=sk;function M8({title:e,titleId:t,...r},n){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:n,"aria-labelledby":t},r),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const fk=x.forwardRef(M8);function Oi({open:e,onOpenChange:t,children:r}){return C.jsx(A8,{open:e,onOpenChange:t,children:r})}function L8({title:e,children:t}){var n,i,a,o,s,l,u,c;const{modal:r}=gt;return C.jsxs(C.Fragment,{children:[C.jsx(N8,{...r==null?void 0:r.overlay}),C.jsx("div",{...r==null?void 0:r.container,children:C.jsxs(D8,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[C.jsxs("div",{...(a=(i=r==null?void 0:r.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[C.jsx(j8,{...(s=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),C.jsx(ck,{children:C.jsx(fk,{role:"button",tabIndex:0,...(u=(l=r==null?void 0:r.dialog)==null?void 0:l.title)==null?void 0:u.closeIcon})})]}),C.jsx("div",{...(c=r==null?void 0:r.dialog)==null?void 0:c.content,children:t})]})})]})}Oi.Button=P8,Oi.Close=ck,Oi.Content=L8;const dk=j.forwardRef(({children:e,className:t,...r},n)=>{const{container:{className:i}}=gt;return C.jsxs("div",{...r,className:Vp(i,t),ref:n,children:[C.jsx(RU,{}),C.jsxs(L1,{children:[C.jsx(F8,{}),e]})]})}),F8=()=>{const{modal:e}=gt,t=Me(n=>n.connected),{showModal:r}=qS();return j.useEffect(()=>{var n,i,a,o;t||r({title:"Connection Error",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(i=(n=e==null?void 0:e.dialog)==null?void 0:n.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),C.jsx(Oi.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(o=(a=e==null?void 0:e.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),C.jsx(C.Fragment,{})},B8=j.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:i}=gt,{container:a,icon:o}=i??{};return C.jsx("div",{...r,...a,ref:n,onClick:t,children:C.jsx("div",{...o})})});var Om="Collapsible",[U8,Fpe]=E_(Om),[z8,Tm]=U8(Om),pk=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l=!1,u]=__({prop:n,defaultProp:i,onChange:o});return C.jsx(z8,{scope:r,disabled:a,contentId:Sc(),open:l,onOpenToggle:x.useCallback(()=>u(c=>!c),[u]),children:C.jsx(dr.div,{"data-state":Im(l),"data-disabled":a?"":void 0,...s,ref:t})})});pk.displayName=Om;var hk="CollapsibleTrigger",mk=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=Tm(hk,r);return C.jsx(dr.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Im(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:Kn(e.onClick,i.onOpenToggle)})});mk.displayName=hk;var Cm="CollapsibleContent",vk=x.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Tm(Cm,e.__scopeCollapsible);return C.jsx(Ec,{present:r||i.open,children:({present:a})=>C.jsx(W8,{...n,ref:t,present:a})})});vk.displayName=Cm;var W8=x.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...a}=e,o=Tm(Cm,r),[s,l]=x.useState(n),u=x.useRef(null),c=ri(t,u),f=x.useRef(0),d=f.current,p=x.useRef(0),h=p.current,m=o.open||s,g=x.useRef(m),v=x.useRef();return x.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),fa(()=>{const y=u.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();f.current=b.height,p.current=b.width,g.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),l(n)}},[o.open,n]),C.jsx(dr.div,{"data-state":Im(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&i})});function Im(e){return e?"open":"closed"}var H8=pk,V8=vk;const yk=({...e})=>{var o,s;const{header:t,modal:r}=gt,n=Me(l=>l.restartConversation),{showModal:i}=qS(),a=l=>{var u,c,f,d;l.stopPropagation(),i({title:"Restart Conversation",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(c=(u=r==null?void 0:r.dialog)==null?void 0:u.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),C.jsx(Oi.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:n,children:"Restart"})})]})})};return C.jsx(m6,{...e,...(s=(o=t==null?void 0:t.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:l=>{l.key==="Enter"&&a(l)}})},q8=({...e})=>{const{header:t}=gt,r=Me(i=>i.closeWindow),n=i=>{i.stopPropagation(),r==null||r()};return C.jsx(fk,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{i.key==="Enter"&&n(i)}})},zs=({icon:e,title:t,link:r,...n})=>{var o,s,l,u,c,f,d,p,h,m,g,v;const{header:i}=gt,a=e??n7;return t?r?C.jsxs("a",{...n,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:r,target:"_blank",rel:"noreferrer noopener",children:[C.jsx(a,{...(u=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:u.icon}),C.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...n,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[C.jsx(a,{...(m=(h=i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),C.jsx("p",{...(v=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:v.text,children:t})]}):null},gk=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var d,p,h,m,g,v,y,b,k,S,_,$,N,z,O,D,H,L,W,M,I,V;const{header:i}=gt,a=Me(U=>U.configuration),o=Me(U=>U.closeWindow),s=Me(U=>U.getClientId)(),l=Me(U=>!U.disableRestartConversation),[u,c]=j.useState(!!e),f=!!((d=a.email)!=null&&d.title)||!!((p=a.phone)!=null&&p.title)||!!((h=a.website)!=null&&h.title)||!!((m=a.termsOfService)!=null&&m.link)||!!((g=a.privacyPolicy)!=null&&g.link);return C.jsxs(H8,{open:f?u:!1,onOpenChange:c,"data-disabled":f?void 0:"",...i.container,...n,children:[C.jsxs(mk,{...i.content.container,children:[C.jsx(td,{...n,userId:s,src:a.botAvatar,...i.content.avatar,children:a.botName||"Bot"}),C.jsx("h2",{...i.content.title,children:a.botName||"Bot"}),a.botDescription&&C.jsx("p",{...i.content.description,children:a.botDescription}),C.jsxs("div",{...i.content.actions.container,children:[l&&C.jsx(yk,{}),o&&C.jsx(q8,{})]})]}),C.jsxs(V8,{...i.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...i.expandedContent.group,children:[C.jsx(zs,{"data-email":"",icon:f7,title:(v=a.email)==null?void 0:v.title,link:(b=(y=a.email)==null?void 0:y.link)!=null&&b.startsWith("mailto:")?(k=a.email)==null?void 0:k.link:`mailto:${(S=a.email)==null?void 0:S.link}`}),C.jsx(zs,{"data-phone":"",icon:y7,title:(_=a.phone)==null?void 0:_.title,link:(N=($=a.phone)==null?void 0:$.link)!=null&&N.startsWith("tel:")?(z=a.phone)==null?void 0:z.link:`tel:${(O=a.phone)==null?void 0:O.link}`}),C.jsx(zs,{"data-website":"",link:(D=a.website)==null?void 0:D.link,icon:p7,title:(H=a.website)==null?void 0:H.title})]}),C.jsxs("div",{"data-legal":"",...(L=i.expandedContent)==null?void 0:L.group,children:[C.jsx(zs,{"data-terms":"",link:(W=a.termsOfService)==null?void 0:W.link,icon:u7,title:(M=a.termsOfService)==null?void 0:M.title}),C.jsx(zs,{"data-privacy":"",link:(I=a.privacyPolicy)==null?void 0:I.link,icon:m7,title:(V=a.privacyPolicy)==null?void 0:V.title})]})]})]})},bk=j.memo(({...e})=>{const{typingIndicator:t}=gt;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})}),Rm=j.memo(j.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:i,sender:a,id:o,metadata:s,...l},u)=>{var v,y,b,k;const[c,f]=j.useState([]),{message:d}=gt,{botAvatar:p,botName:h}=Me(S=>S.configuration),m=Me(S=>S.getClientId)(),g=Ug(m??"",15);return C.jsx(HS.Provider,{value:{isLoading:c,setIsLoading:f},children:C.jsxs("div",{...l,...d==null?void 0:d.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:u,children:[C.jsxs(Hf,{"data-color":g,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[C.jsx(Vf,{...(y=d==null?void 0:d.avatar)==null?void 0:y.image,src:(a==null?void 0:a.avatar)??p}),C.jsx(qf,{...(b=d==null?void 0:d.avatar)==null?void 0:b.fallback,children:(a==null?void 0:a.name[0])??((k=h??"Bot")==null?void 0:k[0])})]}),t&&C.jsx(Ga,{block:t,direction:e,sender:a,timestamp:l.timestamp,messageId:o,metadata:s}),i]})})}));function Z8(){const e=Me(n=>n.getClientId)(),t=Me(n=>n.configuration),{messageList:{marquee:r}}=gt;return C.jsxs("li",{...r.container,children:[C.jsx(td,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),C.jsxs("div",{...r.content,children:[C.jsx("h1",{...r.title,children:t.botName||"Bot"}),C.jsx("p",{...r.description,children:t.botDescription})]})]})}function K8(e,t){try{var r=global,n=r.document;if(typeof n<"u"&&n.createElement&&n.head&&n.head.appendChild){var i=n.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||n.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),n.head.appendChild(i)}}catch{}}function G8(){K8("react-scroll-to-bottom:version","4.2.0")}var Ws=function(e){return e&&e.Math===Math&&e},Bt=Ws(typeof globalThis=="object"&&globalThis)||Ws(typeof window=="object"&&window)||Ws(typeof self=="object"&&self)||Ws(typeof ct=="object"&&ct)||Ws(typeof ct=="object"&&ct)||function(){return this}()||Function("return this")(),Ut=function(e){try{return!!e()}catch{return!0}},Y8=Ut,Pc=!Y8(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),J8=Pc,wk=Function.prototype,xk=wk.apply,Sk=wk.call,Am=typeof Reflect=="object"&&Reflect.apply||(J8?Sk.bind(xk):function(){return Sk.apply(xk,arguments)}),Ek=Pc,_k=Function.prototype,Pm=_k.call,X8=Ek&&_k.bind.bind(Pm,Pm),Dt=Ek?X8:function(e){return function(){return Pm.apply(e,arguments)}},kk=Dt,Q8=kk({}.toString),eZ=kk("".slice),ra=function(e){return eZ(Q8(e),8,-1)},tZ=ra,rZ=Dt,Nm=function(e){if(tZ(e)==="Function")return rZ(e)},Dm=typeof document=="object"&&document.all,ar=typeof Dm>"u"&&Dm!==void 0?function(e){return typeof e=="function"||e===Dm}:function(e){return typeof e=="function"},Hs={},nZ=Ut,yr=!nZ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),iZ=Pc,Nc=Function.prototype.call,Tn=iZ?Nc.bind(Nc):function(){return Nc.apply(Nc,arguments)},jm={},$k={}.propertyIsEnumerable,Ok=Object.getOwnPropertyDescriptor,aZ=Ok&&!$k.call({1:2},1);jm.f=aZ?function(t){var r=Ok(this,t);return!!r&&r.enumerable}:$k;var Vs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},oZ=Dt,sZ=Ut,lZ=ra,Mm=Object,uZ=oZ("".split),Tk=sZ(function(){return!Mm("z").propertyIsEnumerable(0)})?function(e){return lZ(e)==="String"?uZ(e,""):Mm(e)}:Mm,Lm=function(e){return e==null},cZ=Lm,fZ=TypeError,Dc=function(e){if(cZ(e))throw new fZ("Can't call method on "+e);return e},dZ=Tk,pZ=Dc,Cn=function(e){return dZ(pZ(e))},hZ=ar,tn=function(e){return typeof e=="object"?e!==null:hZ(e)},Jt={},Fm=Jt,Bm=Bt,mZ=ar,Ck=function(e){return mZ(e)?e:void 0},In=function(e,t){return arguments.length<2?Ck(Fm[e])||Ck(Bm[e]):Fm[e]&&Fm[e][t]||Bm[e]&&Bm[e][t]},vZ=Dt,Gn=vZ({}.isPrototypeOf),yZ=Bt,Ik=yZ.navigator,Rk=Ik&&Ik.userAgent,Um=Rk?String(Rk):"",Ak=Bt,zm=Um,Pk=Ak.process,Nk=Ak.Deno,Dk=Pk&&Pk.versions||Nk&&Nk.version,jk=Dk&&Dk.v8,rn,jc;jk&&(rn=jk.split("."),jc=rn[0]>0&&rn[0]<4?1:+(rn[0]+rn[1])),!jc&&zm&&(rn=zm.match(/Edge\/(\d+)/),(!rn||rn[1]>=74)&&(rn=zm.match(/Chrome\/(\d+)/),rn&&(jc=+rn[1])));var Wm=jc,Mk=Wm,gZ=Ut,bZ=Bt,wZ=bZ.String,ro=!!Object.getOwnPropertySymbols&&!gZ(function(){var e=Symbol("symbol detection");return!wZ(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mk&&Mk<41}),xZ=ro,Lk=xZ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",SZ=In,EZ=ar,_Z=Gn,kZ=Lk,$Z=Object,qs=kZ?function(e){return typeof e=="symbol"}:function(e){var t=SZ("Symbol");return EZ(t)&&_Z(t.prototype,$Z(e))},OZ=String,Mc=function(e){try{return OZ(e)}catch{return"Object"}},TZ=ar,CZ=Mc,IZ=TypeError,Lc=function(e){if(TZ(e))return e;throw new IZ(CZ(e)+" is not a function")},RZ=Lc,AZ=Lm,Hm=function(e,t){var r=e[t];return AZ(r)?void 0:RZ(r)},Vm=Tn,qm=ar,Zm=tn,PZ=TypeError,NZ=function(e,t){var r,n;if(t==="string"&&qm(r=e.toString)&&!Zm(n=Vm(r,e))||qm(r=e.valueOf)&&!Zm(n=Vm(r,e))||t!=="string"&&qm(r=e.toString)&&!Zm(n=Vm(r,e)))return n;throw new PZ("Can't convert object to primitive value")},Fk={exports:{}},Bk=Bt,DZ=Object.defineProperty,jZ=function(e,t){try{DZ(Bk,e,{value:t,configurable:!0,writable:!0})}catch{Bk[e]=t}return t},MZ=Bt,LZ=jZ,Uk="__core-js_shared__",zk=Fk.exports=MZ[Uk]||LZ(Uk,{});(zk.versions||(zk.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 Km=Fk.exports,Wk=Km,no=function(e,t){return Wk[e]||(Wk[e]=t||{})},FZ=Dc,BZ=Object,Yn=function(e){return BZ(FZ(e))},UZ=Dt,zZ=Yn,WZ=UZ({}.hasOwnProperty),Or=Object.hasOwn||function(t,r){return WZ(zZ(t),r)},HZ=Dt,VZ=0,qZ=Math.random(),ZZ=HZ(1 .toString),Gm=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ZZ(++VZ+qZ,36)},KZ=Bt,GZ=no,Hk=Or,YZ=Gm,JZ=ro,XZ=Lk,io=KZ.Symbol,Ym=GZ("wks"),QZ=XZ?io.for||io:io&&io.withoutSetter||YZ,Zt=function(e){return Hk(Ym,e)||(Ym[e]=JZ&&Hk(io,e)?io[e]:QZ("Symbol."+e)),Ym[e]},eK=Tn,Vk=tn,qk=qs,tK=Hm,rK=NZ,nK=Zt,iK=TypeError,aK=nK("toPrimitive"),oK=function(e,t){if(!Vk(e)||qk(e))return e;var r=tK(e,aK),n;if(r){if(t===void 0&&(t="default"),n=eK(r,e,t),!Vk(n)||qk(n))return n;throw new iK("Can't convert object to primitive value")}return t===void 0&&(t="number"),rK(e,t)},sK=oK,lK=qs,Jm=function(e){var t=sK(e,"string");return lK(t)?t:t+""},uK=Bt,Zk=tn,Xm=uK.document,cK=Zk(Xm)&&Zk(Xm.createElement),Kk=function(e){return cK?Xm.createElement(e):{}},fK=yr,dK=Ut,pK=Kk,Gk=!fK&&!dK(function(){return Object.defineProperty(pK("div"),"a",{get:function(){return 7}}).a!==7}),hK=yr,mK=Tn,vK=jm,yK=Vs,gK=Cn,bK=Jm,wK=Or,xK=Gk,Yk=Object.getOwnPropertyDescriptor;Hs.f=hK?Yk:function(t,r){if(t=gK(t),r=bK(r),xK)try{return Yk(t,r)}catch{}if(wK(t,r))return yK(!mK(vK.f,t,r),t[r])};var SK=Ut,EK=ar,_K=/#|\.prototype\./,Zs=function(e,t){var r=$K[kK(e)];return r===TK?!0:r===OK?!1:EK(t)?SK(t):!!t},kK=Zs.normalize=function(e){return String(e).replace(_K,".").toLowerCase()},$K=Zs.data={},OK=Zs.NATIVE="N",TK=Zs.POLYFILL="P",CK=Zs,Jk=Nm,IK=Lc,RK=Pc,AK=Jk(Jk.bind),Qm=function(e,t){return IK(e),t===void 0?e:RK?AK(e,t):function(){return e.apply(t,arguments)}},nn={},PK=yr,NK=Ut,Xk=PK&&NK(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),DK=tn,jK=String,MK=TypeError,Ti=function(e){if(DK(e))return e;throw new MK(jK(e)+" is not an object")},LK=yr,FK=Gk,BK=Xk,Fc=Ti,Qk=Jm,UK=TypeError,ev=Object.defineProperty,zK=Object.getOwnPropertyDescriptor,tv="enumerable",rv="configurable",nv="writable";nn.f=LK?BK?function(t,r,n){if(Fc(t),r=Qk(r),Fc(n),typeof t=="function"&&r==="prototype"&&"value"in n&&nv in n&&!n[nv]){var i=zK(t,r);i&&i[nv]&&(t[r]=n.value,n={configurable:rv in n?n[rv]:i[rv],enumerable:tv in n?n[tv]:i[tv],writable:!1})}return ev(t,r,n)}:ev:function(t,r,n){if(Fc(t),r=Qk(r),Fc(n),FK)try{return ev(t,r,n)}catch{}if("get"in n||"set"in n)throw new UK("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var WK=yr,HK=nn,VK=Vs,Bc=WK?function(e,t,r){return HK.f(e,t,VK(1,r))}:function(e,t,r){return e[t]=r,e},Ks=Bt,qK=Am,ZK=Nm,KK=ar,GK=Hs.f,YK=CK,ao=Jt,JK=Qm,oo=Bc,e$=Or,XK=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return qK(e,this,arguments)};return t.prototype=e.prototype,t},vt=function(e,t){var r=e.target,n=e.global,i=e.stat,a=e.proto,o=n?Ks:i?Ks[r]:Ks[r]&&Ks[r].prototype,s=n?ao:ao[r]||oo(ao,r,{})[r],l=s.prototype,u,c,f,d,p,h,m,g,v;for(d in t)u=YK(n?d:r+(i?".":"#")+d,e.forced),c=!u&&o&&e$(o,d),h=s[d],c&&(e.dontCallGetSet?(v=GK(o,d),m=v&&v.value):m=o[d]),p=c&&m?m:t[d],!(!u&&!a&&typeof h==typeof p)&&(e.bind&&c?g=JK(p,Ks):e.wrap&&c?g=XK(p):a&&KK(p)?g=ZK(p):g=p,(e.sham||p&&p.sham||h&&h.sham)&&oo(g,"sham",!0),oo(s,d,g),a&&(f=r+"Prototype",e$(ao,f)||oo(ao,f,{}),oo(ao[f],d,p),e.real&&l&&(u||!l[d])&&oo(l,d,p)))},QK=ra,so=Array.isArray||function(t){return QK(t)==="Array"},eG=vt,tG=so;eG({target:"Array",stat:!0},{isArray:tG});var rG=Jt,nG=rG.Array.isArray,iG=nG,t$=iG,aG=t$,oG=aG,sG=oG,lG=sG,uG=lG;const r$=Ze(uG);function cG(e){if(r$(e))return e}var fG=Math.ceil,dG=Math.floor,pG=Math.trunc||function(t){var r=+t;return(r>0?dG:fG)(r)},hG=pG,Uc=function(e){var t=+e;return t!==t||t===0?0:hG(t)},mG=Uc,vG=Math.min,yG=function(e){var t=mG(e);return t>0?vG(t,9007199254740991):0},gG=yG,na=function(e){return gG(e.length)},bG=TypeError,wG=9007199254740991,iv=function(e){if(e>wG)throw bG("Maximum allowed index exceeded");return e},xG=yr,SG=nn,EG=Vs,Gs=function(e,t,r){xG?SG.f(e,t,EG(0,r)):e[t]=r},_G=Zt,kG=_G("toStringTag"),n$={};n$[kG]="z";var av=String(n$)==="[object z]",$G=av,OG=ar,zc=ra,TG=Zt,CG=TG("toStringTag"),IG=Object,RG=zc(function(){return arguments}())==="Arguments",AG=function(e,t){try{return e[t]}catch{}},Ys=$G?zc:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=AG(t=IG(e),CG))=="string"?r:RG?zc(t):(n=zc(t))==="Object"&&OG(t.callee)?"Arguments":n},PG=Dt,NG=ar,ov=Km,DG=PG(Function.toString);NG(ov.inspectSource)||(ov.inspectSource=function(e){return DG(e)});var jG=ov.inspectSource,MG=Dt,LG=Ut,i$=ar,FG=Ys,BG=In,UG=jG,a$=function(){},o$=BG("Reflect","construct"),sv=/^\s*(?:class|function)\b/,zG=MG(sv.exec),WG=!sv.test(a$),Js=function(t){if(!i$(t))return!1;try{return o$(a$,[],t),!0}catch{return!1}},s$=function(t){if(!i$(t))return!1;switch(FG(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return WG||!!zG(sv,UG(t))}catch{return!0}};s$.sham=!0;var lv=!o$||LG(function(){var e;return Js(Js.call)||!Js(Object)||!Js(function(){e=!0})||e})?s$:Js,l$=so,HG=lv,VG=tn,qG=Zt,ZG=qG("species"),u$=Array,KG=function(e){var t;return l$(e)&&(t=e.constructor,HG(t)&&(t===u$||l$(t.prototype))?t=void 0:VG(t)&&(t=t[ZG],t===null&&(t=void 0))),t===void 0?u$:t},GG=KG,uv=function(e,t){return new(GG(e))(t===0?0:t)},YG=Ut,JG=Zt,XG=Wm,QG=JG("species"),Wc=function(e){return XG>=51||!YG(function(){var t=[],r=t.constructor={};return r[QG]=function(){return{foo:1}},t[e](Boolean).foo!==1})},eY=vt,tY=Ut,rY=so,nY=tn,iY=Yn,aY=na,c$=iv,f$=Gs,oY=uv,sY=Wc,lY=Zt,uY=Wm,d$=lY("isConcatSpreadable"),cY=uY>=51||!tY(function(){var e=[];return e[d$]=!1,e.concat()[0]!==e}),fY=function(e){if(!nY(e))return!1;var t=e[d$];return t!==void 0?!!t:rY(e)},dY=!cY||!sY("concat");eY({target:"Array",proto:!0,arity:1,forced:dY},{concat:function(t){var r=iY(this),n=oY(r,0),i=0,a,o,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?r:arguments[a],fY(u))for(l=aY(u),c$(i+l),o=0;o<l;o++,i++)o in u&&f$(n,i,u[o]);else c$(i+1),f$(n,i++,u);return n.length=i,n}});var pY=Ys,hY=String,Xs=function(e){if(pY(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return hY(e)},Hc={},mY=Uc,vY=Math.max,yY=Math.min,cv=function(e,t){var r=mY(e);return r<0?vY(r+t,0):yY(r,t)},gY=Cn,bY=cv,wY=na,p$=function(e){return function(t,r,n){var i=gY(t),a=wY(i);if(a===0)return!e&&-1;var o=bY(n,a),s;if(e&&r!==r){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}},h$={includes:p$(!0),indexOf:p$(!1)},Vc={},xY=Dt,fv=Or,SY=Cn,EY=h$.indexOf,_Y=Vc,m$=xY([].push),v$=function(e,t){var r=SY(e),n=0,i=[],a;for(a in r)!fv(_Y,a)&&fv(r,a)&&m$(i,a);for(;t.length>n;)fv(r,a=t[n++])&&(~EY(i,a)||m$(i,a));return i},dv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kY=v$,$Y=dv,pv=Object.keys||function(t){return kY(t,$Y)},OY=yr,TY=Xk,CY=nn,IY=Ti,RY=Cn,AY=pv;Hc.f=OY&&!TY?Object.defineProperties:function(t,r){IY(t);for(var n=RY(r),i=AY(r),a=i.length,o=0,s;a>o;)CY.f(t,s=i[o++],n[s]);return t};var PY=In,NY=PY("document","documentElement"),DY=no,jY=Gm,y$=DY("keys"),qc=function(e){return y$[e]||(y$[e]=jY(e))},MY=Ti,LY=Hc,g$=dv,FY=Vc,BY=NY,UY=Kk,zY=qc,b$=">",w$="<",hv="prototype",mv="script",x$=zY("IE_PROTO"),vv=function(){},S$=function(e){return w$+mv+b$+e+w$+"/"+mv+b$},E$=function(e){e.write(S$("")),e.close();var t=e.parentWindow.Object;return e=null,t},WY=function(){var e=UY("iframe"),t="java"+mv+":",r;return e.style.display="none",BY.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(S$("document.F=Object")),r.close(),r.F},Zc,Kc=function(){try{Zc=new ActiveXObject("htmlfile")}catch{}Kc=typeof document<"u"?document.domain&&Zc?E$(Zc):WY():E$(Zc);for(var e=g$.length;e--;)delete Kc[hv][g$[e]];return Kc()};FY[x$]=!0;var yv=Object.create||function(t,r){var n;return t!==null?(vv[hv]=MY(t),n=new vv,vv[hv]=null,n[x$]=t):n=Kc(),r===void 0?n:LY.f(n,r)},Gc={},HY=v$,VY=dv,qY=VY.concat("length","prototype");Gc.f=Object.getOwnPropertyNames||function(t){return HY(t,qY)};var _$={},ZY=Dt,Yc=ZY([].slice),KY=ra,GY=Cn,k$=Gc.f,YY=Yc,$$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],JY=function(e){try{return k$(e)}catch{return YY($$)}};_$.f=function(t){return $$&&KY(t)==="Window"?JY(t):k$(GY(t))};var Jc={};Jc.f=Object.getOwnPropertySymbols;var XY=Bc,Xc=function(e,t,r,n){return n&&n.enumerable?e[t]=r:XY(e,t,r),e},QY=nn,eJ=function(e,t,r){return QY.f(e,t,r)},Qs={},tJ=Zt;Qs.f=tJ;var O$=Jt,rJ=Or,nJ=Qs,iJ=nn.f,_t=function(e){var t=O$.Symbol||(O$.Symbol={});rJ(t,e)||iJ(t,e,{value:nJ.f(e)})},aJ=Tn,oJ=In,sJ=Zt,lJ=Xc,T$=function(){var e=oJ("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=sJ("toPrimitive");t&&!t[n]&&lJ(t,n,function(i){return aJ(r,this)},{arity:1})},uJ=av,cJ=Ys,fJ=uJ?{}.toString:function(){return"[object "+cJ(this)+"]"},dJ=av,pJ=nn.f,hJ=Bc,mJ=Or,vJ=fJ,yJ=Zt,C$=yJ("toStringTag"),lo=function(e,t,r,n){var i=r?e:e&&e.prototype;i&&(mJ(i,C$)||pJ(i,C$,{configurable:!0,value:t}),n&&!dJ&&hJ(i,"toString",vJ))},gJ=Bt,bJ=ar,I$=gJ.WeakMap,wJ=bJ(I$)&&/native code/.test(String(I$)),xJ=wJ,R$=Bt,SJ=tn,EJ=Bc,gv=Or,bv=Km,_J=qc,kJ=Vc,A$="Object already initialized",wv=R$.TypeError,$J=R$.WeakMap,Qc,el,ef,OJ=function(e){return ef(e)?el(e):Qc(e,{})},TJ=function(e){return function(t){var r;if(!SJ(t)||(r=el(t)).type!==e)throw new wv("Incompatible receiver, "+e+" required");return r}};if(xJ||bv.state){var Rn=bv.state||(bv.state=new $J);Rn.get=Rn.get,Rn.has=Rn.has,Rn.set=Rn.set,Qc=function(e,t){if(Rn.has(e))throw new wv(A$);return t.facade=e,Rn.set(e,t),t},el=function(e){return Rn.get(e)||{}},ef=function(e){return Rn.has(e)}}else{var uo=_J("state");kJ[uo]=!0,Qc=function(e,t){if(gv(e,uo))throw new wv(A$);return t.facade=e,EJ(e,uo,t),t},el=function(e){return gv(e,uo)?e[uo]:{}},ef=function(e){return gv(e,uo)}}var xv={set:Qc,get:el,has:ef,enforce:OJ,getterFor:TJ},CJ=Qm,IJ=Dt,RJ=Tk,AJ=Yn,PJ=na,NJ=uv,P$=IJ([].push),Ci=function(e){var t=e===1,r=e===2,n=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(l,u,c,f){for(var d=AJ(l),p=RJ(d),h=PJ(p),m=CJ(u,c),g=0,v=f||NJ,y=t?v(l,h):r||o?v(l,0):void 0,b,k;h>g;g++)if((s||g in p)&&(b=p[g],k=m(b,g,d),e))if(t)y[g]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return g;case 2:P$(y,b)}else switch(e){case 4:return!1;case 7:P$(y,b)}return a?-1:n||i?i:y}},Sv={forEach:Ci(0),map:Ci(1),filter:Ci(2),some:Ci(3),every:Ci(4),find:Ci(5),findIndex:Ci(6),filterReject:Ci(7)},tf=vt,tl=Bt,Ev=Tn,DJ=Dt,co=yr,fo=ro,jJ=Ut,Kt=Or,MJ=Gn,_v=Ti,rf=Cn,kv=Jm,LJ=Xs,$v=Vs,po=yv,N$=pv,FJ=Gc,D$=_$,BJ=Jc,j$=Hs,M$=nn,UJ=Hc,L$=jm,F$=Xc,zJ=eJ,Ov=no,WJ=qc,B$=Vc,U$=Gm,HJ=Zt,VJ=Qs,qJ=_t,ZJ=T$,KJ=lo,z$=xv,nf=Sv.forEach,gr=WJ("hidden"),af="Symbol",rl="prototype",GJ=z$.set,W$=z$.getterFor(af),an=Object[rl],ia=tl.Symbol,nl=ia&&ia[rl],YJ=tl.RangeError,JJ=tl.TypeError,Tv=tl.QObject,H$=j$.f,aa=M$.f,V$=D$.f,XJ=L$.f,q$=DJ([].push),Jn=Ov("symbols"),il=Ov("op-symbols"),QJ=Ov("wks"),Cv=!Tv||!Tv[rl]||!Tv[rl].findChild,Z$=function(e,t,r){var n=H$(an,t);n&&delete an[t],aa(e,t,r),n&&e!==an&&aa(an,t,n)},Iv=co&&jJ(function(){return po(aa({},"a",{get:function(){return aa(this,"a",{value:7}).a}})).a!==7})?Z$:aa,Rv=function(e,t){var r=Jn[e]=po(nl);return GJ(r,{type:af,tag:e,description:t}),co||(r.description=t),r},of=function(t,r,n){t===an&&of(il,r,n),_v(t);var i=kv(r);return _v(n),Kt(Jn,i)?(n.enumerable?(Kt(t,gr)&&t[gr][i]&&(t[gr][i]=!1),n=po(n,{enumerable:$v(0,!1)})):(Kt(t,gr)||aa(t,gr,$v(1,po(null))),t[gr][i]=!0),Iv(t,i,n)):aa(t,i,n)},Av=function(t,r){_v(t);var n=rf(r),i=N$(n).concat(J$(n));return nf(i,function(a){(!co||Ev(K$,n,a))&&of(t,a,n[a])}),t},eX=function(t,r){return r===void 0?po(t):Av(po(t),r)},K$=function(t){var r=kv(t),n=Ev(XJ,this,r);return this===an&&Kt(Jn,r)&&!Kt(il,r)?!1:n||!Kt(this,r)||!Kt(Jn,r)||Kt(this,gr)&&this[gr][r]?n:!0},G$=function(t,r){var n=rf(t),i=kv(r);if(!(n===an&&Kt(Jn,i)&&!Kt(il,i))){var a=H$(n,i);return a&&Kt(Jn,i)&&!(Kt(n,gr)&&n[gr][i])&&(a.enumerable=!0),a}},Y$=function(t){var r=V$(rf(t)),n=[];return nf(r,function(i){!Kt(Jn,i)&&!Kt(B$,i)&&q$(n,i)}),n},J$=function(e){var t=e===an,r=V$(t?il:rf(e)),n=[];return nf(r,function(i){Kt(Jn,i)&&(!t||Kt(an,i))&&q$(n,Jn[i])}),n};fo||(ia=function(){if(MJ(nl,this))throw new JJ("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:LJ(arguments[0]),r=U$(t),n=function(i){var a=this===void 0?tl:this;a===an&&Ev(n,il,i),Kt(a,gr)&&Kt(a[gr],r)&&(a[gr][r]=!1);var o=$v(1,i);try{Iv(a,r,o)}catch(s){if(!(s instanceof YJ))throw s;Z$(a,r,o)}};return co&&Cv&&Iv(an,r,{configurable:!0,set:n}),Rv(r,t)},nl=ia[rl],F$(nl,"toString",function(){return W$(this).tag}),F$(ia,"withoutSetter",function(e){return Rv(U$(e),e)}),L$.f=K$,M$.f=of,UJ.f=Av,j$.f=G$,FJ.f=D$.f=Y$,BJ.f=J$,VJ.f=function(e){return Rv(HJ(e),e)},co&&zJ(nl,"description",{configurable:!0,get:function(){return W$(this).description}})),tf({global:!0,constructor:!0,wrap:!0,forced:!fo,sham:!fo},{Symbol:ia}),nf(N$(QJ),function(e){qJ(e)}),tf({target:af,stat:!0,forced:!fo},{useSetter:function(){Cv=!0},useSimple:function(){Cv=!1}}),tf({target:"Object",stat:!0,forced:!fo,sham:!co},{create:eX,defineProperty:of,defineProperties:Av,getOwnPropertyDescriptor:G$}),tf({target:"Object",stat:!0,forced:!fo},{getOwnPropertyNames:Y$}),ZJ(),KJ(ia,af),B$[gr]=!0;var tX=ro,X$=tX&&!!Symbol.for&&!!Symbol.keyFor,rX=vt,nX=In,iX=Or,aX=Xs,Q$=no,oX=X$,Pv=Q$("string-to-symbol-registry"),sX=Q$("symbol-to-string-registry");rX({target:"Symbol",stat:!0,forced:!oX},{for:function(e){var t=aX(e);if(iX(Pv,t))return Pv[t];var r=nX("Symbol")(t);return Pv[t]=r,sX[r]=t,r}});var lX=vt,uX=Or,cX=qs,fX=Mc,dX=no,pX=X$,eO=dX("symbol-to-string-registry");lX({target:"Symbol",stat:!0,forced:!pX},{keyFor:function(t){if(!cX(t))throw new TypeError(fX(t)+" is not a symbol");if(uX(eO,t))return eO[t]}});var hX=Dt,tO=so,mX=ar,rO=ra,vX=Xs,nO=hX([].push),yX=function(e){if(mX(e))return e;if(tO(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];typeof i=="string"?nO(r,i):(typeof i=="number"||rO(i)==="Number"||rO(i)==="String")&&nO(r,vX(i))}var a=r.length,o=!0;return function(s,l){if(o)return o=!1,l;if(tO(this))return l;for(var u=0;u<a;u++)if(r[u]===s)return l}}},gX=vt,iO=In,aO=Am,bX=Tn,al=Dt,oO=Ut,sO=ar,lO=qs,uO=Yc,wX=yX,xX=ro,SX=String,Ii=iO("JSON","stringify"),sf=al(/./.exec),cO=al("".charAt),EX=al("".charCodeAt),_X=al("".replace),kX=al(1 .toString),$X=/[\uD800-\uDFFF]/g,fO=/^[\uD800-\uDBFF]$/,dO=/^[\uDC00-\uDFFF]$/,pO=!xX||oO(function(){var e=iO("Symbol")("stringify detection");return Ii([e])!=="[null]"||Ii({a:e})!=="{}"||Ii(Object(e))!=="{}"}),hO=oO(function(){return Ii("\uDF06\uD834")!=='"\\udf06\\ud834"'||Ii("\uDEAD")!=='"\\udead"'}),OX=function(e,t){var r=uO(arguments),n=wX(t);if(!(!sO(n)&&(e===void 0||lO(e))))return r[1]=function(i,a){if(sO(n)&&(a=bX(n,this,SX(i),a)),!lO(a))return a},aO(Ii,null,r)},TX=function(e,t,r){var n=cO(r,t-1),i=cO(r,t+1);return sf(fO,e)&&!sf(dO,i)||sf(dO,e)&&!sf(fO,n)?"\\u"+kX(EX(e,0),16):e};Ii&&gX({target:"JSON",stat:!0,arity:3,forced:pO||hO},{stringify:function(t,r,n){var i=uO(arguments),a=aO(pO?OX:Ii,null,i);return hO&&typeof a=="string"?_X(a,$X,TX):a}});var CX=vt,IX=ro,RX=Ut,mO=Jc,AX=Yn,PX=!IX||RX(function(){mO.f(1)});CX({target:"Object",stat:!0,forced:PX},{getOwnPropertySymbols:function(t){var r=mO.f;return r?r(AX(t)):[]}});var NX=_t;NX("asyncIterator");var DX=_t;DX("hasInstance");var jX=_t;jX("isConcatSpreadable");var MX=_t;MX("iterator");var LX=_t;LX("match");var FX=_t;FX("matchAll");var BX=_t;BX("replace");var UX=_t;UX("search");var zX=_t;zX("species");var WX=_t;WX("split");var HX=_t,VX=T$;HX("toPrimitive"),VX();var qX=In,ZX=_t,KX=lo;ZX("toStringTag"),KX(qX("Symbol"),"Symbol");var GX=_t;GX("unscopables");var YX=Bt,JX=lo;JX(YX.JSON,"JSON",!0);var XX=Jt,QX=XX.Symbol,ho={},Nv=yr,eQ=Or,vO=Function.prototype,tQ=Nv&&Object.getOwnPropertyDescriptor,Dv=eQ(vO,"name"),rQ=Dv&&(function(){}).name==="something",nQ=Dv&&(!Nv||Nv&&tQ(vO,"name").configurable),iQ={EXISTS:Dv,PROPER:rQ,CONFIGURABLE:nQ},aQ=Ut,oQ=!aQ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),sQ=Or,lQ=ar,uQ=Yn,cQ=qc,fQ=oQ,yO=cQ("IE_PROTO"),jv=Object,dQ=jv.prototype,gO=fQ?jv.getPrototypeOf:function(e){var t=uQ(e);if(sQ(t,yO))return t[yO];var r=t.constructor;return lQ(r)&&t instanceof r?r.prototype:t instanceof jv?dQ:null},pQ=Ut,hQ=ar,mQ=tn,vQ=yv,bO=gO,yQ=Xc,gQ=Zt,Mv=gQ("iterator"),wO=!1,Xn,Lv,Fv;[].keys&&(Fv=[].keys(),"next"in Fv?(Lv=bO(bO(Fv)),Lv!==Object.prototype&&(Xn=Lv)):wO=!0);var bQ=!mQ(Xn)||pQ(function(){var e={};return Xn[Mv].call(e)!==e});bQ?Xn={}:Xn=vQ(Xn),hQ(Xn[Mv])||yQ(Xn,Mv,function(){return this});var xO={IteratorPrototype:Xn,BUGGY_SAFARI_ITERATORS:wO},wQ=xO.IteratorPrototype,xQ=yv,SQ=Vs,EQ=lo,_Q=ho,kQ=function(){return this},$Q=function(e,t,r,n){var i=t+" Iterator";return e.prototype=xQ(wQ,{next:SQ(+!n,r)}),EQ(e,i,!1,!0),_Q[i]=kQ,e},OQ=Dt,TQ=Lc,CQ=function(e,t,r){try{return OQ(TQ(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},IQ=tn,RQ=function(e){return IQ(e)||e===null},AQ=RQ,PQ=String,NQ=TypeError,DQ=function(e){if(AQ(e))return e;throw new NQ("Can't set "+PQ(e)+" as a prototype")},jQ=CQ,MQ=tn,LQ=Dc,FQ=DQ;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},r;try{r=jQ(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(i,a){return LQ(i),FQ(a),MQ(i)&&(e?r(i,a):i.__proto__=a),i}}();var BQ=vt,UQ=Tn,SO=iQ,zQ=$Q,WQ=gO,HQ=lo,EO=Xc,VQ=Zt,_O=ho,kO=xO,qQ=SO.PROPER;SO.CONFIGURABLE,kO.IteratorPrototype;var lf=kO.BUGGY_SAFARI_ITERATORS,Bv=VQ("iterator"),$O="keys",uf="values",OO="entries",ZQ=function(){return this},TO=function(e,t,r,n,i,a,o){zQ(r,t,n);var s=function(v){if(v===i&&d)return d;if(!lf&&v&&v in c)return c[v];switch(v){case $O:return function(){return new r(this,v)};case uf:return function(){return new r(this,v)};case OO:return function(){return new r(this,v)}}return function(){return new r(this)}},l=t+" Iterator",u=!1,c=e.prototype,f=c[Bv]||c["@@iterator"]||i&&c[i],d=!lf&&f||s(i),p=t==="Array"&&c.entries||f,h,m,g;if(p&&(h=WQ(p.call(new e)),h!==Object.prototype&&h.next&&(HQ(h,l,!0,!0),_O[l]=ZQ)),qQ&&i===uf&&f&&f.name!==uf&&(u=!0,d=function(){return UQ(f,this)}),i)if(m={values:s(uf),keys:a?d:s($O),entries:s(OO)},o)for(g in m)(lf||u||!(g in c))&&EO(c,g,m[g]);else BQ({target:t,proto:!0,forced:lf||u},m);return o&&c[Bv]!==d&&EO(c,Bv,d,{name:i}),_O[t]=d,m},CO=function(e,t){return{value:e,done:t}},KQ=Cn,IO=ho,RO=xv;nn.f;var GQ=TO,cf=CO,AO="Array Iterator",YQ=RO.set,JQ=RO.getterFor(AO);GQ(Array,"Array",function(e,t){YQ(this,{type:AO,target:KQ(e),index:0,kind:t})},function(){var e=JQ(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,cf(void 0,!0);switch(e.kind){case"keys":return cf(r,!1);case"values":return cf(t[r],!1)}return cf([r,t[r]],!1)},"values"),IO.Arguments=IO.Array;var XQ={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},QQ=XQ,eee=Bt,tee=lo,PO=ho;for(var Uv in QQ)tee(eee[Uv],Uv),PO[Uv]=PO.Array;var ree=QX,nee=ree,iee=Zt,aee=nn.f,NO=iee("metadata"),DO=Function.prototype;DO[NO]===void 0&&aee(DO,NO,{value:null});var oee=_t;oee("asyncDispose");var see=_t;see("dispose");var lee=_t;lee("metadata");var uee=nee,cee=uee,fee=In,dee=Dt,zv=fee("Symbol"),pee=zv.keyFor,hee=dee(zv.prototype.valueOf),jO=zv.isRegisteredSymbol||function(t){try{return pee(hee(t))!==void 0}catch{return!1}},mee=vt,vee=jO;mee({target:"Symbol",stat:!0},{isRegisteredSymbol:vee});for(var yee=no,MO=In,gee=Dt,bee=qs,wee=Zt,ff=MO("Symbol"),LO=ff.isWellKnownSymbol,FO=MO("Object","getOwnPropertyNames"),xee=gee(ff.prototype.valueOf),BO=yee("wks"),Wv=0,UO=FO(ff),See=UO.length;Wv<See;Wv++)try{var zO=UO[Wv];bee(ff[zO])&&wee(zO)}catch{}var WO=function(t){if(LO&&LO(t))return!0;try{for(var r=xee(t),n=0,i=FO(BO),a=i.length;n<a;n++)if(BO[i[n]]==r)return!0}catch{}return!1},Eee=vt,_ee=WO;Eee({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:_ee});var kee=_t;kee("customMatcher");var $ee=_t;$ee("observable");var Oee=vt,Tee=jO;Oee({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Tee});var Cee=vt,Iee=WO;Cee({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Iee});var Ree=_t;Ree("matcher");var Aee=_t;Aee("metadataKey");var Pee=_t;Pee("patternMatch");var Nee=_t;Nee("replaceAll");var Dee=cee,jee=Dee,Mee=jee;const mo=Ze(Mee);var Hv=Dt,Lee=Uc,Fee=Xs,Bee=Dc,Uee=Hv("".charAt),HO=Hv("".charCodeAt),zee=Hv("".slice),VO=function(e){return function(t,r){var n=Fee(Bee(t)),i=Lee(r),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=HO(n,i),o<55296||o>56319||i+1===a||(s=HO(n,i+1))<56320||s>57343?e?Uee(n,i):o:e?zee(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Wee={codeAt:VO(!1),charAt:VO(!0)},Hee=Wee.charAt,Vee=Xs,qO=xv,qee=TO,ZO=CO,KO="String Iterator",Zee=qO.set,Kee=qO.getterFor(KO);qee(String,"String",function(e){Zee(this,{type:KO,string:Vee(e),index:0})},function(){var t=Kee(this),r=t.string,n=t.index,i;return n>=r.length?ZO(void 0,!0):(i=Hee(r,n),t.index+=i.length,ZO(i,!1))});var Gee=Ys,GO=Hm,Yee=Lm,Jee=ho,Xee=Zt,Qee=Xee("iterator"),Vv=function(e){if(!Yee(e))return GO(e,Qee)||GO(e,"@@iterator")||Jee[Gee(e)]},ete=Vv,tte=ete,rte=tte,nte=rte,ite=nte,ate=ite,ote=ate,ste=ote,lte=ste;const YO=Ze(lte);var ute=yr,cte=so,fte=TypeError,dte=Object.getOwnPropertyDescriptor,pte=ute&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),JO=pte?function(e,t){if(cte(e)&&!dte(e,"length").writable)throw new fte("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},hte=vt,mte=Yn,vte=na,yte=JO,gte=iv,bte=Ut,wte=bte(function(){return[].push.call({length:4294967296},1)!==4294967297}),xte=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Ste=wte||!xte();hte({target:"Array",proto:!0,arity:1,forced:Ste},{push:function(t){var r=mte(this),n=vte(r),i=arguments.length;gte(n+i);for(var a=0;a<i;a++)r[n]=arguments[a],n++;return yte(r,n),n}});var Ete=Bt,_te=Jt,oa=function(e,t){var r=_te[e+"Prototype"],n=r&&r[t];if(n)return n;var i=Ete[e],a=i&&i.prototype;return a&&a[t]},kte=oa,$te=kte("Array","push"),Ote=Gn,Tte=$te,qv=Array.prototype,Cte=function(e){var t=e.push;return e===qv||Ote(qv,e)&&t===qv.push?Tte:t},Ite=Cte,Rte=Ite,Ate=Rte,Pte=Ate,Nte=Pte,Dte=Nte,jte=Dte;const Mte=Ze(jte);function Lte(e,t){var r=e==null?null:typeof mo<"u"&&YO(e)||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(Mte(s).call(s,n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}var Fte=vt,XO=so,Bte=lv,Ute=tn,QO=cv,zte=na,Wte=Cn,Hte=Gs,Vte=Zt,qte=Wc,Zte=Yc,Kte=qte("slice"),Gte=Vte("species"),Zv=Array,Yte=Math.max;Fte({target:"Array",proto:!0,forced:!Kte},{slice:function(t,r){var n=Wte(this),i=zte(n),a=QO(t,i),o=QO(r===void 0?i:r,i),s,l,u;if(XO(n)&&(s=n.constructor,Bte(s)&&(s===Zv||XO(s.prototype))?s=void 0:Ute(s)&&(s=s[Gte],s===null&&(s=void 0)),s===Zv||s===void 0))return Zte(n,a,o);for(l=new(s===void 0?Zv:s)(Yte(o-a,0)),u=0;a<o;a++,u++)a in n&&Hte(l,u,n[a]);return l.length=u,l}});var Jte=oa,Xte=Jte("Array","slice"),Qte=Gn,ere=Xte,Kv=Array.prototype,tre=function(e){var t=e.slice;return e===Kv||Qte(Kv,e)&&t===Kv.slice?ere:t},rre=tre,nre=rre,ire=nre,are=ire,ore=are,sre=ore,lre=sre;const ure=Ze(lre);var cre=Tn,eT=Ti,fre=Hm,dre=function(e,t,r){var n,i;eT(e);try{if(n=fre(e,"return"),!n){if(t==="throw")throw r;return r}n=cre(n,e)}catch(a){i=!0,n=a}if(t==="throw")throw r;if(i)throw n;return eT(n),r},pre=Ti,hre=dre,mre=function(e,t,r,n){try{return n?t(pre(r)[0],r[1]):t(r)}catch(i){hre(e,"throw",i)}},vre=Zt,yre=ho,gre=vre("iterator"),bre=Array.prototype,wre=function(e){return e!==void 0&&(yre.Array===e||bre[gre]===e)},xre=Tn,Sre=Lc,Ere=Ti,_re=Mc,kre=Vv,$re=TypeError,Ore=function(e,t){var r=arguments.length<2?kre(e):t;if(Sre(r))return Ere(xre(r,e));throw new $re(_re(e)+" is not iterable")},Tre=Qm,Cre=Tn,Ire=Yn,Rre=mre,Are=wre,Pre=lv,Nre=na,tT=Gs,Dre=Ore,jre=Vv,rT=Array,Mre=function(t){var r=Ire(t),n=Pre(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Tre(a,i>2?arguments[2]:void 0));var s=jre(r),l=0,u,c,f,d,p,h;if(s&&!(this===rT&&Are(s)))for(c=n?new this:[],d=Dre(r,s),p=d.next;!(f=Cre(p,d)).done;l++)h=o?Rre(d,a,[f.value,l],!0):f.value,tT(c,l,h);else for(u=Nre(r),c=n?new this(u):rT(u);u>l;l++)h=o?a(r[l],l):r[l],tT(c,l,h);return c.length=l,c},Lre=Zt,nT=Lre("iterator"),iT=!1;try{var Fre=0,aT={next:function(){return{done:!!Fre++}},return:function(){iT=!0}};aT[nT]=function(){return this},Array.from(aT,function(){throw 2})}catch{}var Bre=function(e,t){try{if(!t&&!iT)return!1}catch{return!1}var r=!1;try{var n={};n[nT]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Ure=vt,zre=Mre,Wre=Bre,Hre=!Wre(function(e){Array.from(e)});Ure({target:"Array",stat:!0,forced:Hre},{from:zre});var Vre=Jt,qre=Vre.Array.from,Zre=qre,Kre=Zre,Gre=Kre,Yre=Gre,Jre=Yre,Xre=Jre,Qre=Xre;const oT=Ze(Qre);function Gv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function sT(e,t){if(e){var r;if(typeof e=="string")return Gv(e,t);var n=ure(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?oT(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gv(e,t):void 0}}function ene(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
329
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function An(e,t){return cG(e)||Lte(e,t)||sT(e,t)||ene()}var lT={exports:{}};/*!
|
|
330
330
|
Copyright (c) 2018 Jed Watson.
|
|
331
331
|
Licensed under the MIT License (MIT), see
|
|
332
332
|
http://jedwatson.github.io/classnames
|
|
333
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var s=r.apply(null,a);s&&n.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var
|
|
333
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var s=r.apply(null,a);s&&n.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&n.push(l);else n.push(a.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(lT);var tne=lT.exports;const Yv=Ze(tne);var Jv={exports:{}},df={exports:{}},ft={};/** @license React v16.13.1
|
|
334
334
|
* react-is.production.min.js
|
|
335
335
|
*
|
|
336
336
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
337
337
|
*
|
|
338
338
|
* This source code is licensed under the MIT license found in the
|
|
339
339
|
* LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/var
|
|
340
|
+
*/var uT;function rne(){if(uT)return ft;uT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=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,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case l:case u:case n:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case h:case p:case o:return S;default:return _}}case r:return _}}}function k(S){return b(S)===u}return ft.AsyncMode=l,ft.ConcurrentMode=u,ft.ContextConsumer=s,ft.ContextProvider=o,ft.Element=t,ft.ForwardRef=c,ft.Fragment=n,ft.Lazy=h,ft.Memo=p,ft.Portal=r,ft.Profiler=a,ft.StrictMode=i,ft.Suspense=f,ft.isAsyncMode=function(S){return k(S)||b(S)===l},ft.isConcurrentMode=k,ft.isContextConsumer=function(S){return b(S)===s},ft.isContextProvider=function(S){return b(S)===o},ft.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ft.isForwardRef=function(S){return b(S)===c},ft.isFragment=function(S){return b(S)===n},ft.isLazy=function(S){return b(S)===h},ft.isMemo=function(S){return b(S)===p},ft.isPortal=function(S){return b(S)===r},ft.isProfiler=function(S){return b(S)===a},ft.isStrictMode=function(S){return b(S)===i},ft.isSuspense=function(S){return b(S)===f},ft.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===u||S===a||S===i||S===f||S===d||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===o||S.$$typeof===s||S.$$typeof===c||S.$$typeof===g||S.$$typeof===v||S.$$typeof===y||S.$$typeof===m)},ft.typeOf=b,ft}var dt={};/** @license React v16.13.1
|
|
341
341
|
* react-is.development.js
|
|
342
342
|
*
|
|
343
343
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
344
344
|
*
|
|
345
345
|
* This source code is licensed under the MIT license found in the
|
|
346
346
|
* LICENSE file in the root directory of this source tree.
|
|
347
|
-
*/var
|
|
347
|
+
*/var cT;function nne(){return cT||(cT=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=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,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(K){return typeof K=="string"||typeof K=="function"||K===n||K===u||K===a||K===i||K===f||K===d||typeof K=="object"&&K!==null&&(K.$$typeof===h||K.$$typeof===p||K.$$typeof===o||K.$$typeof===s||K.$$typeof===c||K.$$typeof===g||K.$$typeof===v||K.$$typeof===y||K.$$typeof===m)}function k(K){if(typeof K=="object"&&K!==null){var de=K.$$typeof;switch(de){case t:var ve=K.type;switch(ve){case l:case u:case n:case a:case i:case f:return ve;default:var Ce=ve&&ve.$$typeof;switch(Ce){case s:case c:case h:case p:case o:return Ce;default:return de}}case r:return de}}}var S=l,_=u,$=s,N=o,z=t,O=c,D=n,H=h,L=p,W=r,M=a,I=i,V=f,U=!1;function A(K){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.")),w(K)||k(K)===l}function w(K){return k(K)===u}function F(K){return k(K)===s}function Z(K){return k(K)===o}function E(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function Y(K){return k(K)===c}function oe(K){return k(K)===n}function re(K){return k(K)===h}function le(K){return k(K)===p}function pe(K){return k(K)===r}function he(K){return k(K)===a}function ue(K){return k(K)===i}function Q(K){return k(K)===f}dt.AsyncMode=S,dt.ConcurrentMode=_,dt.ContextConsumer=$,dt.ContextProvider=N,dt.Element=z,dt.ForwardRef=O,dt.Fragment=D,dt.Lazy=H,dt.Memo=L,dt.Portal=W,dt.Profiler=M,dt.StrictMode=I,dt.Suspense=V,dt.isAsyncMode=A,dt.isConcurrentMode=w,dt.isContextConsumer=F,dt.isContextProvider=Z,dt.isElement=E,dt.isForwardRef=Y,dt.isFragment=oe,dt.isLazy=re,dt.isMemo=le,dt.isPortal=pe,dt.isProfiler=he,dt.isStrictMode=ue,dt.isSuspense=Q,dt.isValidElementType=b,dt.typeOf=k}()),dt}var fT;function dT(){return fT||(fT=1,process.env.NODE_ENV==="production"?df.exports=rne():df.exports=nne()),df.exports}/*
|
|
348
348
|
object-assign
|
|
349
349
|
(c) Sindre Sorhus
|
|
350
350
|
@license MIT
|
|
351
|
-
*/var
|
|
352
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
353
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e){return Kne(e)||Gne(e)||aT(e)||Yne()}var hf=function(e){return e&&e.Math==Math&&e},Tr=hf(typeof globalThis=="object"&&globalThis)||hf(typeof window=="object"&&window)||hf(typeof self=="object"&&self)||hf(typeof ct=="object"&&ct)||function(){return this}()||Function("return this")(),uy={},on=function(e){try{return!!e()}catch{return!0}},Jne=on,sa=!Jne(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),ET={},_T={}.propertyIsEnumerable,kT=Object.getOwnPropertyDescriptor,Xne=kT&&!_T.call({1:2},1);ET.f=Xne?function(t){var r=kT(this,t);return!!r&&r.enumerable}:_T;var $T=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Qne={}.toString,cy=function(e){return Qne.call(e).slice(8,-1)},eie=on,tie=cy,rie="".split,nie=eie(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return tie(e)=="String"?rie.call(e,""):Object(e)}:Object,mf=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},iie=nie,aie=mf,fy=function(e){return iie(aie(e))},Br=function(e){return typeof e=="function"},oie=Br,sl=function(e){return typeof e=="object"?e!==null:oie(e)},dy=Tr,sie=Br,lie=function(e){return sie(e)?e:void 0},vf=function(e,t){return arguments.length<2?lie(dy[e]):dy[e]&&dy[e][t]},uie=vf,cie=uie("navigator","userAgent")||"",OT=Tr,py=cie,TT=OT.process,CT=OT.Deno,IT=TT&&TT.versions||CT&&CT.version,RT=IT&&IT.v8,Pn,yf;RT?(Pn=RT.split("."),yf=Pn[0]<4?1:Pn[0]+Pn[1]):py&&(Pn=py.match(/Edge\/(\d+)/),(!Pn||Pn[1]>=74)&&(Pn=py.match(/Chrome\/(\d+)/),Pn&&(yf=Pn[1])));var fie=yf&&+yf,AT=fie,die=on,PT=!!Object.getOwnPropertySymbols&&!die(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&AT&&AT<41}),pie=PT,NT=pie&&!Symbol.sham&&typeof Symbol.iterator=="symbol",hie=Br,mie=vf,vie=NT,DT=vie?function(e){return typeof e=="symbol"}:function(e){var t=mie("Symbol");return hie(t)&&Object(e)instanceof t},yie=function(e){try{return String(e)}catch{return"Object"}},gie=Br,bie=yie,wie=function(e){if(gie(e))return e;throw TypeError(bie(e)+" is not a function")},xie=wie,jT=function(e,t){var r=e[t];return r==null?void 0:xie(r)},hy=Br,my=sl,Sie=function(e,t){var r,n;if(t==="string"&&hy(r=e.toString)&&!my(n=r.call(e))||hy(r=e.valueOf)&&!my(n=r.call(e))||t!=="string"&&hy(r=e.toString)&&!my(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},MT={exports:{}},LT=Tr,vy=function(e,t){try{Object.defineProperty(LT,e,{value:t,configurable:!0,writable:!0})}catch{LT[e]=t}return t},Eie=Tr,_ie=vy,FT="__core-js_shared__",kie=Eie[FT]||_ie(FT,{}),yy=kie,BT=yy;(MT.exports=function(e,t){return BT[e]||(BT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var gy=MT.exports,$ie=mf,UT=function(e){return Object($ie(e))},Oie=UT,Tie={}.hasOwnProperty,la=Object.hasOwn||function(t,r){return Tie.call(Oie(t),r)},Cie=0,Iie=Math.random(),zT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Cie+Iie).toString(36)},Rie=Tr,Aie=gy,WT=la,Pie=zT,HT=PT,Nie=NT,ll=Aie("wks"),ul=Rie.Symbol,Die=Nie?ul:ul&&ul.withoutSetter||Pie,cl=function(e){return(!WT(ll,e)||!(HT||typeof ll[e]=="string"))&&(HT&&WT(ul,e)?ll[e]=ul[e]:ll[e]=Die("Symbol."+e)),ll[e]},VT=sl,qT=DT,jie=jT,Mie=Sie,Lie=cl,Fie=Lie("toPrimitive"),Bie=function(e,t){if(!VT(e)||qT(e))return e;var r=jie(e,Fie),n;if(r){if(t===void 0&&(t="default"),n=r.call(e,t),!VT(n)||qT(n))return n;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Mie(e,t)},Uie=Bie,zie=DT,ZT=function(e){var t=Uie(e,"string");return zie(t)?t:String(t)},Wie=Tr,KT=sl,by=Wie.document,Hie=KT(by)&&KT(by.createElement),GT=function(e){return Hie?by.createElement(e):{}},Vie=sa,qie=on,Zie=GT,YT=!Vie&&!qie(function(){return Object.defineProperty(Zie("div"),"a",{get:function(){return 7}}).a!=7}),Kie=sa,Gie=ET,Yie=$T,Jie=fy,Xie=ZT,Qie=la,eae=YT,JT=Object.getOwnPropertyDescriptor;uy.f=Kie?JT:function(t,r){if(t=Jie(t),r=Xie(r),eae)try{return JT(t,r)}catch{}if(Qie(t,r))return Yie(!Gie.f.call(t,r),t[r])};var fl={},tae=sl,Ri=function(e){if(tae(e))return e;throw TypeError(String(e)+" is not an object")},rae=sa,nae=YT,XT=Ri,iae=ZT,QT=Object.defineProperty;fl.f=rae?QT:function(t,r,n){if(XT(t),r=iae(r),XT(n),nae)try{return QT(t,r,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var aae=sa,oae=fl,sae=$T,gf=aae?function(e,t,r){return oae.f(e,t,sae(1,r))}:function(e,t,r){return e[t]=r,e},eC={exports:{}},lae=Br,wy=yy,uae=Function.toString;lae(wy.inspectSource)||(wy.inspectSource=function(e){return uae.call(e)});var tC=wy.inspectSource,cae=Tr,fae=Br,dae=tC,rC=cae.WeakMap,pae=fae(rC)&&/native code/.test(dae(rC)),hae=gy,mae=zT,nC=hae("keys"),iC=function(e){return nC[e]||(nC[e]=mae(e))},xy={},vae=pae,yae=Tr,gae=sl,bae=gf,Sy=la,Ey=yy,wae=iC,xae=xy,aC="Object already initialized",Sae=yae.WeakMap,bf,dl,wf,Eae=function(e){return wf(e)?dl(e):bf(e,{})},_ae=function(e){return function(t){var r;if(!gae(t)||(r=dl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(vae||Ey.state){var ua=Ey.state||(Ey.state=new Sae),kae=ua.get,oC=ua.has,$ae=ua.set;bf=function(e,t){if(oC.call(ua,e))throw new TypeError(aC);return t.facade=e,$ae.call(ua,e,t),t},dl=function(e){return kae.call(ua,e)||{}},wf=function(e){return oC.call(ua,e)}}else{var vo=wae("state");xae[vo]=!0,bf=function(e,t){if(Sy(e,vo))throw new TypeError(aC);return t.facade=e,bae(e,vo,t),t},dl=function(e){return Sy(e,vo)?e[vo]:{}},wf=function(e){return Sy(e,vo)}}var sC={set:bf,get:dl,has:wf,enforce:Eae,getterFor:_ae},_y=sa,Oae=la,lC=Function.prototype,Tae=_y&&Object.getOwnPropertyDescriptor,ky=Oae(lC,"name"),Cae=ky&&(function(){}).name==="something",Iae=ky&&(!_y||_y&&Tae(lC,"name").configurable),$y={EXISTS:ky,PROPER:Cae,CONFIGURABLE:Iae},Rae=Tr,uC=Br,Aae=la,cC=gf,Pae=vy,Nae=tC,fC=sC,Dae=$y.CONFIGURABLE,jae=fC.get,Mae=fC.enforce,Lae=String(String).split("String");(eC.exports=function(e,t,r,n){var i=n?!!n.unsafe:!1,a=n?!!n.enumerable:!1,o=n?!!n.noTargetGet:!1,s=n&&n.name!==void 0?n.name:t,u;if(uC(r)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Aae(r,"name")||Dae&&r.name!==s)&&cC(r,"name",s),u=Mae(r),u.source||(u.source=Lae.join(typeof s=="string"?s:""))),e===Rae){a?e[t]=r:Pae(t,r);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=r:cC(e,t,r)})(Function.prototype,"toString",function(){return uC(this)&&jae(this).source||Nae(this)});var pl=eC.exports,dC={},Fae=Math.ceil,Bae=Math.floor,xf=function(e){var t=+e;return t!==t||t===0?0:(t>0?Bae:Fae)(t)},Uae=xf,zae=Math.max,Wae=Math.min,Hae=function(e,t){var r=Uae(e);return r<0?zae(r+t,0):Wae(r,t)},Vae=xf,qae=Math.min,pC=function(e){return e>0?qae(Vae(e),9007199254740991):0},Zae=pC,Kae=function(e){return Zae(e.length)},Gae=fy,Yae=Hae,Jae=Kae,hC=function(e){return function(t,r,n){var i=Gae(t),a=Jae(i),o=Yae(n,a),s;if(e&&r!=r){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}},Xae={includes:hC(!0),indexOf:hC(!1)},Oy=la,Qae=fy,eoe=Xae.indexOf,toe=xy,mC=function(e,t){var r=Qae(e),n=0,i=[],a;for(a in r)!Oy(toe,a)&&Oy(r,a)&&i.push(a);for(;t.length>n;)Oy(r,a=t[n++])&&(~eoe(i,a)||i.push(a));return i},Ty=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],roe=mC,noe=Ty,ioe=noe.concat("length","prototype");dC.f=Object.getOwnPropertyNames||function(t){return roe(t,ioe)};var vC={};vC.f=Object.getOwnPropertySymbols;var aoe=vf,ooe=dC,soe=vC,loe=Ri,uoe=aoe("Reflect","ownKeys")||function(t){var r=ooe.f(loe(t)),n=soe.f;return n?r.concat(n(t)):r},coe=la,foe=uoe,doe=uy,poe=fl,hoe=function(e,t){for(var r=foe(t),n=poe.f,i=doe.f,a=0;a<r.length;a++){var o=r[a];coe(e,o)||n(e,o,i(t,o))}},moe=on,voe=Br,yoe=/#|\.prototype\./,hl=function(e,t){var r=boe[goe(e)];return r==xoe?!0:r==woe?!1:voe(t)?moe(t):!!t},goe=hl.normalize=function(e){return String(e).replace(yoe,".").toLowerCase()},boe=hl.data={},woe=hl.NATIVE="N",xoe=hl.POLYFILL="P",Soe=hl,Cy=Tr,Eoe=uy.f,_oe=gf,koe=pl,$oe=vy,Ooe=hoe,Toe=Soe,Coe=function(e,t){var r=e.target,n=e.global,i=e.stat,a,o,s,u,l,c;if(n?o=Cy:i?o=Cy[r]||$oe(r,{}):o=(Cy[r]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=Eoe(o,s),u=c&&c.value):u=o[s],a=Toe(n?s:r+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;Ooe(l,u)}(e.sham||u&&u.sham)&&_oe(l,"sham",!0),koe(o,s,l,e)}},Ioe=cl,Roe=Ioe("toStringTag"),yC={};yC[Roe]="z";var Iy=String(yC)==="[object z]",Aoe=Iy,Poe=Br,Sf=cy,Noe=cl,Doe=Noe("toStringTag"),joe=Sf(function(){return arguments}())=="Arguments",Moe=function(e,t){try{return e[t]}catch{}},gC=Aoe?Sf:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Moe(t=Object(e),Doe))=="string"?r:joe?Sf(t):(n=Sf(t))=="Object"&&Poe(t.callee)?"Arguments":n},Loe=gC,Ef=function(e){if(Loe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Foe=Ri,bC=function(){var e=Foe(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},Ry={},wC=on,Boe=Tr,xC=Boe.RegExp;Ry.UNSUPPORTED_Y=wC(function(){var e=xC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Ry.BROKEN_CARET=wC(function(){var e=xC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Uoe=mC,zoe=Ty,Woe=Object.keys||function(t){return Uoe(t,zoe)},Hoe=sa,Voe=fl,qoe=Ri,Zoe=Woe,Koe=Hoe?Object.defineProperties:function(t,r){qoe(t);for(var n=Zoe(r),i=n.length,a=0,o;i>a;)Voe.f(t,o=n[a++],r[o]);return t},Goe=vf,Yoe=Goe("document","documentElement"),Joe=Ri,Xoe=Koe,SC=Ty,Qoe=xy,ese=Yoe,tse=GT,rse=iC,EC=">",_C="<",Ay="prototype",Py="script",kC=rse("IE_PROTO"),Ny=function(){},$C=function(e){return _C+Py+EC+e+_C+"/"+Py+EC},OC=function(e){e.write($C("")),e.close();var t=e.parentWindow.Object;return e=null,t},nse=function(){var e=tse("iframe"),t="java"+Py+":",r;return e.style.display="none",ese.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write($C("document.F=Object")),r.close(),r.F},_f,kf=function(){try{_f=new ActiveXObject("htmlfile")}catch{}kf=typeof document<"u"?document.domain&&_f?OC(_f):nse():OC(_f);for(var e=SC.length;e--;)delete kf[Ay][SC[e]];return kf()};Qoe[kC]=!0;var ise=Object.create||function(t,r){var n;return t!==null?(Ny[Ay]=Joe(t),n=new Ny,Ny[Ay]=null,n[kC]=t):n=kf(),r===void 0?n:Xoe(n,r)},ase=on,ose=Tr,sse=ose.RegExp,lse=ase(function(){var e=sse(".","s");return!(e.dotAll&&e.exec(`
|
|
354
|
-
`)&&e.flags==="s")}),
|
|
355
|
-
`)&&(g="(?: "+g+")",b=" "+b,v++),s=new RegExp("^(?:"+g+")",m)),My&&(s=new RegExp("^"+g+"$(?!\\s)",m)),jy&&(u=r.lastIndex),l=$f.call(h?s:r,b),h?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=r.lastIndex,r.lastIndex+=l[0].length):r.lastIndex=0:jy&&l&&(r.lastIndex=r.global?l.index+l[0].length:u),My&&l&&l.length>1&&wse.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&p)for(l.groups=f=vse(null),c=0;c<p.length;c++)d=p[c],f[d[0]]=l[d[1]];return l});var Ly=Dy,Sse=Coe,IC=Ly;Sse({target:"RegExp",proto:!0,forced:/./.exec!==IC},{exec:IC});var RC=pl,Ese=Ly,AC=on,PC=cl,_se=gf,kse=PC("species"),Fy=RegExp.prototype,$se=function(e,t,r,n){var i=PC(e),a=!AC(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!AC(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[kse]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||r){var s=/./[i],u=t(i,""[e],function(l,c,f,d,p){var h=c.exec;return h===Ese||h===Fy.exec?a&&!p?{done:!0,value:s.call(c,f,d)}:{done:!0,value:l.call(f,c,d)}:{done:!1}});RC(String.prototype,e,u[0]),RC(Fy,i,u[1])}n&&_se(Fy[i],"sham",!0)},Ose=xf,Tse=Ef,Cse=mf,NC=function(e){return function(t,r){var n=Tse(Cse(t)),i=Ose(r),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=n.charCodeAt(i),o<55296||o>56319||i+1===a||(s=n.charCodeAt(i+1))<56320||s>57343?e?n.charAt(i):o:e?n.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},Ise={codeAt:NC(!1),charAt:NC(!0)},Rse=Ise.charAt,Ase=function(e,t,r){return t+(r?Rse(e,t).length:1)},Pse=UT,Nse=Math.floor,Dse="".replace,jse=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Mse=/\$([$&'`]|\d{1,2})/g,Lse=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,u=Mse;return i!==void 0&&(i=Pse(i),u=jse),Dse.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var d=+c;if(d===0)return l;if(d>s){var p=Nse(d/10);return p===0?l:p<=s?n[p-1]===void 0?c.charAt(1):n[p-1]+c.charAt(1):l}f=n[d-1]}return f===void 0?"":f})},Fse=Ri,Bse=Br,Use=cy,zse=Ly,Wse=function(e,t){var r=e.exec;if(Bse(r)){var n=r.call(e,t);return n!==null&&Fse(n),n}if(Use(e)==="RegExp")return zse.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Hse=$se,Vse=on,qse=Ri,Zse=Br,Kse=xf,Gse=pC,yo=Ef,Yse=mf,Jse=Ase,Xse=jT,Qse=Lse,ele=Wse,tle=cl,By=tle("replace"),rle=Math.max,nle=Math.min,ile=function(e){return e===void 0?e:String(e)},ale=function(){return"a".replace(/./,"$0")==="$0"}(),DC=function(){return/./[By]?/./[By]("a","$0")==="":!1}(),ole=!Vse(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Hse("replace",function(e,t,r){var n=DC?"$":"$0";return[function(a,o){var s=Yse(this),u=a==null?void 0:Xse(a,By);return u?u.call(a,s,o):t.call(yo(s),a,o)},function(i,a){var o=qse(this),s=yo(i);if(typeof a=="string"&&a.indexOf(n)===-1&&a.indexOf("$<")===-1){var u=r(t,o,s,a);if(u.done)return u.value}var l=Zse(a);l||(a=yo(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=ele(o,s);if(p===null||(d.push(p),!c))break;var h=yo(p[0]);h===""&&(o.lastIndex=Jse(s,Gse(o.lastIndex),f))}for(var m="",g=0,v=0;v<d.length;v++){p=d[v];for(var b=yo(p[0]),y=rle(nle(Kse(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(ile(p[S]));var E=p.groups;if(l){var $=[b].concat(k,y,s);E!==void 0&&$.push(E);var M=yo(a.apply(void 0,$))}else M=Qse(b,s,y,k,E,a);y>=g&&(m+=s.slice(g,y)+M,g=y+b.length)}return m+s.slice(g)}]},!ole||!ale||DC);var ml=Bt,sle=Bm,lle=ra,Of=function(e){return sle.slice(0,e.length)===e},ule=function(){return Of("Bun/")?"BUN":Of("Cloudflare-Workers")?"CLOUDFLARE":Of("Deno/")?"DENO":Of("Node.js/")?"NODE":ml.Bun&&typeof Bun.version=="string"?"BUN":ml.Deno&&typeof Deno.version=="object"?"DENO":lle(ml.process)==="process"?"NODE":ml.window&&ml.document?"BROWSER":"REST"}(),cle=TypeError,fle=function(e,t){if(e<t)throw new cle("Not enough arguments");return e},jC=Bt,dle=Rm,ple=ar,hle=ule,mle=Bm,vle=Yc,yle=fle,gle=jC.Function,ble=/MSIE .\./.test(mle)||hle==="BUN"&&function(){var e=jC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),MC=function(e,t){var r=t?2:1;return ble?function(n,i){var a=yle(arguments.length,1)>r,o=ple(n)?n:gle(n),s=a?vle(arguments,r):[],u=a?function(){dle(o,this,s)}:o;return t?e(u,i):e(u)}:e},wle=vt,LC=Bt,xle=MC,FC=xle(LC.setInterval,!0);wle({global:!0,bind:!0,forced:LC.setInterval!==FC},{setInterval:FC});var Sle=vt,BC=Bt,Ele=MC,UC=Ele(BC.setTimeout,!0);Sle({global:!0,bind:!0,forced:BC.setTimeout!==UC},{setTimeout:UC});var _le=Jt,kle=_le.setInterval,$le=kle;const Ole=Ze($le);var Tle=Ut,zC=function(e,t){var r=[][e];return!!r&&Tle(function(){r.call(null,t||function(){return 1},1)})},Cle=vt,Ile=Pm,Rle=d$.indexOf,Ale=zC,Uy=Ile([].indexOf),WC=!!Uy&&1/Uy([1],1,-0)<0,Ple=WC||!Ale("indexOf");Cle({target:"Array",proto:!0,forced:Ple},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return WC?Uy(this,t,r)||0:Rle(this,t,r)}});var Nle=oa,Dle=Nle("Array","indexOf"),jle=Gn,Mle=Dle,zy=Array.prototype,Lle=function(e){var t=e.indexOf;return e===zy||jle(zy,e)&&t===zy.indexOf?Mle:t},Fle=Lle,Ble=Fle,Ule=Ble;const zle=Ze(Ule);var HC=Mc,Wle=TypeError,Hle=function(e,t){if(!delete e[t])throw new Wle("Cannot delete property "+HC(t)+" of "+HC(e))},Vle=vt,qle=Yn,Zle=uv,Kle=Uc,Gle=na,Yle=GO,Jle=nv,Xle=lv,Qle=Gs,Wy=Hle,eue=Wc,tue=eue("splice"),rue=Math.max,nue=Math.min;Vle({target:"Array",proto:!0,forced:!tue},{splice:function(t,r){var n=qle(this),i=Gle(n),a=Zle(t,i),o=arguments.length,s,u,l,c,f,d;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=nue(rue(Kle(r),0),i-a)),Jle(i+s-u),l=Xle(n,u),c=0;c<u;c++)f=a+c,f in n&&Qle(l,c,n[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,d=c+s,f in n?n[d]=n[f]:Wy(n,d);for(c=i;c>i-u+s;c--)Wy(n,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,d=c+s-1,f in n?n[d]=n[f]:Wy(n,d);for(c=0;c<s;c++)n[c+a]=arguments[c+2];return Yle(n,i-u+s),l}});var iue=oa,aue=iue("Array","splice"),oue=Gn,sue=aue,Hy=Array.prototype,lue=function(e){var t=e.splice;return e===Hy||oue(Hy,e)&&t===Hy.splice?sue:t},uue=lue,cue=uue,fue=cue;const due=Ze(fue);var pue=oa,hue=pue("Array","concat"),mue=Gn,vue=hue,Vy=Array.prototype,yue=function(e){var t=e.concat;return e===Vy||mue(Vy,e)&&t===Vy.concat?vue:t},gue=yue,bue=gue,wue=bue;const kt=Ze(wue);var xue=vt,Sue=Dt,VC=Date,Eue=Sue(VC.prototype.getTime);xue({target:"Date",stat:!0},{now:function(){return Eue(new VC)}});var _ue=Jt,kue=_ue.Date.now,$ue=kue,Oue=$ue,Tue=Oue;const Ai=Ze(Tue);var Cue=xv.forEach,Iue=zC,Rue=Iue("forEach"),Aue=Rue?[].forEach:function(t){return Cue(this,t,arguments.length>1?arguments[1]:void 0)},Pue=vt,qC=Aue;Pue({target:"Array",proto:!0,forced:[].forEach!==qC},{forEach:qC});var Nue=oa,Due=Nue("Array","forEach"),jue=Due,Mue=jue,Lue=Ys,Fue=Or,Bue=Gn,Uue=Mue,qy=Array.prototype,zue={DOMTokenList:!0,NodeList:!0},Wue=function(e){var t=e.forEach;return e===qy||Bue(qy,e)&&t===qy.forEach||Fue(zue,Lue(e))?Uue:t},Hue=Wue;const Tf=Ze(Hue);var Vue=vt,que=Yn,ZC=dv,Zue=Ut,Kue=Zue(function(){ZC(1)});Vue({target:"Object",stat:!0,forced:Kue},{keys:function(t){return ZC(que(t))}});var Gue=Jt,Yue=Gue.Object.keys,Jue=Yue,Xue=Jue,Que=Xue;const ece=Ze(Que);var tce=Jt,rce=tce.Object.getOwnPropertySymbols,nce=rce,ice=nce,ace=ice;const KC=Ze(ace);var oce=vt,sce=xv.filter,lce=Wc,uce=lce("filter");oce({target:"Array",proto:!0,forced:!uce},{filter:function(t){return sce(this,t,arguments.length>1?arguments[1]:void 0)}});var cce=oa,fce=cce("Array","filter"),dce=Gn,pce=fce,Zy=Array.prototype,hce=function(e){var t=e.filter;return e===Zy||dce(Zy,e)&&t===Zy.filter?pce:t},mce=hce,vce=mce,yce=vce;const gce=Ze(yce);var GC={exports:{}},bce=vt,wce=Ut,xce=Cn,YC=Hs.f,JC=yr,Sce=!JC||wce(function(){YC(1)});bce({target:"Object",stat:!0,forced:Sce,sham:!JC},{getOwnPropertyDescriptor:function(t,r){return YC(xce(t),r)}});var Ece=Jt,XC=Ece.Object,_ce=GC.exports=function(t,r){return XC.getOwnPropertyDescriptor(t,r)};XC.getOwnPropertyDescriptor.sham&&(_ce.sham=!0);var kce=GC.exports,$ce=kce,Oce=$ce,Tce=Oce;const QC=Ze(Tce);var Cce=In,Ice=Dt,Rce=Gc,Ace=Jc,Pce=Ti,Nce=Ice([].concat),Dce=Cce("Reflect","ownKeys")||function(t){var r=Rce.f(Pce(t)),n=Ace.f;return n?Nce(r,n(t)):r},jce=vt,Mce=yr,Lce=Dce,Fce=Cn,Bce=Hs,Uce=Gs;jce({target:"Object",stat:!0,sham:!Mce},{getOwnPropertyDescriptors:function(t){for(var r=Fce(t),n=Bce.f,i=Lce(r),a={},o=0,s,u;i.length>o;)u=n(r,s=i[o++]),u!==void 0&&Uce(a,s,u);return a}});var zce=Jt,Wce=zce.Object.getOwnPropertyDescriptors,Hce=Wce,Vce=Hce,qce=Vce;const eI=Ze(qce);var tI={exports:{}},Zce=vt,Kce=yr,rI=Hc.f;Zce({target:"Object",stat:!0,forced:Object.defineProperties!==rI,sham:!Kce},{defineProperties:rI});var Gce=Jt,nI=Gce.Object,Yce=tI.exports=function(t,r){return nI.defineProperties(t,r)};nI.defineProperties.sham&&(Yce.sham=!0);var Jce=tI.exports,Xce=Jce,Qce=Xce,efe=Qce;const tfe=Ze(efe);var rfe=ST;const nfe=Ze(rfe);var ife=!1;function afe(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 ofe(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 sfe=function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!ife:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ofe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=afe(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e}(),or="-ms-",Cf="-moz-",st="-webkit-",iI="comm",Ky="rule",Gy="decl",lfe="@import",aI="@keyframes",ufe="@layer",cfe=Math.abs,If=String.fromCharCode,ffe=Object.assign;function dfe(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function oI(e){return e.trim()}function pfe(e,t){return(e=t.exec(e))?e[0]:e}function lt(e,t,r){return e.replace(t,r)}function Yy(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function vl(e,t,r){return e.slice(t,r)}function Nn(e){return e.length}function Jy(e){return e.length}function Rf(e,t){return t.push(e),e}function hfe(e,t){return e.map(t).join("")}var Af=1,go=1,sI=0,br=0,jt=0,bo="";function Pf(e,t,r,n,i,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Af,column:go,length:o,return:""}}function yl(e,t){return ffe(Pf("",null,null,"",null,null,0),e,{length:-e.length},t)}function mfe(){return jt}function vfe(){return jt=br>0?Xt(bo,--br):0,go--,jt===10&&(go=1,Af--),jt}function Cr(){return jt=br<sI?Xt(bo,br++):0,go++,jt===10&&(go=1,Af++),jt}function Dn(){return Xt(bo,br)}function Nf(){return br}function gl(e,t){return vl(bo,e,t)}function bl(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 lI(e){return Af=go=1,sI=Nn(bo=e),br=0,[]}function uI(e){return bo="",e}function Df(e){return oI(gl(br-1,Xy(e===91?e+2:e===40?e+1:e)))}function yfe(e){for(;(jt=Dn())&&jt<33;)Cr();return bl(e)>2||bl(jt)>3?"":" "}function gfe(e,t){for(;--t&&Cr()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return gl(e,Nf()+(t<6&&Dn()==32&&Cr()==32))}function Xy(e){for(;Cr();)switch(jt){case e:return br;case 34:case 39:e!==34&&e!==39&&Xy(jt);break;case 40:e===41&&Xy(e);break;case 92:Cr();break}return br}function bfe(e,t){for(;Cr()&&e+jt!==57;)if(e+jt===84&&Dn()===47)break;return"/*"+gl(t,br-1)+"*"+If(e===47?e:Cr())}function wfe(e){for(;!bl(Dn());)Cr();return gl(e,br)}function xfe(e){return uI(jf("",null,null,null,[""],e=lI(e),0,[0],e))}function jf(e,t,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,d=0,p=0,h=0,m=1,g=1,v=1,b=0,y="",k=i,S=a,E=n,$=y;g;)switch(h=b,b=Cr()){case 40:if(h!=108&&Xt($,f-1)==58){Yy($+=lt(Df(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:$+=Df(b);break;case 9:case 10:case 13:case 32:$+=yfe(h);break;case 92:$+=gfe(Nf()-1,7);continue;case 47:switch(Dn()){case 42:case 47:Rf(Sfe(bfe(Cr(),Nf()),t,r),u);break;default:$+="/"}break;case 123*m:s[l++]=Nn($)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:v==-1&&($=lt($,/\f/g,"")),p>0&&Nn($)-f&&Rf(p>32?fI($+";",n,r,f-1):fI(lt($," ","")+";",n,r,f-2),u);break;case 59:$+=";";default:if(Rf(E=cI($,t,r,l,c,i,s,y,k=[],S=[],f),a),b===123)if(c===0)jf($,t,E,E,k,a,f,s,S);else switch(d===99&&Xt($,3)===110?100:d){case 100:case 108:case 109:case 115:jf(e,E,E,n&&Rf(cI(e,E,E,0,0,i,s,y,i,k=[],f),S),i,S,f,s,n?k:S);break;default:jf($,E,E,E,[""],S,0,s,S)}}l=c=p=0,m=v=1,y=$="",f=o;break;case 58:f=1+Nn($),p=h;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&vfe()==125)continue}switch($+=If(b),b*m){case 38:v=c>0?1:($+="\f",-1);break;case 44:s[l++]=(Nn($)-1)*v,v=1;break;case 64:Dn()===45&&($+=Df(Cr())),d=Dn(),c=f=Nn(y=$+=wfe(Nf())),b++;break;case 45:h===45&&Nn($)==2&&(m=0)}}return a}function cI(e,t,r,n,i,a,o,s,u,l,c){for(var f=i-1,d=i===0?a:[""],p=Jy(d),h=0,m=0,g=0;h<n;++h)for(var v=0,b=vl(e,f+1,f=cfe(m=o[h])),y=e;v<p;++v)(y=oI(m>0?d[v]+" "+b:lt(b,/&\f/g,d[v])))&&(u[g++]=y);return Pf(e,t,r,i===0?Ky:s,u,l,c)}function Sfe(e,t,r){return Pf(e,t,r,iI,If(mfe()),vl(e,2,-2),0)}function fI(e,t,r,n){return Pf(e,t,r,Gy,vl(e,0,n),vl(e,n+1,-1),n)}function wo(e,t){for(var r="",n=Jy(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Efe(e,t,r,n){switch(e.type){case ufe:if(e.children.length)break;case lfe:case Gy:return e.return=e.return||e.value;case iI:return"";case aI:return e.return=e.value+"{"+wo(e.children,n)+"}";case Ky:e.value=e.props.join(",")}return Nn(r=wo(e.children,n))?e.return=e.value+"{"+r+"}":""}function _fe(e){var t=Jy(e);return function(r,n,i,a){for(var o="",s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}function kfe(e){return function(t){t.root||(t=t.return)&&e(t)}}function $fe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ofe=function(t,r,n){for(var i=0,a=0;i=a,a=Dn(),i===38&&a===12&&(r[n]=1),!bl(a);)Cr();return gl(t,br)},Tfe=function(t,r){var n=-1,i=44;do switch(bl(i)){case 0:i===38&&Dn()===12&&(r[n]=1),t[n]+=Ofe(br-1,r,n);break;case 2:t[n]+=Df(i);break;case 4:if(i===44){t[++n]=Dn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=If(i)}while(i=Cr());return t},Cfe=function(t,r){return uI(Tfe(lI(t),r))},dI=new WeakMap,Ife=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!dI.get(n))&&!i){dI.set(t,!0);for(var a=[],o=Cfe(r,a),s=n.props,u=0,l=0;u<o.length;u++)for(var c=0;c<s.length;c++,l++)t.props[l]=a[u]?o[u].replace(/&\f/g,s[c]):s[c]+" "+o[u]}}},Rfe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function pI(e,t){switch(dfe(e,t)){case 5103:return st+"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 st+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return st+e+Cf+e+or+e+e;case 6828:case 4268:return st+e+or+e+e;case 6165:return st+e+or+"flex-"+e+e;case 5187:return st+e+lt(e,/(\w+).+(:[^]+)/,st+"box-$1$2"+or+"flex-$1$2")+e;case 5443:return st+e+or+"flex-item-"+lt(e,/flex-|-self/,"")+e;case 4675:return st+e+or+"flex-line-pack"+lt(e,/align-content|flex-|-self/,"")+e;case 5548:return st+e+or+lt(e,"shrink","negative")+e;case 5292:return st+e+or+lt(e,"basis","preferred-size")+e;case 6060:return st+"box-"+lt(e,"-grow","")+st+e+or+lt(e,"grow","positive")+e;case 4554:return st+lt(e,/([^-])(transform)/g,"$1"+st+"$2")+e;case 6187:return lt(lt(lt(e,/(zoom-|grab)/,st+"$1"),/(image-set)/,st+"$1"),e,"")+e;case 5495:case 3959:return lt(e,/(image-set\([^]*)/,st+"$1$`$1");case 4968:return lt(lt(e,/(.+:)(flex-)?(.*)/,st+"box-pack:$3"+or+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+st+e+e;case 4095:case 3583:case 4068:case 2532:return lt(e,/(.+)-inline(.+)/,st+"$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(Nn(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return lt(e,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+Cf+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yy(e,"stretch")?pI(lt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,Nn(e)-3-(~Yy(e,"!important")&&10))){case 107:return lt(e,":",":"+st)+e;case 101:return lt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+st+(Xt(e,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+or+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return st+e+or+e+e}return e}var Afe=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Gy:t.return=pI(t.value,t.length);break;case aI:return wo([yl(t,{value:lt(t.value,"@","@"+st)})],i);case Ky:if(t.length)return hfe(t.props,function(a){switch(pfe(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wo([yl(t,{props:[lt(a,/:(read-\w+)/,":"+Cf+"$1")]})],i);case"::placeholder":return wo([yl(t,{props:[lt(a,/:(plac\w+)/,":"+st+"input-$1")]}),yl(t,{props:[lt(a,/:(plac\w+)/,":"+Cf+"$1")]}),yl(t,{props:[lt(a,/:(plac\w+)/,or+"input-$1")]})],i)}return""})}},Pfe=[Afe],Nfe=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||Pfe,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),v=1;v<g.length;v++)a[g[v]]=!0;s.push(m)});var u,l=[Ife,Rfe];{var c,f=[Efe,kfe(function(m){c.insert(m)})],d=_fe(l.concat(i,f)),p=function(g){return wo(xfe(g),d)};u=function(g,v,b,y){c=b,p(g?g+"{"+v.styles+"}":v.styles),y&&(h.inserted[v.name]=!0)}}var h={key:r,sheet:new sfe({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return h.sheet.hydrate(s),h};function Dfe(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&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 jfe={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},Mfe=!1,Lfe=/[A-Z]|^ms/g,Ffe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hI=function(t){return t.charCodeAt(1)===45},mI=function(t){return t!=null&&typeof t!="boolean"},Qy=$fe(function(e){return hI(e)?e:e.replace(Lfe,"-$&").toLowerCase()}),vI=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ffe,function(n,i,a){return Pi={name:i,styles:a,next:Pi},i})}return jfe[t]!==1&&!hI(t)&&typeof r=="number"&&r!==0?r+"px":r},Bfe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Mf(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Pi={name:i.name,styles:i.styles,next:Pi},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Pi={name:o.name,styles:o.styles,next:Pi},o=o.next;var s=a.styles+";";return s}return Ufe(e,t,r)}}var u=r;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function Ufe(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Mf(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":mI(s)&&(n+=Qy(a)+":"+vI(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Mfe)throw new Error(Bfe);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)mI(o[u])&&(n+=Qy(a)+":"+vI(a,o[u])+";");else{var l=Mf(e,t,o);switch(a){case"animation":case"animationName":{n+=Qy(a)+":"+l+";";break}default:n+=a+"{"+l+"}"}}}}return n}var yI=/label:\s*([^\s;{]+)\s*(;|$)/g,Pi;function eg(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Pi=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Mf(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Mf(r,t,e[s]),n){var u=a;i+=u[s]}yI.lastIndex=0;for(var l="",c;(c=yI.exec(i))!==null;)l+="-"+c[1];var f=Dfe(i)+l;return{name:f,styles:i,next:Pi}}function gI(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var zfe=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},Wfe=function(t,r,n){zfe(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function bI(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function wI(e,t,r){var n=[],i=gI(e,n,r);return n.length<2?r:i+t(n)}var Hfe=function(t){var r=Nfe(t);r.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},r.compat=!0;var n=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=eg(l,r.registered,void 0);return Wfe(r,f),r.key+"-"+f.name},i=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=eg(l,r.registered),d="animation-"+f.name;return bI(r,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=eg(l,r.registered);bI(r,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return wI(r.registered,n,Vfe(l))};return{css:n,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){r.inserted[l]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:gI.bind(null,r.registered),merge:wI.bind(null,r.registered,n)}},Vfe=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];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&&(r&&(r+=" "),r+=a)}}return r},qfe=pl,tg=Date.prototype,xI="Invalid Date",SI="toString",Zfe=tg[SI],Kfe=tg.getTime;String(new Date(NaN))!=xI&&qfe(tg,SI,function(){var t=Kfe.call(this);return t===t?Zfe.call(this):xI});var Gfe=Iy,Yfe=gC,Jfe=Gfe?{}.toString:function(){return"[object "+Yfe(this)+"]"},Xfe=Iy,Qfe=pl,ede=Jfe;Xfe||Qfe(Object.prototype,"toString",ede,{unsafe:!0});var tde=$y.PROPER,rde=pl,nde=Ri,EI=Ef,ide=on,ade=bC,rg="toString",_I=RegExp.prototype,kI=_I[rg],ode=ide(function(){return kI.call({source:"a",flags:"b"})!="/a/b"}),sde=tde&&kI.name!=rg;(ode||sde)&&rde(RegExp.prototype,rg,function(){var t=nde(this),r=EI(t.source),n=t.flags,i=EI(n===void 0&&t instanceof RegExp&&!("flags"in _I)?ade.call(t):n);return"/"+r+"/"+i},{unsafe:!0});var $I=typeof window<"u"?window:self,lde=$I.crypto||$I.msCrypto,ude=function(e){if(!e)return Math.random;var t=Math.pow(2,32),r=new Uint32Array(1);return function(){return e.getRandomValues(r)[0]/t}}(lde);const cde=Ze(ude);function fde(){return cde().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var dde=Qk;const OI=Ze(dde);function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",r="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(r+=" color: ".concat(t,";")),[r,""]}function TI(e,t){for(var r,n,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return kt(r=[kt(n="%c".concat(e,"%c ")).call(n,t)]).call(r,tt(ht("green","white")),a)}function pde(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.force,n=r===void 0?!1:r;return n?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,u=An(s,1),l=u[0];typeof l=="function"&&(a=l());var c=OI(a[0])?a:[a],f=c.length===1;Tf(c).call(c,function(d,p){if(f){var h,m;(h=console).log.apply(h,tt(TI.apply(void 0,kt(m=[e]).call(m,tt(d)))))}else if(p){var g;(g=console).log.apply(g,tt(OI(d)?d:[d]))}else{var v,b;(v=console).groupCollapsed.apply(v,tt(TI.apply(void 0,kt(b=[e]).call(b,tt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var hde=sa,mde=$y.EXISTS,vde=fl.f,CI=Function.prototype,yde=CI.toString,gde=/^\s*function ([^ (]*)/,bde="name";hde&&!mde&&vde(CI,bde,{configurable:!0,get:function(){try{return yde.call(this).match(gde)[1]}catch{return""}}});var wde=Jt,xde=wde.setTimeout,Sde=xde;const Ede=Ze(Sde);function _de(e,t){if(!t)return e;var r=0,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Ai();s-r>t?(e.apply(void 0,a),r=s):(clearTimeout(n),n=Ede(function(){e.apply(void 0,a),r=Ai()},Math.max(0,t-s+r)))}}var II=function(t){var r=t.debounce,n=t.name,i=t.onEvent,a=t.target,o=N.useRef();o.current=i;var s=N.useMemo(function(){return _de(function(l){var c=o.current;c&&c(l)},r)},[r,o]),u=N.useCallback(function(l){l.timeStampLow=Ai(),s(l)},[s]);return N.useLayoutEffect(function(){return a.addEventListener(n,u,{passive:!0}),u({target:a,type:n}),function(){return a.removeEventListener(n,u)}},[n,u,a]),!1};II.defaultProps={debounce:200};var kde=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},$de=vt,Ode=kde;$de({target:"Math",stat:!0},{sign:Ode});var Tde=Jt,Cde=Tde.Math.sign,Ide=Cde,Rde=Ide,Ade=Rde;const Pde=Ze(Ade);function Nde(e,t){var r=Pde(t-e),n=Math.sqrt(Math.abs(t-e)),i=e+n*r;return r>0?Math.min(t,i):Math.max(t,i)}function Dde(e,t,r,n){for(var i=e,a=0;a<n;a++)i=r(i,t);return i}var RI=function(t){var r=t.name,n=t.onEnd,i=t.target,a=t.value,o=N.useRef(),s=N.useCallback(function(l,c,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Ai();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var h=f==="100%"?i.scrollHeight-i.offsetHeight:f,m=Dde(c,h,Nde,(Ai()-p)/5);Math.abs(h-m)<1.5&&(m=h),i[l]=m,h===m?n&&n(!0):s(l,c,f,d+1,p)}}))},[o,n,i]),u=N.useCallback(function(){cancelAnimationFrame(o.current),n&&n(!1)},[n]);return N.useLayoutEffect(function(){return s(r,i[r],a,1),i?(i.addEventListener("pointerdown",u,{passive:!0}),i.addEventListener("wheel",u,{passive:!0}),function(){i.removeEventListener("pointerdown",u),i.removeEventListener("wheel",u),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,u,r,i,a]),!1};RI.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function ng(e){var t=N.useState(e),r=An(t,2),n=r[0],i=r[1],a=N.useRef(),o=N.useCallback(function(s){typeof s=="function"?o(function(u){return s=s(u),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=n,[n,i,a]}function AI(e,t){var r=ece(e);if(KC){var n=KC(e);t&&(n=gce(n).call(n,function(i){return QC(e,i).enumerable})),r.push.apply(r,n)}return r}function PI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;Tf(n=AI(Object(r),!0)).call(n,function(a){Zne(e,a,r[a])})}else if(eI)tfe(e,eI(r));else{var i;Tf(i=AI(Object(r))).call(i,function(a){nfe(e,a,QC(r,a))})}}return e}var jde=function(){return 1/0},NI=17,Mde="bottom",sn="top",DI=1,Lde=34,jI={};function Fde(e,t){return e(),Ole(e,t)}function MI(e){var t=e.mode,r=e.target,n=r.offsetHeight,i=r.scrollHeight,a=r.scrollTop,o=i-a-n<DI,s=a<DI,u=t===sn?s:o,l=t!==sn?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function wl(e,t){return e===(t===sn?0:"100%")}var ig=function(t){var r=t.checkInterval,n=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=N.useMemo(function(){return pde("<ScrollToBottom>",{force:a})},[a]);s=s===sn?sn:Mde;var f=N.useRef(0),d=N.useRef(o),p=ng(s===sn?0:"100%"),h=An(p,3),m=h[0],g=h[1],v=h[2],b=ng(null),y=An(b,3),k=y[0],S=y[1],E=y[2],$=N.useRef(0),M=N.useRef(0),z=N.useRef(0),O=N.useState(!0),D=An(O,2),H=D[0],L=D[1],I=N.useState(!0),j=An(I,2),F=j[0],q=j[1],U=N.useState(!0),P=An(U,2),w=P[0],W=P[1],Z=N.useState(!1),_=An(Z,2),Y=_[0],oe=_[1],re=ng(!0),le=An(re,3),pe=le[0],he=le[1],ue=le[2],Q=N.useRef([]),K=N.useCallback(function(A){var X=E.current;return Q.current.push(A),X&&A({scrollTop:X.scrollTop}),function(){var ce=Q.current,_e=zle(ce).call(ce,A);~_e&&due(ce).call(ce,_e,1)}},[Q,E]),de=N.useCallback(function(){var A=v.current;c(function(){var X;return kt(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,tt(ht("magenta")),tt(ht("orange")),[{animateTo:A}])}),f.current=Ai(),wl(A,s)||he(!1),g(null)},[v,c,f,s,g,he]),ve=N.useCallback(function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,_e=E.current;if(typeof A!="number"&&A!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof A=="number"?A+"px":A.replace(/%/g,"%%"),"%c")]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),{behavior:ce,nextAnimateTo:A,target:_e}]}),ce==="auto"?(de(),_e&&(_e.scrollTop=A==="100%"?_e.scrollHeight-_e.offsetHeight:A)):(ce!=="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(A)),wl(A,s)&&(c(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),[{mode:s,nextAnimateTo:A}]]}),he(!0))},[c,de,s,g,he,E]),Ce=N.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return kt(ce=["%cscrollToBottom%c: Called"]).call(ce,tt(ht("yellow","")))}),X!=="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.'),ve("100%",{behavior:X||"smooth"})},[c,ve]),R=N.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return kt(ce=["%cscrollToTop%c: Called"]).call(ce,tt(ht("yellow","")))}),X!=="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.'),ve(0,{behavior:X||"smooth"})},[c,ve]),J=N.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var _e;return kt(_e=["%cscrollToEnd%c: Called"]).call(_e,tt(ht("yellow","")))}),X!=="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 ce={behavior:X||"smooth"};s===sn?R(ce):Ce(ce)},[c,s,Ce,R]),ae=N.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var _e;return kt(_e=["%cscrollToStart%c: Called"]).call(_e,tt(ht("yellow","")))}),X!=="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 ce={behavior:X||"smooth"};s===sn?Ce(ce):R(ce)},[c,s,Ce,R]),ee=N.useCallback(function(){var A=E.current;if(A){if(d.current==="auto"){c(function(){var Ct;return kt(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,tt(ht("blue")))}),A.scrollTop=s===sn?0:A.scrollHeight-A.offsetHeight,d.current=!1;return}var X=$.current,ce=A.offsetHeight,_e=A.scrollHeight,Oe=A.scrollTop,Xe=s===sn?0:Math.max(0,_e-ce-Oe),ut=Math.max(0,X-Oe),zt=l({maxValue:Xe,minValue:ut,offsetHeight:ce,scrollHeight:_e,scrollTop:Oe}),Tt=Math.max(0,Math.min(Xe,zt)),Ge;s===sn||Tt!==Xe?Ge=Oe+Tt:Ge="100%",c(function(){var Ct,rt,wr;return[kt(Ct=[kt(rt=kt(wr="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(wr,typeof Ge=="number"?Ge+"px":Ge.replace(/%/g,"%%"),"%c (%c")).call(rt,(Ge==="100%"?Xe:Ge)+X,"px%c)")]).call(Ct,tt(ht("orange")),tt(ht("purple")),tt(ht("purple")),tt(ht("purple"))),{animateFrom:X,maxValue:Xe,minValue:ut,nextAnimateTo:Ge,nextValue:Tt,offsetHeight:ce,rawNextValue:zt,scrollHeight:_e,scrollTop:Oe}]}),ve(Ge,{behavior:"smooth"})}},[$,c,s,l,ve,E]),ke=N.useCallback(function(A){var X,ce=A.timeStampLow,_e=v.current,Oe=E.current,Xe=_e!==null;if(!(ce<=f.current||!Oe)){var ut=MI({mode:s,target:Oe}),zt=ut.atBottom,Tt=ut.atEnd,Ge=ut.atStart,Ct=ut.atTop;L(zt),q(Tt),oe(Ge),W(Ct);var rt=Oe.offsetHeight,wr=Oe.scrollHeight,Ir=M.current,ln=z.current,Qn=rt!==Ir,jn=wr!==ln;if(Qn&&(M.current=rt),jn&&(z.current=wr),!Qn&&!jn){var un=Xe&&wl(_e,s)||Tt;ue.current!==un&&(c(function(){var mt,St,Wt,Ht;return[kt(mt=["%conScroll%c: %csetSticky%c(%c".concat(un,"%c)")]).call(mt,tt(ht("red")),tt(ht("red")),tt(ht("purple"))),kt(St=[kt(Wt=kt(Ht="(animating = %c".concat(Xe,"%c && isEnd = %c")).call(Ht,wl(_e,s),"%c) || atEnd = %c")).call(Wt,Tt,"%c")]).call(St,tt(ht("purple")),tt(ht("purple")),tt(ht("purple")),[{animating:Xe,animateTo:_e,atEnd:Tt,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:un}])]}),he(un))}else ue.current&&(c(function(){var mt;return[kt(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,tt(ht("red")),tt(ht("orange")),[{offsetHeightChanged:Qn,scrollHeightChanged:jn}]),{nextOffsetHeight:rt,prevOffsetHeight:Ir,nextScrollHeight:wr,prevScrollHeight:ln}]}),ee());var ei=Oe.scrollTop;Tf(X=Q.current).call(X,function(mt){return mt({scrollTop:ei})})}},[v,c,f,s,M,z,Q,ee,L,q,oe,W,he,ue,E]);N.useEffect(function(){if(k){var A=!1,X=Fde(function(){var ce=E.current,_e=v.current!==null;ue.current?MI({mode:s,target:ce}).atEnd?A=!1:A?Ai()-A>Lde&&(_e||($.current=ce.scrollTop,c(function(){var Oe;return kt(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,tt(ht("navy")),tt(ht("orange")))}),ee()),A=!1):A=Ai():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[kt(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,tt(ht("navy")),tt(ht("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(NI,r)||NI);return function(){return clearInterval(X)}}},[v,r,c,s,ee,he,ue,k,E]);var xe=N.useMemo(function(){var A=jI[u]||(jI[u]=Hfe({key:"react-scroll-to-bottom--css-"+fde(),nonce:u}));return function(X){return A.css(X)+""}},[u]),Re=N.useMemo(function(){return{observeScrollPosition:K,setTarget:S,styleToClassName:xe}},[K,S,xe]),qe=N.useMemo(function(){return{atBottom:H,atEnd:F,atStart:Y,atTop:w,mode:s}},[H,F,Y,w,s]),Ae=N.useMemo(function(){var A=m!==null;return{animating:A,animatingToEnd:A&&wl(m,s),sticky:pe}},[m,s,pe]),Be=N.useMemo(function(){return PI(PI({},qe),Ae)},[qe,Ae]),B=N.useMemo(function(){return{scrollTo:ve,scrollToBottom:Ce,scrollToEnd:J,scrollToStart:ae,scrollToTop:R}},[ve,Ce,J,ae,R]);return N.useEffect(function(){if(k){var A=function(){z.current=k.scrollHeight};return k.addEventListener("focus",A,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",A)}}},[k]),c(function(){var A;return[kt(A=["%cRender%c: Render"]).call(A,tt(ht("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),N.createElement(pf.Provider,{value:Re},N.createElement(ny.Provider,{value:B},N.createElement(oy.Provider,{value:Be},N.createElement(iy.Provider,{value:qe},N.createElement(ay.Provider,{value:Ae},n,k&&N.createElement(II,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&m!==null&&N.createElement(RI,{name:"scrollTop",onEnd:de,target:k,value:m}))))))};ig.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:jde},ig.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 Bde={height:"100%",overflowY:"auto",width:"100%"},ag=function(t){var r=t.children,n=t.className,i=N.useContext(pf),a=i.setTarget,o=sy()(Bde);return N.createElement("div",{className:Gv(o,(n||"")+""),ref:a},r)};ag.defaultProps={children:void 0,className:void 0},ag.propTypes={children:at.any,className:at.string};var Ude={position:"relative"},og=function(t){var r=t.children,n=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=sy()(Ude);return N.createElement("div",{className:Gv(o,(n||"")+"")},N.createElement(ag,{className:(a||"")+""},r),N.createElement(ly,{className:(i||"")+""}))};og.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},og.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var sg=function(t){var r=t.checkInterval,n=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,u=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,d=t.scrollViewClassName;return N.createElement(ig,{checkInterval:r,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},N.createElement(og,{className:i,followButtonClassName:s,scrollViewClassName:d},n))};sg.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},sg.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};function zde(){var e=vT(),t=e.scrollToBottom;return t}Z8();const LI=N.memo(({scrollDownButton:e,...t})=>{const{messageList:r}=gt,n=$r(v=>v.conversationId),i=Me(v=>v.messages)[n??""]??[],a=Me(v=>v.setState),o=Me(v=>v.client),s=Me(v=>v.messageContainerRef),u=Me(v=>v.isTyping),l=Me(v=>v.setIsTyping),c=Me(v=>v.headerMessage),f=N.useMemo(()=>LR(i),[i]),[d,p]=N.useState(!0),{y:h}=Mz(s),m=N.useCallback(()=>{if(!s.current)return;const{scrollHeight:v}=s.current;d&&s.current.scrollTo({top:v})},[]);N.useEffect(()=>o==null?void 0:o.on("isTyping",({isTyping:v,timeout:b})=>{l(v,b)}),[]),N.useEffect(()=>{const v=i[i.length-1];a({disableComposer:!!(v!=null&&v.disableInput)})},[i.length]),N.useEffect(()=>{if(!s.current)return;const{offsetHeight:v,scrollHeight:b,scrollTop:y}=s.current;p(b<=y+v+100)},[h]);const g=e!=null&&e.icon?e==null?void 0:e.icon:f6;return C.jsx(C.Fragment,{children:C.jsxs(sg,{...t,...r.container,followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[c&&C.jsx("span",{...r.headerMessage,children:c}),C.jsx(V8,{}),f.map(v=>C.jsx(Im,{scroll:m,...v},v.id)),u&&C.jsx(Im,{scroll:m,direction:"incoming",children:C.jsx(yk,{})}),C.jsx("li",{"data-is-at-bottom":d,...r.scrollDownButton.container,children:C.jsxs(Wde,{children:[(e==null?void 0:e.text)??"Back"," ",C.jsx(g,{...r.scrollDownButton.icon})]})})]})})}),Wde=e=>{const[t]=gT(),r=zde(),{messageList:{scrollDownButton:n}}=gt;return!t&&C.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},Hde=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:i}=qS(),a=N.useMemo(()=>pb({color:e,fontFamily:t,radius:r,themeMode:n,variant:i}),[e,t,r,n,i]);return C.jsxs(C.Fragment,{children:[C.jsxs(ck,{children:[C.jsx(vk,{}),C.jsx(LI,{}),C.jsx(D1,{})]}),C.jsx("style",{children:a})]})};Pe.Avatar=td,Pe.Block=Ga,Pe.Composer=D1,Pe.Container=ck,Pe.Fab=L8,Pe.Header=vk,Pe.Message=Im,Pe.MessageList=LI,Pe.Modal=Oi,Pe.ModalProvider=j1,Pe.RestartConversation=mk,Pe.TypingIndicator=yk,Pe.Webchat=Hde,Pe.WebchatProvider=cq,Pe.WebchatThemeSchema=ed,Pe.__adapters=QI,Pe.avatarThemeSchema=jl,Pe.blockThemeSchema=lb,Pe.configPropsSchema=db,Pe.configurationSchema=ab,Pe.cssStyleSchema=sb,Pe.descriptionItemSchema=va,Pe.fileTypes=Q0,Pe.generateThemeStylesheet=pb,Pe.getClient=tS,Pe.initPropsSchema=LA,Pe.isFileType=eS,Pe.markdownTypeSchema=ob,Pe.renderers=T1,Pe.statePropsSchema=cb,Pe.styleOptionSchema=fe,Pe.themeSchema=ub,Pe.useClient=L4,Pe.useWebchatStore=Me,Pe.userPropsSchema=fb,Pe.webchatClasses=gt,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
|
|
351
|
+
*/var Xv,pT;function ine(){if(pT)return Xv;pT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[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 Xv=i()?Object.assign:function(a,o){for(var s,l=n(a),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 d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},Xv}var Qv,hT;function ey(){if(hT)return Qv;hT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qv=e,Qv}var ty,mT;function ane(){if(mT)return ty;mT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ey(),r={},n=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,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(n(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw d.name="Invariant Violation",d}f=a[c](o,c,l,s,null,t)}catch(h){f=h}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 r)){r[f.message]=!0;var p=u?u():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ty=i,ty}var ry,vT;function one(){if(vT)return ry;vT=1;var e=dT(),t=ine(),r=ey(),n=ane(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ry=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(A){var w=A&&(u&&A[u]||A[c]);if(typeof w=="function")return w}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:y(),arrayOf:b,element:k(),elementType:S(),instanceOf:_,node:O(),objectOf:N,oneOf:$,oneOfType:z,shape:D,exact:H};function h(A,w){return A===w?A!==0||1/A===1/w:A!==A&&w!==w}function m(A){this.message=A,this.stack=""}m.prototype=Error.prototype;function g(A){if(process.env.NODE_ENV!=="production")var w={},F=0;function Z(Y,oe,re,le,pe,he,ue){if(le=le||d,he=he||re,ue!==r){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var K=le+":"+re;!w[K]&&F<3&&(a("You are manually calling a React.PropTypes validation function for the `"+he+"` prop on `"+le+"`. 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."),w[K]=!0,F++)}}return oe[re]==null?Y?oe[re]===null?new m("The "+pe+" `"+he+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+pe+" `"+he+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:A(oe,re,le,pe,he)}var E=Z.bind(null,!1);return E.isRequired=Z.bind(null,!0),E}function v(A){function w(F,Z,E,Y,oe,re){var le=F[Z],pe=M(le);if(pe!==A){var he=I(le);return new m("Invalid "+Y+" `"+oe+"` of type "+("`"+he+"` supplied to `"+E+"`, expected ")+("`"+A+"`."))}return null}return g(w)}function y(){return g(o)}function b(A){function w(F,Z,E,Y,oe){if(typeof A!="function")return new m("Property `"+oe+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var re=F[Z];if(!Array.isArray(re)){var le=M(re);return new m("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected an array."))}for(var pe=0;pe<re.length;pe++){var he=A(re,pe,E,Y,oe+"["+pe+"]",r);if(he instanceof Error)return he}return null}return g(w)}function k(){function A(w,F,Z,E,Y){var oe=w[F];if(!s(oe)){var re=M(oe);return new m("Invalid "+E+" `"+Y+"` of type "+("`"+re+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return g(A)}function S(){function A(w,F,Z,E,Y){var oe=w[F];if(!e.isValidElementType(oe)){var re=M(oe);return new m("Invalid "+E+" `"+Y+"` of type "+("`"+re+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return g(A)}function _(A){function w(F,Z,E,Y,oe){if(!(F[Z]instanceof A)){var re=A.name||d,le=U(F[Z]);return new m("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected ")+("instance of `"+re+"`."))}return null}return g(w)}function $(A){if(!Array.isArray(A))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 w(F,Z,E,Y,oe){for(var re=F[Z],le=0;le<A.length;le++)if(h(re,A[le]))return null;var pe=JSON.stringify(A,function(ue,Q){var K=I(Q);return K==="symbol"?String(Q):Q});return new m("Invalid "+Y+" `"+oe+"` of value `"+String(re)+"` "+("supplied to `"+E+"`, expected one of "+pe+"."))}return g(w)}function N(A){function w(F,Z,E,Y,oe){if(typeof A!="function")return new m("Property `"+oe+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var re=F[Z],le=M(re);if(le!=="object")return new m("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected an object."));for(var pe in re)if(i(re,pe)){var he=A(re,pe,E,Y,oe+"."+pe,r);if(he instanceof Error)return he}return null}return g(w)}function z(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var w=0;w<A.length;w++){var F=A[w];if(typeof F!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(F)+" at index "+w+"."),o}function Z(E,Y,oe,re,le){for(var pe=0;pe<A.length;pe++){var he=A[pe];if(he(E,Y,oe,re,le,r)==null)return null}return new m("Invalid "+re+" `"+le+"` supplied to "+("`"+oe+"`."))}return g(Z)}function O(){function A(w,F,Z,E,Y){return L(w[F])?null:new m("Invalid "+E+" `"+Y+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return g(A)}function D(A){function w(F,Z,E,Y,oe){var re=F[Z],le=M(re);if(le!=="object")return new m("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+E+"`, expected `object`."));for(var pe in A){var he=A[pe];if(he){var ue=he(re,pe,E,Y,oe+"."+pe,r);if(ue)return ue}}return null}return g(w)}function H(A){function w(F,Z,E,Y,oe){var re=F[Z],le=M(re);if(le!=="object")return new m("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+E+"`, expected `object`."));var pe=t({},F[Z],A);for(var he in pe){var ue=A[he];if(!ue)return new m("Invalid "+Y+" `"+oe+"` key `"+he+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(F[Z],null," ")+`
|
|
352
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var Q=ue(re,he,E,Y,oe+"."+he,r);if(Q)return Q}return null}return g(w)}function L(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(L);if(A===null||s(A))return!0;var w=f(A);if(w){var F=w.call(A),Z;if(w!==A.entries){for(;!(Z=F.next()).done;)if(!L(Z.value))return!1}else for(;!(Z=F.next()).done;){var E=Z.value;if(E&&!L(E[1]))return!1}}else return!1;return!0;default:return!1}}function W(A,w){return A==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function M(A){var w=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":W(w,A)?"symbol":w}function I(A){if(typeof A>"u"||A===null)return""+A;var w=M(A);if(w==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return w}function V(A){var w=I(A);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function U(A){return!A.constructor||!A.constructor.name?d:A.constructor.name}return p.checkPropTypes=n,p.resetWarningCache=n.resetWarningCache,p.PropTypes=p,p},ry}var ny,yT;function sne(){if(yT)return ny;yT=1;var e=ey();function t(){}function r(){}return r.resetWarningCache=t,ny=function(){function n(o,s,l,u,c,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}}n.isRequired=n;function i(){return n}var a={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},ny}if(process.env.NODE_ENV!=="production"){var lne=dT(),une=!0;Jv.exports=one()(lne.isElement,une)}else Jv.exports=sne()();var cne=Jv.exports;const at=Ze(cne);var iy=j.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});iy.displayName="ScrollToBottomFunctionContext";function gT(){return j.useContext(iy)}function fne(){var e=gT(),t=e.scrollToEnd;return t}var ay=j.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});ay.displayName="ScrollToBottomState1Context";var oy=j.createContext({animating:!1,animatingToEnd:!1,sticky:!0});oy.displayName="ScrollToBottomState2Context";var sy=j.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});sy.displayName="ScrollToBottomStateContext";var bT=[sy,ay,oy];function dne(e){return j.useContext(bT[e]||bT[0])}function wT(){var e=dne(2),t=e.sticky;return[t]}var pf=j.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});pf.displayName="ScrollToBottomInternalContext";function pne(){return j.useContext(pf)}function ly(){var e=pne(),t=e.styleToClassName;return t}var hne={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)"}},uy=function(t){var r=t.children,n=t.className,i=wT(),a=An(i,1),o=a[0],s=ly()(hne),l=fne();return!o&&j.createElement("button",{className:Yv(s,(n||"")+""),onClick:l,type:"button"},r)};uy.defaultProps={children:void 0,className:""},uy.propTypes={children:at.any,className:at.string};var xT={exports:{}},mne=vt,vne=yr,ST=nn.f;mne({target:"Object",stat:!0,forced:Object.defineProperty!==ST,sham:!vne},{defineProperty:ST});var yne=Jt,ET=yne.Object,gne=xT.exports=function(t,r,n){return ET.defineProperty(t,r,n)};ET.defineProperty.sham&&(gne.sham=!0);var bne=xT.exports,wne=bne,_T=wne,xne=_T,Sne=xne,Ene=Sne,_ne=Ene,kne=_ne;const $ne=Ze(kne);var One=Qs,Tne=One.f("iterator"),Cne=Tne,Ine=Cne,Rne=Ine,Ane=Rne,Pne=Ane,Nne=Pne,Dne=Nne;const jne=Ze(Dne);function ol(e){"@babel/helpers - typeof";return ol=typeof mo=="function"&&typeof jne=="symbol"?function(t){return typeof t}:function(t){return t&&typeof mo=="function"&&t.constructor===mo&&t!==mo.prototype?"symbol":typeof t},ol(e)}var Mne=Qs,Lne=Mne.f("toPrimitive"),Fne=Lne,Bne=Fne,Une=Bne,zne=Une,Wne=zne,Hne=Wne,Vne=Hne;const qne=Ze(Vne);function Zne(e,t){if(ol(e)!="object"||!e)return e;var r=e[qne];if(r!==void 0){var n=r.call(e,t||"default");if(ol(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kne(e){var t=Zne(e,"string");return ol(t)=="symbol"?t:t+""}function Gne(e,t,r){return(t=Kne(t))in e?$ne(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yne(e){if(r$(e))return Gv(e)}function Jne(e){if(typeof mo<"u"&&YO(e)!=null||e["@@iterator"]!=null)return oT(e)}function Xne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
353
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e){return Yne(e)||Jne(e)||sT(e)||Xne()}var hf=function(e){return e&&e.Math==Math&&e},Tr=hf(typeof globalThis=="object"&&globalThis)||hf(typeof window=="object"&&window)||hf(typeof self=="object"&&self)||hf(typeof ct=="object"&&ct)||function(){return this}()||Function("return this")(),cy={},on=function(e){try{return!!e()}catch{return!0}},Qne=on,sa=!Qne(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),kT={},$T={}.propertyIsEnumerable,OT=Object.getOwnPropertyDescriptor,eie=OT&&!$T.call({1:2},1);kT.f=eie?function(t){var r=OT(this,t);return!!r&&r.enumerable}:$T;var TT=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},tie={}.toString,fy=function(e){return tie.call(e).slice(8,-1)},rie=on,nie=fy,iie="".split,aie=rie(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return nie(e)=="String"?iie.call(e,""):Object(e)}:Object,mf=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},oie=aie,sie=mf,dy=function(e){return oie(sie(e))},Br=function(e){return typeof e=="function"},lie=Br,sl=function(e){return typeof e=="object"?e!==null:lie(e)},py=Tr,uie=Br,cie=function(e){return uie(e)?e:void 0},vf=function(e,t){return arguments.length<2?cie(py[e]):py[e]&&py[e][t]},fie=vf,die=fie("navigator","userAgent")||"",CT=Tr,hy=die,IT=CT.process,RT=CT.Deno,AT=IT&&IT.versions||RT&&RT.version,PT=AT&&AT.v8,Pn,yf;PT?(Pn=PT.split("."),yf=Pn[0]<4?1:Pn[0]+Pn[1]):hy&&(Pn=hy.match(/Edge\/(\d+)/),(!Pn||Pn[1]>=74)&&(Pn=hy.match(/Chrome\/(\d+)/),Pn&&(yf=Pn[1])));var pie=yf&&+yf,NT=pie,hie=on,DT=!!Object.getOwnPropertySymbols&&!hie(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&NT&&NT<41}),mie=DT,jT=mie&&!Symbol.sham&&typeof Symbol.iterator=="symbol",vie=Br,yie=vf,gie=jT,MT=gie?function(e){return typeof e=="symbol"}:function(e){var t=yie("Symbol");return vie(t)&&Object(e)instanceof t},bie=function(e){try{return String(e)}catch{return"Object"}},wie=Br,xie=bie,Sie=function(e){if(wie(e))return e;throw TypeError(xie(e)+" is not a function")},Eie=Sie,LT=function(e,t){var r=e[t];return r==null?void 0:Eie(r)},my=Br,vy=sl,_ie=function(e,t){var r,n;if(t==="string"&&my(r=e.toString)&&!vy(n=r.call(e))||my(r=e.valueOf)&&!vy(n=r.call(e))||t!=="string"&&my(r=e.toString)&&!vy(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},FT={exports:{}},BT=Tr,yy=function(e,t){try{Object.defineProperty(BT,e,{value:t,configurable:!0,writable:!0})}catch{BT[e]=t}return t},kie=Tr,$ie=yy,UT="__core-js_shared__",Oie=kie[UT]||$ie(UT,{}),gy=Oie,zT=gy;(FT.exports=function(e,t){return zT[e]||(zT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var by=FT.exports,Tie=mf,WT=function(e){return Object(Tie(e))},Cie=WT,Iie={}.hasOwnProperty,la=Object.hasOwn||function(t,r){return Iie.call(Cie(t),r)},Rie=0,Aie=Math.random(),HT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Rie+Aie).toString(36)},Pie=Tr,Nie=by,VT=la,Die=HT,qT=DT,jie=jT,ll=Nie("wks"),ul=Pie.Symbol,Mie=jie?ul:ul&&ul.withoutSetter||Die,cl=function(e){return(!VT(ll,e)||!(qT||typeof ll[e]=="string"))&&(qT&&VT(ul,e)?ll[e]=ul[e]:ll[e]=Mie("Symbol."+e)),ll[e]},ZT=sl,KT=MT,Lie=LT,Fie=_ie,Bie=cl,Uie=Bie("toPrimitive"),zie=function(e,t){if(!ZT(e)||KT(e))return e;var r=Lie(e,Uie),n;if(r){if(t===void 0&&(t="default"),n=r.call(e,t),!ZT(n)||KT(n))return n;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Fie(e,t)},Wie=zie,Hie=MT,GT=function(e){var t=Wie(e,"string");return Hie(t)?t:String(t)},Vie=Tr,YT=sl,wy=Vie.document,qie=YT(wy)&&YT(wy.createElement),JT=function(e){return qie?wy.createElement(e):{}},Zie=sa,Kie=on,Gie=JT,XT=!Zie&&!Kie(function(){return Object.defineProperty(Gie("div"),"a",{get:function(){return 7}}).a!=7}),Yie=sa,Jie=kT,Xie=TT,Qie=dy,eae=GT,tae=la,rae=XT,QT=Object.getOwnPropertyDescriptor;cy.f=Yie?QT:function(t,r){if(t=Qie(t),r=eae(r),rae)try{return QT(t,r)}catch{}if(tae(t,r))return Xie(!Jie.f.call(t,r),t[r])};var fl={},nae=sl,Ri=function(e){if(nae(e))return e;throw TypeError(String(e)+" is not an object")},iae=sa,aae=XT,eC=Ri,oae=GT,tC=Object.defineProperty;fl.f=iae?tC:function(t,r,n){if(eC(t),r=oae(r),eC(n),aae)try{return tC(t,r,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var sae=sa,lae=fl,uae=TT,gf=sae?function(e,t,r){return lae.f(e,t,uae(1,r))}:function(e,t,r){return e[t]=r,e},rC={exports:{}},cae=Br,xy=gy,fae=Function.toString;cae(xy.inspectSource)||(xy.inspectSource=function(e){return fae.call(e)});var nC=xy.inspectSource,dae=Tr,pae=Br,hae=nC,iC=dae.WeakMap,mae=pae(iC)&&/native code/.test(hae(iC)),vae=by,yae=HT,aC=vae("keys"),oC=function(e){return aC[e]||(aC[e]=yae(e))},Sy={},gae=mae,bae=Tr,wae=sl,xae=gf,Ey=la,_y=gy,Sae=oC,Eae=Sy,sC="Object already initialized",_ae=bae.WeakMap,bf,dl,wf,kae=function(e){return wf(e)?dl(e):bf(e,{})},$ae=function(e){return function(t){var r;if(!wae(t)||(r=dl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(gae||_y.state){var ua=_y.state||(_y.state=new _ae),Oae=ua.get,lC=ua.has,Tae=ua.set;bf=function(e,t){if(lC.call(ua,e))throw new TypeError(sC);return t.facade=e,Tae.call(ua,e,t),t},dl=function(e){return Oae.call(ua,e)||{}},wf=function(e){return lC.call(ua,e)}}else{var vo=Sae("state");Eae[vo]=!0,bf=function(e,t){if(Ey(e,vo))throw new TypeError(sC);return t.facade=e,xae(e,vo,t),t},dl=function(e){return Ey(e,vo)?e[vo]:{}},wf=function(e){return Ey(e,vo)}}var uC={set:bf,get:dl,has:wf,enforce:kae,getterFor:$ae},ky=sa,Cae=la,cC=Function.prototype,Iae=ky&&Object.getOwnPropertyDescriptor,$y=Cae(cC,"name"),Rae=$y&&(function(){}).name==="something",Aae=$y&&(!ky||ky&&Iae(cC,"name").configurable),Oy={EXISTS:$y,PROPER:Rae,CONFIGURABLE:Aae},Pae=Tr,fC=Br,Nae=la,dC=gf,Dae=yy,jae=nC,pC=uC,Mae=Oy.CONFIGURABLE,Lae=pC.get,Fae=pC.enforce,Bae=String(String).split("String");(rC.exports=function(e,t,r,n){var i=n?!!n.unsafe:!1,a=n?!!n.enumerable:!1,o=n?!!n.noTargetGet:!1,s=n&&n.name!==void 0?n.name:t,l;if(fC(r)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Nae(r,"name")||Mae&&r.name!==s)&&dC(r,"name",s),l=Fae(r),l.source||(l.source=Bae.join(typeof s=="string"?s:""))),e===Pae){a?e[t]=r:Dae(t,r);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=r:dC(e,t,r)})(Function.prototype,"toString",function(){return fC(this)&&Lae(this).source||jae(this)});var pl=rC.exports,hC={},Uae=Math.ceil,zae=Math.floor,xf=function(e){var t=+e;return t!==t||t===0?0:(t>0?zae:Uae)(t)},Wae=xf,Hae=Math.max,Vae=Math.min,qae=function(e,t){var r=Wae(e);return r<0?Hae(r+t,0):Vae(r,t)},Zae=xf,Kae=Math.min,mC=function(e){return e>0?Kae(Zae(e),9007199254740991):0},Gae=mC,Yae=function(e){return Gae(e.length)},Jae=dy,Xae=qae,Qae=Yae,vC=function(e){return function(t,r,n){var i=Jae(t),a=Qae(i),o=Xae(n,a),s;if(e&&r!=r){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}},eoe={includes:vC(!0),indexOf:vC(!1)},Ty=la,toe=dy,roe=eoe.indexOf,noe=Sy,yC=function(e,t){var r=toe(e),n=0,i=[],a;for(a in r)!Ty(noe,a)&&Ty(r,a)&&i.push(a);for(;t.length>n;)Ty(r,a=t[n++])&&(~roe(i,a)||i.push(a));return i},Cy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ioe=yC,aoe=Cy,ooe=aoe.concat("length","prototype");hC.f=Object.getOwnPropertyNames||function(t){return ioe(t,ooe)};var gC={};gC.f=Object.getOwnPropertySymbols;var soe=vf,loe=hC,uoe=gC,coe=Ri,foe=soe("Reflect","ownKeys")||function(t){var r=loe.f(coe(t)),n=uoe.f;return n?r.concat(n(t)):r},doe=la,poe=foe,hoe=cy,moe=fl,voe=function(e,t){for(var r=poe(t),n=moe.f,i=hoe.f,a=0;a<r.length;a++){var o=r[a];doe(e,o)||n(e,o,i(t,o))}},yoe=on,goe=Br,boe=/#|\.prototype\./,hl=function(e,t){var r=xoe[woe(e)];return r==Eoe?!0:r==Soe?!1:goe(t)?yoe(t):!!t},woe=hl.normalize=function(e){return String(e).replace(boe,".").toLowerCase()},xoe=hl.data={},Soe=hl.NATIVE="N",Eoe=hl.POLYFILL="P",_oe=hl,Iy=Tr,koe=cy.f,$oe=gf,Ooe=pl,Toe=yy,Coe=voe,Ioe=_oe,Roe=function(e,t){var r=e.target,n=e.global,i=e.stat,a,o,s,l,u,c;if(n?o=Iy:i?o=Iy[r]||Toe(r,{}):o=(Iy[r]||{}).prototype,o)for(s in t){if(u=t[s],e.noTargetGet?(c=koe(o,s),l=c&&c.value):l=o[s],a=Ioe(n?s:r+(i?".":"#")+s,e.forced),!a&&l!==void 0){if(typeof u==typeof l)continue;Coe(u,l)}(e.sham||l&&l.sham)&&$oe(u,"sham",!0),Ooe(o,s,u,e)}},Aoe=cl,Poe=Aoe("toStringTag"),bC={};bC[Poe]="z";var Ry=String(bC)==="[object z]",Noe=Ry,Doe=Br,Sf=fy,joe=cl,Moe=joe("toStringTag"),Loe=Sf(function(){return arguments}())=="Arguments",Foe=function(e,t){try{return e[t]}catch{}},wC=Noe?Sf:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Foe(t=Object(e),Moe))=="string"?r:Loe?Sf(t):(n=Sf(t))=="Object"&&Doe(t.callee)?"Arguments":n},Boe=wC,Ef=function(e){if(Boe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Uoe=Ri,xC=function(){var e=Uoe(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},Ay={},SC=on,zoe=Tr,EC=zoe.RegExp;Ay.UNSUPPORTED_Y=SC(function(){var e=EC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Ay.BROKEN_CARET=SC(function(){var e=EC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Woe=yC,Hoe=Cy,Voe=Object.keys||function(t){return Woe(t,Hoe)},qoe=sa,Zoe=fl,Koe=Ri,Goe=Voe,Yoe=qoe?Object.defineProperties:function(t,r){Koe(t);for(var n=Goe(r),i=n.length,a=0,o;i>a;)Zoe.f(t,o=n[a++],r[o]);return t},Joe=vf,Xoe=Joe("document","documentElement"),Qoe=Ri,ese=Yoe,_C=Cy,tse=Sy,rse=Xoe,nse=JT,ise=oC,kC=">",$C="<",Py="prototype",Ny="script",OC=ise("IE_PROTO"),Dy=function(){},TC=function(e){return $C+Ny+kC+e+$C+"/"+Ny+kC},CC=function(e){e.write(TC("")),e.close();var t=e.parentWindow.Object;return e=null,t},ase=function(){var e=nse("iframe"),t="java"+Ny+":",r;return e.style.display="none",rse.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(TC("document.F=Object")),r.close(),r.F},_f,kf=function(){try{_f=new ActiveXObject("htmlfile")}catch{}kf=typeof document<"u"?document.domain&&_f?CC(_f):ase():CC(_f);for(var e=_C.length;e--;)delete kf[Py][_C[e]];return kf()};tse[OC]=!0;var ose=Object.create||function(t,r){var n;return t!==null?(Dy[Py]=Qoe(t),n=new Dy,Dy[Py]=null,n[OC]=t):n=kf(),r===void 0?n:ese(n,r)},sse=on,lse=Tr,use=lse.RegExp,cse=sse(function(){var e=use(".","s");return!(e.dotAll&&e.exec(`
|
|
354
|
+
`)&&e.flags==="s")}),fse=on,dse=Tr,pse=dse.RegExp,hse=fse(function(){var e=pse("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),mse=Ef,vse=xC,IC=Ay,yse=by,gse=ose,bse=uC.get,wse=cse,xse=hse,$f=RegExp.prototype.exec,Sse=yse("native-string-replace",String.prototype.replace),jy=$f,My=function(){var e=/a/,t=/b*/g;return $f.call(e,"a"),$f.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),RC=IC.UNSUPPORTED_Y||IC.BROKEN_CARET,Ly=/()??/.exec("")[1]!==void 0,Ese=My||Ly||RC||wse||xse;Ese&&(jy=function(t){var r=this,n=bse(r),i=mse(t),a=n.raw,o,s,l,u,c,f,d;if(a)return a.lastIndex=r.lastIndex,o=jy.call(a,i),r.lastIndex=a.lastIndex,o;var p=n.groups,h=RC&&r.sticky,m=vse.call(r),g=r.source,v=0,y=i;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),y=i.slice(r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&i.charAt(r.lastIndex-1)!==`
|
|
355
|
+
`)&&(g="(?: "+g+")",y=" "+y,v++),s=new RegExp("^(?:"+g+")",m)),Ly&&(s=new RegExp("^"+g+"$(?!\\s)",m)),My&&(l=r.lastIndex),u=$f.call(h?s:r,y),h?u?(u.input=u.input.slice(v),u[0]=u[0].slice(v),u.index=r.lastIndex,r.lastIndex+=u[0].length):r.lastIndex=0:My&&u&&(r.lastIndex=r.global?u.index+u[0].length:l),Ly&&u&&u.length>1&&Sse.call(u[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(u[c]=void 0)}),u&&p)for(u.groups=f=gse(null),c=0;c<p.length;c++)d=p[c],f[d[0]]=u[d[1]];return u});var Fy=jy,_se=Roe,AC=Fy;_se({target:"RegExp",proto:!0,forced:/./.exec!==AC},{exec:AC});var PC=pl,kse=Fy,NC=on,DC=cl,$se=gf,Ose=DC("species"),By=RegExp.prototype,Tse=function(e,t,r,n){var i=DC(e),a=!NC(function(){var u={};return u[i]=function(){return 7},""[e](u)!=7}),o=a&&!NC(function(){var u=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[Ose]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return u=!0,null},c[i](""),!u});if(!a||!o||r){var s=/./[i],l=t(i,""[e],function(u,c,f,d,p){var h=c.exec;return h===kse||h===By.exec?a&&!p?{done:!0,value:s.call(c,f,d)}:{done:!0,value:u.call(f,c,d)}:{done:!1}});PC(String.prototype,e,l[0]),PC(By,i,l[1])}n&&$se(By[i],"sham",!0)},Cse=xf,Ise=Ef,Rse=mf,jC=function(e){return function(t,r){var n=Ise(Rse(t)),i=Cse(r),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=n.charCodeAt(i),o<55296||o>56319||i+1===a||(s=n.charCodeAt(i+1))<56320||s>57343?e?n.charAt(i):o:e?n.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},Ase={codeAt:jC(!1),charAt:jC(!0)},Pse=Ase.charAt,Nse=function(e,t,r){return t+(r?Pse(e,t).length:1)},Dse=WT,jse=Math.floor,Mse="".replace,Lse=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Fse=/\$([$&'`]|\d{1,2})/g,Bse=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,l=Fse;return i!==void 0&&(i=Dse(i),l=Lse),Mse.call(a,l,function(u,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var d=+c;if(d===0)return u;if(d>s){var p=jse(d/10);return p===0?u:p<=s?n[p-1]===void 0?c.charAt(1):n[p-1]+c.charAt(1):u}f=n[d-1]}return f===void 0?"":f})},Use=Ri,zse=Br,Wse=fy,Hse=Fy,Vse=function(e,t){var r=e.exec;if(zse(r)){var n=r.call(e,t);return n!==null&&Use(n),n}if(Wse(e)==="RegExp")return Hse.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},qse=Tse,Zse=on,Kse=Ri,Gse=Br,Yse=xf,Jse=mC,yo=Ef,Xse=mf,Qse=Nse,ele=LT,tle=Bse,rle=Vse,nle=cl,Uy=nle("replace"),ile=Math.max,ale=Math.min,ole=function(e){return e===void 0?e:String(e)},sle=function(){return"a".replace(/./,"$0")==="$0"}(),MC=function(){return/./[Uy]?/./[Uy]("a","$0")==="":!1}(),lle=!Zse(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});qse("replace",function(e,t,r){var n=MC?"$":"$0";return[function(a,o){var s=Xse(this),l=a==null?void 0:ele(a,Uy);return l?l.call(a,s,o):t.call(yo(s),a,o)},function(i,a){var o=Kse(this),s=yo(i);if(typeof a=="string"&&a.indexOf(n)===-1&&a.indexOf("$<")===-1){var l=r(t,o,s,a);if(l.done)return l.value}var u=Gse(a);u||(a=yo(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=rle(o,s);if(p===null||(d.push(p),!c))break;var h=yo(p[0]);h===""&&(o.lastIndex=Qse(s,Jse(o.lastIndex),f))}for(var m="",g=0,v=0;v<d.length;v++){p=d[v];for(var y=yo(p[0]),b=ile(ale(Yse(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(ole(p[S]));var _=p.groups;if(u){var $=[y].concat(k,b,s);_!==void 0&&$.push(_);var N=yo(a.apply(void 0,$))}else N=tle(y,s,b,k,_,a);b>=g&&(m+=s.slice(g,b)+N,g=b+y.length)}return m+s.slice(g)}]},!lle||!sle||MC);var ml=Bt,ule=Um,cle=ra,Of=function(e){return ule.slice(0,e.length)===e},fle=function(){return Of("Bun/")?"BUN":Of("Cloudflare-Workers")?"CLOUDFLARE":Of("Deno/")?"DENO":Of("Node.js/")?"NODE":ml.Bun&&typeof Bun.version=="string"?"BUN":ml.Deno&&typeof Deno.version=="object"?"DENO":cle(ml.process)==="process"?"NODE":ml.window&&ml.document?"BROWSER":"REST"}(),dle=TypeError,ple=function(e,t){if(e<t)throw new dle("Not enough arguments");return e},LC=Bt,hle=Am,mle=ar,vle=fle,yle=Um,gle=Yc,ble=ple,wle=LC.Function,xle=/MSIE .\./.test(yle)||vle==="BUN"&&function(){var e=LC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),FC=function(e,t){var r=t?2:1;return xle?function(n,i){var a=ble(arguments.length,1)>r,o=mle(n)?n:wle(n),s=a?gle(arguments,r):[],l=a?function(){hle(o,this,s)}:o;return t?e(l,i):e(l)}:e},Sle=vt,BC=Bt,Ele=FC,UC=Ele(BC.setInterval,!0);Sle({global:!0,bind:!0,forced:BC.setInterval!==UC},{setInterval:UC});var _le=vt,zC=Bt,kle=FC,WC=kle(zC.setTimeout,!0);_le({global:!0,bind:!0,forced:zC.setTimeout!==WC},{setTimeout:WC});var $le=Jt,Ole=$le.setInterval,Tle=Ole;const Cle=Ze(Tle);var Ile=Ut,HC=function(e,t){var r=[][e];return!!r&&Ile(function(){r.call(null,t||function(){return 1},1)})},Rle=vt,Ale=Nm,Ple=h$.indexOf,Nle=HC,zy=Ale([].indexOf),VC=!!zy&&1/zy([1],1,-0)<0,Dle=VC||!Nle("indexOf");Rle({target:"Array",proto:!0,forced:Dle},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return VC?zy(this,t,r)||0:Ple(this,t,r)}});var jle=oa,Mle=jle("Array","indexOf"),Lle=Gn,Fle=Mle,Wy=Array.prototype,Ble=function(e){var t=e.indexOf;return e===Wy||Lle(Wy,e)&&t===Wy.indexOf?Fle:t},Ule=Ble,zle=Ule,Wle=zle;const Hle=Ze(Wle);var qC=Mc,Vle=TypeError,qle=function(e,t){if(!delete e[t])throw new Vle("Cannot delete property "+qC(t)+" of "+qC(e))},Zle=vt,Kle=Yn,Gle=cv,Yle=Uc,Jle=na,Xle=JO,Qle=iv,eue=uv,tue=Gs,Hy=qle,rue=Wc,nue=rue("splice"),iue=Math.max,aue=Math.min;Zle({target:"Array",proto:!0,forced:!nue},{splice:function(t,r){var n=Kle(this),i=Jle(n),a=Gle(t,i),o=arguments.length,s,l,u,c,f,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=aue(iue(Yle(r),0),i-a)),Qle(i+s-l),u=eue(n,l),c=0;c<l;c++)f=a+c,f in n&&tue(u,c,n[f]);if(u.length=l,s<l){for(c=a;c<i-l;c++)f=c+l,d=c+s,f in n?n[d]=n[f]:Hy(n,d);for(c=i;c>i-l+s;c--)Hy(n,c-1)}else if(s>l)for(c=i-l;c>a;c--)f=c+l-1,d=c+s-1,f in n?n[d]=n[f]:Hy(n,d);for(c=0;c<s;c++)n[c+a]=arguments[c+2];return Xle(n,i-l+s),u}});var oue=oa,sue=oue("Array","splice"),lue=Gn,uue=sue,Vy=Array.prototype,cue=function(e){var t=e.splice;return e===Vy||lue(Vy,e)&&t===Vy.splice?uue:t},fue=cue,due=fue,pue=due;const hue=Ze(pue);var mue=oa,vue=mue("Array","concat"),yue=Gn,gue=vue,qy=Array.prototype,bue=function(e){var t=e.concat;return e===qy||yue(qy,e)&&t===qy.concat?gue:t},wue=bue,xue=wue,Sue=xue;const kt=Ze(Sue);var Eue=vt,_ue=Dt,ZC=Date,kue=_ue(ZC.prototype.getTime);Eue({target:"Date",stat:!0},{now:function(){return kue(new ZC)}});var $ue=Jt,Oue=$ue.Date.now,Tue=Oue,Cue=Tue,Iue=Cue;const Ai=Ze(Iue);var Rue=Sv.forEach,Aue=HC,Pue=Aue("forEach"),Nue=Pue?[].forEach:function(t){return Rue(this,t,arguments.length>1?arguments[1]:void 0)},Due=vt,KC=Nue;Due({target:"Array",proto:!0,forced:[].forEach!==KC},{forEach:KC});var jue=oa,Mue=jue("Array","forEach"),Lue=Mue,Fue=Lue,Bue=Ys,Uue=Or,zue=Gn,Wue=Fue,Zy=Array.prototype,Hue={DOMTokenList:!0,NodeList:!0},Vue=function(e){var t=e.forEach;return e===Zy||zue(Zy,e)&&t===Zy.forEach||Uue(Hue,Bue(e))?Wue:t},que=Vue;const Tf=Ze(que);var Zue=vt,Kue=Yn,GC=pv,Gue=Ut,Yue=Gue(function(){GC(1)});Zue({target:"Object",stat:!0,forced:Yue},{keys:function(t){return GC(Kue(t))}});var Jue=Jt,Xue=Jue.Object.keys,Que=Xue,ece=Que,tce=ece;const rce=Ze(tce);var nce=Jt,ice=nce.Object.getOwnPropertySymbols,ace=ice,oce=ace,sce=oce;const YC=Ze(sce);var lce=vt,uce=Sv.filter,cce=Wc,fce=cce("filter");lce({target:"Array",proto:!0,forced:!fce},{filter:function(t){return uce(this,t,arguments.length>1?arguments[1]:void 0)}});var dce=oa,pce=dce("Array","filter"),hce=Gn,mce=pce,Ky=Array.prototype,vce=function(e){var t=e.filter;return e===Ky||hce(Ky,e)&&t===Ky.filter?mce:t},yce=vce,gce=yce,bce=gce;const wce=Ze(bce);var JC={exports:{}},xce=vt,Sce=Ut,Ece=Cn,XC=Hs.f,QC=yr,_ce=!QC||Sce(function(){XC(1)});xce({target:"Object",stat:!0,forced:_ce,sham:!QC},{getOwnPropertyDescriptor:function(t,r){return XC(Ece(t),r)}});var kce=Jt,eI=kce.Object,$ce=JC.exports=function(t,r){return eI.getOwnPropertyDescriptor(t,r)};eI.getOwnPropertyDescriptor.sham&&($ce.sham=!0);var Oce=JC.exports,Tce=Oce,Cce=Tce,Ice=Cce;const tI=Ze(Ice);var Rce=In,Ace=Dt,Pce=Gc,Nce=Jc,Dce=Ti,jce=Ace([].concat),Mce=Rce("Reflect","ownKeys")||function(t){var r=Pce.f(Dce(t)),n=Nce.f;return n?jce(r,n(t)):r},Lce=vt,Fce=yr,Bce=Mce,Uce=Cn,zce=Hs,Wce=Gs;Lce({target:"Object",stat:!0,sham:!Fce},{getOwnPropertyDescriptors:function(t){for(var r=Uce(t),n=zce.f,i=Bce(r),a={},o=0,s,l;i.length>o;)l=n(r,s=i[o++]),l!==void 0&&Wce(a,s,l);return a}});var Hce=Jt,Vce=Hce.Object.getOwnPropertyDescriptors,qce=Vce,Zce=qce,Kce=Zce;const rI=Ze(Kce);var nI={exports:{}},Gce=vt,Yce=yr,iI=Hc.f;Gce({target:"Object",stat:!0,forced:Object.defineProperties!==iI,sham:!Yce},{defineProperties:iI});var Jce=Jt,aI=Jce.Object,Xce=nI.exports=function(t,r){return aI.defineProperties(t,r)};aI.defineProperties.sham&&(Xce.sham=!0);var Qce=nI.exports,efe=Qce,tfe=efe,rfe=tfe;const nfe=Ze(rfe);var ife=_T;const afe=Ze(ife);var ofe=!1;function sfe(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 lfe(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 ufe=function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!ofe:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(lfe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=sfe(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e}(),or="-ms-",Cf="-moz-",st="-webkit-",oI="comm",Gy="rule",Yy="decl",cfe="@import",sI="@keyframes",ffe="@layer",dfe=Math.abs,If=String.fromCharCode,pfe=Object.assign;function hfe(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function lI(e){return e.trim()}function mfe(e,t){return(e=t.exec(e))?e[0]:e}function lt(e,t,r){return e.replace(t,r)}function Jy(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function vl(e,t,r){return e.slice(t,r)}function Nn(e){return e.length}function Xy(e){return e.length}function Rf(e,t){return t.push(e),e}function vfe(e,t){return e.map(t).join("")}var Af=1,go=1,uI=0,br=0,jt=0,bo="";function Pf(e,t,r,n,i,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Af,column:go,length:o,return:""}}function yl(e,t){return pfe(Pf("",null,null,"",null,null,0),e,{length:-e.length},t)}function yfe(){return jt}function gfe(){return jt=br>0?Xt(bo,--br):0,go--,jt===10&&(go=1,Af--),jt}function Cr(){return jt=br<uI?Xt(bo,br++):0,go++,jt===10&&(go=1,Af++),jt}function Dn(){return Xt(bo,br)}function Nf(){return br}function gl(e,t){return vl(bo,e,t)}function bl(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 cI(e){return Af=go=1,uI=Nn(bo=e),br=0,[]}function fI(e){return bo="",e}function Df(e){return lI(gl(br-1,Qy(e===91?e+2:e===40?e+1:e)))}function bfe(e){for(;(jt=Dn())&&jt<33;)Cr();return bl(e)>2||bl(jt)>3?"":" "}function wfe(e,t){for(;--t&&Cr()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return gl(e,Nf()+(t<6&&Dn()==32&&Cr()==32))}function Qy(e){for(;Cr();)switch(jt){case e:return br;case 34:case 39:e!==34&&e!==39&&Qy(jt);break;case 40:e===41&&Qy(e);break;case 92:Cr();break}return br}function xfe(e,t){for(;Cr()&&e+jt!==57;)if(e+jt===84&&Dn()===47)break;return"/*"+gl(t,br-1)+"*"+If(e===47?e:Cr())}function Sfe(e){for(;!bl(Dn());)Cr();return gl(e,br)}function Efe(e){return fI(jf("",null,null,null,[""],e=cI(e),0,[0],e))}function jf(e,t,r,n,i,a,o,s,l){for(var u=0,c=0,f=o,d=0,p=0,h=0,m=1,g=1,v=1,y=0,b="",k=i,S=a,_=n,$=b;g;)switch(h=y,y=Cr()){case 40:if(h!=108&&Xt($,f-1)==58){Jy($+=lt(Df(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:$+=Df(y);break;case 9:case 10:case 13:case 32:$+=bfe(h);break;case 92:$+=wfe(Nf()-1,7);continue;case 47:switch(Dn()){case 42:case 47:Rf(_fe(xfe(Cr(),Nf()),t,r),l);break;default:$+="/"}break;case 123*m:s[u++]=Nn($)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:v==-1&&($=lt($,/\f/g,"")),p>0&&Nn($)-f&&Rf(p>32?pI($+";",n,r,f-1):pI(lt($," ","")+";",n,r,f-2),l);break;case 59:$+=";";default:if(Rf(_=dI($,t,r,u,c,i,s,b,k=[],S=[],f),a),y===123)if(c===0)jf($,t,_,_,k,a,f,s,S);else switch(d===99&&Xt($,3)===110?100:d){case 100:case 108:case 109:case 115:jf(e,_,_,n&&Rf(dI(e,_,_,0,0,i,s,b,i,k=[],f),S),i,S,f,s,n?k:S);break;default:jf($,_,_,_,[""],S,0,s,S)}}u=c=p=0,m=v=1,b=$="",f=o;break;case 58:f=1+Nn($),p=h;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&gfe()==125)continue}switch($+=If(y),y*m){case 38:v=c>0?1:($+="\f",-1);break;case 44:s[u++]=(Nn($)-1)*v,v=1;break;case 64:Dn()===45&&($+=Df(Cr())),d=Dn(),c=f=Nn(b=$+=Sfe(Nf())),y++;break;case 45:h===45&&Nn($)==2&&(m=0)}}return a}function dI(e,t,r,n,i,a,o,s,l,u,c){for(var f=i-1,d=i===0?a:[""],p=Xy(d),h=0,m=0,g=0;h<n;++h)for(var v=0,y=vl(e,f+1,f=dfe(m=o[h])),b=e;v<p;++v)(b=lI(m>0?d[v]+" "+y:lt(y,/&\f/g,d[v])))&&(l[g++]=b);return Pf(e,t,r,i===0?Gy:s,l,u,c)}function _fe(e,t,r){return Pf(e,t,r,oI,If(yfe()),vl(e,2,-2),0)}function pI(e,t,r,n){return Pf(e,t,r,Yy,vl(e,0,n),vl(e,n+1,-1),n)}function wo(e,t){for(var r="",n=Xy(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function kfe(e,t,r,n){switch(e.type){case ffe:if(e.children.length)break;case cfe:case Yy:return e.return=e.return||e.value;case oI:return"";case sI:return e.return=e.value+"{"+wo(e.children,n)+"}";case Gy:e.value=e.props.join(",")}return Nn(r=wo(e.children,n))?e.return=e.value+"{"+r+"}":""}function $fe(e){var t=Xy(e);return function(r,n,i,a){for(var o="",s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}function Ofe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Tfe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Cfe=function(t,r,n){for(var i=0,a=0;i=a,a=Dn(),i===38&&a===12&&(r[n]=1),!bl(a);)Cr();return gl(t,br)},Ife=function(t,r){var n=-1,i=44;do switch(bl(i)){case 0:i===38&&Dn()===12&&(r[n]=1),t[n]+=Cfe(br-1,r,n);break;case 2:t[n]+=Df(i);break;case 4:if(i===44){t[++n]=Dn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=If(i)}while(i=Cr());return t},Rfe=function(t,r){return fI(Ife(cI(t),r))},hI=new WeakMap,Afe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!hI.get(n))&&!i){hI.set(t,!0);for(var a=[],o=Rfe(r,a),s=n.props,l=0,u=0;l<o.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=a[l]?o[l].replace(/&\f/g,s[c]):s[c]+" "+o[l]}}},Pfe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function mI(e,t){switch(hfe(e,t)){case 5103:return st+"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 st+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return st+e+Cf+e+or+e+e;case 6828:case 4268:return st+e+or+e+e;case 6165:return st+e+or+"flex-"+e+e;case 5187:return st+e+lt(e,/(\w+).+(:[^]+)/,st+"box-$1$2"+or+"flex-$1$2")+e;case 5443:return st+e+or+"flex-item-"+lt(e,/flex-|-self/,"")+e;case 4675:return st+e+or+"flex-line-pack"+lt(e,/align-content|flex-|-self/,"")+e;case 5548:return st+e+or+lt(e,"shrink","negative")+e;case 5292:return st+e+or+lt(e,"basis","preferred-size")+e;case 6060:return st+"box-"+lt(e,"-grow","")+st+e+or+lt(e,"grow","positive")+e;case 4554:return st+lt(e,/([^-])(transform)/g,"$1"+st+"$2")+e;case 6187:return lt(lt(lt(e,/(zoom-|grab)/,st+"$1"),/(image-set)/,st+"$1"),e,"")+e;case 5495:case 3959:return lt(e,/(image-set\([^]*)/,st+"$1$`$1");case 4968:return lt(lt(e,/(.+:)(flex-)?(.*)/,st+"box-pack:$3"+or+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+st+e+e;case 4095:case 3583:case 4068:case 2532:return lt(e,/(.+)-inline(.+)/,st+"$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(Nn(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return lt(e,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+Cf+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jy(e,"stretch")?mI(lt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,Nn(e)-3-(~Jy(e,"!important")&&10))){case 107:return lt(e,":",":"+st)+e;case 101:return lt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+st+(Xt(e,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+or+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return st+e+or+lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return st+e+or+e+e}return e}var Nfe=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Yy:t.return=mI(t.value,t.length);break;case sI:return wo([yl(t,{value:lt(t.value,"@","@"+st)})],i);case Gy:if(t.length)return vfe(t.props,function(a){switch(mfe(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wo([yl(t,{props:[lt(a,/:(read-\w+)/,":"+Cf+"$1")]})],i);case"::placeholder":return wo([yl(t,{props:[lt(a,/:(plac\w+)/,":"+st+"input-$1")]}),yl(t,{props:[lt(a,/:(plac\w+)/,":"+Cf+"$1")]}),yl(t,{props:[lt(a,/:(plac\w+)/,or+"input-$1")]})],i)}return""})}},Dfe=[Nfe],jfe=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||Dfe,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),v=1;v<g.length;v++)a[g[v]]=!0;s.push(m)});var l,u=[Afe,Pfe];{var c,f=[kfe,Ofe(function(m){c.insert(m)})],d=$fe(u.concat(i,f)),p=function(g){return wo(Efe(g),d)};l=function(g,v,y,b){c=y,p(g?g+"{"+v.styles+"}":v.styles),b&&(h.inserted[v.name]=!0)}}var h={key:r,sheet:new ufe({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return h.sheet.hydrate(s),h};function Mfe(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&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 Lfe={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},Ffe=!1,Bfe=/[A-Z]|^ms/g,Ufe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vI=function(t){return t.charCodeAt(1)===45},yI=function(t){return t!=null&&typeof t!="boolean"},eg=Tfe(function(e){return vI(e)?e:e.replace(Bfe,"-$&").toLowerCase()}),gI=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ufe,function(n,i,a){return Pi={name:i,styles:a,next:Pi},i})}return Lfe[t]!==1&&!vI(t)&&typeof r=="number"&&r!==0?r+"px":r},zfe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Mf(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Pi={name:i.name,styles:i.styles,next:Pi},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Pi={name:o.name,styles:o.styles,next:Pi},o=o.next;var s=a.styles+";";return s}return Wfe(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function Wfe(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Mf(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":yI(s)&&(n+=eg(a)+":"+gI(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Ffe)throw new Error(zfe);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)yI(o[l])&&(n+=eg(a)+":"+gI(a,o[l])+";");else{var u=Mf(e,t,o);switch(a){case"animation":case"animationName":{n+=eg(a)+":"+u+";";break}default:n+=a+"{"+u+"}"}}}}return n}var bI=/label:\s*([^\s;{]+)\s*(;|$)/g,Pi;function tg(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Pi=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Mf(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Mf(r,t,e[s]),n){var l=a;i+=l[s]}bI.lastIndex=0;for(var u="",c;(c=bI.exec(i))!==null;)u+="-"+c[1];var f=Mfe(i)+u;return{name:f,styles:i,next:Pi}}function wI(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var Hfe=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},Vfe=function(t,r,n){Hfe(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function xI(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function SI(e,t,r){var n=[],i=wI(e,n,r);return n.length<2?r:i+t(n)}var qfe=function(t){var r=jfe(t);r.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},r.compat=!0;var n=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=tg(u,r.registered,void 0);return Vfe(r,f),r.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=tg(u,r.registered),d="animation-"+f.name;return xI(r,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var f=tg(u,r.registered);xI(r,f)},o=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return SI(r.registered,n,Zfe(u))};return{css:n,cx:o,injectGlobal:a,keyframes:i,hydrate:function(l){l.forEach(function(u){r.inserted[u]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:wI.bind(null,r.registered),merge:SI.bind(null,r.registered,n)}},Zfe=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];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&&(r&&(r+=" "),r+=a)}}return r},Kfe=pl,rg=Date.prototype,EI="Invalid Date",_I="toString",Gfe=rg[_I],Yfe=rg.getTime;String(new Date(NaN))!=EI&&Kfe(rg,_I,function(){var t=Yfe.call(this);return t===t?Gfe.call(this):EI});var Jfe=Ry,Xfe=wC,Qfe=Jfe?{}.toString:function(){return"[object "+Xfe(this)+"]"},ede=Ry,tde=pl,rde=Qfe;ede||tde(Object.prototype,"toString",rde,{unsafe:!0});var nde=Oy.PROPER,ide=pl,ade=Ri,kI=Ef,ode=on,sde=xC,ng="toString",$I=RegExp.prototype,OI=$I[ng],lde=ode(function(){return OI.call({source:"a",flags:"b"})!="/a/b"}),ude=nde&&OI.name!=ng;(lde||ude)&&ide(RegExp.prototype,ng,function(){var t=ade(this),r=kI(t.source),n=t.flags,i=kI(n===void 0&&t instanceof RegExp&&!("flags"in $I)?sde.call(t):n);return"/"+r+"/"+i},{unsafe:!0});var TI=typeof window<"u"?window:self,cde=TI.crypto||TI.msCrypto,fde=function(e){if(!e)return Math.random;var t=Math.pow(2,32),r=new Uint32Array(1);return function(){return e.getRandomValues(r)[0]/t}}(cde);const dde=Ze(fde);function pde(){return dde().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var hde=t$;const CI=Ze(hde);function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",r="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(r+=" color: ".concat(t,";")),[r,""]}function II(e,t){for(var r,n,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return kt(r=[kt(n="%c".concat(e,"%c ")).call(n,t)]).call(r,tt(ht("green","white")),a)}function mde(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.force,n=r===void 0?!1:r;return n?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,l=An(s,1),u=l[0];typeof u=="function"&&(a=u());var c=CI(a[0])?a:[a],f=c.length===1;Tf(c).call(c,function(d,p){if(f){var h,m;(h=console).log.apply(h,tt(II.apply(void 0,kt(m=[e]).call(m,tt(d)))))}else if(p){var g;(g=console).log.apply(g,tt(CI(d)?d:[d]))}else{var v,y;(v=console).groupCollapsed.apply(v,tt(II.apply(void 0,kt(y=[e]).call(y,tt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var vde=sa,yde=Oy.EXISTS,gde=fl.f,RI=Function.prototype,bde=RI.toString,wde=/^\s*function ([^ (]*)/,xde="name";vde&&!yde&&gde(RI,xde,{configurable:!0,get:function(){try{return bde.call(this).match(wde)[1]}catch{return""}}});var Sde=Jt,Ede=Sde.setTimeout,_de=Ede;const kde=Ze(_de);function $de(e,t){if(!t)return e;var r=0,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Ai();s-r>t?(e.apply(void 0,a),r=s):(clearTimeout(n),n=kde(function(){e.apply(void 0,a),r=Ai()},Math.max(0,t-s+r)))}}var AI=function(t){var r=t.debounce,n=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return $de(function(u){var c=o.current;c&&c(u)},r)},[r,o]),l=j.useCallback(function(u){u.timeStampLow=Ai(),s(u)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(n,l,{passive:!0}),l({target:a,type:n}),function(){return a.removeEventListener(n,l)}},[n,l,a]),!1};AI.defaultProps={debounce:200};var Ode=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},Tde=vt,Cde=Ode;Tde({target:"Math",stat:!0},{sign:Cde});var Ide=Jt,Rde=Ide.Math.sign,Ade=Rde,Pde=Ade,Nde=Pde;const Dde=Ze(Nde);function jde(e,t){var r=Dde(t-e),n=Math.sqrt(Math.abs(t-e)),i=e+n*r;return r>0?Math.min(t,i):Math.max(t,i)}function Mde(e,t,r,n){for(var i=e,a=0;a<n;a++)i=r(i,t);return i}var PI=function(t){var r=t.name,n=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(u,c,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Ai();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var h=f==="100%"?i.scrollHeight-i.offsetHeight:f,m=Mde(c,h,jde,(Ai()-p)/5);Math.abs(h-m)<1.5&&(m=h),i[u]=m,h===m?n&&n(!0):s(u,c,f,d+1,p)}}))},[o,n,i]),l=j.useCallback(function(){cancelAnimationFrame(o.current),n&&n(!1)},[n]);return j.useLayoutEffect(function(){return s(r,i[r],a,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,l,r,i,a]),!1};PI.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function ig(e){var t=j.useState(e),r=An(t,2),n=r[0],i=r[1],a=j.useRef(),o=j.useCallback(function(s){typeof s=="function"?o(function(l){return s=s(l),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=n,[n,i,a]}function NI(e,t){var r=rce(e);if(YC){var n=YC(e);t&&(n=wce(n).call(n,function(i){return tI(e,i).enumerable})),r.push.apply(r,n)}return r}function DI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;Tf(n=NI(Object(r),!0)).call(n,function(a){Gne(e,a,r[a])})}else if(rI)nfe(e,rI(r));else{var i;Tf(i=NI(Object(r))).call(i,function(a){afe(e,a,tI(r,a))})}}return e}var Lde=function(){return 1/0},jI=17,Fde="bottom",sn="top",MI=1,Bde=34,LI={};function Ude(e,t){return e(),Cle(e,t)}function FI(e){var t=e.mode,r=e.target,n=r.offsetHeight,i=r.scrollHeight,a=r.scrollTop,o=i-a-n<MI,s=a<MI,l=t===sn?s:o,u=t!==sn?s:o;return{atBottom:o,atEnd:l,atStart:u,atTop:s}}function wl(e,t){return e===(t===sn?0:"100%")}var ag=function(t){var r=t.checkInterval,n=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,c=j.useMemo(function(){return mde("<ScrollToBottom>",{force:a})},[a]);s=s===sn?sn:Fde;var f=j.useRef(0),d=j.useRef(o),p=ig(s===sn?0:"100%"),h=An(p,3),m=h[0],g=h[1],v=h[2],y=ig(null),b=An(y,3),k=b[0],S=b[1],_=b[2],$=j.useRef(0),N=j.useRef(0),z=j.useRef(0),O=j.useState(!0),D=An(O,2),H=D[0],L=D[1],W=j.useState(!0),M=An(W,2),I=M[0],V=M[1],U=j.useState(!0),A=An(U,2),w=A[0],F=A[1],Z=j.useState(!1),E=An(Z,2),Y=E[0],oe=E[1],re=ig(!0),le=An(re,3),pe=le[0],he=le[1],ue=le[2],Q=j.useRef([]),K=j.useCallback(function(P){var X=_.current;return Q.current.push(P),X&&P({scrollTop:X.scrollTop}),function(){var ce=Q.current,_e=Hle(ce).call(ce,P);~_e&&hue(ce).call(ce,_e,1)}},[Q,_]),de=j.useCallback(function(){var P=v.current;c(function(){var X;return kt(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,tt(ht("magenta")),tt(ht("orange")),[{animateTo:P}])}),f.current=Ai(),wl(P,s)||he(!1),g(null)},[v,c,f,s,g,he]),ve=j.useCallback(function(P){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,_e=_.current;if(typeof P!="number"&&P!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof P=="number"?P+"px":P.replace(/%/g,"%%"),"%c")]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),{behavior:ce,nextAnimateTo:P,target:_e}]}),ce==="auto"?(de(),_e&&(_e.scrollTop=P==="100%"?_e.scrollHeight-_e.offsetHeight:P)):(ce!=="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(P)),wl(P,s)&&(c(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),[{mode:s,nextAnimateTo:P}]]}),he(!0))},[c,de,s,g,he,_]),Ce=j.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=P.behavior;c(function(){var ce;return kt(ce=["%cscrollToBottom%c: Called"]).call(ce,tt(ht("yellow","")))}),X!=="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.'),ve("100%",{behavior:X||"smooth"})},[c,ve]),R=j.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=P.behavior;c(function(){var ce;return kt(ce=["%cscrollToTop%c: Called"]).call(ce,tt(ht("yellow","")))}),X!=="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.'),ve(0,{behavior:X||"smooth"})},[c,ve]),J=j.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=P.behavior;c(function(){var _e;return kt(_e=["%cscrollToEnd%c: Called"]).call(_e,tt(ht("yellow","")))}),X!=="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 ce={behavior:X||"smooth"};s===sn?R(ce):Ce(ce)},[c,s,Ce,R]),ae=j.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=P.behavior;c(function(){var _e;return kt(_e=["%cscrollToStart%c: Called"]).call(_e,tt(ht("yellow","")))}),X!=="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 ce={behavior:X||"smooth"};s===sn?Ce(ce):R(ce)},[c,s,Ce,R]),ee=j.useCallback(function(){var P=_.current;if(P){if(d.current==="auto"){c(function(){var Ct;return kt(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,tt(ht("blue")))}),P.scrollTop=s===sn?0:P.scrollHeight-P.offsetHeight,d.current=!1;return}var X=$.current,ce=P.offsetHeight,_e=P.scrollHeight,Oe=P.scrollTop,Xe=s===sn?0:Math.max(0,_e-ce-Oe),ut=Math.max(0,X-Oe),zt=u({maxValue:Xe,minValue:ut,offsetHeight:ce,scrollHeight:_e,scrollTop:Oe}),Tt=Math.max(0,Math.min(Xe,zt)),Ge;s===sn||Tt!==Xe?Ge=Oe+Tt:Ge="100%",c(function(){var Ct,rt,wr;return[kt(Ct=[kt(rt=kt(wr="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(wr,typeof Ge=="number"?Ge+"px":Ge.replace(/%/g,"%%"),"%c (%c")).call(rt,(Ge==="100%"?Xe:Ge)+X,"px%c)")]).call(Ct,tt(ht("orange")),tt(ht("purple")),tt(ht("purple")),tt(ht("purple"))),{animateFrom:X,maxValue:Xe,minValue:ut,nextAnimateTo:Ge,nextValue:Tt,offsetHeight:ce,rawNextValue:zt,scrollHeight:_e,scrollTop:Oe}]}),ve(Ge,{behavior:"smooth"})}},[$,c,s,u,ve,_]),ke=j.useCallback(function(P){var X,ce=P.timeStampLow,_e=v.current,Oe=_.current,Xe=_e!==null;if(!(ce<=f.current||!Oe)){var ut=FI({mode:s,target:Oe}),zt=ut.atBottom,Tt=ut.atEnd,Ge=ut.atStart,Ct=ut.atTop;L(zt),V(Tt),oe(Ge),F(Ct);var rt=Oe.offsetHeight,wr=Oe.scrollHeight,Ir=N.current,ln=z.current,Qn=rt!==Ir,jn=wr!==ln;if(Qn&&(N.current=rt),jn&&(z.current=wr),!Qn&&!jn){var un=Xe&&wl(_e,s)||Tt;ue.current!==un&&(c(function(){var mt,St,Wt,Ht;return[kt(mt=["%conScroll%c: %csetSticky%c(%c".concat(un,"%c)")]).call(mt,tt(ht("red")),tt(ht("red")),tt(ht("purple"))),kt(St=[kt(Wt=kt(Ht="(animating = %c".concat(Xe,"%c && isEnd = %c")).call(Ht,wl(_e,s),"%c) || atEnd = %c")).call(Wt,Tt,"%c")]).call(St,tt(ht("purple")),tt(ht("purple")),tt(ht("purple")),[{animating:Xe,animateTo:_e,atEnd:Tt,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:un}])]}),he(un))}else ue.current&&(c(function(){var mt;return[kt(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,tt(ht("red")),tt(ht("orange")),[{offsetHeightChanged:Qn,scrollHeightChanged:jn}]),{nextOffsetHeight:rt,prevOffsetHeight:Ir,nextScrollHeight:wr,prevScrollHeight:ln}]}),ee());var ei=Oe.scrollTop;Tf(X=Q.current).call(X,function(mt){return mt({scrollTop:ei})})}},[v,c,f,s,N,z,Q,ee,L,V,oe,F,he,ue,_]);j.useEffect(function(){if(k){var P=!1,X=Ude(function(){var ce=_.current,_e=v.current!==null;ue.current?FI({mode:s,target:ce}).atEnd?P=!1:P?Ai()-P>Bde&&(_e||($.current=ce.scrollTop,c(function(){var Oe;return kt(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,tt(ht("navy")),tt(ht("orange")))}),ee()),P=!1):P=Ai():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[kt(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,tt(ht("navy")),tt(ht("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(jI,r)||jI);return function(){return clearInterval(X)}}},[v,r,c,s,ee,he,ue,k,_]);var xe=j.useMemo(function(){var P=LI[l]||(LI[l]=qfe({key:"react-scroll-to-bottom--css-"+pde(),nonce:l}));return function(X){return P.css(X)+""}},[l]),Re=j.useMemo(function(){return{observeScrollPosition:K,setTarget:S,styleToClassName:xe}},[K,S,xe]),qe=j.useMemo(function(){return{atBottom:H,atEnd:I,atStart:Y,atTop:w,mode:s}},[H,I,Y,w,s]),Ae=j.useMemo(function(){var P=m!==null;return{animating:P,animatingToEnd:P&&wl(m,s),sticky:pe}},[m,s,pe]),Be=j.useMemo(function(){return DI(DI({},qe),Ae)},[qe,Ae]),B=j.useMemo(function(){return{scrollTo:ve,scrollToBottom:Ce,scrollToEnd:J,scrollToStart:ae,scrollToTop:R}},[ve,Ce,J,ae,R]);return j.useEffect(function(){if(k){var P=function(){z.current=k.scrollHeight};return k.addEventListener("focus",P,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",P)}}},[k]),c(function(){var P;return[kt(P=["%cRender%c: Render"]).call(P,tt(ht("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),j.createElement(pf.Provider,{value:Re},j.createElement(iy.Provider,{value:B},j.createElement(sy.Provider,{value:Be},j.createElement(ay.Provider,{value:qe},j.createElement(oy.Provider,{value:Ae},n,k&&j.createElement(AI,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&m!==null&&j.createElement(PI,{name:"scrollTop",onEnd:de,target:k,value:m}))))))};ag.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Lde},ag.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 zde={height:"100%",overflowY:"auto",width:"100%"},og=function(t){var r=t.children,n=t.className,i=j.useContext(pf),a=i.setTarget,o=ly()(zde);return j.createElement("div",{className:Yv(o,(n||"")+""),ref:a},r)};og.defaultProps={children:void 0,className:void 0},og.propTypes={children:at.any,className:at.string};var Wde={position:"relative"},sg=function(t){var r=t.children,n=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=ly()(Wde);return j.createElement("div",{className:Yv(o,(n||"")+"")},j.createElement(og,{className:(a||"")+""},r),j.createElement(uy,{className:(i||"")+""}))};sg.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},sg.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var lg=function(t){var r=t.checkInterval,n=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,c=t.nonce,f=t.scroller,d=t.scrollViewClassName;return j.createElement(ag,{checkInterval:r,debounce:a,debug:o,initialScrollBehavior:l,mode:u,nonce:c,scroller:f},j.createElement(sg,{className:i,followButtonClassName:s,scrollViewClassName:d},n))};lg.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},lg.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};function Hde(){var e=gT(),t=e.scrollToBottom;return t}G8();const BI=j.memo(({scrollDownButton:e,className:t,...r})=>{const{messageList:n}=gt,i=$r(y=>y.conversationId),a=Me(y=>y.messages)[i??""]??[],o=Me(y=>y.setState),s=Me(y=>y.client),l=Me(y=>y.messageContainerRef),u=Me(y=>y.isTyping),c=Me(y=>y.setIsTyping),f=Me(y=>y.headerMessage),d=j.useMemo(()=>BR(a),[a]),[p,h]=j.useState(!0),{y:m}=Fz(l),g=j.useCallback(()=>{if(!l.current)return;const{scrollHeight:y}=l.current;p&&l.current.scrollTo({top:y})},[]);j.useEffect(()=>s==null?void 0:s.on("isTyping",({isTyping:y,timeout:b})=>{c(y,b)}),[]),j.useEffect(()=>{const y=a[a.length-1];o({disableComposer:!!(y!=null&&y.disableInput)})},[a.length]),j.useEffect(()=>{if(!l.current)return;const{offsetHeight:y,scrollHeight:b,scrollTop:k}=l.current;h(b<=k+y+100)},[m]);const v=e!=null&&e.icon?e==null?void 0:e.icon:p6;return C.jsxs(lg,{...r,className:Vp(n.container.className,t),followButtonClassName:"bpHidden",scrollViewClassName:n.viewPort.className,children:[f&&C.jsx("span",{...n.headerMessage,children:f}),C.jsx(Z8,{}),d.map(y=>C.jsx(Rm,{scroll:g,...y},y.id)),u&&C.jsx(Rm,{scroll:g,direction:"incoming",children:C.jsx(bk,{})}),C.jsx("li",{"data-is-at-bottom":p,...n.scrollDownButton.container,children:C.jsxs(Vde,{children:[(e==null?void 0:e.text)??"Back"," ",C.jsx(v,{...n.scrollDownButton.icon})]})})]})}),Vde=e=>{const[t]=wT(),r=Hde(),{messageList:{scrollDownButton:n}}=gt;return!t&&C.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},qde=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:i}=KS(),a=j.useMemo(()=>hb({color:e,fontFamily:t,radius:r,themeMode:n,variant:i}),[e,t,r,n,i]);return C.jsxs(C.Fragment,{children:[C.jsxs(dk,{children:[C.jsx(gk,{}),C.jsx(BI,{}),C.jsx(M1,{})]}),C.jsx("style",{children:a})]})};Pe.Avatar=td,Pe.Block=Ga,Pe.Composer=M1,Pe.Container=dk,Pe.Fab=B8,Pe.Header=gk,Pe.Message=Rm,Pe.MessageList=BI,Pe.Modal=Oi,Pe.ModalProvider=L1,Pe.RestartConversation=yk,Pe.TypingIndicator=bk,Pe.Webchat=qde,Pe.WebchatProvider=dq,Pe.WebchatThemeSchema=ed,Pe.__adapters=tR,Pe.avatarThemeSchema=jl,Pe.blockThemeSchema=ub,Pe.configPropsSchema=pb,Pe.configurationSchema=ob,Pe.cssStyleSchema=lb,Pe.descriptionItemSchema=va,Pe.fileTypes=eS,Pe.generateThemeStylesheet=hb,Pe.getClient=rS,Pe.initPropsSchema=BA,Pe.isFileType=tS,Pe.markdownTypeSchema=sb,Pe.renderers=I1,Pe.statePropsSchema=fb,Pe.styleOptionSchema=fe,Pe.themeSchema=cb,Pe.useClient=B4,Pe.useWebchatStore=Me,Pe.userPropsSchema=db,Pe.webchatClasses=gt,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
|