@botpress/webchat 2.4.0-beta.2 → 2.4.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(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,Ti){"use strict";var Zoe=Object.defineProperty;var Koe=(Pe,j,Ti)=>j in Pe?Zoe(Pe,j,{enumerable:!0,configurable:!0,writable:!0,value:Ti}):Pe[j]=Ti;var _e=(Pe,j,Ti)=>Koe(Pe,typeof j!="symbol"?j+"":j,Ti);function oy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=oy(j),sy=oy(Ti),rC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let sl;const iC=new Uint8Array(16);function aC(){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(iC)}const Kt=[];for(let e=0;e<256;++e)Kt.push((e+256).toString(16).slice(1));function oC(e,t=0){return Kt[e[t+0]]+Kt[e[t+1]]+Kt[e[t+2]]+Kt[e[t+3]]+"-"+Kt[e[t+4]]+Kt[e[t+5]]+"-"+Kt[e[t+6]]+Kt[e[t+7]]+"-"+Kt[e[t+8]]+Kt[e[t+9]]+"-"+Kt[e[t+10]]+Kt[e[t+11]]+Kt[e[t+12]]+Kt[e[t+13]]+Kt[e[t+14]]+Kt[e[t+15]]}const ly={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function uy(e,t,n){if(ly.randomUUID&&!t&&!e)return ly.randomUUID();e=e||{};const r=e.random||(e.rng||aC)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,oC(r)}const co=e=>({block:e,type:"bubble"}),cy=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},fy=e=>({payload:{type:"audio",url:e.audioUrl}}),sC=e=>({payload:co(cy(e))}),lC=e=>({payload:{type:"carousel",blocks:e.items.map(t=>cy(t))}}),uC=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=uy(),i=co({type:"text",text:n});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:r}))}]}}},cC=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:co({type:"column",blocks:r})}},dy=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),py=e=>({payload:{type:"image",url:e.imageUrl}}),hy=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),my=e=>({payload:co({type:"text",text:e.markdown})}),vy=e=>({payload:co({type:"text",text:e.text,value:e.value})}),yy=e=>({payload:{type:"video",url:e.videoUrl}}),fC=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return fy({...n.payload,type:n.type}).payload;case"file":return dy({...n.payload,type:n.type}).payload;case"image":return py({...n.payload,type:n.type}).payload;case"location":return hy({...n.payload,type:n.type}).payload;case"markdown":return my({...n.payload,type:n.type}).payload;case"text":return vy({...n.payload,type:n.type}).payload;case"video":return yy({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),cf=e=>{switch(e.type){case"audio":return fy(e);case"card":return sC(e);case"carousel":return lC(e);case"choice":return uC(e);case"dropdown":return cC(e);case"file":return dy(e);case"image":return py(e);case"location":return hy(e);case"markdown":return my(e);case"text":return vy(e);case"video":return yy(e);case"bloc":return fC(e);default:throw new Error("Unsuported message type")}},dC=Object.freeze(Object.defineProperty({__proto__:null,target:rC,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:cf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pC(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ff={exports:{}},fo={};/**
1
+ (function(Ie,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):(Ie=typeof globalThis<"u"?globalThis:Ie||self,j(Ie.Webchat={},Ie.React,Ie.ReactDOM))})(this,function(Ie,j,Ti){"use strict";var ese=Object.defineProperty;var tse=(Ie,j,Ti)=>j in Ie?ese(Ie,j,{enumerable:!0,configurable:!0,writable:!0,value:Ti}):Ie[j]=Ti;var _e=(Ie,j,Ti)=>tse(Ie,typeof j!="symbol"?j+"":j,Ti);function oy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=oy(j),sy=oy(Ti),aC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let sl;const oC=new Uint8Array(16);function sC(){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(oC)}const Kt=[];for(let e=0;e<256;++e)Kt.push((e+256).toString(16).slice(1));function lC(e,t=0){return Kt[e[t+0]]+Kt[e[t+1]]+Kt[e[t+2]]+Kt[e[t+3]]+"-"+Kt[e[t+4]]+Kt[e[t+5]]+"-"+Kt[e[t+6]]+Kt[e[t+7]]+"-"+Kt[e[t+8]]+Kt[e[t+9]]+"-"+Kt[e[t+10]]+Kt[e[t+11]]+Kt[e[t+12]]+Kt[e[t+13]]+Kt[e[t+14]]+Kt[e[t+15]]}const ly={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function uy(e,t,n){if(ly.randomUUID&&!t&&!e)return ly.randomUUID();e=e||{};const r=e.random||(e.rng||sC)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,lC(r)}const co=e=>({block:e,type:"bubble"}),cy=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},fy=e=>({payload:{type:"audio",url:e.audioUrl}}),uC=e=>({payload:co(cy(e))}),cC=e=>({payload:{type:"carousel",blocks:e.items.map(t=>cy(t))}}),fC=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=uy(),i=co({type:"text",text:n});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:r}))}]}}},dC=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:co({type:"column",blocks:r})}},dy=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),py=e=>({payload:{type:"image",url:e.imageUrl}}),hy=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),my=e=>({payload:co({type:"text",text:e.markdown})}),vy=e=>({payload:co({type:"text",text:e.text,value:e.value})}),yy=e=>({payload:{type:"video",url:e.videoUrl}}),pC=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return fy({...n.payload,type:n.type}).payload;case"file":return dy({...n.payload,type:n.type}).payload;case"image":return py({...n.payload,type:n.type}).payload;case"location":return hy({...n.payload,type:n.type}).payload;case"markdown":return my({...n.payload,type:n.type}).payload;case"text":return vy({...n.payload,type:n.type}).payload;case"video":return yy({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),cf=e=>{switch(e.type){case"audio":return fy(e);case"card":return uC(e);case"carousel":return cC(e);case"choice":return fC(e);case"dropdown":return dC(e);case"file":return dy(e);case"image":return py(e);case"location":return hy(e);case"markdown":return my(e);case"text":return vy(e);case"video":return yy(e);case"bloc":return pC(e);default:throw new Error("Unsuported message type")}},hC=Object.freeze(Object.defineProperty({__proto__:null,target:aC,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:cf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mC(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ff={exports:{}},fo={};/**
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 gy;function hC(){if(gy)return fo;gy=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},p=null,d=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(d=u.ref);for(c in u)r.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return fo.Fragment=n,fo.jsx=o,fo.jsxs=o,fo}var po={};/**
9
+ */var gy;function vC(){if(gy)return fo;gy=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},p=null,d=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(d=u.ref);for(c in u)r.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return fo.Fragment=n,fo.jsx=o,fo.jsxs=o,fo}var po={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,47 +14,47 @@
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 by;function mC(){return by||(by=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function y(C){if(C===null||typeof C!="object")return null;var te=m&&C[m]||C[h];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(C){{for(var te=arguments.length,ye=new Array(te>1?te-1:0),je=1;je<te;je++)ye[je-1]=arguments[je];b("error",C,ye)}}function b(C,te,ye){{var je=v.ReactDebugCurrentFrame,ft=je.getStackAddendum();ft!==""&&(te+="%s",ye=ye.concat([ft]));var gt=ye.map(function(nt){return String(nt)});gt.unshift("Warning: "+te),Function.prototype.apply.call(console[C],console,gt)}}var k=!1,S=!1,E=!1,O=!1,L=!1,D;D=Symbol.for("react.module.reference");function T(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===a||L||C===i||C===l||C===c||O||C===d||k||S||E||typeof C=="object"&&C!==null&&(C.$$typeof===p||C.$$typeof===f||C.$$typeof===o||C.$$typeof===s||C.$$typeof===u||C.$$typeof===D||C.getModuleId!==void 0))}function P(C,te,ye){var je=C.displayName;if(je)return je;var ft=te.displayName||te.name||"";return ft!==""?ye+"("+ft+")":ye}function q(C){return C.displayName||"Context"}function $(C){if(C==null)return null;if(typeof C.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case s:var te=C;return q(te)+".Consumer";case o:var ye=C;return q(ye._context)+".Provider";case u:return P(C,C.render,"ForwardRef");case f:var je=C.displayName||null;return je!==null?je:$(C.type)||"Memo";case p:{var ft=C,gt=ft._payload,nt=ft._init;try{return $(nt(gt))}catch{return null}}}return null}var F=Object.assign,M=0,B,W,U,N,x,V,K;function _(){}_.__reactDisabledLog=!0;function Y(){{if(M===0){B=console.log,W=console.info,U=console.warn,N=console.error,x=console.group,V=console.groupCollapsed,K=console.groupEnd;var C={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}M++}}function oe(){{if(M--,M===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},C,{value:B}),info:F({},C,{value:W}),warn:F({},C,{value:U}),error:F({},C,{value:N}),group:F({},C,{value:x}),groupCollapsed:F({},C,{value:V}),groupEnd:F({},C,{value:K})})}M<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=v.ReactCurrentDispatcher,le;function pe(C,te,ye){{if(le===void 0)try{throw Error()}catch(ft){var je=ft.stack.trim().match(/\n( *(at )?)/);le=je&&je[1]||""}return`
17
+ */var by;function yC(){return by||(by=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function y(C){if(C===null||typeof C!="object")return null;var te=m&&C[m]||C[h];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(C){{for(var te=arguments.length,ye=new Array(te>1?te-1:0),je=1;je<te;je++)ye[je-1]=arguments[je];b("error",C,ye)}}function b(C,te,ye){{var je=v.ReactDebugCurrentFrame,ft=je.getStackAddendum();ft!==""&&(te+="%s",ye=ye.concat([ft]));var gt=ye.map(function(nt){return String(nt)});gt.unshift("Warning: "+te),Function.prototype.apply.call(console[C],console,gt)}}var k=!1,S=!1,E=!1,O=!1,L=!1,D;D=Symbol.for("react.module.reference");function T(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===a||L||C===i||C===l||C===c||O||C===d||k||S||E||typeof C=="object"&&C!==null&&(C.$$typeof===p||C.$$typeof===f||C.$$typeof===o||C.$$typeof===s||C.$$typeof===u||C.$$typeof===D||C.getModuleId!==void 0))}function P(C,te,ye){var je=C.displayName;if(je)return je;var ft=te.displayName||te.name||"";return ft!==""?ye+"("+ft+")":ye}function q(C){return C.displayName||"Context"}function $(C){if(C==null)return null;if(typeof C.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case s:var te=C;return q(te)+".Consumer";case o:var ye=C;return q(ye._context)+".Provider";case u:return P(C,C.render,"ForwardRef");case f:var je=C.displayName||null;return je!==null?je:$(C.type)||"Memo";case p:{var ft=C,gt=ft._payload,nt=ft._init;try{return $(nt(gt))}catch{return null}}}return null}var F=Object.assign,M=0,B,W,U,N,x,V,K;function _(){}_.__reactDisabledLog=!0;function Y(){{if(M===0){B=console.log,W=console.info,U=console.warn,N=console.error,x=console.group,V=console.groupCollapsed,K=console.groupEnd;var C={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}M++}}function oe(){{if(M--,M===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},C,{value:B}),info:F({},C,{value:W}),warn:F({},C,{value:U}),error:F({},C,{value:N}),group:F({},C,{value:x}),groupCollapsed:F({},C,{value:V}),groupEnd:F({},C,{value:K})})}M<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=v.ReactCurrentDispatcher,le;function pe(C,te,ye){{if(le===void 0)try{throw Error()}catch(ft){var je=ft.stack.trim().match(/\n( *(at )?)/);le=je&&je[1]||""}return`
18
18
  `+le+C}}var he=!1,ue;{var Q=typeof WeakMap=="function"?WeakMap:Map;ue=new Q}function Z(C,te){if(!C||he)return"";{var ye=ue.get(C);if(ye!==void 0)return ye}var je;he=!0;var ft=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=ne.current,ne.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(wn){je=wn}Reflect.construct(C,[],nt)}else{try{nt.call()}catch(wn){je=wn}C.call(nt.prototype)}}else{try{throw Error()}catch(wn){je=wn}C()}}catch(wn){if(wn&&je&&typeof wn.stack=="string"){for(var Ye=wn.stack.split(`
19
19
  `),fn=je.stack.split(`
20
20
  `),$t=Ye.length-1,Mt=fn.length-1;$t>=1&&Mt>=0&&Ye[$t]!==fn[Mt];)Mt--;for(;$t>=1&&Mt>=0;$t--,Mt--)if(Ye[$t]!==fn[Mt]){if($t!==1||Mt!==1)do if($t--,Mt--,Mt<0||Ye[$t]!==fn[Mt]){var Un=`
21
- `+Ye[$t].replace(" at new "," at ");return C.displayName&&Un.includes("<anonymous>")&&(Un=Un.replace("<anonymous>",C.displayName)),typeof C=="function"&&ue.set(C,Un),Un}while($t>=1&&Mt>=0);break}}}finally{he=!1,ne.current=gt,oe(),Error.prepareStackTrace=ft}var uo=C?C.displayName||C.name:"",Qi=uo?pe(uo):"";return typeof C=="function"&&ue.set(C,Qi),Qi}function de(C,te,ye){return Z(C,!1)}function ve(C){var te=C.prototype;return!!(te&&te.isReactComponent)}function $e(C,te,ye){if(C==null)return"";if(typeof C=="function")return Z(C,ve(C));if(typeof C=="string")return pe(C);switch(C){case l:return pe("Suspense");case c:return pe("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case u:return de(C.render);case f:return $e(C.type,te,ye);case p:{var je=C,ft=je._payload,gt=je._init;try{return $e(gt(ft),te,ye)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,J={},ae=v.ReactDebugCurrentFrame;function ee(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);ae.setExtraStackFrame(ye)}else ae.setExtraStackFrame(null)}function ke(C,te,ye,je,ft){{var gt=Function.call.bind(R);for(var nt in C)if(gt(C,nt)){var Ye=void 0;try{if(typeof C[nt]!="function"){var fn=Error((je||"React class")+": "+ye+" type `"+nt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[nt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}Ye=C[nt](te,nt,je,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($t){Ye=$t}Ye&&!(Ye instanceof Error)&&(ee(ft),g("%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).",je||"React class",ye,nt,typeof Ye),ee(null)),Ye instanceof Error&&!(Ye.message in J)&&(J[Ye.message]=!0,ee(ft),g("Failed %s type: %s",ye,Ye.message),ee(null))}}}var we=Array.isArray;function Re(C){return we(C)}function We(C){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ye=te&&C[Symbol.toStringTag]||C.constructor.name||"Object";return ye}}function Ae(C){try{return Fe(C),!1}catch{return!0}}function Fe(C){return""+C}function z(C){if(Ae(C))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",We(C)),Fe(C)}var A=v.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0},ce,Ee,Oe;Oe={};function Je(C){if(R.call(C,"ref")){var te=Object.getOwnPropertyDescriptor(C,"ref").get;if(te&&te.isReactWarning)return!1}return C.ref!==void 0}function lt(C){if(R.call(C,"key")){var te=Object.getOwnPropertyDescriptor(C,"key").get;if(te&&te.isReactWarning)return!1}return C.key!==void 0}function Ut(C,te){if(typeof C.ref=="string"&&A.current&&te&&A.current.stateNode!==te){var ye=$(A.current.type);Oe[ye]||(g('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',$(A.current.type),C.ref),Oe[ye]=!0)}}function Ot(C,te){{var ye=function(){ce||(ce=!0,g("%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(C,"key",{get:ye,configurable:!0})}}function Ze(C,te){{var ye=function(){Ee||(Ee=!0,g("%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(C,"ref",{get:ye,configurable:!0})}}var Ct=function(C,te,ye,je,ft,gt,nt){var Ye={$$typeof:t,type:C,key:te,ref:ye,props:nt,_owner:gt};return Ye._store={},Object.defineProperty(Ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(Ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ft}),Object.freeze&&(Object.freeze(Ye.props),Object.freeze(Ye)),Ye};function tt(C,te,ye,je,ft){{var gt,nt={},Ye=null,fn=null;ye!==void 0&&(z(ye),Ye=""+ye),lt(te)&&(z(te.key),Ye=""+te.key),Je(te)&&(fn=te.ref,Ut(te,ft));for(gt in te)R.call(te,gt)&&!X.hasOwnProperty(gt)&&(nt[gt]=te[gt]);if(C&&C.defaultProps){var $t=C.defaultProps;for(gt in $t)nt[gt]===void 0&&(nt[gt]=$t[gt])}if(Ye||fn){var Mt=typeof C=="function"?C.displayName||C.name||"Unknown":C;Ye&&Ot(nt,Mt),fn&&Ze(nt,Mt)}return Ct(C,Ye,fn,ft,je,A.current,nt)}}var xn=v.ReactCurrentOwner,$n=v.ReactDebugCurrentFrame;function rr(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);$n.setExtraStackFrame(ye)}else $n.setExtraStackFrame(null)}var Wr;Wr=!1;function $r(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ir(){{if(xn.current){var C=$(xn.current.type);if(C)return`
21
+ `+Ye[$t].replace(" at new "," at ");return C.displayName&&Un.includes("<anonymous>")&&(Un=Un.replace("<anonymous>",C.displayName)),typeof C=="function"&&ue.set(C,Un),Un}while($t>=1&&Mt>=0);break}}}finally{he=!1,ne.current=gt,oe(),Error.prepareStackTrace=ft}var uo=C?C.displayName||C.name:"",Qi=uo?pe(uo):"";return typeof C=="function"&&ue.set(C,Qi),Qi}function de(C,te,ye){return Z(C,!1)}function ve(C){var te=C.prototype;return!!(te&&te.isReactComponent)}function $e(C,te,ye){if(C==null)return"";if(typeof C=="function")return Z(C,ve(C));if(typeof C=="string")return pe(C);switch(C){case l:return pe("Suspense");case c:return pe("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case u:return de(C.render);case f:return $e(C.type,te,ye);case p:{var je=C,ft=je._payload,gt=je._init;try{return $e(gt(ft),te,ye)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,J={},ae=v.ReactDebugCurrentFrame;function ee(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);ae.setExtraStackFrame(ye)}else ae.setExtraStackFrame(null)}function ke(C,te,ye,je,ft){{var gt=Function.call.bind(R);for(var nt in C)if(gt(C,nt)){var Ye=void 0;try{if(typeof C[nt]!="function"){var fn=Error((je||"React class")+": "+ye+" type `"+nt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[nt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}Ye=C[nt](te,nt,je,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($t){Ye=$t}Ye&&!(Ye instanceof Error)&&(ee(ft),g("%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).",je||"React class",ye,nt,typeof Ye),ee(null)),Ye instanceof Error&&!(Ye.message in J)&&(J[Ye.message]=!0,ee(ft),g("Failed %s type: %s",ye,Ye.message),ee(null))}}}var we=Array.isArray;function Pe(C){return we(C)}function We(C){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ye=te&&C[Symbol.toStringTag]||C.constructor.name||"Object";return ye}}function Ae(C){try{return Fe(C),!1}catch{return!0}}function Fe(C){return""+C}function z(C){if(Ae(C))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",We(C)),Fe(C)}var A=v.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0},ce,Ee,Oe;Oe={};function Je(C){if(R.call(C,"ref")){var te=Object.getOwnPropertyDescriptor(C,"ref").get;if(te&&te.isReactWarning)return!1}return C.ref!==void 0}function lt(C){if(R.call(C,"key")){var te=Object.getOwnPropertyDescriptor(C,"key").get;if(te&&te.isReactWarning)return!1}return C.key!==void 0}function Ut(C,te){if(typeof C.ref=="string"&&A.current&&te&&A.current.stateNode!==te){var ye=$(A.current.type);Oe[ye]||(g('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',$(A.current.type),C.ref),Oe[ye]=!0)}}function Ot(C,te){{var ye=function(){ce||(ce=!0,g("%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(C,"key",{get:ye,configurable:!0})}}function Ze(C,te){{var ye=function(){Ee||(Ee=!0,g("%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(C,"ref",{get:ye,configurable:!0})}}var Ct=function(C,te,ye,je,ft,gt,nt){var Ye={$$typeof:t,type:C,key:te,ref:ye,props:nt,_owner:gt};return Ye._store={},Object.defineProperty(Ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(Ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ft}),Object.freeze&&(Object.freeze(Ye.props),Object.freeze(Ye)),Ye};function tt(C,te,ye,je,ft){{var gt,nt={},Ye=null,fn=null;ye!==void 0&&(z(ye),Ye=""+ye),lt(te)&&(z(te.key),Ye=""+te.key),Je(te)&&(fn=te.ref,Ut(te,ft));for(gt in te)R.call(te,gt)&&!X.hasOwnProperty(gt)&&(nt[gt]=te[gt]);if(C&&C.defaultProps){var $t=C.defaultProps;for(gt in $t)nt[gt]===void 0&&(nt[gt]=$t[gt])}if(Ye||fn){var Mt=typeof C=="function"?C.displayName||C.name||"Unknown":C;Ye&&Ot(nt,Mt),fn&&Ze(nt,Mt)}return Ct(C,Ye,fn,ft,je,A.current,nt)}}var xn=v.ReactCurrentOwner,$n=v.ReactDebugCurrentFrame;function rr(C){if(C){var te=C._owner,ye=$e(C.type,C._source,te?te.type:null);$n.setExtraStackFrame(ye)}else $n.setExtraStackFrame(null)}var Wr;Wr=!1;function $r(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ir(){{if(xn.current){var C=$(xn.current.type);if(C)return`
22
22
 
23
23
  Check the render method of \``+C+"`."}return""}}function Hr(C){return""}var pt={};function wt(C){{var te=ir();if(!te){var ye=typeof C=="string"?C:C.displayName||C.name;ye&&(te=`
24
24
 
25
- Check the top-level render call using <`+ye+">.")}return te}}function zt(C,te){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ye=wt(te);if(pt[ye])return;pt[ye]=!0;var je="";C&&C._owner&&C._owner!==xn.current&&(je=" It was passed a child from "+$(C._owner.type)+"."),rr(C),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,je),rr(null)}}function Vt(C,te){{if(typeof C!="object")return;if(Re(C))for(var ye=0;ye<C.length;ye++){var je=C[ye];$r(je)&&zt(je,te)}else if($r(C))C._store&&(C._store.validated=!0);else if(C){var ft=y(C);if(typeof ft=="function"&&ft!==C.entries)for(var gt=ft.call(C),nt;!(nt=gt.next()).done;)$r(nt.value)&&zt(nt.value,te)}}}function Xt(C){{var te=C.type;if(te==null||typeof te=="string")return;var ye;if(typeof te=="function")ye=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===f))ye=te.propTypes;else return;if(ye){var je=$(te);ke(ye,C.props,"prop",je,C)}else if(te.PropTypes!==void 0&&!Wr){Wr=!0;var ft=$(te);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ft||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qt(C){{for(var te=Object.keys(C.props),ye=0;ye<te.length;ye++){var je=te[ye];if(je!=="children"&&je!=="key"){rr(C),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),rr(null);break}}C.ref!==null&&(rr(C),g("Invalid attribute `ref` supplied to `React.Fragment`."),rr(null))}}var Fn={};function Bn(C,te,ye,je,ft,gt){{var nt=T(C);if(!nt){var Ye="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ye+=" 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 fn=Hr();fn?Ye+=fn:Ye+=ir();var $t;C===null?$t="null":Re(C)?$t="array":C!==void 0&&C.$$typeof===t?($t="<"+($(C.type)||"Unknown")+" />",Ye=" Did you accidentally export a JSX literal instead of a component?"):$t=typeof C,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$t,Ye)}var Mt=tt(C,te,ye,ft,gt);if(Mt==null)return Mt;if(nt){var Un=te.children;if(Un!==void 0)if(je)if(Re(Un)){for(var uo=0;uo<Un.length;uo++)Vt(Un[uo],C);Object.freeze&&Object.freeze(Un)}else g("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 Vt(Un,C)}if(R.call(te,"key")){var Qi=$(C),wn=Object.keys(te).filter(function(Hoe){return Hoe!=="key"}),ey=wn.length>0?"{key: someKey, "+wn.join(": ..., ")+": ...}":"{key: someKey}";if(!Fn[Qi+ey]){var Woe=wn.length>0?"{"+wn.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ye+">.")}return te}}function zt(C,te){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var ye=wt(te);if(pt[ye])return;pt[ye]=!0;var je="";C&&C._owner&&C._owner!==xn.current&&(je=" It was passed a child from "+$(C._owner.type)+"."),rr(C),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,je),rr(null)}}function Vt(C,te){{if(typeof C!="object")return;if(Pe(C))for(var ye=0;ye<C.length;ye++){var je=C[ye];$r(je)&&zt(je,te)}else if($r(C))C._store&&(C._store.validated=!0);else if(C){var ft=y(C);if(typeof ft=="function"&&ft!==C.entries)for(var gt=ft.call(C),nt;!(nt=gt.next()).done;)$r(nt.value)&&zt(nt.value,te)}}}function Xt(C){{var te=C.type;if(te==null||typeof te=="string")return;var ye;if(typeof te=="function")ye=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===f))ye=te.propTypes;else return;if(ye){var je=$(te);ke(ye,C.props,"prop",je,C)}else if(te.PropTypes!==void 0&&!Wr){Wr=!0;var ft=$(te);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ft||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qt(C){{for(var te=Object.keys(C.props),ye=0;ye<te.length;ye++){var je=te[ye];if(je!=="children"&&je!=="key"){rr(C),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),rr(null);break}}C.ref!==null&&(rr(C),g("Invalid attribute `ref` supplied to `React.Fragment`."),rr(null))}}var Fn={};function Bn(C,te,ye,je,ft,gt){{var nt=T(C);if(!nt){var Ye="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ye+=" 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 fn=Hr();fn?Ye+=fn:Ye+=ir();var $t;C===null?$t="null":Pe(C)?$t="array":C!==void 0&&C.$$typeof===t?($t="<"+($(C.type)||"Unknown")+" />",Ye=" Did you accidentally export a JSX literal instead of a component?"):$t=typeof C,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$t,Ye)}var Mt=tt(C,te,ye,ft,gt);if(Mt==null)return Mt;if(nt){var Un=te.children;if(Un!==void 0)if(je)if(Pe(Un)){for(var uo=0;uo<Un.length;uo++)Vt(Un[uo],C);Object.freeze&&Object.freeze(Un)}else g("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 Vt(Un,C)}if(R.call(te,"key")){var Qi=$(C),wn=Object.keys(te).filter(function(Qoe){return Qoe!=="key"}),ey=wn.length>0?"{key: someKey, "+wn.join(": ..., ")+": ...}":"{key: someKey}";if(!Fn[Qi+ey]){var Xoe=wn.length>0?"{"+wn.join(": ..., ")+": ...}":"{}";g(`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} />`,ey,Qi,Woe,Qi),Fn[Qi+ey]=!0}}return C===r?qt(Mt):Xt(Mt),Mt}}function ki(C,te,ye){return Bn(C,te,ye,!0)}function zoe(C,te,ye){return Bn(C,te,ye,!1)}var Voe=zoe,qoe=ki;po.Fragment=r,po.jsx=Voe,po.jsxs=qoe}()),po}process.env.NODE_ENV==="production"?ff.exports=hC():ff.exports=mC();var I=ff.exports;function vC(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:p,children:d,...m}=f,h=(p==null?void 0:p[e][u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:d})}function c(f,p){const d=(p==null?void 0:p[e][u])||s,m=w.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,yC(i,...t)]}function yC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Zr(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ea=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function gC(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xy(...e){return t=>e.forEach(n=>gC(n,t))}function Kr(...e){return w.useCallback(xy(...e),e)}var df=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(xC);if(a){const o=a.props.children,s=i.map(u=>u===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:u);return I.jsx(pf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return I.jsx(pf,{...r,ref:t,children:n})});df.displayName="Slot";var pf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=SC(n);return w.cloneElement(n,{...wC(r,n.props),ref:t?xy(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});pf.displayName="SlotClone";var bC=({children:e})=>I.jsx(I.Fragment,{children:e});function xC(e){return w.isValidElement(e)&&e.type===bC}function wC(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function SC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _C=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dn=_C.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?df:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function EC(e,t){e&&sy.flushSync(()=>e.dispatchEvent(t))}var hf="Avatar",[kC,Joe]=vC(hf),[TC,wy]=kC(hf),mf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return I.jsx(TC,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:I.jsx(dn.span,{...r,ref:t})})});mf.displayName=hf;var Sy="AvatarImage",vf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=wy(Sy,n),s=OC(r),u=Zr(l=>{i(l),o.onImageLoadingStatusChange(l)});return ea(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(dn.img,{...a,ref:t,src:r}):null});vf.displayName=Sy;var _y="AvatarFallback",yf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=wy(_y,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?I.jsx(dn.span,{...i,ref:t}):null});yf.displayName=_y;function OC(e){const[t,n]=w.useState("idle");return ea(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function gf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function CC(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const $C=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Ey(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const IC=2.4,RC=.2126729,PC=.7151522,AC=.072175,NC=.56,DC=.57,MC=.62,jC=.65,ll=.022,ky=1.414,LC=1.14,FC=1.14,BC=.035991,UC=.035991,zC=27.7847239587675,VC=27.7847239587675,Ty=.027,Oy=.027,Cy=.001,qC=5e-4;function $y(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**IC;return RC*i(t)+PC*i(n)+AC*i(r)}function Iy(e,t){if(!e||!t)return 0;let n=$y(gf(e)),r=$y(gf(t)),i=0,a=0;return n=n>ll?n:n+(ll-n)**ky,r=r>ll?r:r+(ll-r)**ky,Math.abs(r-n)<qC?0:(r>n?(i=(r**NC-n**DC)*LC,a=i<Cy?0:i<BC?i-i*zC*Ty:i-Ty):(i=(r**jC-n**MC)*FC,a=i>-Cy?0:i>-UC?i-i*VC*Oy:i+Oy),Math.abs(a*100))}let bf=class{constructor(){_e(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const WC=new bf;function Ry(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Py(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Ay={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",p="quarter",d="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={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(F){var M=["th","st","nd","rd"],B=F%100;return"["+F+(M[(B-20)%10]||M[B]||M[0])+"]"}},b=function(F,M,B){var W=String(F);return!W||W.length>=M?F:""+Array(M+1-W.length).join(B)+F},k={s:b,z:function(F){var M=-F.utcOffset(),B=Math.abs(M),W=Math.floor(B/60),U=B%60;return(M<=0?"+":"-")+b(W,2,"0")+":"+b(U,2,"0")},m:function F(M,B){if(M.date()<B.date())return-F(B,M);var W=12*(B.year()-M.year())+(B.month()-M.month()),U=M.clone().add(W,f),N=B-U<0,x=M.clone().add(W+(N?-1:1),f);return+(-(W+(B-U)/(N?U-x:x-U))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:d,w:c,d:l,D:m,h:u,m:s,s:o,ms:a,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",E={};E[S]=g;var O="$isDayjsObject",L=function(F){return F instanceof q||!(!F||!F[O])},D=function F(M,B,W){var U;if(!M)return S;if(typeof M=="string"){var N=M.toLowerCase();E[N]&&(U=N),B&&(E[N]=B,U=N);var x=M.split("-");if(!U&&x.length>1)return F(x[0])}else{var V=M.name;E[V]=M,U=V}return!W&&U&&(S=U),U||!W&&S},T=function(F,M){if(L(F))return F.clone();var B=typeof M=="object"?M:{};return B.date=F,B.args=arguments,new q(B)},P=k;P.l=D,P.i=L,P.w=function(F,M){return T(F,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var q=function(){function F(B){this.$L=D(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var M=F.prototype;return M.parse=function(B){this.$d=function(W){var U=W.date,N=W.utc;if(U===null)return new Date(NaN);if(P.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var x=U.match(y);if(x){var V=x[2]-1||0,K=(x[7]||"0").substring(0,3);return N?new Date(Date.UTC(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(U)}(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(B,W){var U=T(B);return this.startOf(W)<=U&&U<=this.endOf(W)},M.isAfter=function(B,W){return T(B)<this.startOf(W)},M.isBefore=function(B,W){return this.endOf(W)<T(B)},M.$g=function(B,W,U){return P.u(B)?this[W]:this.set(U,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,W){var U=this,N=!!P.u(W)||W,x=P.p(B),V=function(he,ue){var Q=P.w(U.$u?Date.UTC(U.$y,ue,he):new Date(U.$y,ue,he),U);return N?Q:Q.endOf(l)},K=function(he,ue){return P.w(U.toDate()[he].apply(U.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ue)),U)},_=this.$W,Y=this.$M,oe=this.$D,ne="set"+(this.$u?"UTC":"");switch(x){case d:return N?V(1,0):V(31,11);case f:return N?V(1,Y):V(0,Y+1);case c:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return V(N?oe-pe:oe+(6-pe),Y);case l:case m:return K(ne+"Hours",0);case u:return K(ne+"Minutes",1);case s:return K(ne+"Seconds",2);case o:return K(ne+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,W){var U,N=P.p(B),x="set"+(this.$u?"UTC":""),V=(U={},U[l]=x+"Date",U[m]=x+"Date",U[f]=x+"Month",U[d]=x+"FullYear",U[u]=x+"Hours",U[s]=x+"Minutes",U[o]=x+"Seconds",U[a]=x+"Milliseconds",U)[N],K=N===l?this.$D+(W-this.$W):W;if(N===f||N===d){var _=this.clone().set(m,1);_.$d[V](K),_.init(),this.$d=_.set(m,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](K);return this.init(),this},M.set=function(B,W){return this.clone().$set(B,W)},M.get=function(B){return this[P.p(B)]()},M.add=function(B,W){var U,N=this;B=Number(B);var x=P.p(W),V=function(Y){var oe=T(N);return P.w(oe.date(oe.date()+Math.round(Y*B)),N)};if(x===f)return this.set(f,this.$M+B);if(x===d)return this.set(d,this.$y+B);if(x===l)return V(1);if(x===c)return V(7);var K=(U={},U[s]=r,U[u]=i,U[o]=n,U)[x]||1,_=this.$d.getTime()+B*K;return P.w(_,this)},M.subtract=function(B,W){return this.add(-1*B,W)},M.format=function(B){var W=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var N=B||"YYYY-MM-DDTHH:mm:ssZ",x=P.z(this),V=this.$H,K=this.$m,_=this.$M,Y=U.weekdays,oe=U.months,ne=U.meridiem,le=function(ue,Q,Z,de){return ue&&(ue[Q]||ue(W,N))||Z[Q].slice(0,de)},pe=function(ue){return P.s(V%12||12,ue,"0")},he=ne||function(ue,Q,Z){var de=ue<12?"AM":"PM";return Z?de.toLowerCase():de};return N.replace(v,function(ue,Q){return Q||function(Z){switch(Z){case"YY":return String(W.$y).slice(-2);case"YYYY":return P.s(W.$y,4,"0");case"M":return _+1;case"MM":return P.s(_+1,2,"0");case"MMM":return le(U.monthsShort,_,oe,3);case"MMMM":return le(oe,_);case"D":return W.$D;case"DD":return P.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return le(U.weekdaysMin,W.$W,Y,2);case"ddd":return le(U.weekdaysShort,W.$W,Y,3);case"dddd":return Y[W.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(V,K,!0);case"A":return he(V,K,!1);case"m":return String(K);case"mm":return P.s(K,2,"0");case"s":return String(W.$s);case"ss":return P.s(W.$s,2,"0");case"SSS":return P.s(W.$ms,3,"0");case"Z":return x}return null}(ue)||x.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,W,U){var N,x=this,V=P.p(W),K=T(B),_=(K.utcOffset()-this.utcOffset())*r,Y=this-K,oe=function(){return P.m(x,K)};switch(V){case d:N=oe()/12;break;case f:N=oe();break;case p:N=oe()/3;break;case c:N=(Y-_)/6048e5;break;case l:N=(Y-_)/864e5;break;case u:N=Y/i;break;case s:N=Y/r;break;case o:N=Y/n;break;default:N=Y}return U?N:P.a(N)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return E[this.$L]},M.locale=function(B,W){if(!B)return this.$L;var U=this.clone(),N=D(B,W,!0);return N&&(U.$L=N),U},M.clone=function(){return P.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()},F}(),$=q.prototype;return T.prototype=$,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",d],["$D",m]].forEach(function(F){$[F[1]]=function(M){return this.$g(M,F[0],F[1])}}),T.extend=function(F,M){return F.$i||(F(M,q,T),F.$i=!0),T},T.locale=D,T.isDayjs=L,T.unix=function(F){return T(1e3*F)},T.en=E[S],T.Ls=E,T.p={},T})})(Ay);var HC=Ay.exports;const ul=Ke(HC);var Ny={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Ny);var ZC=Ny.exports;const KC=Ke(ZC);var Dy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Dy);var GC=Dy.exports;const YC=Ke(GC);ul.extend(KC),ul.extend(YC);function JC(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(My(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!ul(s).isSame(u,t)&&u&&n.push(My(u))}return n}function My(e){return{id:uy(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:XC(e)}}}function XC(e,t=!1){const n=ul(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function QC(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function e$(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function t$(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function n$(e,t){return e.map(n=>Math.round(n*t))}const ho=e=>t=>t$(t,e),mo=e=>t=>n$(t,e),r$={50:ho(.95),100:ho(.9),200:ho(.75),300:ho(.6),400:ho(.3),500:e=>e,600:mo(.9),700:mo(.6),800:mo(.45),900:mo(.3),950:mo(.2)};function jy(e,t=r$){const n={},r=QC(e);for(const[i,a]of Object.entries(t))n[i]=e$(a(r));return n}var at;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(at||(at={}));var xf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xf||(xf={}));const ge=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gr=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=at.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"]),i$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let zn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,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(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};zn.create=e=>new zn(e);const vo=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let Ly=vo;function a$(e){Ly=e}function cl(){return Ly}const fl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.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}},o$=[];function xe(e,t){const n=fl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,cl(),vo].filter(r=>!!r)});e.common.issues.push(n)}let pn=class XO{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return XO.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),Fy=e=>({status:"dirty",value:e}),sn=e=>({status:"valid",value:e}),wf=e=>e.status==="aborted",Sf=e=>e.status==="dirty",yo=e=>e.status==="valid",dl=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));let or=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const By=(e,t)=>{if(yo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new zn(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let Ve=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 Gr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return By(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(dl(i)?i:Promise.resolve(i));return By(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Vn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rr.create(this,this._def)}nullable(){return $i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ci.create(this,this._def)}promise(){return ia.create(this,this._def)}or(t){return Eo.create([this,t],this._def)}and(t){return ko.create(this,t,this._def)}transform(t){return new Vn({...Be(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Io({...Be(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new Wy({typeName:Ne.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new gl({...Be(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return kf.create(this,t)}readonly(){return xl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const s$=/^c[^\s-]{8,}$/i,l$=/^[a-z][a-z0-9]*$/,u$=/^[0-9A-HJKMNP-TV-Z]{26}$/,c$=/^[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,f$=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _f;const p$=/^(((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}))$/,h$=/^(([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})))$/,m$=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 v$(e,t){return!!((t==="v4"||!t)&&p$.test(e)||(t==="v6"||!t)&&h$.test(e))}let ta=class ol extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Le}const r=new pn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")f$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")_f||(_f=new RegExp(d$,"u")),_f.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")c$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")s$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")l$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")u$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?m$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?v$(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):at.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ol({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ol({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ol({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ol({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ta.create=e=>{var t;return new ta({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function y$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let go=class ty 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)!==ge.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="int"?at.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?y$(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new ty({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new ty({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&at.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};go.create=e=>new go({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let bo=class ny 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)!==ge.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new ny({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new ny({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};bo.create=e=>{var t;return new bo({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let xo=class extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Le}return sn(t.data)}};xo.create=e=>new xo({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let wo=class QO extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Le}const r=new pn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):at.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new QO({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};wo.create=e=>new wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Be(e)});let pl=class extends Ve{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Le}return sn(t.data)}};pl.create=e=>new pl({typeName:Ne.ZodSymbol,...Be(e)});let So=class extends Ve{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Le}return sn(t.data)}};So.create=e=>new So({typeName:Ne.ZodUndefined,...Be(e)});let _o=class extends Ve{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Le}return sn(t.data)}};_o.create=e=>new _o({typeName:Ne.ZodNull,...Be(e)});let na=class extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return sn(t.data)}};na.create=e=>new na({typeName:Ne.ZodAny,...Be(e)});let Oi=class extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sn(t.data)}};Oi.create=e=>new Oi({typeName:Ne.ZodUnknown,...Be(e)});let Ir=class extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Le}};Ir.create=e=>new Ir({typeName:Ne.ZodNever,...Be(e)});let hl=class extends Ve{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Le}return sn(t.data)}};hl.create=e=>new hl({typeName:Ne.ZodVoid,...Be(e)});let Ci=class lf extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ge.array)return xe(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{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}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(xe(n,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(xe(n,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new or(n,o,n.path,s)))).then(o=>pn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new or(n,o,n.path,s)));return pn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new lf({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new lf({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new lf({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}};Ci.create=(e,t)=>new Ci({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Be(t)});function ra(e){if(e instanceof In){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rr.create(ra(r))}return new In({...e._def,shape:()=>t})}else return e instanceof Ci?new Ci({...e._def,type:ra(e.element)}):e instanceof Rr?Rr.create(ra(e.unwrap())):e instanceof $i?$i.create(ra(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>ra(t))):e}let In=class ar extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=at.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return xe(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ir&&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 or(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ir){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&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new or(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=>pn.mergeObjectSync(r,l)):pn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new ar({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ce.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new ar({...this._def,unknownKeys:"strip"})}passthrough(){return new ar({...this._def,unknownKeys:"passthrough"})}extend(t){return new ar({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ar({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ar({...this._def,catchall:t})}pick(t){const n={};return at.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}omit(t){const n={};return at.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}deepPartial(){return ra(this)}partial(t){const n={};return at.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ar({...this._def,shape:()=>n})}required(t){const n={};return at.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Rr;)a=a._def.innerType;n[r]=a}}),new ar({...this._def,shape:()=>n})}keyof(){return qy(at.objectKeys(this.shape))}};In.create=(e,t)=>new In({shape:()=>e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.strictCreate=(e,t)=>new In({shape:()=>e,unknownKeys:"strict",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.lazycreate=(e,t)=>new In({shape:e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)});let Eo=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new zn(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.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 n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new zn(u));return xe(n,{code:se.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};Eo.create=(e,t)=>new Eo({options:e,typeName:Ne.ZodUnion,...Be(t)});const ml=e=>e instanceof To?ml(e.schema):e instanceof Vn?ml(e.innerType()):e instanceof Oo?[e.value]:e instanceof Co?e.options:e instanceof $o?Object.keys(e.enum):e instanceof Io?ml(e._def.innerType):e instanceof So?[void 0]:e instanceof _o?[null]:null;let Uy=class eC extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return xe(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=ml(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 eC({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function Ef(e,t){const n=Gr(e),r=Gr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const i=at.objectKeys(t),a=at.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Ef(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===ge.array&&r===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=Ef(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let ko=class extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wf(a)||wf(o))return Le;const s=Ef(a.value,o.value);return s.valid?((Sf(a)||Sf(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ko.create=(e,t,n)=>new ko({left:e,right:t,typeName:Ne.ZodIntersection,...Be(n)});let Yr=class tC extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return xe(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new or(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>pn.mergeArray(n,o)):pn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new tC({...this._def,rest:t})}};Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Ne.ZodTuple,rest:null,...Be(t)})};let zy=class ry extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return xe(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new or(r,s,r.path,s)),value:o._parse(new or(r,r.data[s],r.path,s))});return r.common.async?pn.mergeObjectAsync(n,i):pn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new ry({keyType:t,valueType:n,typeName:Ne.ZodRecord,...Be(r)}):new ry({keyType:ta.create(),valueType:t,typeName:Ne.ZodRecord,...Be(n)})}},vl=class extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return xe(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new or(r,s,r.path,[l,"key"])),value:a._parse(new or(r,u,r.path,[l,"value"]))}));if(r.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 Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.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 Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};vl.create=(e,t,n)=>new vl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Be(n)});let yl=class iy extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return xe(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new or(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new iy({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new iy({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};yl.create=(e,t)=>new yl({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Be(t)});let Vy=class uf extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return xe(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Le;function r(s,u){return fl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cl(),vo].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:u}})}function i(s,u){return fl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cl(),vo].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ia){const s=this;return sn(async function(...u){const l=new zn([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return sn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new zn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new zn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new uf({...this._def,args:Yr.create(t).rest(Oi.create())})}returns(t){return new uf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new uf({args:t||Yr.create([]).rest(Oi.create()),returns:n||Oi.create(),typeName:Ne.ZodFunction,...Be(r)})}},To=class extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};To.create=(e,t)=>new To({getter:e,typeName:Ne.ZodLazy,...Be(t)});let Oo=class extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};Oo.create=(e,t)=>new Oo({value:e,typeName:Ne.ZodLiteral,...Be(t)});function qy(e,t){return new Co({values:e,typeName:Ne.ZodEnum,...Be(t)})}let Co=class ay extends Ve{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:at.joinValues(r),received:n.parsedType,code:se.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Le}return sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ay.create(t)}exclude(t){return ay.create(this.options.filter(n=>!t.includes(n)))}};Co.create=qy;let $o=class extends Ve{_parse(t){const n=at.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=at.objectValues(n);return xe(r,{expected:at.joinValues(i),received:r.parsedType,code:se.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=at.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Le}return sn(t.data)}get enum(){return this._def.values}};$o.create=(e,t)=>new $o({values:e,typeName:Ne.ZodNativeEnum,...Be(t)});let ia=class extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Le;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return sn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ia.create=(e,t)=>new ia({type:e,typeName:Ne.ZodPromise,...Be(t)});let Vn=class extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.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(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!yo(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>yo(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);at.assertNever(i)}};Vn.create=(e,t,n)=>new Vn({schema:e,typeName:Ne.ZodEffects,effect:t,...Be(n)}),Vn.createWithPreprocess=(e,t,n)=>new Vn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Be(n)});let Rr=class extends Ve{_parse(t){return this._getType(t)===ge.undefined?sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rr.create=(e,t)=>new Rr({innerType:e,typeName:Ne.ZodOptional,...Be(t)});let $i=class extends Ve{_parse(t){return this._getType(t)===ge.null?sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$i.create=(e,t)=>new $i({innerType:e,typeName:Ne.ZodNullable,...Be(t)});let Io=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Io.create=(e,t)=>new Io({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let gl=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};gl.create=(e,t)=>new gl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let bl=class extends Ve{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};bl.create=e=>new bl({typeName:Ne.ZodNaN,...Be(e)});const g$=Symbol("zod_brand");let Wy=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},kf=class nC extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),Fy(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new nC({in:t,out:n,typeName:Ne.ZodPipeline})}},xl=class extends Ve{_parse(t){const n=this._def.innerType._parse(t);return yo(n)&&(n.value=Object.freeze(n.value)),n}};xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodReadonly,...Be(t)});const Hy=(e,t={},n)=>e?na.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):na.create(),b$={object:In.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 x$=(e,t={message:`Input not instance of ${e.name}`})=>Hy(n=>n instanceof e,t),Zy=ta.create,Ky=go.create,w$=bl.create,S$=bo.create,Gy=xo.create,_$=wo.create,E$=pl.create,k$=So.create,T$=_o.create,O$=na.create,C$=Oi.create,$$=Ir.create,I$=hl.create,R$=Ci.create,P$=In.create,A$=In.strictCreate,N$=Eo.create,D$=Uy.create,M$=ko.create,j$=Yr.create,L$=zy.create,F$=vl.create,B$=yl.create,U$=Vy.create,z$=To.create,V$=Oo.create,q$=Co.create,W$=$o.create,H$=ia.create,Yy=Vn.create,Z$=Rr.create,K$=$i.create,G$=Vn.createWithPreprocess,Y$=kf.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:vo,setErrorMap:a$,getErrorMap:cl,makeIssue:fl,EMPTY_PATH:o$,addIssueToContext:xe,ParseStatus:pn,INVALID:Le,DIRTY:Fy,OK:sn,isAborted:wf,isDirty:Sf,isValid:yo,isAsync:dl,get util(){return at},get objectUtil(){return xf},ZodParsedType:ge,getParsedType:Gr,ZodType:Ve,ZodString:ta,ZodNumber:go,ZodBigInt:bo,ZodBoolean:xo,ZodDate:wo,ZodSymbol:pl,ZodUndefined:So,ZodNull:_o,ZodAny:na,ZodUnknown:Oi,ZodNever:Ir,ZodVoid:hl,ZodArray:Ci,ZodObject:In,ZodUnion:Eo,ZodDiscriminatedUnion:Uy,ZodIntersection:ko,ZodTuple:Yr,ZodRecord:zy,ZodMap:vl,ZodSet:yl,ZodFunction:Vy,ZodLazy:To,ZodLiteral:Oo,ZodEnum:Co,ZodNativeEnum:$o,ZodPromise:ia,ZodEffects:Vn,ZodTransformer:Vn,ZodOptional:Rr,ZodNullable:$i,ZodDefault:Io,ZodCatch:gl,ZodNaN:bl,BRAND:g$,ZodBranded:Wy,ZodPipeline:kf,ZodReadonly:xl,custom:Hy,Schema:Ve,ZodSchema:Ve,late:b$,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>ta.create({...e,coerce:!0}),number:e=>go.create({...e,coerce:!0}),boolean:e=>xo.create({...e,coerce:!0}),bigint:e=>bo.create({...e,coerce:!0}),date:e=>wo.create({...e,coerce:!0})},any:O$,array:R$,bigint:S$,boolean:Gy,date:_$,discriminatedUnion:D$,effect:Yy,enum:q$,function:U$,instanceof:x$,intersection:M$,lazy:z$,literal:V$,map:F$,nan:w$,nativeEnum:W$,never:$$,null:T$,nullable:K$,number:Ky,object:P$,oboolean:()=>Gy().optional(),onumber:()=>Ky().optional(),optional:Z$,ostring:()=>Zy().optional(),pipeline:Y$,preprocess:G$,promise:H$,record:L$,set:B$,strictObject:A$,string:Zy,symbol:E$,transformer:Yy,tuple:j$,undefined:k$,union:N$,unknown:C$,void:I$,NEVER:Le,ZodIssueCode:se,quotelessJson:i$,ZodError:zn});const aa=Se.object({title:Se.string().optional(),link:Se.string().optional()}),Tf=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()}),Jy=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:aa.optional(),email:aa.optional(),phone:aa.optional(),privacyPolicy:aa.optional(),termsOfService:aa.optional(),showPoweredBy:Se.boolean().optional()}).merge(Tf),Xy=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Qy=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:Qy.optional()}),wl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),eg=Se.object({button:fe.optional(),text:Se.record(Xy,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()}),tg=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:wl.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:wl.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:wl.optional(),blocks:eg.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),ng=Se.enum(["opened","closed","initial"]),rg=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),ig=Se.object({configuration:Jy.optional().catch(void 0),theme:tg.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:rg.optional().catch(void 0)}),J$=ig.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:ng.optional().catch(void 0)});function ag(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=Tf.parse(e);let o={},s={};if(a){const c=jy(a),f=r==="dark"?Ey(c):c,p=jy(CC($C(gf(a)))),d=r==="dark"?Ey(p):p,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const h=Object.entries({...d,1:m}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?Iy(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?Iy(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},Ry(":root",o)+(t?Ry(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const Sl=j.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Py(e??"",15);return I.jsxs(mf,{ref:o,"data-color":s,...n,...a,children:[I.jsx(vf,{src:t,...r}),I.jsx(yf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});Sl.displayName="Avatar";function rse(){}function ise(){}function X$(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Q$=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tI={};function og(e,t){return(tI.jsx?eI:Q$).test(e)}const nI=/[ \t\n\f\r]/g;function rI(e){return typeof e=="object"?e.type==="text"?sg(e.value):!1:sg(e)}function sg(e){return e.replace(nI,"")===""}class Ro{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ro.prototype.property={},Ro.prototype.normal={},Ro.prototype.space=null;function lg(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ro(n,r,t)}function Of(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let iI=0;const Ue=Ii(),It=Ii(),ug=Ii(),ie=Ii(),bt=Ii(),oa=Ii(),Sn=Ii();function Ii(){return 2**++iI}const Cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:It,commaOrSpaceSeparated:Sn,commaSeparated:oa,number:ie,overloadedBoolean:ug,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),$f=Object.keys(Cf);class If extends Rn{constructor(t,n,r,i){let a=-1;if(super(t,n),cg(this,"space",i),typeof r=="number")for(;++a<$f.length;){const o=$f[a];cg(this,$f[a],(r&Cf[o])===Cf[o])}}}If.prototype.defined=!0;function cg(e,t,n){n&&(e[t]=n)}const aI={}.hasOwnProperty;function sa(e){const t={},n={};let r;for(r in e.properties)if(aI.call(e.properties,r)){const i=e.properties[r],a=new If(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Of(r)]=r,n[Of(a.attribute)]=r}return new Ro(t,n,e.space)}const fg=sa({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}}),dg=sa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pg(e,t){return t in e?e[t]:t}function hg(e,t){return pg(e,t.toLowerCase())}const mg=sa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:hg,properties:{xmlns:null,xmlnsXLink:null}}),vg=sa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:bt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ie,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:bt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:It,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),oI=sa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:hg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:oa,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:bt,autoFocus:Ue,autoPlay:Ue,blocking:bt,capture:null,charSet:null,checked:Ue,cite:null,className:bt,cols:ie,colSpan:null,content:null,contentEditable:It,controls:Ue,controlsList:bt,coords:ie|oa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:ug,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:bt,height:ie,hidden:Ue,high:ie,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ue,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:ie,pattern:null,ping:bt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:bt,required:Ue,reversed:Ue,rows:ie,rowSpan:ie,sandbox:bt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:It,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:Ue,useMap:null,value:It,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,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:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:It,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:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ie,security:null,unselectable:null}}),sI=sa({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:pg,properties:{about:Sn,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:bt,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:Ue,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:oa,g2:oa,glyphName:oa,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:Sn,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:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:Sn,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:Sn,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:Sn,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}}),lI=/^data[-\w.:]+$/i,yg=/-[a-z]/g,uI=/[A-Z]/g;function cI(e,t){const n=Of(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yg,dI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yg.test(a)){let o=a.replace(uI,fI);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=If}return new i(r,t)}function fI(e){return"-"+e.toLowerCase()}function dI(e){return e.charAt(1).toUpperCase()}const pI={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"},hI=lg([dg,fg,mg,vg,oI],"html"),Rf=lg([dg,fg,mg,vg,sI],"svg");function mI(e){return e.join(" ").trim()}var gg={},bg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vI=/\n/g,yI=/^\s*/,gI=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bI=/^:\s*/,xI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,wI=/^[;\s]*/,SI=/^\s+|\s+$/g,_I=`
31
- `,xg="/",wg="*",Ri="",EI="comment",kI="declaration",TI=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(vI);h&&(n+=h.length);var y=m.lastIndexOf(_I);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function u(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){u(yI)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!(xg!=e.charAt(0)||wg!=e.charAt(1))){for(var h=2;Ri!=e.charAt(h)&&(wg!=e.charAt(h)||xg!=e.charAt(h+1));)++h;if(h+=2,Ri===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:EI,comment:y})}}function p(){var m=a(),h=u(gI);if(h){if(f(),!u(bI))return s("property missing ':'");var y=u(xI),v=m({type:kI,property:Sg(h[0].replace(bg,Ri)),value:y?Sg(y[0].replace(bg,Ri)):Ri});return u(wI),v}}function d(){var m=[];c(m);for(var h;h=p();)h!==!1&&(m.push(h),c(m));return m}return l(),d()};function Sg(e){return e?e.replace(SI,Ri):Ri}var OI=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gg,"__esModule",{value:!0});var _g=gg.default=$I,CI=OI(TI);function $I(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,CI.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const II=_g.default||_g,Eg=kg("end"),Pf=kg("start");function kg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function RI(e){const t=Pf(e),n=Eg(e);if(t&&n)return{start:t,end:n}}function Po(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tg(e.position):"start"in e||"end"in e?Tg(e):"line"in e||"column"in e?Af(e):""}function Af(e){return Og(e&&e.line)+":"+Og(e&&e.column)}function Tg(e){return Af(e&&e.start)+"-"+Af(e&&e.end)}function Og(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.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=Po(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}}Qt.prototype.file="",Qt.prototype.name="",Qt.prototype.reason="",Qt.prototype.message="",Qt.prototype.stack="",Qt.prototype.column=void 0,Qt.prototype.line=void 0,Qt.prototype.ancestors=void 0,Qt.prototype.cause=void 0,Qt.prototype.fatal=void 0,Qt.prototype.place=void 0,Qt.prototype.ruleId=void 0,Qt.prototype.source=void 0;const Nf={}.hasOwnProperty,PI=new Map,AI=/[A-Z]/g,NI=/-([a-z])/g,DI=new Set(["table","tbody","thead","tfoot","tr"]),MI=new Set(["td","th"]),Cg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=WI(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=qI(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Rf:hI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$g(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function $g(e,t,n){if(t.type==="element")return LI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return FI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return UI(e,t,n);if(t.type==="mdxjsEsm")return BI(e,t);if(t.type==="root")return zI(e,t,n);if(t.type==="text")return VI(e,t)}function LI(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const a=Rg(e,t.tagName,!1),o=HI(e,t);let s=Mf(e,t);return DI.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!rI(u):!0})),Ig(e,o,a,t),Df(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function FI(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ao(e,t.position)}function BI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ao(e,t.position)}function UI(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Rg(e,t.name,!0),o=ZI(e,t),s=Mf(e,t);return Ig(e,o,a,t),Df(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zI(e,t,n){const r={};return Df(r,Mf(e,t)),e.create(t,e.Fragment,r,n)}function VI(e,t){return t.value}function Ig(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Df(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qI(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function WI(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=Pf(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function HI(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Nf.call(t.properties,i)){const a=KI(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&MI.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ZI(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ao(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Ao(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Mf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:PI;for(;++r<t.children.length;){const a=t.children[r];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=$g(e,a,o);s!==void 0&&n.push(s)}return n}function KI(e,t,n){const r=cI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?X$(n):mI(n)),r.property==="style"){let i=typeof n=="object"?n:GI(e,String(n));return e.stylePropertyNameCase==="css"&&(i=YI(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pI[r.property]||r.property:r.attribute,n]}}function GI(e,t){const n={};try{II(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new Qt("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=Cg+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(NI,XI)),n[o]=a}}function Rg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=og(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=og(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Nf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ao(e)}function Ao(e,t){const n=new Qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Cg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YI(e){const t={};let n;for(n in e)Nf.call(e,n)&&(t[JI(n)]=e[n]);return t}function JI(e){let t=e.replace(AI,QI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function XI(e,t){return t.toUpperCase()}function QI(e){return"-"+e.toLowerCase()}const jf={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"]},eR={};function Lf(e,t){const n=eR,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pg(e,r,i)}function Pg(e,t,n){if(tR(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ag(e.children,t,n)}return Array.isArray(e)?Ag(e,t,n):""}function Ag(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Pg(e[i],t,n);return r.join("")}function tR(e){return!!(e&&typeof e=="object")}const Ng=document.createElement("i");function Ff(e){const t="&"+e+";";Ng.innerHTML=t;const n=Ng.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function An(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const Dg={}.hasOwnProperty;function Mg(e){const t={};let n=-1;for(;++n<e.length;)nR(t,e[n]);return t}function nR(e,t){let n;for(n in t){const i=(Dg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Dg.call(i,o)||(i[o]=[]);const s=a[o];rR(i[o],Array.isArray(s)?s:s?[s]:[])}}}function rR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function jg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=Jr(/[A-Za-z]/),en=Jr(/[\dA-Za-z]/),iR=Jr(/[#-'*+\--9=?A-Z^-~]/);function _l(e){return e!==null&&(e<32||e===127)}const Bf=Jr(/\d/),aR=Jr(/[\dA-Fa-f]/),oR=Jr(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const El=Jr(new RegExp("\\p{P}|\\p{S}","u")),Pi=Jr(/\s/);function Jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function la(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return He(u)?(e.enter(n),s(u)):t(u)}function s(u){return He(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const sR={tokenize:lR};function lR(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=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 uR={tokenize:cR},Lg={tokenize:fR};function cR(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(b)}return l(b)}function u(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();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(r);let O=k;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Pn(t.events,S+1,0,t.events.slice(k)),t.events.length=O,l(b)}return s(b)}function l(b){if(r===n.length){if(!i)return p(b);if(i.currentConstruct&&i.currentConstruct.concrete)return m(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lg,c,f)(b)}function c(b){return i&&g(),v(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(b)}function p(b){return t.containerState={},e.attempt(Lg,d,m)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function m(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(b)}function h(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Ie(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),h)}function y(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 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 O=t.events.length;let L=O,D,T;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(D){T=t.events[L][1].end;break}D=!0}for(v(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Pn(t.events,L+1,0,t.events.slice(O)),t.events.length=E}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fR(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function kl(e){if(e===null||vt(e)||Pi(e))return 1;if(El(e))return 2}function Tl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Uf={name:"attention",tokenize:pR,resolveAll:dR};function dR(e,t){let n=-1,r,i,a,o,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Fg(f,-u),Fg(p,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=An(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=An(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=An(l,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=An(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=An(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kl(r);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=kl(u),f=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!p)),l._close=!!(a===42?p:p&&(c||!f)),t(u)}}function Fg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hR={name:"autolink",tokenize:mR};function mR(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return ln(d)?(e.consume(d),o):d===64?n(d):l(d)}function o(d){return d===43||d===45||d===46||en(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,u):(d===43||d===45||d===46||en(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function u(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||_l(d)?n(d):(e.consume(d),u)}function l(d){return d===64?(e.consume(d),c):iR(d)?(e.consume(d),l):n(d)}function c(d){return en(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||en(d))&&r++<63){const m=d===45?p:f;return e.consume(d),m}return n(d)}}const No={tokenize:vR,partial:!0};function vR(e,t,n){return r;function r(a){return He(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):n(a)}}const Bg={name:"blockQuote",tokenize:yR,continuation:{tokenize:gR},exit:bR};function yR(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return He(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function gR(e,t,n){const r=this;return i;function i(o){return He(o)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Bg,t,n)(o)}}function bR(e){e.exit("blockQuote")}const Ug={name:"characterEscape",tokenize:xR};function xR(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return oR(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const zg={name:"characterReference",tokenize:wR};function wR(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=en,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=aR,c):(e.enter("characterReferenceValue"),a=7,o=Bf,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===en&&!Ff(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const Vg={tokenize:_R,partial:!0},qg={name:"codeFenced",tokenize:SR,concrete:!0};function SR(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return u;function u(E){return l(E)}function l(E){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[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?n(E):(e.exit("codeFencedFenceSequence"),He(E)?Xe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Ie(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Vg,h,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||Ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):He(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||Ie(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||Ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),m)}function h(E){return e.attempt(i,k,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return a>0&&He(E)?Xe(e,g,"linePrefix",a+1)(E):g(E)}function g(E){return E===null||Ie(E)?e.check(Vg,h,k)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||Ie(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),b)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,O,L){let D=0;return T;function T(M){return E.enter("lineEnding"),E.consume(M),E.exit("lineEnding"),P}function P(M){return E.enter("codeFencedFence"),He(M)?Xe(E,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):q(M)}function q(M){return M===s?(E.enter("codeFencedFenceSequence"),$(M)):L(M)}function $(M){return M===s?(D++,E.consume(M),$):D>=o?(E.exit("codeFencedFenceSequence"),He(M)?Xe(E,F,"whitespace")(M):F(M)):L(M)}function F(M){return M===null||Ie(M)?(E.exit("codeFencedFence"),O(M)):L(M)}}}function _R(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const zf={name:"codeIndented",tokenize:kR},ER={tokenize:TR,partial:!0};function kR(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):Ie(l)?e.attempt(ER,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 TR(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Xe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Ie(o)?i(o):n(o)}}const OR={name:"codeText",tokenize:IR,resolve:CR,previous:$R};function CR(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function $R(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function IR(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(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===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class RR{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Do(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,n.reverse())}}}function Do(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wg(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new RR(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[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(r[0]==="enter")r[1].contentType&&(Object.assign(t,PR(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,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&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Pn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function PR(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,p=-1,d=n,m=0,h=0;const y=[h];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,y.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const v=s.slice(y[p],y[p+1]),g=a.pop();u.push([g,g+v.length-1]),e.splice(g,2,v)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const AR={tokenize:MR,resolve:DR},NR={tokenize:jR,partial:!0};function DR(e){return Wg(e),e}function MR(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Ie(s)?e.check(NR,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function jR(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Hg(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),p):v===null||v===32||v===41||_l(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function p(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===62?(e.exit("chunkString"),e.exit(s),p(v)):v===null||v===60||Ie(v)?n(v):(e.consume(v),v===92?m:d)}function m(v){return v===60||v===62||v===92?(e.consume(v),d):d(v)}function h(v){return!c&&(v===null||v===41||vt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||_l(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function Zg(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!u||d===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||Ie(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),u||(u=!He(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Kg(e,t,n,r,i,a){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,u):n(p)}function u(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===o?(e.exit(a),u(o)):p===null?n(p):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Xe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||Ie(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Mo(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):He(i)?Xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const LR={name:"definition",tokenize:BR},FR={tokenize:UR,partial:!0};function BR(e,t,n){const r=this;let i;return a;function a(d){return e.enter("definition"),o(d)}function o(d){return Zg.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),u):n(d)}function u(d){return vt(d)?Mo(e,l)(d):l(d)}function l(d){return Hg(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(FR,f,f)(d)}function f(d){return He(d)?Xe(e,p,"whitespace")(d):p(d)}function p(d){return d===null||Ie(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function UR(e,t,n){return r;function r(s){return vt(s)?Mo(e,i)(s):n(s)}function i(s){return Kg(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return He(s)?Xe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ie(s)?t(s):n(s)}}const zR={name:"hardBreakEscape",tokenize:VR};function VR(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const qR={name:"headingAtx",tokenize:HR,resolve:WR};function WR(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function HR(e,t,n){let r=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&&r++<6?(e.consume(c),o):c===null||vt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Ie(c)?(e.exit("atxHeading"),t(c)):He(c)?Xe(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||vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const ZR=["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"],Gg=["pre","script","style","textarea"],KR={name:"htmlFlow",tokenize:XR,resolveTo:JR,concrete:!0},GR={tokenize:eP,partial:!0},YR={tokenize:QR,partial:!0};function JR(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 XR(e,t,n){const r=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(_),p):_===47?(e.consume(_),a=!0,h):_===63?(e.consume(_),i=3,r.interrupt?t:x):ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function p(_){return _===45?(e.consume(_),i=2,d):_===91?(e.consume(_),i=5,s=0,m):ln(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function d(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function m(_){const Y="CDATA[";return _===Y.charCodeAt(s++)?(e.consume(_),s===Y.length?r.interrupt?t:q:m):n(_)}function h(_){return ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function y(_){if(_===null||_===47||_===62||vt(_)){const Y=_===47,oe=o.toLowerCase();return!Y&&!a&&Gg.includes(oe)?(i=1,r.interrupt?t(_):q(_)):ZR.includes(o.toLowerCase())?(i=6,Y?(e.consume(_),v):r.interrupt?t(_):q(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?g(_):b(_))}return _===45||en(_)?(e.consume(_),o+=String.fromCharCode(_),y):n(_)}function v(_){return _===62?(e.consume(_),r.interrupt?t:q):n(_)}function g(_){return He(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||ln(_)?(e.consume(_),k):He(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||en(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),E):He(_)?(e.consume(_),S):b(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,O):He(_)?(e.consume(_),E):L(_)}function O(_){return _===u?(e.consume(_),u=null,D):_===null||Ie(_)?n(_):(e.consume(_),O)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||vt(_)?S(_):(e.consume(_),L)}function D(_){return _===47||_===62||He(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),P):n(_)}function P(_){return _===null||Ie(_)?q(_):He(_)?(e.consume(_),P):n(_)}function q(_){return _===45&&i===2?(e.consume(_),B):_===60&&i===1?(e.consume(_),W):_===62&&i===4?(e.consume(_),V):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),N):Ie(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(GR,K,$)(_)):_===null||Ie(_)?(e.exit("htmlFlowData"),$(_)):(e.consume(_),q)}function $(_){return e.check(YR,F,K)(_)}function F(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),M}function M(_){return _===null||Ie(_)?$(_):(e.enter("htmlFlowData"),q(_))}function B(_){return _===45?(e.consume(_),x):q(_)}function W(_){return _===47?(e.consume(_),o="",U):q(_)}function U(_){if(_===62){const Y=o.toLowerCase();return Gg.includes(Y)?(e.consume(_),V):q(_)}return ln(_)&&o.length<8?(e.consume(_),o+=String.fromCharCode(_),U):q(_)}function N(_){return _===93?(e.consume(_),x):q(_)}function x(_){return _===62?(e.consume(_),V):_===45&&i===2?(e.consume(_),x):q(_)}function V(_){return _===null||Ie(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),V)}function K(_){return e.exit("htmlFlow"),t(_)}}function QR(e,t,n){const r=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function eP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(No,t,n)}}const tP={name:"htmlText",tokenize:nP};function nP(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),l):x===47?(e.consume(x),S):x===63?(e.consume(x),b):ln(x)?(e.consume(x),L):n(x)}function l(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),a=0,m):ln(x)?(e.consume(x),g):n(x)}function c(x){return x===45?(e.consume(x),d):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),p):Ie(x)?(o=f,W(x)):(e.consume(x),f)}function p(x){return x===45?(e.consume(x),d):f(x)}function d(x){return x===62?B(x):x===45?p(x):f(x)}function m(x){const V="CDATA[";return x===V.charCodeAt(a++)?(e.consume(x),a===V.length?h:m):n(x)}function h(x){return x===null?n(x):x===93?(e.consume(x),y):Ie(x)?(o=h,W(x)):(e.consume(x),h)}function y(x){return x===93?(e.consume(x),v):h(x)}function v(x){return x===62?B(x):x===93?(e.consume(x),v):h(x)}function g(x){return x===null||x===62?B(x):Ie(x)?(o=g,W(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Ie(x)?(o=b,W(x)):(e.consume(x),b)}function k(x){return x===62?B(x):b(x)}function S(x){return ln(x)?(e.consume(x),E):n(x)}function E(x){return x===45||en(x)?(e.consume(x),E):O(x)}function O(x){return Ie(x)?(o=O,W(x)):He(x)?(e.consume(x),O):B(x)}function L(x){return x===45||en(x)?(e.consume(x),L):x===47||x===62||vt(x)?D(x):n(x)}function D(x){return x===47?(e.consume(x),B):x===58||x===95||ln(x)?(e.consume(x),T):Ie(x)?(o=D,W(x)):He(x)?(e.consume(x),D):B(x)}function T(x){return x===45||x===46||x===58||x===95||en(x)?(e.consume(x),T):P(x)}function P(x){return x===61?(e.consume(x),q):Ie(x)?(o=P,W(x)):He(x)?(e.consume(x),P):D(x)}function q(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Ie(x)?(o=q,W(x)):He(x)?(e.consume(x),q):(e.consume(x),F)}function $(x){return x===i?(e.consume(x),i=void 0,M):x===null?n(x):Ie(x)?(o=$,W(x)):(e.consume(x),$)}function F(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||vt(x)?D(x):(e.consume(x),F)}function M(x){return x===47||x===62||vt(x)?D(x):n(x)}function B(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function W(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),U}function U(x){return He(x)?Xe(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):N(x)}function N(x){return e.enter("htmlTextData"),o(x)}}const Vf={name:"labelEnd",tokenize:lP,resolveTo:sP,resolveAll:oP},rP={tokenize:uP},iP={tokenize:cP},aP={tokenize:fP};function oP(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function sP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const 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+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=An(s,e.slice(a+1,a+r+3)),s=An(s,[["enter",c,t]]),s=An(s,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=An(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=An(s,e.slice(o+1)),s=An(s,[["exit",u,t]]),Pn(e,a,e.length,s),e}function lP(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(p){return a?a._inactive?f(p):(o=r.parser.defined.includes(qn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(rP,c,o?c:f)(p):p===91?e.attempt(iP,c,o?l:f)(p):o?c(p):f(p)}function l(p){return e.attempt(aP,c,f)(p)}function c(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function uP(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return vt(f)?Mo(e,a)(f):a(f)}function a(f){return f===41?c(f):Hg(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return vt(f)?Mo(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Kg(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return vt(f)?Mo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function cP(e,t,n){const r=this;return i;function i(s){return Zg.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function fP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const dP={name:"labelStartImage",tokenize:pP,resolveAll:Vf.resolveAll};function pP(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const hP={name:"labelStartLink",tokenize:mP,resolveAll:Vf.resolveAll};function mP(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const qf={name:"lineEnding",tokenize:vP};function vP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ol={name:"thematicBreak",tokenize:yP};function yP(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Ie(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),He(l)?Xe(e,s,"whitespace")(l):s(l))}}const hn={name:"list",tokenize:xP,continuation:{tokenize:wP},exit:_P},gP={tokenize:EP,partial:!0},bP={tokenize:SP,partial:!0};function xP(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Bf(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ol,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(d)}return n(d)}function u(d){return Bf(d)&&++o<10?(e.consume(d),u):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(No,r.interrupt?n:c,e.attempt(gP,p,f))}function c(d){return r.containerState.initialBlankLine=!0,a++,p(d)}function f(d){return He(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function wP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(No,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!He(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bP,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(hn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function SP(e,t,n){const r=this;return Xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function _P(e){e.exit(this.containerState.type)}function EP(e,t,n){const r=this;return Xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!He(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Yg={name:"setextUnderline",tokenize:TP,resolveTo:kP};function kP(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function TP(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),He(l)?Xe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Ie(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const OP={tokenize:CP};function CP(e){const t=this,n=e.attempt(No,r,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(AR,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $P={resolveAll:Xg()},IP=Jg("string"),RP=Jg("text");function Jg(e){return{tokenize:t,resolveAll:Xg(e==="text"?PP:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Xg(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function PP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,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:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function AP(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:g,enter:b,exit:k,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(P){return o=An(o,P),y(),o[o.length-1]!==null?[]:(L(t,0),l.events=Tl(a,l.events,l),l.events)}function p(P,q){return DP(d(P),q)}function d(P){return NP(o,P)}function m(){const{line:P,column:q,offset:$,_index:F,_bufferIndex:M}=r;return{line:P,column:q,offset:$,_index:F,_bufferIndex:M}}function h(P){i[P.line]=P.column,T()}function y(){let P;for(;r._index<o.length;){const q=o[r._index];if(typeof q=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<q.length;)v(q.charCodeAt(r._bufferIndex));else v(q)}}function v(P){c=c(P)}function g(P){Ie(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,T()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=P}function b(P,q){const $=q||{};return $.type=P,$.start=m(),l.events.push(["enter",$,l]),s.push($),$}function k(P){const q=s.pop();return q.end=m(),l.events.push(["exit",q,l]),q}function S(P,q){L(P,q.from)}function E(P,q){q.restore()}function O(P,q){return $;function $(F,M,B){let W,U,N,x;return Array.isArray(F)?K(F):"tokenize"in F?K([F]):V(F);function V(ne){return le;function le(pe){const he=pe!==null&&ne[pe],ue=pe!==null&&ne.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return K(Q)(pe)}}function K(ne){return W=ne,U=0,ne.length===0?B:_(ne[U])}function _(ne){return le;function le(pe){return x=D(),N=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?oe():ne.tokenize.call(q?Object.assign(Object.create(l),q):l,u,Y,oe)(pe)}}function Y(ne){return P(N,x),M}function oe(ne){return x.restore(),++U<W.length?_(W[U]):B}}}function L(P,q){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&Pn(l.events,q,l.events.length-q,P.resolve(l.events.slice(q),l)),P.resolveTo&&(l.events=P.resolveTo(l.events,l))}function D(){const P=m(),q=l.previous,$=l.currentConstruct,F=l.events.length,M=Array.from(s);return{restore:B,from:F};function B(){r=P,l.previous=q,l.currentConstruct=$,l.events.length=F,s=M,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function NP(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function DP(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
30
+ <%s key={someKey} {...props} />`,ey,Qi,Xoe,Qi),Fn[Qi+ey]=!0}}return C===r?qt(Mt):Xt(Mt),Mt}}function ki(C,te,ye){return Bn(C,te,ye,!0)}function Goe(C,te,ye){return Bn(C,te,ye,!1)}var Yoe=Goe,Joe=ki;po.Fragment=r,po.jsx=Yoe,po.jsxs=Joe}()),po}process.env.NODE_ENV==="production"?ff.exports=vC():ff.exports=yC();var I=ff.exports;function gC(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:p,children:d,...m}=f,h=(p==null?void 0:p[e][u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:d})}function c(f,p){const d=(p==null?void 0:p[e][u])||s,m=w.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,bC(i,...t)]}function bC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Zr(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ea=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function xC(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xy(...e){return t=>e.forEach(n=>xC(n,t))}function Kr(...e){return w.useCallback(xy(...e),e)}var df=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(SC);if(a){const o=a.props.children,s=i.map(u=>u===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:u);return I.jsx(pf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return I.jsx(pf,{...r,ref:t,children:n})});df.displayName="Slot";var pf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=EC(n);return w.cloneElement(n,{..._C(r,n.props),ref:t?xy(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});pf.displayName="SlotClone";var wC=({children:e})=>I.jsx(I.Fragment,{children:e});function SC(e){return w.isValidElement(e)&&e.type===wC}function _C(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function EC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dn=kC.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?df:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function TC(e,t){e&&sy.flushSync(()=>e.dispatchEvent(t))}var hf="Avatar",[OC,ise]=gC(hf),[CC,wy]=OC(hf),mf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return I.jsx(CC,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:I.jsx(dn.span,{...r,ref:t})})});mf.displayName=hf;var Sy="AvatarImage",vf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=wy(Sy,n),s=$C(r),u=Zr(l=>{i(l),o.onImageLoadingStatusChange(l)});return ea(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(dn.img,{...a,ref:t,src:r}):null});vf.displayName=Sy;var _y="AvatarFallback",yf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=wy(_y,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?I.jsx(dn.span,{...i,ref:t}):null});yf.displayName=_y;function $C(e){const[t,n]=w.useState("idle");return ea(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function gf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function IC(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const RC=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Ey(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const PC=2.4,AC=.2126729,NC=.7151522,DC=.072175,MC=.56,jC=.57,LC=.62,FC=.65,ll=.022,ky=1.414,BC=1.14,UC=1.14,zC=.035991,VC=.035991,qC=27.7847239587675,WC=27.7847239587675,Ty=.027,Oy=.027,Cy=.001,HC=5e-4;function $y(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**PC;return AC*i(t)+NC*i(n)+DC*i(r)}function Iy(e,t){if(!e||!t)return 0;let n=$y(gf(e)),r=$y(gf(t)),i=0,a=0;return n=n>ll?n:n+(ll-n)**ky,r=r>ll?r:r+(ll-r)**ky,Math.abs(r-n)<HC?0:(r>n?(i=(r**MC-n**jC)*BC,a=i<Cy?0:i<zC?i-i*qC*Ty:i-Ty):(i=(r**FC-n**LC)*UC,a=i>-Cy?0:i>-VC?i-i*WC*Oy:i+Oy),Math.abs(a*100))}let bf=class{constructor(){_e(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const ZC=new bf;function Ry(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Py(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Ay={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",p="quarter",d="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={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(F){var M=["th","st","nd","rd"],B=F%100;return"["+F+(M[(B-20)%10]||M[B]||M[0])+"]"}},b=function(F,M,B){var W=String(F);return!W||W.length>=M?F:""+Array(M+1-W.length).join(B)+F},k={s:b,z:function(F){var M=-F.utcOffset(),B=Math.abs(M),W=Math.floor(B/60),U=B%60;return(M<=0?"+":"-")+b(W,2,"0")+":"+b(U,2,"0")},m:function F(M,B){if(M.date()<B.date())return-F(B,M);var W=12*(B.year()-M.year())+(B.month()-M.month()),U=M.clone().add(W,f),N=B-U<0,x=M.clone().add(W+(N?-1:1),f);return+(-(W+(B-U)/(N?U-x:x-U))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:d,w:c,d:l,D:m,h:u,m:s,s:o,ms:a,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",E={};E[S]=g;var O="$isDayjsObject",L=function(F){return F instanceof q||!(!F||!F[O])},D=function F(M,B,W){var U;if(!M)return S;if(typeof M=="string"){var N=M.toLowerCase();E[N]&&(U=N),B&&(E[N]=B,U=N);var x=M.split("-");if(!U&&x.length>1)return F(x[0])}else{var V=M.name;E[V]=M,U=V}return!W&&U&&(S=U),U||!W&&S},T=function(F,M){if(L(F))return F.clone();var B=typeof M=="object"?M:{};return B.date=F,B.args=arguments,new q(B)},P=k;P.l=D,P.i=L,P.w=function(F,M){return T(F,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var q=function(){function F(B){this.$L=D(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[O]=!0}var M=F.prototype;return M.parse=function(B){this.$d=function(W){var U=W.date,N=W.utc;if(U===null)return new Date(NaN);if(P.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var x=U.match(y);if(x){var V=x[2]-1||0,K=(x[7]||"0").substring(0,3);return N?new Date(Date.UTC(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],V,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(U)}(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(B,W){var U=T(B);return this.startOf(W)<=U&&U<=this.endOf(W)},M.isAfter=function(B,W){return T(B)<this.startOf(W)},M.isBefore=function(B,W){return this.endOf(W)<T(B)},M.$g=function(B,W,U){return P.u(B)?this[W]:this.set(U,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,W){var U=this,N=!!P.u(W)||W,x=P.p(B),V=function(he,ue){var Q=P.w(U.$u?Date.UTC(U.$y,ue,he):new Date(U.$y,ue,he),U);return N?Q:Q.endOf(l)},K=function(he,ue){return P.w(U.toDate()[he].apply(U.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ue)),U)},_=this.$W,Y=this.$M,oe=this.$D,ne="set"+(this.$u?"UTC":"");switch(x){case d:return N?V(1,0):V(31,11);case f:return N?V(1,Y):V(0,Y+1);case c:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return V(N?oe-pe:oe+(6-pe),Y);case l:case m:return K(ne+"Hours",0);case u:return K(ne+"Minutes",1);case s:return K(ne+"Seconds",2);case o:return K(ne+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,W){var U,N=P.p(B),x="set"+(this.$u?"UTC":""),V=(U={},U[l]=x+"Date",U[m]=x+"Date",U[f]=x+"Month",U[d]=x+"FullYear",U[u]=x+"Hours",U[s]=x+"Minutes",U[o]=x+"Seconds",U[a]=x+"Milliseconds",U)[N],K=N===l?this.$D+(W-this.$W):W;if(N===f||N===d){var _=this.clone().set(m,1);_.$d[V](K),_.init(),this.$d=_.set(m,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](K);return this.init(),this},M.set=function(B,W){return this.clone().$set(B,W)},M.get=function(B){return this[P.p(B)]()},M.add=function(B,W){var U,N=this;B=Number(B);var x=P.p(W),V=function(Y){var oe=T(N);return P.w(oe.date(oe.date()+Math.round(Y*B)),N)};if(x===f)return this.set(f,this.$M+B);if(x===d)return this.set(d,this.$y+B);if(x===l)return V(1);if(x===c)return V(7);var K=(U={},U[s]=r,U[u]=i,U[o]=n,U)[x]||1,_=this.$d.getTime()+B*K;return P.w(_,this)},M.subtract=function(B,W){return this.add(-1*B,W)},M.format=function(B){var W=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var N=B||"YYYY-MM-DDTHH:mm:ssZ",x=P.z(this),V=this.$H,K=this.$m,_=this.$M,Y=U.weekdays,oe=U.months,ne=U.meridiem,le=function(ue,Q,Z,de){return ue&&(ue[Q]||ue(W,N))||Z[Q].slice(0,de)},pe=function(ue){return P.s(V%12||12,ue,"0")},he=ne||function(ue,Q,Z){var de=ue<12?"AM":"PM";return Z?de.toLowerCase():de};return N.replace(v,function(ue,Q){return Q||function(Z){switch(Z){case"YY":return String(W.$y).slice(-2);case"YYYY":return P.s(W.$y,4,"0");case"M":return _+1;case"MM":return P.s(_+1,2,"0");case"MMM":return le(U.monthsShort,_,oe,3);case"MMMM":return le(oe,_);case"D":return W.$D;case"DD":return P.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return le(U.weekdaysMin,W.$W,Y,2);case"ddd":return le(U.weekdaysShort,W.$W,Y,3);case"dddd":return Y[W.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(V,K,!0);case"A":return he(V,K,!1);case"m":return String(K);case"mm":return P.s(K,2,"0");case"s":return String(W.$s);case"ss":return P.s(W.$s,2,"0");case"SSS":return P.s(W.$ms,3,"0");case"Z":return x}return null}(ue)||x.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,W,U){var N,x=this,V=P.p(W),K=T(B),_=(K.utcOffset()-this.utcOffset())*r,Y=this-K,oe=function(){return P.m(x,K)};switch(V){case d:N=oe()/12;break;case f:N=oe();break;case p:N=oe()/3;break;case c:N=(Y-_)/6048e5;break;case l:N=(Y-_)/864e5;break;case u:N=Y/i;break;case s:N=Y/r;break;case o:N=Y/n;break;default:N=Y}return U?N:P.a(N)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return E[this.$L]},M.locale=function(B,W){if(!B)return this.$L;var U=this.clone(),N=D(B,W,!0);return N&&(U.$L=N),U},M.clone=function(){return P.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()},F}(),$=q.prototype;return T.prototype=$,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",d],["$D",m]].forEach(function(F){$[F[1]]=function(M){return this.$g(M,F[0],F[1])}}),T.extend=function(F,M){return F.$i||(F(M,q,T),F.$i=!0),T},T.locale=D,T.isDayjs=L,T.unix=function(F){return T(1e3*F)},T.en=E[S],T.Ls=E,T.p={},T})})(Ay);var KC=Ay.exports;const ul=Ke(KC);var Ny={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Ny);var GC=Ny.exports;const YC=Ke(GC);var Dy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ht,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Dy);var JC=Dy.exports;const XC=Ke(JC);ul.extend(YC),ul.extend(XC);function QC(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(My(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!ul(s).isSame(u,t)&&u&&n.push(My(u))}return n}function My(e){return{id:uy(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:e$(e)}}}function e$(e,t=!1){const n=ul(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function t$(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function n$(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function r$(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function i$(e,t){return e.map(n=>Math.round(n*t))}const ho=e=>t=>r$(t,e),mo=e=>t=>i$(t,e),a$={50:ho(.95),100:ho(.9),200:ho(.75),300:ho(.6),400:ho(.3),500:e=>e,600:mo(.9),700:mo(.6),800:mo(.45),900:mo(.3),950:mo(.2)};function jy(e,t=a$){const n={},r=t$(e);for(const[i,a]of Object.entries(t))n[i]=n$(a(r));return n}var at;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(at||(at={}));var xf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xf||(xf={}));const ge=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gr=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=at.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"]),o$=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let zn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,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(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};zn.create=e=>new zn(e);const vo=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:at.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,at.assertNever(e)}return{message:n}};let Ly=vo;function s$(e){Ly=e}function cl(){return Ly}const fl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.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}},l$=[];function xe(e,t){const n=fl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,cl(),vo].filter(r=>!!r)});e.common.issues.push(n)}let pn=class eC{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return eC.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),Fy=e=>({status:"dirty",value:e}),sn=e=>({status:"valid",value:e}),wf=e=>e.status==="aborted",Sf=e=>e.status==="dirty",yo=e=>e.status==="valid",dl=e=>typeof Promise<"u"&&e instanceof Promise;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));let or=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const By=(e,t)=>{if(yo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new zn(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let Ve=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 Gr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return By(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(dl(i)?i:Promise.resolve(i));return By(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Vn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rr.create(this,this._def)}nullable(){return $i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ci.create(this,this._def)}promise(){return ia.create(this,this._def)}or(t){return Eo.create([this,t],this._def)}and(t){return ko.create(this,t,this._def)}transform(t){return new Vn({...Be(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Io({...Be(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new Wy({typeName:Ne.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new gl({...Be(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return kf.create(this,t)}readonly(){return xl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const u$=/^c[^\s-]{8,}$/i,c$=/^[a-z][a-z0-9]*$/,f$=/^[0-9A-HJKMNP-TV-Z]{26}$/,d$=/^[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,p$=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,h$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _f;const m$=/^(((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}))$/,v$=/^(([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})))$/,y$=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 g$(e,t){return!!((t==="v4"||!t)&&m$.test(e)||(t==="v6"||!t)&&v$.test(e))}let ta=class ol extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.string,received:a.parsedType}),Le}const r=new pn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")p$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")_f||(_f=new RegExp(h$,"u")),_f.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")d$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")u$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")c$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")f$.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?y$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?g$(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):at.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new ol({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new ol({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ol({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ol({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ta.create=e=>{var t;return new ta({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function b$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let go=class ty 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)!==ge.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.number,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="int"?at.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?b$(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new ty({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new ty({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&at.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};go.create=e=>new go({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let bo=class ny 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)!==ge.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.bigint,received:a.parsedType}),Le}let r;const i=new pn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{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)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):at.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new ny({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new ny({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};bo.create=e=>{var t;return new bo({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let xo=class extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Le}return sn(t.data)}};xo.create=e=>new xo({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let wo=class tC extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ge.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Le}const r=new pn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):at.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new tC({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};wo.create=e=>new wo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...Be(e)});let pl=class extends Ve{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Le}return sn(t.data)}};pl.create=e=>new pl({typeName:Ne.ZodSymbol,...Be(e)});let So=class extends Ve{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Le}return sn(t.data)}};So.create=e=>new So({typeName:Ne.ZodUndefined,...Be(e)});let _o=class extends Ve{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Le}return sn(t.data)}};_o.create=e=>new _o({typeName:Ne.ZodNull,...Be(e)});let na=class extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return sn(t.data)}};na.create=e=>new na({typeName:Ne.ZodAny,...Be(e)});let Oi=class extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sn(t.data)}};Oi.create=e=>new Oi({typeName:Ne.ZodUnknown,...Be(e)});let Ir=class extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Le}};Ir.create=e=>new Ir({typeName:Ne.ZodNever,...Be(e)});let hl=class extends Ve{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Le}return sn(t.data)}};hl.create=e=>new hl({typeName:Ne.ZodVoid,...Be(e)});let Ci=class lf extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ge.array)return xe(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{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}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(xe(n,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(xe(n,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new or(n,o,n.path,s)))).then(o=>pn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new or(n,o,n.path,s)));return pn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new lf({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new lf({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new lf({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}};Ci.create=(e,t)=>new Ci({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Be(t)});function ra(e){if(e instanceof In){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rr.create(ra(r))}return new In({...e._def,shape:()=>t})}else return e instanceof Ci?new Ci({...e._def,type:ra(e.element)}):e instanceof Rr?Rr.create(ra(e.unwrap())):e instanceof $i?$i.create(ra(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>ra(t))):e}let In=class ar extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=at.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return xe(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ir&&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 or(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ir){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&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new or(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=>pn.mergeObjectSync(r,l)):pn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new ar({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ce.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new ar({...this._def,unknownKeys:"strip"})}passthrough(){return new ar({...this._def,unknownKeys:"passthrough"})}extend(t){return new ar({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ar({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ar({...this._def,catchall:t})}pick(t){const n={};return at.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}omit(t){const n={};return at.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ar({...this._def,shape:()=>n})}deepPartial(){return ra(this)}partial(t){const n={};return at.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ar({...this._def,shape:()=>n})}required(t){const n={};return at.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Rr;)a=a._def.innerType;n[r]=a}}),new ar({...this._def,shape:()=>n})}keyof(){return qy(at.objectKeys(this.shape))}};In.create=(e,t)=>new In({shape:()=>e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.strictCreate=(e,t)=>new In({shape:()=>e,unknownKeys:"strict",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)}),In.lazycreate=(e,t)=>new In({shape:e,unknownKeys:"strip",catchall:Ir.create(),typeName:Ne.ZodObject,...Be(t)});let Eo=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new zn(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.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 n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new zn(u));return xe(n,{code:se.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};Eo.create=(e,t)=>new Eo({options:e,typeName:Ne.ZodUnion,...Be(t)});const ml=e=>e instanceof To?ml(e.schema):e instanceof Vn?ml(e.innerType()):e instanceof Oo?[e.value]:e instanceof Co?e.options:e instanceof $o?Object.keys(e.enum):e instanceof Io?ml(e._def.innerType):e instanceof So?[void 0]:e instanceof _o?[null]:null;let Uy=class nC extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return xe(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=ml(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 nC({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function Ef(e,t){const n=Gr(e),r=Gr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const i=at.objectKeys(t),a=at.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Ef(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===ge.array&&r===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=Ef(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let ko=class extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wf(a)||wf(o))return Le;const s=Ef(a.value,o.value);return s.valid?((Sf(a)||Sf(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ko.create=(e,t,n)=>new ko({left:e,right:t,typeName:Ne.ZodIntersection,...Be(n)});let Yr=class rC extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return xe(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new or(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>pn.mergeArray(n,o)):pn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new rC({...this._def,rest:t})}};Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:Ne.ZodTuple,rest:null,...Be(t)})};let zy=class ry extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return xe(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new or(r,s,r.path,s)),value:o._parse(new or(r,r.data[s],r.path,s))});return r.common.async?pn.mergeObjectAsync(n,i):pn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new ry({keyType:t,valueType:n,typeName:Ne.ZodRecord,...Be(r)}):new ry({keyType:ta.create(),valueType:t,typeName:Ne.ZodRecord,...Be(n)})}},vl=class extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return xe(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new or(r,s,r.path,[l,"key"])),value:a._parse(new or(r,u,r.path,[l,"value"]))}));if(r.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 Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.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 Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};vl.create=(e,t,n)=>new vl({valueType:t,keyType:e,typeName:Ne.ZodMap,...Be(n)});let yl=class iy extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return xe(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new or(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new iy({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new iy({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};yl.create=(e,t)=>new yl({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Be(t)});let Vy=class uf extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return xe(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Le;function r(s,u){return fl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cl(),vo].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:u}})}function i(s,u){return fl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cl(),vo].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ia){const s=this;return sn(async function(...u){const l=new zn([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return sn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new zn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new zn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new uf({...this._def,args:Yr.create(t).rest(Oi.create())})}returns(t){return new uf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new uf({args:t||Yr.create([]).rest(Oi.create()),returns:n||Oi.create(),typeName:Ne.ZodFunction,...Be(r)})}},To=class extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};To.create=(e,t)=>new To({getter:e,typeName:Ne.ZodLazy,...Be(t)});let Oo=class extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};Oo.create=(e,t)=>new Oo({value:e,typeName:Ne.ZodLiteral,...Be(t)});function qy(e,t){return new Co({values:e,typeName:Ne.ZodEnum,...Be(t)})}let Co=class ay extends Ve{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:at.joinValues(r),received:n.parsedType,code:se.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Le}return sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ay.create(t)}exclude(t){return ay.create(this.options.filter(n=>!t.includes(n)))}};Co.create=qy;let $o=class extends Ve{_parse(t){const n=at.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const i=at.objectValues(n);return xe(r,{expected:at.joinValues(i),received:r.parsedType,code:se.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=at.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Le}return sn(t.data)}get enum(){return this._def.values}};$o.create=(e,t)=>new $o({values:e,typeName:Ne.ZodNativeEnum,...Be(t)});let ia=class extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Le;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return sn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ia.create=(e,t)=>new ia({type:e,typeName:Ne.ZodPromise,...Be(t)});let Vn=class extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.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(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!yo(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>yo(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);at.assertNever(i)}};Vn.create=(e,t,n)=>new Vn({schema:e,typeName:Ne.ZodEffects,effect:t,...Be(n)}),Vn.createWithPreprocess=(e,t,n)=>new Vn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...Be(n)});let Rr=class extends Ve{_parse(t){return this._getType(t)===ge.undefined?sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rr.create=(e,t)=>new Rr({innerType:e,typeName:Ne.ZodOptional,...Be(t)});let $i=class extends Ve{_parse(t){return this._getType(t)===ge.null?sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$i.create=(e,t)=>new $i({innerType:e,typeName:Ne.ZodNullable,...Be(t)});let Io=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Io.create=(e,t)=>new Io({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let gl=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};gl.create=(e,t)=>new gl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let bl=class extends Ve{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};bl.create=e=>new bl({typeName:Ne.ZodNaN,...Be(e)});const x$=Symbol("zod_brand");let Wy=class extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},kf=class iC extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),Fy(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new iC({in:t,out:n,typeName:Ne.ZodPipeline})}},xl=class extends Ve{_parse(t){const n=this._def.innerType._parse(t);return yo(n)&&(n.value=Object.freeze(n.value)),n}};xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodReadonly,...Be(t)});const Hy=(e,t={},n)=>e?na.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):na.create(),w$={object:In.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 S$=(e,t={message:`Input not instance of ${e.name}`})=>Hy(n=>n instanceof e,t),Zy=ta.create,Ky=go.create,_$=bl.create,E$=bo.create,Gy=xo.create,k$=wo.create,T$=pl.create,O$=So.create,C$=_o.create,$$=na.create,I$=Oi.create,R$=Ir.create,P$=hl.create,A$=Ci.create,N$=In.create,D$=In.strictCreate,M$=Eo.create,j$=Uy.create,L$=ko.create,F$=Yr.create,B$=zy.create,U$=vl.create,z$=yl.create,V$=Vy.create,q$=To.create,W$=Oo.create,H$=Co.create,Z$=$o.create,K$=ia.create,Yy=Vn.create,G$=Rr.create,Y$=$i.create,J$=Vn.createWithPreprocess,X$=kf.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:vo,setErrorMap:s$,getErrorMap:cl,makeIssue:fl,EMPTY_PATH:l$,addIssueToContext:xe,ParseStatus:pn,INVALID:Le,DIRTY:Fy,OK:sn,isAborted:wf,isDirty:Sf,isValid:yo,isAsync:dl,get util(){return at},get objectUtil(){return xf},ZodParsedType:ge,getParsedType:Gr,ZodType:Ve,ZodString:ta,ZodNumber:go,ZodBigInt:bo,ZodBoolean:xo,ZodDate:wo,ZodSymbol:pl,ZodUndefined:So,ZodNull:_o,ZodAny:na,ZodUnknown:Oi,ZodNever:Ir,ZodVoid:hl,ZodArray:Ci,ZodObject:In,ZodUnion:Eo,ZodDiscriminatedUnion:Uy,ZodIntersection:ko,ZodTuple:Yr,ZodRecord:zy,ZodMap:vl,ZodSet:yl,ZodFunction:Vy,ZodLazy:To,ZodLiteral:Oo,ZodEnum:Co,ZodNativeEnum:$o,ZodPromise:ia,ZodEffects:Vn,ZodTransformer:Vn,ZodOptional:Rr,ZodNullable:$i,ZodDefault:Io,ZodCatch:gl,ZodNaN:bl,BRAND:x$,ZodBranded:Wy,ZodPipeline:kf,ZodReadonly:xl,custom:Hy,Schema:Ve,ZodSchema:Ve,late:w$,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>ta.create({...e,coerce:!0}),number:e=>go.create({...e,coerce:!0}),boolean:e=>xo.create({...e,coerce:!0}),bigint:e=>bo.create({...e,coerce:!0}),date:e=>wo.create({...e,coerce:!0})},any:$$,array:A$,bigint:E$,boolean:Gy,date:k$,discriminatedUnion:j$,effect:Yy,enum:H$,function:V$,instanceof:S$,intersection:L$,lazy:q$,literal:W$,map:U$,nan:_$,nativeEnum:Z$,never:R$,null:C$,nullable:Y$,number:Ky,object:N$,oboolean:()=>Gy().optional(),onumber:()=>Ky().optional(),optional:G$,ostring:()=>Zy().optional(),pipeline:X$,preprocess:J$,promise:K$,record:B$,set:z$,strictObject:D$,string:Zy,symbol:T$,transformer:Yy,tuple:F$,undefined:O$,union:M$,unknown:I$,void:P$,NEVER:Le,ZodIssueCode:se,quotelessJson:o$,ZodError:zn});const aa=Se.object({title:Se.string().optional(),link:Se.string().optional()}),Tf=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()}),Jy=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:aa.optional(),email:aa.optional(),phone:aa.optional(),privacyPolicy:aa.optional(),termsOfService:aa.optional(),showPoweredBy:Se.boolean().optional()}).merge(Tf),Xy=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Qy=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:Qy.optional()}),wl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),eg=Se.object({button:fe.optional(),text:Se.record(Xy,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()}),tg=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:wl.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:wl.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:wl.optional(),blocks:eg.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),ng=Se.enum(["opened","closed","initial"]),rg=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),ig=Se.object({configuration:Jy.optional().catch(void 0),theme:tg.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:rg.optional().catch(void 0)}),Q$=ig.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:ng.optional().catch(void 0)});function ag(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=Tf.parse(e);let o={},s={};if(a){const c=jy(a),f=r==="dark"?Ey(c):c,p=jy(IC(RC(gf(a)))),d=r==="dark"?Ey(p):p,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const h=Object.entries({...d,1:m}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?Iy(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?Iy(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},Ry(":root",o)+(t?Ry(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const Sl=j.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Py(e??"",15);return I.jsxs(mf,{ref:o,"data-color":s,...n,...a,children:[I.jsx(vf,{src:t,...r}),I.jsx(yf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});Sl.displayName="Avatar";function cse(){}function fse(){}function eI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const tI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rI={};function og(e,t){return(rI.jsx?nI:tI).test(e)}const iI=/[ \t\n\f\r]/g;function aI(e){return typeof e=="object"?e.type==="text"?sg(e.value):!1:sg(e)}function sg(e){return e.replace(iI,"")===""}class Ro{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ro.prototype.property={},Ro.prototype.normal={},Ro.prototype.space=null;function lg(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ro(n,r,t)}function Of(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let oI=0;const Ue=Ii(),It=Ii(),ug=Ii(),ie=Ii(),bt=Ii(),oa=Ii(),Sn=Ii();function Ii(){return 2**++oI}const Cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:It,commaOrSpaceSeparated:Sn,commaSeparated:oa,number:ie,overloadedBoolean:ug,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),$f=Object.keys(Cf);class If extends Rn{constructor(t,n,r,i){let a=-1;if(super(t,n),cg(this,"space",i),typeof r=="number")for(;++a<$f.length;){const o=$f[a];cg(this,$f[a],(r&Cf[o])===Cf[o])}}}If.prototype.defined=!0;function cg(e,t,n){n&&(e[t]=n)}const sI={}.hasOwnProperty;function sa(e){const t={},n={};let r;for(r in e.properties)if(sI.call(e.properties,r)){const i=e.properties[r],a=new If(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Of(r)]=r,n[Of(a.attribute)]=r}return new Ro(t,n,e.space)}const fg=sa({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}}),dg=sa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function pg(e,t){return t in e?e[t]:t}function hg(e,t){return pg(e,t.toLowerCase())}const mg=sa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:hg,properties:{xmlns:null,xmlnsXLink:null}}),vg=sa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:bt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:ie,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:bt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:It,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),lI=sa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:hg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:oa,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:bt,autoFocus:Ue,autoPlay:Ue,blocking:bt,capture:null,charSet:null,checked:Ue,cite:null,className:bt,cols:ie,colSpan:null,content:null,contentEditable:It,controls:Ue,controlsList:bt,coords:ie|oa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:ug,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:bt,height:ie,hidden:Ue,high:ie,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ue,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:ie,pattern:null,ping:bt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:bt,required:Ue,reversed:Ue,rows:ie,rowSpan:ie,sandbox:bt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:It,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:Ue,useMap:null,value:It,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,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:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:It,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:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ie,security:null,unselectable:null}}),uI=sa({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:pg,properties:{about:Sn,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:bt,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:Ue,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:oa,g2:oa,glyphName:oa,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:Sn,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:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:Sn,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:Sn,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:Sn,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}}),cI=/^data[-\w.:]+$/i,yg=/-[a-z]/g,fI=/[A-Z]/g;function dI(e,t){const n=Of(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cI.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yg,hI);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yg.test(a)){let o=a.replace(fI,pI);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=If}return new i(r,t)}function pI(e){return"-"+e.toLowerCase()}function hI(e){return e.charAt(1).toUpperCase()}const mI={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"},vI=lg([dg,fg,mg,vg,lI],"html"),Rf=lg([dg,fg,mg,vg,uI],"svg");function yI(e){return e.join(" ").trim()}var gg={},bg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gI=/\n/g,bI=/^\s*/,xI=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,wI=/^:\s*/,SI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_I=/^[;\s]*/,EI=/^\s+|\s+$/g,kI=`
31
+ `,xg="/",wg="*",Ri="",TI="comment",OI="declaration",CI=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(gI);h&&(n+=h.length);var y=m.lastIndexOf(kI);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function u(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){u(bI)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!(xg!=e.charAt(0)||wg!=e.charAt(1))){for(var h=2;Ri!=e.charAt(h)&&(wg!=e.charAt(h)||xg!=e.charAt(h+1));)++h;if(h+=2,Ri===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:TI,comment:y})}}function p(){var m=a(),h=u(xI);if(h){if(f(),!u(wI))return s("property missing ':'");var y=u(SI),v=m({type:OI,property:Sg(h[0].replace(bg,Ri)),value:y?Sg(y[0].replace(bg,Ri)):Ri});return u(_I),v}}function d(){var m=[];c(m);for(var h;h=p();)h!==!1&&(m.push(h),c(m));return m}return l(),d()};function Sg(e){return e?e.replace(EI,Ri):Ri}var $I=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gg,"__esModule",{value:!0});var _g=gg.default=RI,II=$I(CI);function RI(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,II.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const PI=_g.default||_g,Eg=kg("end"),Pf=kg("start");function kg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function AI(e){const t=Pf(e),n=Eg(e);if(t&&n)return{start:t,end:n}}function Po(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tg(e.position):"start"in e||"end"in e?Tg(e):"line"in e||"column"in e?Af(e):""}function Af(e){return Og(e&&e.line)+":"+Og(e&&e.column)}function Tg(e){return Af(e&&e.start)+"-"+Af(e&&e.end)}function Og(e){return e&&typeof e=="number"?e:1}class Qt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.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=Po(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}}Qt.prototype.file="",Qt.prototype.name="",Qt.prototype.reason="",Qt.prototype.message="",Qt.prototype.stack="",Qt.prototype.column=void 0,Qt.prototype.line=void 0,Qt.prototype.ancestors=void 0,Qt.prototype.cause=void 0,Qt.prototype.fatal=void 0,Qt.prototype.place=void 0,Qt.prototype.ruleId=void 0,Qt.prototype.source=void 0;const Nf={}.hasOwnProperty,NI=new Map,DI=/[A-Z]/g,MI=/-([a-z])/g,jI=new Set(["table","tbody","thead","tfoot","tr"]),LI=new Set(["td","th"]),Cg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ZI(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=HI(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Rf:vI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$g(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function $g(e,t,n){if(t.type==="element")return BI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return UI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return VI(e,t,n);if(t.type==="mdxjsEsm")return zI(e,t);if(t.type==="root")return qI(e,t,n);if(t.type==="text")return WI(e,t)}function BI(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const a=Rg(e,t.tagName,!1),o=KI(e,t);let s=Mf(e,t);return jI.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!aI(u):!0})),Ig(e,o,a,t),Df(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function UI(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ao(e,t.position)}function zI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ao(e,t.position)}function VI(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Rg(e,t.name,!0),o=GI(e,t),s=Mf(e,t);return Ig(e,o,a,t),Df(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qI(e,t,n){const r={};return Df(r,Mf(e,t)),e.create(t,e.Fragment,r,n)}function WI(e,t){return t.value}function Ig(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Df(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function HI(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function ZI(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=Pf(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function KI(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Nf.call(t.properties,i)){const a=YI(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&LI.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function GI(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ao(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Ao(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Mf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:NI;for(;++r<t.children.length;){const a=t.children[r];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=$g(e,a,o);s!==void 0&&n.push(s)}return n}function YI(e,t,n){const r=dI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?eI(n):yI(n)),r.property==="style"){let i=typeof n=="object"?n:JI(e,String(n));return e.stylePropertyNameCase==="css"&&(i=XI(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?mI[r.property]||r.property:r.attribute,n]}}function JI(e,t){const n={};try{PI(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new Qt("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=Cg+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(MI,eR)),n[o]=a}}function Rg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=og(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=og(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Nf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ao(e)}function Ao(e,t){const n=new Qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Cg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function XI(e){const t={};let n;for(n in e)Nf.call(e,n)&&(t[QI(n)]=e[n]);return t}function QI(e){let t=e.replace(DI,tR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eR(e,t){return t.toUpperCase()}function tR(e){return"-"+e.toLowerCase()}const jf={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"]},nR={};function Lf(e,t){const n=nR,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pg(e,r,i)}function Pg(e,t,n){if(rR(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ag(e.children,t,n)}return Array.isArray(e)?Ag(e,t,n):""}function Ag(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Pg(e[i],t,n);return r.join("")}function rR(e){return!!(e&&typeof e=="object")}const Ng=document.createElement("i");function Ff(e){const t="&"+e+";";Ng.innerHTML=t;const n=Ng.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function An(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const Dg={}.hasOwnProperty;function Mg(e){const t={};let n=-1;for(;++n<e.length;)iR(t,e[n]);return t}function iR(e,t){let n;for(n in t){const i=(Dg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Dg.call(i,o)||(i[o]=[]);const s=a[o];aR(i[o],Array.isArray(s)?s:s?[s]:[])}}}function aR(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function jg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ln=Jr(/[A-Za-z]/),en=Jr(/[\dA-Za-z]/),oR=Jr(/[#-'*+\--9=?A-Z^-~]/);function _l(e){return e!==null&&(e<32||e===127)}const Bf=Jr(/\d/),sR=Jr(/[\dA-Fa-f]/),lR=Jr(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const El=Jr(new RegExp("\\p{P}|\\p{S}","u")),Pi=Jr(/\s/);function Jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function la(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return He(u)?(e.enter(n),s(u)):t(u)}function s(u){return He(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const uR={tokenize:cR};function cR(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Re(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const fR={tokenize:dR},Lg={tokenize:pR};function dR(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(b)}return l(b)}function u(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();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(r);let O=k;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},E),O++;return Pn(t.events,S+1,0,t.events.slice(k)),t.events.length=O,l(b)}return s(b)}function l(b){if(r===n.length){if(!i)return p(b);if(i.currentConstruct&&i.currentConstruct.concrete)return m(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lg,c,f)(b)}function c(b){return i&&g(),v(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(b)}function p(b){return t.containerState={},e.attempt(Lg,d,m)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function m(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(b)}function h(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Re(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),h)}function y(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 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 O=t.events.length;let L=O,D,T;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(D){T=t.events[L][1].end;break}D=!0}for(v(r),E=O;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Pn(t.events,L+1,0,t.events.slice(O)),t.events.length=E}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pR(e,t,n){return Xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function kl(e){if(e===null||vt(e)||Pi(e))return 1;if(El(e))return 2}function Tl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Uf={name:"attention",tokenize:mR,resolveAll:hR};function hR(e,t){let n=-1,r,i,a,o,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Fg(f,-u),Fg(p,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=An(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=An(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=An(l,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=An(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=An(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function mR(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kl(r);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=kl(u),f=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!p)),l._close=!!(a===42?p:p&&(c||!f)),t(u)}}function Fg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vR={name:"autolink",tokenize:yR};function yR(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return ln(d)?(e.consume(d),o):d===64?n(d):l(d)}function o(d){return d===43||d===45||d===46||en(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,u):(d===43||d===45||d===46||en(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function u(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||_l(d)?n(d):(e.consume(d),u)}function l(d){return d===64?(e.consume(d),c):oR(d)?(e.consume(d),l):n(d)}function c(d){return en(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||en(d))&&r++<63){const m=d===45?p:f;return e.consume(d),m}return n(d)}}const No={tokenize:gR,partial:!0};function gR(e,t,n){return r;function r(a){return He(a)?Xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Re(a)?t(a):n(a)}}const Bg={name:"blockQuote",tokenize:bR,continuation:{tokenize:xR},exit:wR};function bR(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return He(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function xR(e,t,n){const r=this;return i;function i(o){return He(o)?Xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Bg,t,n)(o)}}function wR(e){e.exit("blockQuote")}const Ug={name:"characterEscape",tokenize:SR};function SR(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return lR(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const zg={name:"characterReference",tokenize:_R};function _R(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=en,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=sR,c):(e.enter("characterReferenceValue"),a=7,o=Bf,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===en&&!Ff(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const Vg={tokenize:kR,partial:!0},qg={name:"codeFenced",tokenize:ER,concrete:!0};function ER(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return u;function u(E){return l(E)}function l(E){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[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?n(E):(e.exit("codeFencedFenceSequence"),He(E)?Xe(e,f,"whitespace")(E):f(E))}function f(E){return E===null||Re(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Vg,h,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):He(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||Re(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||Re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),m)}function h(E){return e.attempt(i,k,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return a>0&&He(E)?Xe(e,g,"linePrefix",a+1)(E):g(E)}function g(E){return E===null||Re(E)?e.check(Vg,h,k)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||Re(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),b)}function k(E){return e.exit("codeFenced"),t(E)}function S(E,O,L){let D=0;return T;function T(M){return E.enter("lineEnding"),E.consume(M),E.exit("lineEnding"),P}function P(M){return E.enter("codeFencedFence"),He(M)?Xe(E,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):q(M)}function q(M){return M===s?(E.enter("codeFencedFenceSequence"),$(M)):L(M)}function $(M){return M===s?(D++,E.consume(M),$):D>=o?(E.exit("codeFencedFenceSequence"),He(M)?Xe(E,F,"whitespace")(M):F(M)):L(M)}function F(M){return M===null||Re(M)?(E.exit("codeFencedFence"),O(M)):L(M)}}}function kR(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const zf={name:"codeIndented",tokenize:OR},TR={tokenize:CR,partial:!0};function OR(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),Xe(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):Re(l)?e.attempt(TR,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||Re(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function CR(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Xe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Re(o)?i(o):n(o)}}const $R={name:"codeText",tokenize:PR,resolve:IR,previous:RR};function IR(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function RR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PR(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):Re(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||Re(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class AR{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Do(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,n.reverse())}}}function Do(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wg(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new AR(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[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(r[0]==="enter")r[1].contentType&&(Object.assign(t,NR(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,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&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Pn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function NR(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,p=-1,d=n,m=0,h=0;const y=[h];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,y.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const v=s.slice(y[p],y[p+1]),g=a.pop();u.push([g,g+v.length-1]),e.splice(g,2,v)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const DR={tokenize:LR,resolve:jR},MR={tokenize:FR,partial:!0};function jR(e){return Wg(e),e}function LR(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Re(s)?e.check(MR,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function FR(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Xe(e,a,"linePrefix")}function a(o){if(o===null||Re(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Hg(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),p):v===null||v===32||v===41||_l(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function p(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===62?(e.exit("chunkString"),e.exit(s),p(v)):v===null||v===60||Re(v)?n(v):(e.consume(v),v===92?m:d)}function m(v){return v===60||v===62||v===92?(e.consume(v),d):d(v)}function h(v){return!c&&(v===null||v===41||vt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||_l(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function Zg(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!u||d===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||Re(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),u||(u=!He(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Kg(e,t,n,r,i,a){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,u):n(p)}function u(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===o?(e.exit(a),u(o)):p===null?n(p):Re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Xe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||Re(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Mo(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):He(i)?Xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const BR={name:"definition",tokenize:zR},UR={tokenize:VR,partial:!0};function zR(e,t,n){const r=this;let i;return a;function a(d){return e.enter("definition"),o(d)}function o(d){return Zg.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),u):n(d)}function u(d){return vt(d)?Mo(e,l)(d):l(d)}function l(d){return Hg(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(UR,f,f)(d)}function f(d){return He(d)?Xe(e,p,"whitespace")(d):p(d)}function p(d){return d===null||Re(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function VR(e,t,n){return r;function r(s){return vt(s)?Mo(e,i)(s):n(s)}function i(s){return Kg(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return He(s)?Xe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Re(s)?t(s):n(s)}}const qR={name:"hardBreakEscape",tokenize:WR};function WR(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Re(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const HR={name:"headingAtx",tokenize:KR,resolve:ZR};function ZR(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function KR(e,t,n){let r=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&&r++<6?(e.consume(c),o):c===null||vt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Re(c)?(e.exit("atxHeading"),t(c)):He(c)?Xe(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||vt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const GR=["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"],Gg=["pre","script","style","textarea"],YR={name:"htmlFlow",tokenize:eP,resolveTo:QR,concrete:!0},JR={tokenize:nP,partial:!0},XR={tokenize:tP,partial:!0};function QR(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 eP(e,t,n){const r=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(_),p):_===47?(e.consume(_),a=!0,h):_===63?(e.consume(_),i=3,r.interrupt?t:x):ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function p(_){return _===45?(e.consume(_),i=2,d):_===91?(e.consume(_),i=5,s=0,m):ln(_)?(e.consume(_),i=4,r.interrupt?t:x):n(_)}function d(_){return _===45?(e.consume(_),r.interrupt?t:x):n(_)}function m(_){const Y="CDATA[";return _===Y.charCodeAt(s++)?(e.consume(_),s===Y.length?r.interrupt?t:q:m):n(_)}function h(_){return ln(_)?(e.consume(_),o=String.fromCharCode(_),y):n(_)}function y(_){if(_===null||_===47||_===62||vt(_)){const Y=_===47,oe=o.toLowerCase();return!Y&&!a&&Gg.includes(oe)?(i=1,r.interrupt?t(_):q(_)):GR.includes(o.toLowerCase())?(i=6,Y?(e.consume(_),v):r.interrupt?t(_):q(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?g(_):b(_))}return _===45||en(_)?(e.consume(_),o+=String.fromCharCode(_),y):n(_)}function v(_){return _===62?(e.consume(_),r.interrupt?t:q):n(_)}function g(_){return He(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||ln(_)?(e.consume(_),k):He(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||en(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),E):He(_)?(e.consume(_),S):b(_)}function E(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,O):He(_)?(e.consume(_),E):L(_)}function O(_){return _===u?(e.consume(_),u=null,D):_===null||Re(_)?n(_):(e.consume(_),O)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||vt(_)?S(_):(e.consume(_),L)}function D(_){return _===47||_===62||He(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),P):n(_)}function P(_){return _===null||Re(_)?q(_):He(_)?(e.consume(_),P):n(_)}function q(_){return _===45&&i===2?(e.consume(_),B):_===60&&i===1?(e.consume(_),W):_===62&&i===4?(e.consume(_),V):_===63&&i===3?(e.consume(_),x):_===93&&i===5?(e.consume(_),N):Re(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(JR,K,$)(_)):_===null||Re(_)?(e.exit("htmlFlowData"),$(_)):(e.consume(_),q)}function $(_){return e.check(XR,F,K)(_)}function F(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),M}function M(_){return _===null||Re(_)?$(_):(e.enter("htmlFlowData"),q(_))}function B(_){return _===45?(e.consume(_),x):q(_)}function W(_){return _===47?(e.consume(_),o="",U):q(_)}function U(_){if(_===62){const Y=o.toLowerCase();return Gg.includes(Y)?(e.consume(_),V):q(_)}return ln(_)&&o.length<8?(e.consume(_),o+=String.fromCharCode(_),U):q(_)}function N(_){return _===93?(e.consume(_),x):q(_)}function x(_){return _===62?(e.consume(_),V):_===45&&i===2?(e.consume(_),x):q(_)}function V(_){return _===null||Re(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),V)}function K(_){return e.exit("htmlFlow"),t(_)}}function tP(e,t,n){const r=this;return i;function i(o){return Re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function nP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(No,t,n)}}const rP={name:"htmlText",tokenize:iP};function iP(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),l):x===47?(e.consume(x),S):x===63?(e.consume(x),b):ln(x)?(e.consume(x),L):n(x)}function l(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),a=0,m):ln(x)?(e.consume(x),g):n(x)}function c(x){return x===45?(e.consume(x),d):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),p):Re(x)?(o=f,W(x)):(e.consume(x),f)}function p(x){return x===45?(e.consume(x),d):f(x)}function d(x){return x===62?B(x):x===45?p(x):f(x)}function m(x){const V="CDATA[";return x===V.charCodeAt(a++)?(e.consume(x),a===V.length?h:m):n(x)}function h(x){return x===null?n(x):x===93?(e.consume(x),y):Re(x)?(o=h,W(x)):(e.consume(x),h)}function y(x){return x===93?(e.consume(x),v):h(x)}function v(x){return x===62?B(x):x===93?(e.consume(x),v):h(x)}function g(x){return x===null||x===62?B(x):Re(x)?(o=g,W(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Re(x)?(o=b,W(x)):(e.consume(x),b)}function k(x){return x===62?B(x):b(x)}function S(x){return ln(x)?(e.consume(x),E):n(x)}function E(x){return x===45||en(x)?(e.consume(x),E):O(x)}function O(x){return Re(x)?(o=O,W(x)):He(x)?(e.consume(x),O):B(x)}function L(x){return x===45||en(x)?(e.consume(x),L):x===47||x===62||vt(x)?D(x):n(x)}function D(x){return x===47?(e.consume(x),B):x===58||x===95||ln(x)?(e.consume(x),T):Re(x)?(o=D,W(x)):He(x)?(e.consume(x),D):B(x)}function T(x){return x===45||x===46||x===58||x===95||en(x)?(e.consume(x),T):P(x)}function P(x){return x===61?(e.consume(x),q):Re(x)?(o=P,W(x)):He(x)?(e.consume(x),P):D(x)}function q(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Re(x)?(o=q,W(x)):He(x)?(e.consume(x),q):(e.consume(x),F)}function $(x){return x===i?(e.consume(x),i=void 0,M):x===null?n(x):Re(x)?(o=$,W(x)):(e.consume(x),$)}function F(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||vt(x)?D(x):(e.consume(x),F)}function M(x){return x===47||x===62||vt(x)?D(x):n(x)}function B(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function W(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),U}function U(x){return He(x)?Xe(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):N(x)}function N(x){return e.enter("htmlTextData"),o(x)}}const Vf={name:"labelEnd",tokenize:cP,resolveTo:uP,resolveAll:lP},aP={tokenize:fP},oP={tokenize:dP},sP={tokenize:pP};function lP(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function uP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const 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+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=An(s,e.slice(a+1,a+r+3)),s=An(s,[["enter",c,t]]),s=An(s,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=An(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=An(s,e.slice(o+1)),s=An(s,[["exit",u,t]]),Pn(e,a,e.length,s),e}function cP(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(p){return a?a._inactive?f(p):(o=r.parser.defined.includes(qn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(aP,c,o?c:f)(p):p===91?e.attempt(oP,c,o?l:f)(p):o?c(p):f(p)}function l(p){return e.attempt(sP,c,f)(p)}function c(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function fP(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return vt(f)?Mo(e,a)(f):a(f)}function a(f){return f===41?c(f):Hg(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return vt(f)?Mo(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Kg(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return vt(f)?Mo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dP(e,t,n){const r=this;return i;function i(s){return Zg.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function pP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const hP={name:"labelStartImage",tokenize:mP,resolveAll:Vf.resolveAll};function mP(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const vP={name:"labelStartLink",tokenize:yP,resolveAll:Vf.resolveAll};function yP(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const qf={name:"lineEnding",tokenize:gP};function gP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ol={name:"thematicBreak",tokenize:bP};function bP(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Re(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),He(l)?Xe(e,s,"whitespace")(l):s(l))}}const hn={name:"list",tokenize:SP,continuation:{tokenize:_P},exit:kP},xP={tokenize:TP,partial:!0},wP={tokenize:EP,partial:!0};function SP(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Bf(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Ol,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(d)}return n(d)}function u(d){return Bf(d)&&++o<10?(e.consume(d),u):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(No,r.interrupt?n:c,e.attempt(xP,p,f))}function c(d){return r.containerState.initialBlankLine=!0,a++,p(d)}function f(d){return He(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _P(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(No,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Xe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!He(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wP,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Xe(e,e.attempt(hn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function EP(e,t,n){const r=this;return Xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function kP(e){e.exit(this.containerState.type)}function TP(e,t,n){const r=this;return Xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!He(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Yg={name:"setextUnderline",tokenize:CP,resolveTo:OP};function OP(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function CP(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),He(l)?Xe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Re(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const $P={tokenize:IP};function IP(e){const t=this,n=e.attempt(No,r,e.attempt(this.parser.constructs.flowInitial,i,Xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(DR,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const RP={resolveAll:Xg()},PP=Jg("string"),AP=Jg("text");function Jg(e){return{tokenize:t,resolveAll:Xg(e==="text"?NP:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Xg(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function NP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,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:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function DP(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:g,enter:b,exit:k,attempt:O(S),check:O(E),interrupt:O(E,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(P){return o=An(o,P),y(),o[o.length-1]!==null?[]:(L(t,0),l.events=Tl(a,l.events,l),l.events)}function p(P,q){return jP(d(P),q)}function d(P){return MP(o,P)}function m(){const{line:P,column:q,offset:$,_index:F,_bufferIndex:M}=r;return{line:P,column:q,offset:$,_index:F,_bufferIndex:M}}function h(P){i[P.line]=P.column,T()}function y(){let P;for(;r._index<o.length;){const q=o[r._index];if(typeof q=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<q.length;)v(q.charCodeAt(r._bufferIndex));else v(q)}}function v(P){c=c(P)}function g(P){Re(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,T()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=P}function b(P,q){const $=q||{};return $.type=P,$.start=m(),l.events.push(["enter",$,l]),s.push($),$}function k(P){const q=s.pop();return q.end=m(),l.events.push(["exit",q,l]),q}function S(P,q){L(P,q.from)}function E(P,q){q.restore()}function O(P,q){return $;function $(F,M,B){let W,U,N,x;return Array.isArray(F)?K(F):"tokenize"in F?K([F]):V(F);function V(ne){return le;function le(pe){const he=pe!==null&&ne[pe],ue=pe!==null&&ne.null,Q=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return K(Q)(pe)}}function K(ne){return W=ne,U=0,ne.length===0?B:_(ne[U])}function _(ne){return le;function le(pe){return x=D(),N=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?oe():ne.tokenize.call(q?Object.assign(Object.create(l),q):l,u,Y,oe)(pe)}}function Y(ne){return P(N,x),M}function oe(ne){return x.restore(),++U<W.length?_(W[U]):B}}}function L(P,q){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&Pn(l.events,q,l.events.length-q,P.resolve(l.events.slice(q),l)),P.resolveTo&&(l.events=P.resolveTo(l.events,l))}function D(){const P=m(),q=l.previous,$=l.currentConstruct,F=l.events.length,M=Array.from(s);return{restore:B,from:F};function B(){r=P,l.previous=q,l.currentConstruct=$,l.events.length=F,s=M,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function MP(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function jP(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
32
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,r.push(o)}return r.join("")}const MP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:LR},disable:{null:[]},document:{42:hn,43:hn,45:hn,48:hn,49:hn,50:hn,51:hn,52:hn,53:hn,54:hn,55:hn,56:hn,57:hn,62:Bg},flow:{35:qR,42:Ol,45:[Yg,Ol],60:KR,61:Yg,95:Ol,96:qg,126:qg},flowInitial:{[-2]:zf,[-1]:zf,32:zf},insideSpan:{null:[Uf,$P]},string:{38:zg,92:Ug},text:{[-5]:qf,[-4]:qf,[-3]:qf,33:dP,38:zg,42:Uf,60:[hR,tP],91:hP,92:[zR,Ug],93:Vf,95:Uf,96:OR}},Symbol.toStringTag,{value:"Module"}));function jP(e){const n=Mg([MP,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(sR),document:i(uR),flow:i(OP),string:i(IP),text:i(RP)};return r;function i(a){return o;function o(s){return AP(r,a,s)}}}function LP(e){for(;!Wg(e););return e}const Qg=/[\0\t\n\r]/g;function FP(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,p,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Qg.lastIndex=f,l=Qg.exec(a),p=l&&l.index!==void 0?l.index:a.length,d=a.charCodeAt(p),!l){t=a.slice(f);break}if(d===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),d){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:r=!0,e=1}f=p+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const BP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UP(e){return e.replace(BP,zP)}function zP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return jg(n.slice(a?2:1),a?16:10)}return Ff(n)||e}const eb={}.hasOwnProperty;function VP(e,t,n){return typeof t!="string"&&(n=t,t=void 0),qP(n)(LP(jP(n).document().write(FP()(e,t,!0))))}function qP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:D,autolinkEmail:D,atxHeading:a($e),blockQuote:a(ue),characterEscape:D,characterReference:D,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(Z,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(J,o),htmlFlowData:D,htmlText:a(J,o),htmlTextData:D,image:a(ae),label:o,link:a(ee),listItem:a(we),listItemValue:p,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Re),reference:_,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a($e),strong:a(We),thematicBreak:a(Fe)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ne,characterReference:le,codeFenced:u(y),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:u(v),codeText:u(M),codeTextData:T,data:T,definition:u(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u($),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(W),label:N,labelText:U,lineEnding:P,link:u(B),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Y,resourceDestinationString:x,resourceTitleString:V,resource:K,setextHeading:u(L),setextHeadingLineSequence:O,setextHeadingText:E,strong:u(),thematicBreak:u()}};tb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let A={type:"root",children:[]};const X={stack:[A],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},ce=[];let Ee=-1;for(;++Ee<z.length;)if(z[Ee][1].type==="listOrdered"||z[Ee][1].type==="listUnordered")if(z[Ee][0]==="enter")ce.push(Ee);else{const Oe=ce.pop();Ee=i(z,Oe,Ee)}for(Ee=-1;++Ee<z.length;){const Oe=t[z[Ee][0]];eb.call(Oe,z[Ee][1].type)&&Oe[z[Ee][1].type].call(Object.assign({sliceSerialize:z[Ee][2].sliceSerialize},X),z[Ee][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||nb).call(X,void 0,Oe[0])}for(A.position={start:Xr(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Xr(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)A=t.transforms[Ee](A)||A;return A}function i(z,A,X){let ce=A-1,Ee=-1,Oe=!1,Je,lt,Ut,Ot;for(;++ce<=X;){const Ze=z[ce];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ee++:Ee--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Je&&!Ot&&!Ee&&!Ut&&(Ut=ce),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ee&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ee===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Je){let Ct=ce;for(lt=void 0;Ct--;){const tt=z[Ct];if(tt[1].type==="lineEnding"||tt[1].type==="lineEndingBlank"){if(tt[0]==="exit")continue;lt&&(z[lt][1].type="lineEndingBlank",Oe=!0),tt[1].type="lineEnding",lt=Ct}else if(!(tt[1].type==="linePrefix"||tt[1].type==="blockQuotePrefix"||tt[1].type==="blockQuotePrefixWhitespace"||tt[1].type==="blockQuoteMarker"||tt[1].type==="listItemIndent"))break}Ut&&(!lt||Ut<lt)&&(Je._spread=!0),Je.end=Object.assign({},lt?z[lt][1].start:Ze[1].end),z.splice(lt||ce,0,["exit",Je,Ze[2]]),ce++,X++}if(Ze[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Je=Ct,z.splice(ce,0,["enter",Ct,Ze[2]]),ce++,X++,Ut=void 0,Ot=!0}}}return z[A][1]._spread=Oe,X}function a(z,A){return X;function X(ce){s.call(this,z(ce),ce),A&&A.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(z,A,X){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([A,X]),z.position={start:Xr(A.start),end:void 0}}function u(z){return A;function A(X){z&&z.call(this,X),l.call(this,X)}}function l(z,A){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==z.type&&(A?A.call(this,z,ce[0]):(ce[1]||nb).call(this,z,ce[0]));else throw new Error("Cannot close `"+z.type+"` ("+Po({start:z.start,end:z.end})+"): it’s not open");X.position.end=Xr(z.end)}function c(){return Lf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function d(){const z=this.resume(),A=this.stack[this.stack.length-1];A.lang=z}function m(){const z=this.resume(),A=this.stack[this.stack.length-1];A.meta=z}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/(\r?\n|\r)$/g,"")}function g(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qn(this.sliceSerialize(z)).toLowerCase()}function b(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function k(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function S(z){const A=this.stack[this.stack.length-1];if(!A.depth){const X=this.sliceSerialize(z).length;A.depth=X}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function D(z){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:Xr(z.start),end:void 0},X.push(ce)),this.stack.push(ce)}function T(z){const A=this.stack.pop();A.value+=this.sliceSerialize(z),A.position.end=Xr(z.end)}function P(z){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=A.children[A.children.length-1];X.position.end=Xr(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(D.call(this,z),T.call(this,z))}function q(){this.data.atHardBreak=!0}function $(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function F(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function M(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function B(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(z){const A=this.sliceSerialize(z),X=this.stack[this.stack.length-2];X.label=UP(A),X.identifier=qn(A).toLowerCase()}function N(){const z=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=z.children;X.children=ce}else X.alt=A}function x(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function V(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Y(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function oe(z){this.data.characterReferenceType=z.type}function ne(z){const A=this.sliceSerialize(z),X=this.data.characterReferenceType;let ce;X?(ce=jg(A,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Ff(A);const Ee=this.stack[this.stack.length-1];Ee.value+=ce}function le(z){const A=this.stack.pop();A.position.end=Xr(z.end)}function pe(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(z)}function he(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(z)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function $e(){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(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function we(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function We(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Fe(){return{type:"thematicBreak"}}}function Xr(e){return{line:e.line,column:e.column,offset:e.offset}}function tb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tb(e,r):WP(e,r)}}function WP(e,t){let n;for(n in t)if(eb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function nb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Po({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is still open")}function HP(e){const t=this;t.parser=n;function n(r){return VP(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function KP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
- `}]}function GP(e,t){const n=t.value?t.value+`
35
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function YP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=la(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function QP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),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+=r:i.push({type:"text",value:r}),i}function tA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rb(e,t);const i={src:la(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function nA(e,t){const n={src:la(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rb(e,t);const i={href:la(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function aA(e,t){const n={href:la(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oA(e,t,n){const r=e.all(t),i=n?sA(n):ib(t),a={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
33
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const LP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:BR},disable:{null:[]},document:{42:hn,43:hn,45:hn,48:hn,49:hn,50:hn,51:hn,52:hn,53:hn,54:hn,55:hn,56:hn,57:hn,62:Bg},flow:{35:HR,42:Ol,45:[Yg,Ol],60:YR,61:Yg,95:Ol,96:qg,126:qg},flowInitial:{[-2]:zf,[-1]:zf,32:zf},insideSpan:{null:[Uf,RP]},string:{38:zg,92:Ug},text:{[-5]:qf,[-4]:qf,[-3]:qf,33:hP,38:zg,42:Uf,60:[vR,rP],91:vP,92:[qR,Ug],93:Vf,95:Uf,96:$R}},Symbol.toStringTag,{value:"Module"}));function FP(e){const n=Mg([LP,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(uR),document:i(fR),flow:i($P),string:i(PP),text:i(AP)};return r;function i(a){return o;function o(s){return DP(r,a,s)}}}function BP(e){for(;!Wg(e););return e}const Qg=/[\0\t\n\r]/g;function UP(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,p,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Qg.lastIndex=f,l=Qg.exec(a),p=l&&l.index!==void 0?l.index:a.length,d=a.charCodeAt(p),!l){t=a.slice(f);break}if(d===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),d){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:r=!0,e=1}f=p+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const zP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VP(e){return e.replace(zP,qP)}function qP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return jg(n.slice(a?2:1),a?16:10)}return Ff(n)||e}const eb={}.hasOwnProperty;function WP(e,t,n){return typeof t!="string"&&(n=t,t=void 0),HP(n)(BP(FP(n).document().write(UP()(e,t,!0))))}function HP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:D,autolinkEmail:D,atxHeading:a($e),blockQuote:a(ue),characterEscape:D,characterReference:D,codeFenced:a(Q),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Q,o),codeText:a(Z,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(J,o),htmlFlowData:D,htmlText:a(J,o),htmlTextData:D,image:a(ae),label:o,link:a(ee),listItem:a(we),listItemValue:p,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Pe),reference:_,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a($e),strong:a(We),thematicBreak:a(Fe)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ne,characterReference:le,codeFenced:u(y),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:u(v),codeText:u(M),codeTextData:T,data:T,definition:u(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u($),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(W),label:N,labelText:U,lineEnding:P,link:u(B),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Y,resourceDestinationString:x,resourceTitleString:V,resource:K,setextHeading:u(L),setextHeadingLineSequence:O,setextHeadingText:E,strong:u(),thematicBreak:u()}};tb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let A={type:"root",children:[]};const X={stack:[A],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},ce=[];let Ee=-1;for(;++Ee<z.length;)if(z[Ee][1].type==="listOrdered"||z[Ee][1].type==="listUnordered")if(z[Ee][0]==="enter")ce.push(Ee);else{const Oe=ce.pop();Ee=i(z,Oe,Ee)}for(Ee=-1;++Ee<z.length;){const Oe=t[z[Ee][0]];eb.call(Oe,z[Ee][1].type)&&Oe[z[Ee][1].type].call(Object.assign({sliceSerialize:z[Ee][2].sliceSerialize},X),z[Ee][1])}if(X.tokenStack.length>0){const Oe=X.tokenStack[X.tokenStack.length-1];(Oe[1]||nb).call(X,void 0,Oe[0])}for(A.position={start:Xr(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Xr(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)A=t.transforms[Ee](A)||A;return A}function i(z,A,X){let ce=A-1,Ee=-1,Oe=!1,Je,lt,Ut,Ot;for(;++ce<=X;){const Ze=z[ce];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ee++:Ee--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Je&&!Ot&&!Ee&&!Ut&&(Ut=ce),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Ee&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ee===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Je){let Ct=ce;for(lt=void 0;Ct--;){const tt=z[Ct];if(tt[1].type==="lineEnding"||tt[1].type==="lineEndingBlank"){if(tt[0]==="exit")continue;lt&&(z[lt][1].type="lineEndingBlank",Oe=!0),tt[1].type="lineEnding",lt=Ct}else if(!(tt[1].type==="linePrefix"||tt[1].type==="blockQuotePrefix"||tt[1].type==="blockQuotePrefixWhitespace"||tt[1].type==="blockQuoteMarker"||tt[1].type==="listItemIndent"))break}Ut&&(!lt||Ut<lt)&&(Je._spread=!0),Je.end=Object.assign({},lt?z[lt][1].start:Ze[1].end),z.splice(lt||ce,0,["exit",Je,Ze[2]]),ce++,X++}if(Ze[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Je=Ct,z.splice(ce,0,["enter",Ct,Ze[2]]),ce++,X++,Ut=void 0,Ot=!0}}}return z[A][1]._spread=Oe,X}function a(z,A){return X;function X(ce){s.call(this,z(ce),ce),A&&A.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(z,A,X){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([A,X]),z.position={start:Xr(A.start),end:void 0}}function u(z){return A;function A(X){z&&z.call(this,X),l.call(this,X)}}function l(z,A){const X=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==z.type&&(A?A.call(this,z,ce[0]):(ce[1]||nb).call(this,z,ce[0]));else throw new Error("Cannot close `"+z.type+"` ("+Po({start:z.start,end:z.end})+"): it’s not open");X.position.end=Xr(z.end)}function c(){return Lf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function d(){const z=this.resume(),A=this.stack[this.stack.length-1];A.lang=z}function m(){const z=this.resume(),A=this.stack[this.stack.length-1];A.meta=z}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z.replace(/(\r?\n|\r)$/g,"")}function g(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qn(this.sliceSerialize(z)).toLowerCase()}function b(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function k(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function S(z){const A=this.stack[this.stack.length-1];if(!A.depth){const X=this.sliceSerialize(z).length;A.depth=X}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function D(z){const X=this.stack[this.stack.length-1].children;let ce=X[X.length-1];(!ce||ce.type!=="text")&&(ce=Ae(),ce.position={start:Xr(z.start),end:void 0},X.push(ce)),this.stack.push(ce)}function T(z){const A=this.stack.pop();A.value+=this.sliceSerialize(z),A.position.end=Xr(z.end)}function P(z){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=A.children[A.children.length-1];X.position.end=Xr(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(D.call(this,z),T.call(this,z))}function q(){this.data.atHardBreak=!0}function $(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function F(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function M(){const z=this.resume(),A=this.stack[this.stack.length-1];A.value=z}function B(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=A,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(z){const A=this.sliceSerialize(z),X=this.stack[this.stack.length-2];X.label=VP(A),X.identifier=qn(A).toLowerCase()}function N(){const z=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=z.children;X.children=ce}else X.alt=A}function x(){const z=this.resume(),A=this.stack[this.stack.length-1];A.url=z}function V(){const z=this.resume(),A=this.stack[this.stack.length-1];A.title=z}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Y(z){const A=this.resume(),X=this.stack[this.stack.length-1];X.label=A,X.identifier=qn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function oe(z){this.data.characterReferenceType=z.type}function ne(z){const A=this.sliceSerialize(z),X=this.data.characterReferenceType;let ce;X?(ce=jg(A,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Ff(A);const Ee=this.stack[this.stack.length-1];Ee.value+=ce}function le(z){const A=this.stack.pop();A.position.end=Xr(z.end)}function pe(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(z)}function he(z){T.call(this,z);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(z)}function ue(){return{type:"blockquote",children:[]}}function Q(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function $e(){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(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function we(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function We(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Fe(){return{type:"thematicBreak"}}}function Xr(e){return{line:e.line,column:e.column,offset:e.offset}}function tb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tb(e,r):ZP(e,r)}}function ZP(e,t){let n;for(n in t)if(eb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function nb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Po({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is still open")}function KP(e){const t=this;t.parser=n;function n(r){return WP(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function GP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
+ `}]}function JP(e,t){const n=t.value?t.value+`
35
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function XP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=la(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function tA(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),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+=r:i.push({type:"text",value:r}),i}function rA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rb(e,t);const i={src:la(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function iA(e,t){const n={src:la(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function aA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function oA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rb(e,t);const i={href:la(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function sA(e,t){const n={href:la(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lA(e,t,n){const r=e.all(t),i=n?uA(n):ib(t),a={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
36
36
  `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
37
- `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function sA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ib(n[r])}return t}function ib(e){const t=e.spread;return t??e.children.length>1}function lA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function uA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dA(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Pf(t.children[1]),u=Eg(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),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 pA(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],p={},d=o?o[u]:void 0;d&&(p.align=d);let m={type:"element",tagName:a,properties:p,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function hA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ab=9,ob=32;function mA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(sb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(sb(t.slice(i),i>0,!1)),a.join("")}function sb(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ab||a===ob;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ab||a===ob;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function vA(e,t){const n={type:"text",value:mA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const gA={blockquote:ZP,break:KP,code:GP,delete:YP,emphasis:JP,footnoteReference:XP,heading:QP,html:eA,imageReference:tA,image:nA,inlineCode:rA,linkReference:iA,link:aA,listItem:oA,list:lA,paragraph:uA,root:cA,strong:fA,table:dA,tableCell:hA,tableRow:pA,text:vA,thematicBreak:yA,toml:Cl,yaml:Cl,definition:Cl,footnoteDefinition:Cl};function Cl(){}const lb=-1,$l=0,Il=1,Rl=2,Wf=3,Hf=4,Zf=5,Kf=6,ub=7,cb=8,fb=typeof self=="object"?self:globalThis,bA=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case $l:case lb:return n(o,i);case Il:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Rl:{const s=n({},i);for(const[u,l]of o)s[r(u)]=r(l);return s}case Wf:return n(new Date(o),i);case Hf:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case Zf:{const s=n(new Map,i);for(const[u,l]of o)s.set(r(u),r(l));return s}case Kf:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case ub:{const{name:s,message:u}=o;return n(new fb[s](u),i)}case cb:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new fb[a](o),i)};return r},db=e=>bA(new Map,e)(0),ua="",{toString:xA}={},{keys:wA}=Object,jo=e=>{const t=typeof e;if(t!=="object"||!e)return[$l,t];const n=xA.call(e).slice(8,-1);switch(n){case"Array":return[Il,ua];case"Object":return[Rl,ua];case"Date":return[Wf,ua];case"RegExp":return[Hf,ua];case"Map":return[Zf,ua];case"Set":return[Kf,ua]}return n.includes("Array")?[Il,n]:n.includes("Error")?[ub,n]:[Rl,n]},Pl=([e,t])=>e===$l&&(t==="function"||t==="symbol"),SA=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},a=o=>{if(n.has(o))return n.get(o);let[s,u]=jo(o);switch(s){case $l:{let c=o;switch(u){case"bigint":s=cb,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([lb],o)}return i([s,c],o)}case Il:{if(u)return i([u,[...o]],o);const c=[],f=i([s,c],o);for(const p of o)c.push(a(p));return f}case Rl:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const p of wA(o))(e||!Pl(jo(o[p])))&&c.push([a(p),a(o[p])]);return f}case Wf:return i([s,o.toISOString()],o);case Hf:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case Zf:{const c=[],f=i([s,c],o);for(const[p,d]of o)(e||!(Pl(jo(p))||Pl(jo(d))))&&c.push([a(p),a(d)]);return f}case Kf:{const c=[],f=i([s,c],o);for(const p of o)(e||!Pl(jo(p)))&&c.push(a(p));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},pb=(e,{json:t,lossy:n}={})=>{const r=[];return SA(!(t||n),!!t,new Map,r)(e),r},Al=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?db(pb(e,t)):structuredClone(e):(e,t)=>db(pb(e,t));function _A(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function EA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_A,r=e.options.footnoteBackLabel||EA,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),p=la(f.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,d);typeof g=="string"&&(g={type:"text",value:g}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,d),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Al(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
37
+ `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function uA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ib(n[r])}return t}function ib(e){const t=e.spread;return t??e.children.length>1}function cA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function fA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hA(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Pf(t.children[1]),u=Eg(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),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 mA(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],p={},d=o?o[u]:void 0;d&&(p.align=d);let m={type:"element",tagName:a,properties:p,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function vA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ab=9,ob=32;function yA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(sb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(sb(t.slice(i),i>0,!1)),a.join("")}function sb(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ab||a===ob;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ab||a===ob;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gA(e,t){const n={type:"text",value:yA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function bA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xA={blockquote:GP,break:YP,code:JP,delete:XP,emphasis:QP,footnoteReference:eA,heading:tA,html:nA,imageReference:rA,image:iA,inlineCode:aA,linkReference:oA,link:sA,listItem:lA,list:cA,paragraph:fA,root:dA,strong:pA,table:hA,tableCell:vA,tableRow:mA,text:gA,thematicBreak:bA,toml:Cl,yaml:Cl,definition:Cl,footnoteDefinition:Cl};function Cl(){}const lb=-1,$l=0,Il=1,Rl=2,Wf=3,Hf=4,Zf=5,Kf=6,ub=7,cb=8,fb=typeof self=="object"?self:globalThis,wA=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case $l:case lb:return n(o,i);case Il:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Rl:{const s=n({},i);for(const[u,l]of o)s[r(u)]=r(l);return s}case Wf:return n(new Date(o),i);case Hf:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case Zf:{const s=n(new Map,i);for(const[u,l]of o)s.set(r(u),r(l));return s}case Kf:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case ub:{const{name:s,message:u}=o;return n(new fb[s](u),i)}case cb:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new fb[a](o),i)};return r},db=e=>wA(new Map,e)(0),ua="",{toString:SA}={},{keys:_A}=Object,jo=e=>{const t=typeof e;if(t!=="object"||!e)return[$l,t];const n=SA.call(e).slice(8,-1);switch(n){case"Array":return[Il,ua];case"Object":return[Rl,ua];case"Date":return[Wf,ua];case"RegExp":return[Hf,ua];case"Map":return[Zf,ua];case"Set":return[Kf,ua]}return n.includes("Array")?[Il,n]:n.includes("Error")?[ub,n]:[Rl,n]},Pl=([e,t])=>e===$l&&(t==="function"||t==="symbol"),EA=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},a=o=>{if(n.has(o))return n.get(o);let[s,u]=jo(o);switch(s){case $l:{let c=o;switch(u){case"bigint":s=cb,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([lb],o)}return i([s,c],o)}case Il:{if(u)return i([u,[...o]],o);const c=[],f=i([s,c],o);for(const p of o)c.push(a(p));return f}case Rl:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const p of _A(o))(e||!Pl(jo(o[p])))&&c.push([a(p),a(o[p])]);return f}case Wf:return i([s,o.toISOString()],o);case Hf:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case Zf:{const c=[],f=i([s,c],o);for(const[p,d]of o)(e||!(Pl(jo(p))||Pl(jo(d))))&&c.push([a(p),a(d)]);return f}case Kf:{const c=[],f=i([s,c],o);for(const p of o)(e||!Pl(jo(p)))&&c.push(a(p));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},pb=(e,{json:t,lossy:n}={})=>{const r=[];return EA(!(t||n),!!t,new Map,r)(e),r},Al=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?db(pb(e,t)):structuredClone(e):(e,t)=>db(pb(e,t));function kA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function TA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function OA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kA,r=e.options.footnoteBackLabel||TA,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),p=la(f.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,d);typeof g=="string"&&(g={type:"text",value:g}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,d),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Al(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 Nl=function(e){if(e==null)return $A;if(typeof e=="function")return Dl(e);if(typeof e=="object")return Array.isArray(e)?TA(e):OA(e);if(typeof e=="string")return CA(e);throw new Error("Expected function, string, or object as test")};function TA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nl(e[n]);return Dl(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function OA(e){const t=e;return Dl(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function CA(e){return Dl(t);function t(n){return n&&n.type===e}}function Dl(e){return t;function t(n,r,i){return!!(IA(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $A(){return!0}function IA(e){return e!==null&&typeof e=="object"&&"type"in e}function hse(e){return e}const hb=[],RA=!0,Gf=!1,PA="skip";function mb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Nl(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=hb,m,h,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(d=AA(n(u,c)),d[0]===Gf))return d;if("children"in u&&u.children){const v=u;if(v.children&&d[0]!==PA)for(h=(r?v.children.length:-1)+o,y=c.concat(v);h>-1&&h<v.children.length;){const g=v.children[h];if(m=s(g,h,y)(),m[0]===Gf)return m;h=typeof m[1]=="number"?m[1]:h+o}}return d}}}function AA(e){return Array.isArray(e)?e:typeof e=="number"?[RA,e]:e==null?hb:[e]}function Yf(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),mb(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const Jf={}.hasOwnProperty,NA={};function DA(e,t){const n=t||NA,r=new Map,i=new Map,a=new Map,o={...gA,...n.handlers},s={all:l,applyData:jA,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:n,patch:MA,wrap:FA};return Yf(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function u(c,f){const p=c.type,d=s.handlers[p];if(Jf.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...y}=c,v=Al(y);return v.children=s.all(c),v}return Al(c)}return(s.options.unknownHandler||LA)(s,c,f)}function l(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],c);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vb(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=vb(h.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function MA(e,t){e.position&&(t.position=RI(e))}function jA(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Al(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function LA(e,t){const n=t.data||{},r="value"in t&&!(Jf.call(n,"hProperties")||Jf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
39
+ `}]}}const Nl=function(e){if(e==null)return RA;if(typeof e=="function")return Dl(e);if(typeof e=="object")return Array.isArray(e)?CA(e):$A(e);if(typeof e=="string")return IA(e);throw new Error("Expected function, string, or object as test")};function CA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nl(e[n]);return Dl(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function $A(e){const t=e;return Dl(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function IA(e){return Dl(t);function t(n){return n&&n.type===e}}function Dl(e){return t;function t(n,r,i){return!!(PA(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function RA(){return!0}function PA(e){return e!==null&&typeof e=="object"&&"type"in e}function wse(e){return e}const hb=[],AA=!0,Gf=!1,NA="skip";function mb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Nl(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=hb,m,h,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(d=DA(n(u,c)),d[0]===Gf))return d;if("children"in u&&u.children){const v=u;if(v.children&&d[0]!==NA)for(h=(r?v.children.length:-1)+o,y=c.concat(v);h>-1&&h<v.children.length;){const g=v.children[h];if(m=s(g,h,y)(),m[0]===Gf)return m;h=typeof m[1]=="number"?m[1]:h+o}}return d}}}function DA(e){return Array.isArray(e)?e:typeof e=="number"?[AA,e]:e==null?hb:[e]}function Yf(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),mb(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const Jf={}.hasOwnProperty,MA={};function jA(e,t){const n=t||MA,r=new Map,i=new Map,a=new Map,o={...xA,...n.handlers},s={all:l,applyData:FA,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:n,patch:LA,wrap:UA};return Yf(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function u(c,f){const p=c.type,d=s.handlers[p];if(Jf.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...y}=c,v=Al(y);return v.children=s.all(c),v}return Al(c)}return(s.options.unknownHandler||BA)(s,c,f)}function l(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],c);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vb(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=vb(h.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function LA(e,t){e.position&&(t.position=AI(e))}function FA(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Al(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function BA(e,t){const n=t.data||{},r="value"in t&&!(Jf.call(n,"hProperties")||Jf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
40
40
  `});++r<e.length;)r&&n.push({type:"text",value:`
41
41
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
42
- `}),n}function vb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yb(e,t){const n=DA(e,t),r=n.one(e,void 0),i=kA(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
43
- `},i),a}function BA(e,t){return e&&"run"in e?async function(n,r){const i=yb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yb(n,{file:r,...e||t})}}function gb(e){if(e)throw e}var Ml=Object.prototype.hasOwnProperty,bb=Object.prototype.toString,xb=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,Sb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):bb.call(t)==="[object Array]"},_b=function(t){if(!t||bb.call(t)!=="[object Object]")return!1;var n=Ml.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ml.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ml.call(t,i)},Eb=function(t,n){xb&&n.name==="__proto__"?xb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},kb=function(t,n){if(n==="__proto__")if(Ml.call(t,n)){if(wb)return wb(t,n).value}else return;return t[n]},UA=function e(){var t,n,r,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(n in t)r=kb(s,n),i=kb(t,n),s!==i&&(c&&i&&(_b(i)||(a=Sb(i)))?(a?(a=!1,o=r&&Sb(r)?r:[]):o=r&&_b(r)?r:{},Eb(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Eb(s,{name:n,newValue:i}));return s};const Xf=Ke(UA);function Qf(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 zA(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(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?VA(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function VA(e,t){let n;return r;function r(...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&&n)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){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const sr={basename:qA,dirname:WA,extname:HA,join:ZA,sep:"/"};function qA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function WA(e){if(Lo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function HA(e){Lo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ZA(...e){let t=-1,n;for(;++t<e.length;)Lo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":KA(n)}function KA(e){Lo(e);const t=e.codePointAt(0)===47;let n=GA(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function GA(e,t){let n="",r=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(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const YA={cwd:JA};function JA(){return"/"}function ed(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function XA(e){if(typeof e=="string")e=new URL(e);else if(!ed(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 QA(e)}function QA(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const td=["history","path","basename","stem","extname","dirname"];class Tb{constructor(t){let n;t?ed(t)?n={path:t}:typeof t=="string"||eN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":YA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<td.length;){const a=td[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)td.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){rd(t,"basename"),nd(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){Ob(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(nd(t,"extname"),Ob(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=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ed(t)&&(t=XA(t)),rd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){rd(t,"stem"),nd(t,"stem"),this.path=sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Qt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function nd(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function rd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ob(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function eN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tN=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},nN={}.hasOwnProperty;class id extends tN{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=zA()}copy(){const t=new id;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sd("data",this.frozen),this.namespace[t]=n,this):nN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=jl(t),r=this.parser||this.Parser;return ad("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ad("process",this.parser||this.Parser),od("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=jl(t),u=r.parse(s);r.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);const d=f,m=r.stringify(d,p);aN(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ad("processSync",this.parser||this.Parser),od("processSync",this.compiler||this.Compiler),this.process(t,i),$b("processSync","process",n),r;function i(a,o){n=!0,gb(a),r=o}}run(t,n,r){Cb(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=jl(n);i.run(t,u,l);function l(c,f,p){const d=f||t;c?s(c):o?o(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),$b("runSync","run",r),i;function a(o,s){gb(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=jl(n),i=this.compiler||this.Compiler;return od("stringify",i),Cb(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(sd("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")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=Xf(!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,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[d,...m]=c;const h=r[p][1];Qf(h)&&Qf(d)&&(d=Xf(!0,h,d)),r[p]=[l,d,...m]}}}}const rN=new id().freeze();function ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function od(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sd(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 Cb(e){if(!Qf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $b(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jl(e){return iN(e)?e:new Tb(e)}function iN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aN(e){return typeof e=="string"||oN(e)}function oN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ib=[],Rb={allowDangerousHtml:!0},lN=/^(https?|ircs?|mailto|xmpp)$/i,uN=[{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 cN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Ib,u=e.remarkPlugins||Ib,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rb}:Rb,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||fN,d=rN().use(HP).use(u).use(BA,l).use(s),m=new Tb;typeof r=="string"&&(m.value=r);for(const g of uN)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+sN+g.id,void 0);const h=d.parse(m);let y=d.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Yf(y,v),jI(y,{Fragment:I.Fragment,components:a,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return c?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in jf)if(Object.hasOwn(jf,S)&&Object.hasOwn(g.properties,S)){const E=g.properties[S],O=jf[S];(O===null||O.includes(g.tagName))&&(g.properties[S]=p(String(E||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function fN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||lN.test(e.slice(0,t))?e:""}function dN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Pb(e,t,n){const i=Nl((n||{}).ignore||[]),a=pN(t);let o=-1;for(;++o<a.length;)mb(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){const d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){const f=c[c.length-1],p=a[o][0],d=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,g=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let E=d(...b,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=k+1:(m!==k&&g.push({type:"text",value:l.value.slice(m,k)}),Array.isArray(E)?g.push(...E):E&&g.push(E),m=k+b[0].length,v=!0),!p.global)break;b=p.exec(l.value)}return v?(m<l.value.length&&g.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...g)):g=[l],y+g.length}}function pN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([hN(i[0]),mN(i[1])])}return t}function hN(e){return typeof e=="string"?new RegExp(dN(e),"g"):e}function mN(e){return typeof e=="function"?e:function(){return e}}function vN(e){Pb(e,[/\r?\n|\r/g,yN])}function yN(){return{type:"break"}}function gN(){return function(e){vN(e)}}function Ab(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const ld="phrasing",ud=["autolink","link","image","label"];function bN(){return{transforms:[TN],enter:{literalAutolink:wN,literalAutolinkEmail:cd,literalAutolinkHttp:cd,literalAutolinkWww:cd},exit:{literalAutolink:kN,literalAutolinkEmail:EN,literalAutolinkHttp:SN,literalAutolinkWww:_N}}}function xN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ld,notInConstruct:ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ld,notInConstruct:ud},{character:":",before:"[ps]",after:"\\/",inConstruct:ld,notInConstruct:ud}]}}function wN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cd(e){this.config.enter.autolinkProtocol.call(this,e)}function SN(e){this.config.exit.autolinkProtocol.call(this,e)}function _N(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 EN(e){this.config.exit.autolinkEmail.call(this,e)}function kN(e){this.exit(e)}function TN(e){Pb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ON],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CN]],{ignore:["link","linkReference"]})}function ON(e,t,n,r,i){let a="";if(!Nb(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!$N(n)))return!1;const o=IN(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function CN(e,t,n,r){return!Nb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function $N(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 IN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ab(e,"(");let a=Ab(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Nb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pi(n)||El(n))&&(!t||n!==47)}Db.peek=UN;function RN(){return{enter:{gfmFootnoteDefinition:AN,gfmFootnoteDefinitionLabelString:NN,gfmFootnoteCall:jN,gfmFootnoteCallString:LN},exit:{gfmFootnoteDefinition:MN,gfmFootnoteDefinitionLabelString:DN,gfmFootnoteCall:BN,gfmFootnoteCallString:FN}}}function PN(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:zN,footnoteReference:Db}}}function AN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function NN(){this.buffer()}function DN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function MN(e){this.exit(e)}function jN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function LN(){this.buffer()}function FN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function BN(e){this.exit(e)}function Db(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function UN(){return"["}function zN(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),VN)),o(),a}function VN(e,t,n){return t===0?e:(n?"":" ")+e}const qN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mb.peek=GN;function WN(){return{canContainEols:["delete"],enter:{strikethrough:ZN},exit:{strikethrough:KN}}}function HN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:qN}],handlers:{delete:Mb}}}function ZN(e){this.enter({type:"delete",children:[]},e)}function KN(e){this.exit(e)}function Mb(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function GN(){return"~"}function YN(e){return e.length}function JN(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||YN,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const h=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=XN(e[c][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(u[v]===void 0||b>u[v])&&(u[v]=b)}h.push(g)}o[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=jb(r[f]);else{const h=jb(r);for(;++f<l;)a[f]=h}f=-1;const p=[],d=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>u[f]&&(u[f]=g),d[f]=g),p[f]=b}o.splice(1,0,p),s.splice(1,0,d),c=-1;const m=[];for(;++c<o.length;){const h=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const g=h[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=u[f]-(y[f]||0),E=a[f];E===114?b=" ".repeat(S):E===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
44
- `)}function XN(e){return e==null?"":String(e)}function jb(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 QN(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),eD);return i(),o}function eD(e,t,n){return">"+(n?"":" ")+e}function tD(e,t){return Lb(e,t.inConstruct,!0)&&!Lb(e,t.notInConstruct,!1)}function Lb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Fb(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
- `&&tD(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
- `}function nD(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rD(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 iD(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 aD(e,t,n,r){const i=iD(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(rD(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,oD);return f(),p}const s=n.createTracker(r),u=i.repeat(Math.max(nD(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
42
+ `}),n}function vb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yb(e,t){const n=jA(e,t),r=n.one(e,void 0),i=OA(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
43
+ `},i),a}function zA(e,t){return e&&"run"in e?async function(n,r){const i=yb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yb(n,{file:r,...e||t})}}function gb(e){if(e)throw e}var Ml=Object.prototype.hasOwnProperty,bb=Object.prototype.toString,xb=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,Sb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):bb.call(t)==="[object Array]"},_b=function(t){if(!t||bb.call(t)!=="[object Object]")return!1;var n=Ml.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ml.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ml.call(t,i)},Eb=function(t,n){xb&&n.name==="__proto__"?xb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},kb=function(t,n){if(n==="__proto__")if(Ml.call(t,n)){if(wb)return wb(t,n).value}else return;return t[n]},VA=function e(){var t,n,r,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(n in t)r=kb(s,n),i=kb(t,n),s!==i&&(c&&i&&(_b(i)||(a=Sb(i)))?(a?(a=!1,o=r&&Sb(r)?r:[]):o=r&&_b(r)?r:{},Eb(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Eb(s,{name:n,newValue:i}));return s};const Xf=Ke(VA);function Qf(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 qA(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(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?WA(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function WA(e,t){let n;return r;function r(...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&&n)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){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const sr={basename:HA,dirname:ZA,extname:KA,join:GA,sep:"/"};function HA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ZA(e){if(Lo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function KA(e){Lo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function GA(...e){let t=-1,n;for(;++t<e.length;)Lo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":YA(n)}function YA(e){Lo(e);const t=e.codePointAt(0)===47;let n=JA(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function JA(e,t){let n="",r=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(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XA={cwd:QA};function QA(){return"/"}function ed(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eN(e){if(typeof e=="string")e=new URL(e);else if(!ed(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 tN(e)}function tN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const td=["history","path","basename","stem","extname","dirname"];class Tb{constructor(t){let n;t?ed(t)?n={path:t}:typeof t=="string"||nN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":XA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<td.length;){const a=td[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)td.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){rd(t,"basename"),nd(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){Ob(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(nd(t,"extname"),Ob(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=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ed(t)&&(t=eN(t)),rd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){rd(t,"stem"),nd(t,"stem"),this.path=sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Qt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function nd(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function rd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ob(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rN=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},iN={}.hasOwnProperty;class id extends rN{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=qA()}copy(){const t=new id;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sd("data",this.frozen),this.namespace[t]=n,this):iN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=jl(t),r=this.parser||this.Parser;return ad("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ad("process",this.parser||this.Parser),od("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=jl(t),u=r.parse(s);r.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);const d=f,m=r.stringify(d,p);sN(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ad("processSync",this.parser||this.Parser),od("processSync",this.compiler||this.Compiler),this.process(t,i),$b("processSync","process",n),r;function i(a,o){n=!0,gb(a),r=o}}run(t,n,r){Cb(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=jl(n);i.run(t,u,l);function l(c,f,p){const d=f||t;c?s(c):o?o(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),$b("runSync","run",r),i;function a(o,s){gb(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=jl(n),i=this.compiler||this.Compiler;return od("stringify",i),Cb(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(sd("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")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=Xf(!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,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[d,...m]=c;const h=r[p][1];Qf(h)&&Qf(d)&&(d=Xf(!0,h,d)),r[p]=[l,d,...m]}}}}const aN=new id().freeze();function ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function od(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sd(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 Cb(e){if(!Qf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $b(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jl(e){return oN(e)?e:new Tb(e)}function oN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sN(e){return typeof e=="string"||lN(e)}function lN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ib=[],Rb={allowDangerousHtml:!0},cN=/^(https?|ircs?|mailto|xmpp)$/i,fN=[{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 dN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Ib,u=e.remarkPlugins||Ib,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rb}:Rb,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||pN,d=aN().use(KP).use(u).use(zA,l).use(s),m=new Tb;typeof r=="string"&&(m.value=r);for(const g of fN)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+uN+g.id,void 0);const h=d.parse(m);let y=d.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Yf(y,v),FI(y,{Fragment:I.Fragment,components:a,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return c?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in jf)if(Object.hasOwn(jf,S)&&Object.hasOwn(g.properties,S)){const E=g.properties[S],O=jf[S];(O===null||O.includes(g.tagName))&&(g.properties[S]=p(String(E||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function pN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||cN.test(e.slice(0,t))?e:""}function hN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Pb(e,t,n){const i=Nl((n||{}).ignore||[]),a=mN(t);let o=-1;for(;++o<a.length;)mb(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){const d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){const f=c[c.length-1],p=a[o][0],d=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,g=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...c,l]};let E=d(...b,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=k+1:(m!==k&&g.push({type:"text",value:l.value.slice(m,k)}),Array.isArray(E)?g.push(...E):E&&g.push(E),m=k+b[0].length,v=!0),!p.global)break;b=p.exec(l.value)}return v?(m<l.value.length&&g.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...g)):g=[l],y+g.length}}function mN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([vN(i[0]),yN(i[1])])}return t}function vN(e){return typeof e=="string"?new RegExp(hN(e),"g"):e}function yN(e){return typeof e=="function"?e:function(){return e}}function gN(e){Pb(e,[/\r?\n|\r/g,bN])}function bN(){return{type:"break"}}function xN(){return function(e){gN(e)}}function Ab(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const ld="phrasing",ud=["autolink","link","image","label"];function wN(){return{transforms:[CN],enter:{literalAutolink:_N,literalAutolinkEmail:cd,literalAutolinkHttp:cd,literalAutolinkWww:cd},exit:{literalAutolink:ON,literalAutolinkEmail:TN,literalAutolinkHttp:EN,literalAutolinkWww:kN}}}function SN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ld,notInConstruct:ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ld,notInConstruct:ud},{character:":",before:"[ps]",after:"\\/",inConstruct:ld,notInConstruct:ud}]}}function _N(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cd(e){this.config.enter.autolinkProtocol.call(this,e)}function EN(e){this.config.exit.autolinkProtocol.call(this,e)}function kN(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 TN(e){this.config.exit.autolinkEmail.call(this,e)}function ON(e){this.exit(e)}function CN(e){Pb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$N],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IN]],{ignore:["link","linkReference"]})}function $N(e,t,n,r,i){let a="";if(!Nb(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!RN(n)))return!1;const o=PN(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function IN(e,t,n,r){return!Nb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function RN(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 PN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ab(e,"(");let a=Ab(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Nb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pi(n)||El(n))&&(!t||n!==47)}Db.peek=VN;function AN(){return{enter:{gfmFootnoteDefinition:DN,gfmFootnoteDefinitionLabelString:MN,gfmFootnoteCall:FN,gfmFootnoteCallString:BN},exit:{gfmFootnoteDefinition:LN,gfmFootnoteDefinitionLabelString:jN,gfmFootnoteCall:zN,gfmFootnoteCallString:UN}}}function NN(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:qN,footnoteReference:Db}}}function DN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MN(){this.buffer()}function jN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function LN(e){this.exit(e)}function FN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function BN(){this.buffer()}function UN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=qn(this.sliceSerialize(e)).toLowerCase()}function zN(e){this.exit(e)}function Db(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function VN(){return"["}function qN(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),WN)),o(),a}function WN(e,t,n){return t===0?e:(n?"":" ")+e}const HN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mb.peek=JN;function ZN(){return{canContainEols:["delete"],enter:{strikethrough:GN},exit:{strikethrough:YN}}}function KN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HN}],handlers:{delete:Mb}}}function GN(e){this.enter({type:"delete",children:[]},e)}function YN(e){this.exit(e)}function Mb(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function JN(){return"~"}function XN(e){return e.length}function QN(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||XN,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const h=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const g=eD(e[c][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(u[v]===void 0||b>u[v])&&(u[v]=b)}h.push(g)}o[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=jb(r[f]);else{const h=jb(r);for(;++f<l;)a[f]=h}f=-1;const p=[],d=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>u[f]&&(u[f]=g),d[f]=g),p[f]=b}o.splice(1,0,p),s.splice(1,0,d),c=-1;const m=[];for(;++c<o.length;){const h=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const g=h[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=u[f]-(y[f]||0),E=a[f];E===114?b=" ".repeat(S):E===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
44
+ `)}function eD(e){return e==null?"":String(e)}function jb(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 tD(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),nD);return i(),o}function nD(e,t,n){return">"+(n?"":" ")+e}function rD(e,t){return Lb(e,t.inConstruct,!0)&&!Lb(e,t.notInConstruct,!1)}function Lb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Fb(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
+ `&&rD(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
+ `}function iD(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function aD(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 oD(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 sD(e,t,n,r){const i=oD(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(aD(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,lD);return f(),p}const s=n.createTracker(r),u=i.repeat(Math.max(iD(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
47
47
  `,encode:["`"],...s.current()})),f()}return c+=s.move(`
48
48
  `),a&&(c+=s.move(a+`
49
- `)),c+=s.move(u),l(),c}function oD(e,t,n){return(n?"":" ")+e}function fd(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 sD(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
50
- `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function lD(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Bb.peek=uD;function Bb(e,t,n,r){const i=lD(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function uD(e,t,n){return n.options.emphasis||"*"}function cD(e,t){let n=!1;return Yf(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Gf}),!!((!e.depth||e.depth<3)&&Lf(e)&&(t.options.setext||n))}function fD(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(cD(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
49
+ `)),c+=s.move(u),l(),c}function lD(e,t,n){return(n?"":" ")+e}function fd(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 uD(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
50
+ `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function cD(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Bb.peek=fD;function Bb(e,t,n,r){const i=cD(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function fD(e,t,n){return n.options.emphasis||"*"}function dD(e,t){let n=!1;return Yf(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Gf}),!!((!e.depth||e.depth<3)&&Lf(e)&&(t.options.setext||n))}function pD(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(dD(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
51
51
  `,after:`
52
52
  `});return f(),c(),p+`
53
53
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
54
54
  `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");a.move(o+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
55
- `,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}Ub.peek=dD;function Ub(e){return e.value||""}function dD(){return"<"}zb.peek=pD;function zb(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function pD(){return"!"}Vb.peek=hD;function Vb(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function hD(){return"!"}qb.peek=mD;function qb(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function mD(){return"`"}function Wb(e,t){const n=Lf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Hb.peek=vD;function Hb(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(Wb(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=c,f}s=n.enter("link"),u=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function vD(e,t,n){return Wb(e,n)?"<":"["}Zb.peek=yD;function Zb(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function yD(){return"["}function dd(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 gD(e){const t=dd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bD(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 Kb(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 xD(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?bD(n):dd(n);const s=e.ordered?o==="."?")":".":gD(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Kb(n)===o&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function wD(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 SD(e,t,n,r){const i=wD(n);let a=n.bulletCurrent||dd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.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=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(o))+f:(d?a:a+" ".repeat(o-a.length))+f}}function _D(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const ED=Nl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kD(e,t,n,r){return(e.children.some(function(o){return ED(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function TD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gb.peek=OD;function Gb(e,t,n,r){const i=TD(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function OD(e,t,n){return n.options.strong||"*"}function CD(e,t,n,r){return n.safe(e.value,r)}function $D(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 ID(e,t,n){const r=(Kb(n)+(n.options.ruleSpaces?" ":"")).repeat($D(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yb={blockquote:QN,break:Fb,code:aD,definition:sD,emphasis:Bb,hardBreak:Fb,heading:fD,html:Ub,image:zb,imageReference:Vb,inlineCode:qb,link:Hb,linkReference:Zb,list:xD,listItem:SD,paragraph:_D,root:kD,strong:Gb,text:CD,thematicBreak:ID};function RD(){return{enter:{table:PD,tableData:Jb,tableHeader:Jb,tableRow:ND},exit:{codeText:DD,table:AD,tableData:pd,tableHeader:pd,tableRow:pd}}}function PD(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function AD(e){this.exit(e),this.data.inTable=void 0}function ND(e){this.enter({type:"tableRow",children:[]},e)}function pd(e){this.exit(e)}function Jb(e){this.enter({type:"tableCell",children:[]},e)}function DD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,MD));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function MD(e,t){return t==="|"?t:e}function jD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
55
+ `,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}Ub.peek=hD;function Ub(e){return e.value||""}function hD(){return"<"}zb.peek=mD;function zb(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function mD(){return"!"}Vb.peek=vD;function Vb(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function vD(){return"!"}qb.peek=yD;function qb(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function yD(){return"`"}function Wb(e,t){const n=Lf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Hb.peek=gD;function Hb(e,t,n,r){const i=fd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(Wb(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=c,f}s=n.enter("link"),u=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function gD(e,t,n){return Wb(e,n)?"<":"["}Zb.peek=bD;function Zb(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function bD(){return"["}function dd(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 xD(e){const t=dd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wD(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 Kb(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 SD(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?wD(n):dd(n);const s=e.ordered?o==="."?")":".":xD(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Kb(n)===o&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function _D(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 ED(e,t,n,r){const i=_D(n);let a=n.bulletCurrent||dd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.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=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(o))+f:(d?a:a+" ".repeat(o-a.length))+f}}function kD(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const TD=Nl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OD(e,t,n,r){return(e.children.some(function(o){return TD(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function CD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gb.peek=$D;function Gb(e,t,n,r){const i=CD(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function $D(e,t,n){return n.options.strong||"*"}function ID(e,t,n,r){return n.safe(e.value,r)}function RD(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 PD(e,t,n){const r=(Kb(n)+(n.options.ruleSpaces?" ":"")).repeat(RD(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yb={blockquote:tD,break:Fb,code:sD,definition:uD,emphasis:Bb,hardBreak:Fb,heading:pD,html:Ub,image:zb,imageReference:Vb,inlineCode:qb,link:Hb,linkReference:Zb,list:SD,listItem:ED,paragraph:kD,root:OD,strong:Gb,text:ID,thematicBreak:PD};function AD(){return{enter:{table:ND,tableData:Jb,tableHeader:Jb,tableRow:MD},exit:{codeText:jD,table:DD,tableData:pd,tableHeader:pd,tableRow:pd}}}function ND(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function DD(e){this.exit(e),this.data.inTable=void 0}function MD(e){this.enter({type:"tableRow",children:[]},e)}function pd(e){this.exit(e)}function Jb(e){this.enter({type:"tableCell",children:[]},e)}function jD(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,LD));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function LD(e,t){return t==="|"?t:e}function FD(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
56
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:u,tableRow:s}};function o(d,m,h,y){return l(c(d,h,y),d.align)}function s(d,m,h,y){const v=f(d,h,y),g=l([v]);return g.slice(0,g.indexOf(`
57
- `))}function u(d,m,h,y){const v=h.enter("tableCell"),g=h.enter("phrasing"),b=h.containerPhrasing(d,{...y,before:a,after:a});return g(),v(),b}function l(d,m){return JN(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,h){const y=d.children;let v=-1;const g=[],b=m.enter("table");for(;++v<y.length;)g[v]=f(y[v],m,h);return b(),g}function f(d,m,h){const y=d.children;let v=-1;const g=[],b=m.enter("tableRow");for(;++v<y.length;)g[v]=u(y[v],d,m,h);return b(),g}function p(d,m,h){let y=Yb.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function LD(){return{exit:{taskListCheckValueChecked:Xb,taskListCheckValueUnchecked:Xb,paragraph:BD}}}function FD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UD}}}function Xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function UD(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=Yb.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function zD(){return[bN(),RN(),WN(),RD(),LD()]}function VD(e){return{extensions:[xN(),PN(),HN(),jD(e),FD()]}}const qD={tokenize:YD,partial:!0},Qb={tokenize:JD,partial:!0},ex={tokenize:XD,partial:!0},tx={tokenize:QD,partial:!0},WD={tokenize:eM,partial:!0},nx={name:"wwwAutolink",tokenize:KD,previous:ix},rx={name:"protocolAutolink",tokenize:GD,previous:ax},Pr={name:"emailAutolink",tokenize:ZD,previous:ox},lr={};function HD(){return{text:lr}}let Ai=48;for(;Ai<123;)lr[Ai]=Pr,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,rx],lr[104]=[Pr,rx],lr[87]=[Pr,nx],lr[119]=[Pr,nx];function ZD(e,t,n){const r=this;let i,a;return o;function o(f){return!hd(f)||!ox.call(r,r.previous)||md(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return hd(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(WD,c,l)(f):f===45||f===95||en(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&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function KD(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!ix.call(r,r.previous)||md(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(qD,e.attempt(Qb,e.attempt(ex,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function GD(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&ax.call(r,r.previous)&&!md(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ln(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||_l(f)||vt(f)||Pi(f)||El(f)?n(f):e.attempt(Qb,e.attempt(ex,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function YD(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function JD(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(tx,u,s)(l):l===null||vt(l)||Pi(l)||l!==45&&El(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function XD(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(tx,t,a)(o):o===null||vt(o)||Pi(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function QD(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||vt(s)||Pi(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||vt(s)||Pi(s)?t(s):r(s)}function a(s){return ln(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ln(s)?(e.consume(s),o):n(s)}}function eM(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return en(a)?n(a):t(a)}}function ix(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function ax(e){return!ln(e)}function ox(e){return!(e===47||hd(e))}function hd(e){return e===43||e===45||e===46||e===95||en(e)}function md(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const tM={tokenize:uM,partial:!0};function nM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oM,continuation:{tokenize:sM},exit:lM}},text:{91:{name:"gfmFootnoteCall",tokenize:aM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rM,resolveTo:iM}}}}function rM(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.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 n(u);const l=qn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function iM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function aM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||vt(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(qn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return vt(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 oM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!s||m===null||m===91||vt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=qn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vt(m)||(s=!0),o++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),Xe(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function sM(e,t,n){return e.check(No,t,e.attempt(tM,t,n))}function lM(e){e.exit("gfmFootnoteDefinition")}function uM(e,t,n){const r=this;return Xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function cM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let 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)},p=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pn(p,p.length,0,Tl(d,o.slice(l+1,u),s)),Pn(p,p.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Pn(o,l-1,u-l+3,p),u=l+p.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 p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(o.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=kl(l);if(m===126)return f>1?u(m):(o.consume(m),f++,d);if(f<2&&!n)return u(m);const y=o.exit("strikethroughSequenceTemporary"),v=kl(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class fM{constructor(){this.map=[]}add(t,n,r){dM(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function dM(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function pM(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function hM(){return{flow:{null:{name:"table",tokenize:mM,resolveAll:vM}}}}function mM(e,t,n){const r=this;let i=0,a=0,o;return s;function s(T){let P=r.events.length-1;for(;P>-1;){const F=r.events[P][1].type;if(F==="lineEnding"||F==="linePrefix")P--;else break}const q=P>-1?r.events[P][1].type:null,$=q==="tableHead"||q==="tableRow"?E:u;return $===E&&r.parser.lazy[r.now().line]?n(T):$(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(o=!0,a+=1),c(T)}function c(T){return T===null?n(T):Ie(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):He(T)?Xe(e,c,"whitespace")(T):(a+=1,o&&(o=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||vt(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),o=!1,He(T)?Xe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?y(T):T===124?(o=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):S(T)}function h(T){return He(T)?Xe(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(a+=1,v(T)):T===null||Ie(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return He(T)?Xe(e,k,"whitespace")(T):k(T)}function k(T){return T===124?m(T):T===null||Ie(T)?!o||i!==a?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function E(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||Ie(T)?(e.exit("tableRow"),t(T)):He(T)?Xe(e,O,"whitespace")(T):(e.enter("data"),L(T))}function L(T){return T===null||T===124||vt(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?D:L)}function D(T){return T===92||T===124?(e.consume(T),L):L(T)}}function vM(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const p=new fM;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(sx(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Ll(p,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=Ll(p,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=Ll(p,t,a,i,n,f)):o[1]!==0&&(f=Ll(p,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&sx(p,t,u,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=pM(t.events,n))}return e}function Ll(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},ca(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=ca(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=ca(t.events,n[2]),c=ca(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},ca(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function sx(e,t,n,r,i){const a=[],o=ca(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ca(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const yM={name:"tasklistCheck",tokenize:bM};function gM(){return{text:{91:yM}}}function bM(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return vt(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):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Ie(u)?t(u):He(u)?e.check({tokenize:xM},t,n)(u):n(u)}}function xM(e,t,n){return Xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function wM(e){return Mg([HD(),nM(),cM(e),hM(),gM()])}const SM={};function _M(e){const t=this,n=e||SM,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(wM(n)),a.push(zD()),o.push(VD(n))}const yt={container:{className:"bpReset bpContainer"},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},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"}}},EM=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>I.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>I.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>I.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>I.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>I.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>I.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>I.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>I.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>I.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>I.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>I.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>I.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>I.jsx("pre",{...i,...t==null?void 0:t.pre})};return I.jsx(cN,{components:n,remarkPlugins:[_M,gN],children:e})},kM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},lx=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,d))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(kM?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},TM=e=>e?lx(e):lx;var vd={exports:{}},yd={},Fl={exports:{}},gd={};/**
57
+ `))}function u(d,m,h,y){const v=h.enter("tableCell"),g=h.enter("phrasing"),b=h.containerPhrasing(d,{...y,before:a,after:a});return g(),v(),b}function l(d,m){return QN(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,h){const y=d.children;let v=-1;const g=[],b=m.enter("table");for(;++v<y.length;)g[v]=f(y[v],m,h);return b(),g}function f(d,m,h){const y=d.children;let v=-1;const g=[],b=m.enter("tableRow");for(;++v<y.length;)g[v]=u(y[v],d,m,h);return b(),g}function p(d,m,h){let y=Yb.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function BD(){return{exit:{taskListCheckValueChecked:Xb,taskListCheckValueUnchecked:Xb,paragraph:zD}}}function UD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VD}}}function Xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function zD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function VD(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=Yb.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function qD(){return[wN(),AN(),ZN(),AD(),BD()]}function WD(e){return{extensions:[SN(),NN(),KN(),FD(e),UD()]}}const HD={tokenize:XD,partial:!0},Qb={tokenize:QD,partial:!0},ex={tokenize:eM,partial:!0},tx={tokenize:tM,partial:!0},ZD={tokenize:nM,partial:!0},nx={name:"wwwAutolink",tokenize:YD,previous:ix},rx={name:"protocolAutolink",tokenize:JD,previous:ax},Pr={name:"emailAutolink",tokenize:GD,previous:ox},lr={};function KD(){return{text:lr}}let Ai=48;for(;Ai<123;)lr[Ai]=Pr,Ai++,Ai===58?Ai=65:Ai===91&&(Ai=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,rx],lr[104]=[Pr,rx],lr[87]=[Pr,nx],lr[119]=[Pr,nx];function GD(e,t,n){const r=this;let i,a;return o;function o(f){return!hd(f)||!ox.call(r,r.previous)||md(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return hd(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(ZD,c,l)(f):f===45||f===95||en(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&&ln(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function YD(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!ix.call(r,r.previous)||md(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(HD,e.attempt(Qb,e.attempt(ex,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function JD(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&ax.call(r,r.previous)&&!md(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ln(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||_l(f)||vt(f)||Pi(f)||El(f)?n(f):e.attempt(Qb,e.attempt(ex,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function XD(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function QD(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(tx,u,s)(l):l===null||vt(l)||Pi(l)||l!==45&&El(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function eM(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(tx,t,a)(o):o===null||vt(o)||Pi(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function tM(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||vt(s)||Pi(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||vt(s)||Pi(s)?t(s):r(s)}function a(s){return ln(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ln(s)?(e.consume(s),o):n(s)}}function nM(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return en(a)?n(a):t(a)}}function ix(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function ax(e){return!ln(e)}function ox(e){return!(e===47||hd(e))}function hd(e){return e===43||e===45||e===46||e===95||en(e)}function md(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const rM={tokenize:fM,partial:!0};function iM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lM,continuation:{tokenize:uM},exit:cM}},text:{91:{name:"gfmFootnoteCall",tokenize:sM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:aM,resolveTo:oM}}}}function aM(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.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 n(u);const l=qn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function oM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||vt(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(qn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return vt(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 lM(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!s||m===null||m===91||vt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=qn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return vt(m)||(s=!0),o++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),Xe(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function uM(e,t,n){return e.check(No,t,e.attempt(rM,t,n))}function cM(e){e.exit("gfmFootnoteDefinition")}function fM(e,t,n){const r=this;return Xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function dM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let 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)},p=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pn(p,p.length,0,Tl(d,o.slice(l+1,u),s)),Pn(p,p.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Pn(o,l-1,u-l+3,p),u=l+p.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 p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(o.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=kl(l);if(m===126)return f>1?u(m):(o.consume(m),f++,d);if(f<2&&!n)return u(m);const y=o.exit("strikethroughSequenceTemporary"),v=kl(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class pM{constructor(){this.map=[]}add(t,n,r){hM(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function hM(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function mM(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function vM(){return{flow:{null:{name:"table",tokenize:yM,resolveAll:gM}}}}function yM(e,t,n){const r=this;let i=0,a=0,o;return s;function s(T){let P=r.events.length-1;for(;P>-1;){const F=r.events[P][1].type;if(F==="lineEnding"||F==="linePrefix")P--;else break}const q=P>-1?r.events[P][1].type:null,$=q==="tableHead"||q==="tableRow"?E:u;return $===E&&r.parser.lazy[r.now().line]?n(T):$(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(o=!0,a+=1),c(T)}function c(T){return T===null?n(T):Re(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):He(T)?Xe(e,c,"whitespace")(T):(a+=1,o&&(o=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||vt(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),o=!1,He(T)?Xe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?y(T):T===124?(o=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):S(T)}function h(T){return He(T)?Xe(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(a+=1,v(T)):T===null||Re(T)?k(T):S(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return He(T)?Xe(e,k,"whitespace")(T):k(T)}function k(T){return T===124?m(T):T===null||Re(T)?!o||i!==a?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function E(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||Re(T)?(e.exit("tableRow"),t(T)):He(T)?Xe(e,O,"whitespace")(T):(e.enter("data"),L(T))}function L(T){return T===null||T===124||vt(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?D:L)}function D(T){return T===92||T===124?(e.consume(T),L):L(T)}}function gM(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const p=new pM;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(sx(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=Ll(p,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=Ll(p,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=Ll(p,t,a,i,n,f)):o[1]!==0&&(f=Ll(p,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&sx(p,t,u,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=mM(t.events,n))}return e}function Ll(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},ca(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=ca(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=ca(t.events,n[2]),c=ca(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},ca(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function sx(e,t,n,r,i){const a=[],o=ca(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ca(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bM={name:"tasklistCheck",tokenize:wM};function xM(){return{text:{91:bM}}}function wM(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return vt(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):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Re(u)?t(u):He(u)?e.check({tokenize:SM},t,n)(u):n(u)}}function SM(e,t,n){return Xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function _M(e){return Mg([KD(),iM(),dM(e),vM(),xM()])}const EM={};function kM(e){const t=this,n=e||EM,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(_M(n)),a.push(qD()),o.push(WD(n))}const yt={container:{className:"bpReset bpContainer"},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},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"}}},TM=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>I.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>I.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>I.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>I.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>I.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>I.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>I.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>I.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>I.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>I.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>I.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>I.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>I.jsx("pre",{...i,...t==null?void 0:t.pre})};return I.jsx(dN,{components:n,remarkPlugins:[kM,xN],children:e})},OM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},lx=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,d))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(OM?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},CM=e=>e?lx(e):lx;var vd={exports:{}},yd={},Fl={exports:{}},gd={};/**
58
58
  * @license React
59
59
  * use-sync-external-store-shim.production.min.js
60
60
  *
@@ -62,7 +62,7 @@ React keys must be passed directly to JSX without using spread:
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var ux;function OM(){if(ux)return gd;ux=1;var e=j;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,y=m[1];return a(function(){h.value=d,h.getSnapshot=p,u(h)&&y({inst:h})},[f,d,p]),i(function(){return u(h)&&y({inst:h}),f(function(){u(h)&&y({inst:h})})},[f]),o(d),d}function u(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function l(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return gd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,gd}var bd={};/**
65
+ */var ux;function $M(){if(ux)return gd;ux=1;var e=j;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,y=m[1];return a(function(){h.value=d,h.getSnapshot=p,u(h)&&y({inst:h})},[f,d,p]),i(function(){return u(h)&&y({inst:h}),f(function(){u(h)&&y({inst:h})})},[f]),o(d),d}function u(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function l(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return gd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,gd}var bd={};/**
66
66
  * @license React
67
67
  * use-sync-external-store-shim.development.js
68
68
  *
@@ -70,7 +70,7 @@ React keys must be passed directly to JSX without using spread:
70
70
  *
71
71
  * This source code is licensed under the MIT license found in the
72
72
  * LICENSE file in the root directory of this source tree.
73
- */var cx;function CM(){return cx||(cx=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 n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),E=1;E<k;E++)S[E-1]=arguments[E];r("error",b,S)}}function r(b,k,S){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(k+="%s",S=S.concat([O]));var L=S.map(function(D){return String(D)});L.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,L)}}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,u=e.useLayoutEffect,l=e.useDebugValue,c=!1,f=!1;function p(b,k,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=k();if(!f){var O=k();a(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var L=o({inst:{value:E,getSnapshot:k}}),D=L[0].inst,T=L[1];return u(function(){D.value=E,D.getSnapshot=k,d(D)&&T({inst:D})},[b,E,k]),s(function(){d(D)&&T({inst:D});var P=function(){d(D)&&T({inst:D})};return b(P)},[b]),l(E),E}function d(b){var k=b.getSnapshot,S=b.value;try{var E=k();return!a(S,E)}catch{return!0}}function m(b,k,S){return k()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!h,v=y?m:p,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;bd.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),bd}var fx;function dx(){return fx||(fx=1,process.env.NODE_ENV==="production"?Fl.exports=OM():Fl.exports=CM()),Fl.exports}/**
73
+ */var cx;function IM(){return cx||(cx=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 n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),E=1;E<k;E++)S[E-1]=arguments[E];r("error",b,S)}}function r(b,k,S){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(k+="%s",S=S.concat([O]));var L=S.map(function(D){return String(D)});L.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,L)}}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,u=e.useLayoutEffect,l=e.useDebugValue,c=!1,f=!1;function p(b,k,S){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=k();if(!f){var O=k();a(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var L=o({inst:{value:E,getSnapshot:k}}),D=L[0].inst,T=L[1];return u(function(){D.value=E,D.getSnapshot=k,d(D)&&T({inst:D})},[b,E,k]),s(function(){d(D)&&T({inst:D});var P=function(){d(D)&&T({inst:D})};return b(P)},[b]),l(E),E}function d(b){var k=b.getSnapshot,S=b.value;try{var E=k();return!a(S,E)}catch{return!0}}function m(b,k,S){return k()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!h,v=y?m:p,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;bd.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),bd}var fx;function dx(){return fx||(fx=1,process.env.NODE_ENV==="production"?Fl.exports=$M():Fl.exports=IM()),Fl.exports}/**
74
74
  * @license React
75
75
  * use-sync-external-store-shim/with-selector.production.min.js
76
76
  *
@@ -78,7 +78,7 @@ React keys must be passed directly to JSX without using spread:
78
78
  *
79
79
  * This source code is licensed under the MIT license found in the
80
80
  * LICENSE file in the root directory of this source tree.
81
- */var px;function $M(){if(px)return yd;px=1;var e=j,t=dx();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return yd.useSyncExternalStoreWithSelector=function(l,c,f,p,d){var m=a(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function v(E){if(!g){if(g=!0,b=E,E=p(E),d!==void 0&&h.hasValue){var O=h.value;if(d(O,E))return k=O}return k=E}if(O=k,r(b,E))return O;var L=p(E);return d!==void 0&&d(O,L)?O:(b=E,k=L)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return v(c())},S===null?void 0:function(){return v(S())}]},[c,f,p,d]);var y=i(l,m[0],m[1]);return o(function(){h.hasValue=!0,h.value=y},[y]),u(y),y},yd}var xd={};/**
81
+ */var px;function RM(){if(px)return yd;px=1;var e=j,t=dx();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return yd.useSyncExternalStoreWithSelector=function(l,c,f,p,d){var m=a(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function v(E){if(!g){if(g=!0,b=E,E=p(E),d!==void 0&&h.hasValue){var O=h.value;if(d(O,E))return k=O}return k=E}if(O=k,r(b,E))return O;var L=p(E);return d!==void 0&&d(O,L)?O:(b=E,k=L)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return v(c())},S===null?void 0:function(){return v(S())}]},[c,f,p,d]);var y=i(l,m[0],m[1]);return o(function(){h.hasValue=!0,h.value=y},[y]),u(y),y},yd}var xd={};/**
82
82
  * @license React
83
83
  * use-sync-external-store-shim/with-selector.development.js
84
84
  *
@@ -86,11 +86,11 @@ React keys must be passed directly to JSX without using spread:
86
86
  *
87
87
  * This source code is licensed under the MIT license found in the
88
88
  * LICENSE file in the root directory of this source tree.
89
- */var hx;function IM(){return hx||(hx=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=dx();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;function l(c,f,p,d,m){var h=a(null),y;h.current===null?(y={hasValue:!1,value:null},h.current=y):y=h.current;var v=s(function(){var S=!1,E,O,L=function(q){if(!S){S=!0,E=q;var $=d(q);if(m!==void 0&&y.hasValue){var F=y.value;if(m(F,$))return O=F,F}return O=$,$}var M=E,B=O;if(r(M,q))return B;var W=d(q);return m!==void 0&&m(B,W)?B:(E=q,O=W,W)},D=p===void 0?null:p,T=function(){return L(f())},P=D===null?void 0:function(){return L(D())};return[T,P]},[f,p,d,m]),g=v[0],b=v[1],k=i(c,g,b);return o(function(){y.hasValue=!0,y.value=k},[k]),u(k),k}xd.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),xd}process.env.NODE_ENV==="production"?vd.exports=$M():vd.exports=IM();var RM=vd.exports;const PM=Ke(RM),mx={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:AM}=j,{useSyncExternalStoreWithSelector:NM}=PM;let vx=!1;const DM=e=>e;function MM(e,t=DM,n){(mx?"production":void 0)!=="production"&&n&&!vx&&(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"),vx=!0);const r=NM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return AM(r),r}const jM=e=>{(mx?"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"?TM(e):e,n=(r,i)=>MM(t,r,i);return Object.assign(n,t),n},Bl=e=>jM,Ul={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},wd=new Map,zl=e=>{const t=wd.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},LM=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=wd.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return wd.set(n.name,i),{type:"tracked",store:e,...i}},Vl=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...u}=t;let l;try{l=(a??(Ul?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(Ul?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=LM(s,l,u);let p=!0;i.setState=(h,y,v)=>{const g=n(h,y);if(!p)return g;const b=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(b,r()),g):(c==null||c.send({...b,type:`${s}/${b.type}`},{...zl(u.name),[s]:i.getState()}),g)};const d=(...h)=>{const y=p;p=!1,n(...h),p=y},m=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(m):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,y])=>[h,h===f.store?m:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const y=i.dispatch;i.dispatch=(...v)=>{(Ul?"production":void 0)!=="production"&&v[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),y(...v)}}return c.subscribe(h=>{var y;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Sd(h.payload,v=>{if(v.type==="__setState"){if(s===void 0){d(v.state);return}Object.keys(v.state).length!==1&&console.error(`
89
+ */var hx;function PM(){return hx||(hx=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=dx();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;function l(c,f,p,d,m){var h=a(null),y;h.current===null?(y={hasValue:!1,value:null},h.current=y):y=h.current;var v=s(function(){var S=!1,E,O,L=function(q){if(!S){S=!0,E=q;var $=d(q);if(m!==void 0&&y.hasValue){var F=y.value;if(m(F,$))return O=F,F}return O=$,$}var M=E,B=O;if(r(M,q))return B;var W=d(q);return m!==void 0&&m(B,W)?B:(E=q,O=W,W)},D=p===void 0?null:p,T=function(){return L(f())},P=D===null?void 0:function(){return L(D())};return[T,P]},[f,p,d,m]),g=v[0],b=v[1],k=i(c,g,b);return o(function(){y.hasValue=!0,y.value=k},[k]),u(k),k}xd.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),xd}process.env.NODE_ENV==="production"?vd.exports=RM():vd.exports=PM();var AM=vd.exports;const NM=Ke(AM),mx={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:DM}=j,{useSyncExternalStoreWithSelector:MM}=NM;let vx=!1;const jM=e=>e;function LM(e,t=jM,n){(mx?"production":void 0)!=="production"&&n&&!vx&&(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"),vx=!0);const r=MM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return DM(r),r}const FM=e=>{(mx?"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"?CM(e):e,n=(r,i)=>LM(t,r,i);return Object.assign(n,t),n},Bl=e=>FM,Ul={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},wd=new Map,zl=e=>{const t=wd.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},BM=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=wd.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return wd.set(n.name,i),{type:"tracked",store:e,...i}},Vl=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...u}=t;let l;try{l=(a??(Ul?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(Ul?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=BM(s,l,u);let p=!0;i.setState=(h,y,v)=>{const g=n(h,y);if(!p)return g;const b=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(b,r()),g):(c==null||c.send({...b,type:`${s}/${b.type}`},{...zl(u.name),[s]:i.getState()}),g)};const d=(...h)=>{const y=p;p=!1,n(...h),p=y},m=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(m):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,y])=>[h,h===f.store?m:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const y=i.dispatch;i.dispatch=(...v)=>{(Ul?"production":void 0)!=="production"&&v[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),y(...v)}}return c.subscribe(h=>{var y;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Sd(h.payload,v=>{if(v.type==="__setState"){if(s===void 0){d(v.state);return}Object.keys(v.state).length!==1&&console.error(`
90
90
  [zustand devtools middleware] Unsupported __setState action format.
91
91
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
92
92
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
93
- `);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&d(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(zl(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(zl(u.name));case"ROLLBACK":return Sd(h.state,v=>{if(s===void 0){d(v),c==null||c.init(i.getState());return}d(v[s]),c==null||c.init(zl(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Sd(h.state,v=>{if(s===void 0){d(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&d(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;d(s===void 0?g:g[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return p=!p}return}}),m},Sd=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function FM(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const Fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fo(r)(n)}}}},BM=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=Fo(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=c({state:y,version:a.version}).then(b=>l.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},p=i.setState;i.setState=(y,v)=>{p(y,v),f()};const d=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return m=a.merge(g,(b=r())!=null?b:d),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,u.forEach(g=>g(m))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},h(),m||d},UM=(e,t)=>(n,r,i)=>{let a={storage:FM(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:p))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(d=a.merge(S,(b=r())!=null?b:p),n(d,!0),k)return c()}).then(()=>{v==null||v(d,void 0),d=r(),o=!0,u.forEach(g=>g(d))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(u.add(h),()=>{u.delete(h)})},a.skipHydration||m(),d||p},yx=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Ul?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),BM(e,t)):UM(e,t),gx=Bl()(Vl(yx(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"}))),Bo=Bl()(Vl(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),zM=e=>Bl()(Vl(yx(t=>({setUser:n=>t(r=>({...r,user:n})),setConversationId:n=>t(r=>({...r,conversationId:n})),clearAll:()=>{t(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e}))),lo=class lo{constructor(){}static getInstance(t="bp-webchat"){return lo._instances[t]||(lo._instances[t]=zM(t)),lo._instances[t]}};_e(lo,"_instances",{});let _d=lo;const bx=_d.getInstance,ql=Bl()(Vl(e=>({eventEmitter:WC,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),VM=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=ql(v=>v.eventEmitter),[l,c]=j.useState(!1),[f,p]=j.useState(!1),[d,m]=j.useState(!1),{message:{blocks:{button:h}}}=yt;j.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[u,r,i]);function y(){r&&u.emit(`button-group-${r}-click`),c(!0),i||m(!0),n!=="link"&&(a==null||a({type:"text",text:t}))}return I.jsx(qM,{...s,variant:n,onClick:y,disabled:d||o,"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,value:t,...h,children:e})},qM=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return I.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return I.jsx("button",{type:"button",...n})},xx=j.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,...s},u)=>{const{message:{blocks:{bubble:l}}}=yt;return I.jsx("div",{"data-direction":t,...s,...l,ref:u,children:I.jsx(xa,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o})})});xx.displayName="Bubble";const wx=j.createContext(null);function WM(){const e=j.useContext(wx);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Sx=j.createContext(null);function _x(){const e=j.useContext(Sx);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const HM=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let ZM={data:""},KM=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ZM,GM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,YM=/\/\*[^]*?\*\/| +/g,Ex=/\n+/g,Qr=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?Qr(o,a):a+"{"+Qr(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=Qr(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+=Qr.p?Qr.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},kx=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+kx(e[n]);return t}return e},JM=(e,t,n,r,i)=>{let a=kx(e),o=Ar[a]||(Ar[a]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(a));if(!Ar[o]){let u=a!==e?e:(l=>{let c,f,p=[{}];for(;c=GM.exec(l.replace(YM,""));)c[4]?p.shift():c[3]?(f=c[3].replace(Ex," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][c[1]]=c[2].replace(Ex," ").trim();return p[0]})(e);Ar[o]=Qr(i?{["@keyframes "+o]:u}:u,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[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)})(Ar[o],t,r,s),o},XM=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=u?"."+u:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+i+(o??"")},"");function Wl(e){let t=this||{},n=e.call?e(t.p):e;return JM(n.unshift?n.raw?XM(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,KM(t.target),t.g,t.o,t.k)}let Tx,Ed,kd;Wl.bind({g:1});let Nr=Wl.bind({k:1});function QM(e,t,n,r){Qr.p=t,Tx=e,Ed=n,kd=r}function ei(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),u=s.className||i.className;n.p=Object.assign({theme:Ed&&Ed()},s),n.o=/ *go\d+/.test(u),s.className=Wl.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),kd&&l[0]&&kd(s),Tx(l,s)}return i}}var ej=e=>typeof e=="function",Hl=(e,t)=>ej(e)?e(t):e,tj=(()=>{let e=0;return()=>(++e).toString()})(),Ox=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),nj=20,Zl=new Map,rj=1e3,Cx=e=>{if(Zl.has(e))return;let t=setTimeout(()=>{Zl.delete(e),Ni({type:4,toastId:e})},rj);Zl.set(e,t)},ij=e=>{let t=Zl.get(e);t&&clearTimeout(t)},Td=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,nj)};case 1:return t.toast.id&&ij(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Td(e,{type:1,toast:n}):Td(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Cx(r):e.toasts.forEach(a=>{Cx(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===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}))}}},Kl=[],Gl={toasts:[],pausedAt:void 0},Ni=e=>{Gl=Td(Gl,e),Kl.forEach(t=>{t(Gl)})},aj={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},oj=(e={})=>{let[t,n]=j.useState(Gl);j.useEffect(()=>(Kl.push(n),()=>{let i=Kl.indexOf(n);i>-1&&Kl.splice(i,1)}),[t]);let r=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)||aj[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},sj=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||tj()}),Uo=e=>(t,n)=>{let r=sj(t,e,n);return Ni({type:2,toast:r}),r.id},Nn=(e,t)=>Uo("blank")(e,t);Nn.error=Uo("error"),Nn.success=Uo("success"),Nn.loading=Uo("loading"),Nn.custom=Uo("custom"),Nn.dismiss=e=>{Ni({type:3,toastId:e})},Nn.remove=e=>Ni({type:4,toastId:e}),Nn.promise=(e,t,n)=>{let r=Nn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Nn.success(Hl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Nn.error(Hl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var lj=(e,t)=>{Ni({type:1,toast:{id:e,height:t}})},uj=()=>{Ni({type:5,time:Date.now()})},cj=e=>{let{toasts:t,pausedAt:n}=oj(e);j.useEffect(()=>{if(n)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&&Nn.dismiss(s.id);return}return setTimeout(()=>Nn.dismiss(s.id),u)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=j.useCallback(()=>{n&&Ni({type:6,time:Date.now()})},[n]),i=j.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=o||{},c=t.filter(d=>(d.position||l)===(a.position||l)&&d.height),f=c.findIndex(d=>d.id===a.id),p=c.filter((d,m)=>m<f&&d.visible).length;return c.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,m)=>d+(m.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:lj,startPause:uj,endPause:r,calculateOffset:i}}},fj=Nr`
93
+ `);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&d(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(zl(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(zl(u.name));case"ROLLBACK":return Sd(h.state,v=>{if(s===void 0){d(v),c==null||c.init(i.getState());return}d(v[s]),c==null||c.init(zl(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Sd(h.state,v=>{if(s===void 0){d(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&d(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;d(s===void 0?g:g[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return p=!p}return}}),m},Sd=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function UM(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const Fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Fo(r)(n)}}}},zM=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=Fo(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=c({state:y,version:a.version}).then(b=>l.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},p=i.setState;i.setState=(y,v)=>{p(y,v),f()};const d=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return m=a.merge(g,(b=r())!=null?b:d),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,u.forEach(g=>g(m))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},h(),m||d},VM=(e,t)=>(n,r,i)=>{let a={storage:UM(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:p))||void 0;return Fo(l.getItem.bind(l))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(d=a.merge(S,(b=r())!=null?b:p),n(d,!0),k)return c()}).then(()=>{v==null||v(d,void 0),d=r(),o=!0,u.forEach(g=>g(d))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(u.add(h),()=>{u.delete(h)})},a.skipHydration||m(),d||p},yx=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Ul?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),zM(e,t)):VM(e,t),gx=Bl()(Vl(yx(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"}))),Bo=Bl()(Vl(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),qM=e=>Bl()(Vl(yx(t=>({setUser:n=>t(r=>({...r,user:n})),setConversationId:n=>t(r=>({...r,conversationId:n})),clearAll:()=>{t(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e}))),lo=class lo{constructor(){}static getInstance(t="bp-webchat"){return lo._instances[t]||(lo._instances[t]=qM(t)),lo._instances[t]}};_e(lo,"_instances",{});let _d=lo;const bx=_d.getInstance,ql=Bl()(Vl(e=>({eventEmitter:ZC,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),WM=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=ql(v=>v.eventEmitter),[l,c]=j.useState(!1),[f,p]=j.useState(!1),[d,m]=j.useState(!1),{message:{blocks:{button:h}}}=yt;j.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[u,r,i]);function y(){r&&u.emit(`button-group-${r}-click`),c(!0),i||m(!0),n!=="link"&&(a==null||a({type:"text",text:t}))}return I.jsx(HM,{...s,variant:n,onClick:y,disabled:d||o,"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,value:t,...h,children:e})},HM=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return I.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return I.jsx("button",{type:"button",...n})},xx=j.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,...s},u)=>{const{message:{blocks:{bubble:l}}}=yt;return I.jsx("div",{"data-direction":t,...s,...l,ref:u,children:I.jsx(xa,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o})})});xx.displayName="Bubble";const wx=j.createContext(null);function ZM(){const e=j.useContext(wx);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Sx=j.createContext(null);function _x(){const e=j.useContext(Sx);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const KM=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let GM={data:""},YM=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||GM,JM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,XM=/\/\*[^]*?\*\/| +/g,Ex=/\n+/g,Qr=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?Qr(o,a):a+"{"+Qr(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=Qr(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+=Qr.p?Qr.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},kx=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+kx(e[n]);return t}return e},QM=(e,t,n,r,i)=>{let a=kx(e),o=Ar[a]||(Ar[a]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(a));if(!Ar[o]){let u=a!==e?e:(l=>{let c,f,p=[{}];for(;c=JM.exec(l.replace(XM,""));)c[4]?p.shift():c[3]?(f=c[3].replace(Ex," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][c[1]]=c[2].replace(Ex," ").trim();return p[0]})(e);Ar[o]=Qr(i?{["@keyframes "+o]:u}:u,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[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)})(Ar[o],t,r,s),o},ej=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=u?"."+u:s&&typeof s=="object"?s.props?"":Qr(s,""):s===!1?"":s}return r+i+(o??"")},"");function Wl(e){let t=this||{},n=e.call?e(t.p):e;return QM(n.unshift?n.raw?ej(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,YM(t.target),t.g,t.o,t.k)}let Tx,Ed,kd;Wl.bind({g:1});let Nr=Wl.bind({k:1});function tj(e,t,n,r){Qr.p=t,Tx=e,Ed=n,kd=r}function ei(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),u=s.className||i.className;n.p=Object.assign({theme:Ed&&Ed()},s),n.o=/ *go\d+/.test(u),s.className=Wl.apply(n,r)+(u?" "+u:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),kd&&l[0]&&kd(s),Tx(l,s)}return i}}var nj=e=>typeof e=="function",Hl=(e,t)=>nj(e)?e(t):e,rj=(()=>{let e=0;return()=>(++e).toString()})(),Ox=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),ij=20,Zl=new Map,aj=1e3,Cx=e=>{if(Zl.has(e))return;let t=setTimeout(()=>{Zl.delete(e),Ni({type:4,toastId:e})},aj);Zl.set(e,t)},oj=e=>{let t=Zl.get(e);t&&clearTimeout(t)},Td=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,ij)};case 1:return t.toast.id&&oj(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Td(e,{type:1,toast:n}):Td(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Cx(r):e.toasts.forEach(a=>{Cx(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===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}))}}},Kl=[],Gl={toasts:[],pausedAt:void 0},Ni=e=>{Gl=Td(Gl,e),Kl.forEach(t=>{t(Gl)})},sj={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},lj=(e={})=>{let[t,n]=j.useState(Gl);j.useEffect(()=>(Kl.push(n),()=>{let i=Kl.indexOf(n);i>-1&&Kl.splice(i,1)}),[t]);let r=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)||sj[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},uj=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||rj()}),Uo=e=>(t,n)=>{let r=uj(t,e,n);return Ni({type:2,toast:r}),r.id},Nn=(e,t)=>Uo("blank")(e,t);Nn.error=Uo("error"),Nn.success=Uo("success"),Nn.loading=Uo("loading"),Nn.custom=Uo("custom"),Nn.dismiss=e=>{Ni({type:3,toastId:e})},Nn.remove=e=>Ni({type:4,toastId:e}),Nn.promise=(e,t,n)=>{let r=Nn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Nn.success(Hl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Nn.error(Hl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var cj=(e,t)=>{Ni({type:1,toast:{id:e,height:t}})},fj=()=>{Ni({type:5,time:Date.now()})},dj=e=>{let{toasts:t,pausedAt:n}=lj(e);j.useEffect(()=>{if(n)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&&Nn.dismiss(s.id);return}return setTimeout(()=>Nn.dismiss(s.id),u)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=j.useCallback(()=>{n&&Ni({type:6,time:Date.now()})},[n]),i=j.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:u=8,defaultPosition:l}=o||{},c=t.filter(d=>(d.position||l)===(a.position||l)&&d.height),f=c.findIndex(d=>d.id===a.id),p=c.filter((d,m)=>m<f&&d.visible).length;return c.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,m)=>d+(m.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:cj,startPause:fj,endPause:r,calculateOffset:i}}},pj=Nr`
94
94
  from {
95
95
  transform: scale(0) rotate(45deg);
96
96
  opacity: 0;
@@ -98,7 +98,7 @@ from {
98
98
  to {
99
99
  transform: scale(1) rotate(45deg);
100
100
  opacity: 1;
101
- }`,dj=Nr`
101
+ }`,hj=Nr`
102
102
  from {
103
103
  transform: scale(0);
104
104
  opacity: 0;
@@ -106,7 +106,7 @@ from {
106
106
  to {
107
107
  transform: scale(1);
108
108
  opacity: 1;
109
- }`,pj=Nr`
109
+ }`,mj=Nr`
110
110
  from {
111
111
  transform: scale(0) rotate(90deg);
112
112
  opacity: 0;
@@ -114,7 +114,7 @@ from {
114
114
  to {
115
115
  transform: scale(1) rotate(90deg);
116
116
  opacity: 1;
117
- }`,hj=ei("div")`
117
+ }`,vj=ei("div")`
118
118
  width: 20px;
119
119
  opacity: 0;
120
120
  height: 20px;
@@ -123,14 +123,14 @@ to {
123
123
  position: relative;
124
124
  transform: rotate(45deg);
125
125
 
126
- animation: ${fj} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
126
+ animation: ${pj} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
127
127
  forwards;
128
128
  animation-delay: 100ms;
129
129
 
130
130
  &:after,
131
131
  &:before {
132
132
  content: '';
133
- animation: ${dj} 0.15s ease-out forwards;
133
+ animation: ${hj} 0.15s ease-out forwards;
134
134
  animation-delay: 150ms;
135
135
  position: absolute;
136
136
  border-radius: 3px;
@@ -143,18 +143,18 @@ to {
143
143
  }
144
144
 
145
145
  &:before {
146
- animation: ${pj} 0.15s ease-out forwards;
146
+ animation: ${mj} 0.15s ease-out forwards;
147
147
  animation-delay: 180ms;
148
148
  transform: rotate(90deg);
149
149
  }
150
- `,mj=Nr`
150
+ `,yj=Nr`
151
151
  from {
152
152
  transform: rotate(0deg);
153
153
  }
154
154
  to {
155
155
  transform: rotate(360deg);
156
156
  }
157
- `,vj=ei("div")`
157
+ `,gj=ei("div")`
158
158
  width: 12px;
159
159
  height: 12px;
160
160
  box-sizing: border-box;
@@ -162,8 +162,8 @@ to {
162
162
  border-radius: 100%;
163
163
  border-color: ${e=>e.secondary||"#e0e0e0"};
164
164
  border-right-color: ${e=>e.primary||"#616161"};
165
- animation: ${mj} 1s linear infinite;
166
- `,yj=Nr`
165
+ animation: ${yj} 1s linear infinite;
166
+ `,bj=Nr`
167
167
  from {
168
168
  transform: scale(0) rotate(45deg);
169
169
  opacity: 0;
@@ -171,7 +171,7 @@ from {
171
171
  to {
172
172
  transform: scale(1) rotate(45deg);
173
173
  opacity: 1;
174
- }`,gj=Nr`
174
+ }`,xj=Nr`
175
175
  0% {
176
176
  height: 0;
177
177
  width: 0;
@@ -185,7 +185,7 @@ to {
185
185
  100% {
186
186
  opacity: 1;
187
187
  height: 10px;
188
- }`,bj=ei("div")`
188
+ }`,wj=ei("div")`
189
189
  width: 20px;
190
190
  opacity: 0;
191
191
  height: 20px;
@@ -194,13 +194,13 @@ to {
194
194
  position: relative;
195
195
  transform: rotate(45deg);
196
196
 
197
- animation: ${yj} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
197
+ animation: ${bj} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
198
198
  forwards;
199
199
  animation-delay: 100ms;
200
200
  &:after {
201
201
  content: '';
202
202
  box-sizing: border-box;
203
- animation: ${gj} 0.2s ease-out forwards;
203
+ animation: ${xj} 0.2s ease-out forwards;
204
204
  opacity: 0;
205
205
  animation-delay: 200ms;
206
206
  position: absolute;
@@ -212,16 +212,16 @@ to {
212
212
  height: 10px;
213
213
  width: 6px;
214
214
  }
215
- `,xj=ei("div")`
215
+ `,Sj=ei("div")`
216
216
  position: absolute;
217
- `,wj=ei("div")`
217
+ `,_j=ei("div")`
218
218
  position: relative;
219
219
  display: flex;
220
220
  justify-content: center;
221
221
  align-items: center;
222
222
  min-width: 20px;
223
223
  min-height: 20px;
224
- `,Sj=Nr`
224
+ `,Ej=Nr`
225
225
  from {
226
226
  transform: scale(0.6);
227
227
  opacity: 0.4;
@@ -229,20 +229,20 @@ from {
229
229
  to {
230
230
  transform: scale(1);
231
231
  opacity: 1;
232
- }`,_j=ei("div")`
232
+ }`,kj=ei("div")`
233
233
  position: relative;
234
234
  transform: scale(0.6);
235
235
  opacity: 0.4;
236
236
  min-width: 20px;
237
- animation: ${Sj} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
237
+ animation: ${Ej} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
238
238
  forwards;
239
- `,Ej=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?w.createElement(_j,null,t):t:n==="blank"?null:w.createElement(wj,null,w.createElement(vj,{...r}),n!=="loading"&&w.createElement(xj,null,n==="error"?w.createElement(hj,{...r}):w.createElement(bj,{...r})))},kj=e=>`
239
+ `,Tj=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?w.createElement(kj,null,t):t:n==="blank"?null:w.createElement(_j,null,w.createElement(gj,{...r}),n!=="loading"&&w.createElement(Sj,null,n==="error"?w.createElement(vj,{...r}):w.createElement(wj,{...r})))},Oj=e=>`
240
240
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
241
241
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
242
- `,Tj=e=>`
242
+ `,Cj=e=>`
243
243
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
244
244
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
245
- `,Oj="0%{opacity:0;} 100%{opacity:1;}",Cj="0%{opacity:1;} 100%{opacity:0;}",$j=ei("div")`
245
+ `,$j="0%{opacity:0;} 100%{opacity:1;}",Ij="0%{opacity:1;} 100%{opacity:0;}",Rj=ei("div")`
246
246
  display: flex;
247
247
  align-items: center;
248
248
  background: #fff;
@@ -254,24 +254,24 @@ to {
254
254
  pointer-events: auto;
255
255
  padding: 8px 10px;
256
256
  border-radius: 8px;
257
- `,Ij=ei("div")`
257
+ `,Pj=ei("div")`
258
258
  display: flex;
259
259
  justify-content: center;
260
260
  margin: 4px 10px;
261
261
  color: inherit;
262
262
  flex: 1 1 auto;
263
263
  white-space: pre-line;
264
- `,Rj=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Ox()?[Oj,Cj]:[kj(n),Tj(n)];return{animation:t?`${Nr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Nr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Pj=w.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Rj(e.position||t||"top-center",e.visible):{opacity:0},a=w.createElement(Ej,{toast:e}),o=w.createElement(Ij,{...e.ariaProps},Hl(e.message,e));return w.createElement($j,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:a,message:o}):w.createElement(w.Fragment,null,a,o))});QM(w.createElement);var Aj=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=w.useCallback(o=>{if(o){let s=()=>{let u=o.getBoundingClientRect().height;r(e,u)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return w.createElement("div",{ref:a,className:t,style:n},i)},Nj=(e,t)=>{let n=e.includes("top"),r=n?{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:Ox()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Dj=Wl`
264
+ `,Aj=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Ox()?[$j,Ij]:[Oj(n),Cj(n)];return{animation:t?`${Nr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Nr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Nj=w.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Aj(e.position||t||"top-center",e.visible):{opacity:0},a=w.createElement(Tj,{toast:e}),o=w.createElement(Pj,{...e.ariaProps},Hl(e.message,e));return w.createElement(Rj,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:a,message:o}):w.createElement(w.Fragment,null,a,o))});tj(w.createElement);var Dj=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=w.useCallback(o=>{if(o){let s=()=>{let u=o.getBoundingClientRect().height;r(e,u)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return w.createElement("div",{ref:a,className:t,style:n},i)},Mj=(e,t)=>{let n=e.includes("top"),r=n?{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:Ox()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},jj=Wl`
265
265
  z-index: 9999;
266
266
  > * {
267
267
  pointer-events: auto;
268
268
  }
269
- `,Yl=16,Mj=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:u}=cj(n);return w.createElement("div",{style:{position:"fixed",zIndex:9999,top:Yl,left:Yl,right:Yl,bottom:Yl,pointerEvents:"none",...a},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},s.map(l=>{let c=l.position||t,f=u.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),p=Nj(c,f);return w.createElement(Aj,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?Dj:"",style:p},l.type==="custom"?Hl(l.message,l):i?i(l):w.createElement(Pj,{toast:l,position:c}))}))};function $x(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$x(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$x(e))&&(r&&(r+=" "),r+=t);return r}function Xl(){return typeof window<"u"}function fa(e){return Ix(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(Ix(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ix(e){return Xl()?e instanceof Node||e instanceof _n(e).Node:!1}function Wn(e){return Xl()?e instanceof Element||e instanceof _n(e).Element:!1}function cr(e){return Xl()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function Rx(e){return!Xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}function zo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function jj(e){return["table","td","th"].includes(fa(e))}function Ql(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Od(e){const t=Cd(),n=Wn(e)?Hn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Lj(e){let t=ti(e);for(;cr(t)&&!da(t);){if(Od(t))return t;if(Ql(t))return null;t=ti(t)}return null}function Cd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function da(e){return["html","body","#document"].includes(fa(e))}function Hn(e){return _n(e).getComputedStyle(e)}function eu(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ti(e){if(fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rx(e)&&e.host||ur(e);return Rx(t)?t.host:t}function Px(e){const t=ti(e);return da(t)?e.ownerDocument?e.ownerDocument.body:e.body:cr(t)&&zo(t)?t:Px(t)}function ni(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Px(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=_n(i);if(a){const s=$d(o);return t.concat(o,o.visualViewport||[],zo(i)?i:[],s&&n?ni(s):[])}return t.concat(i,ni(i,[],n))}function $d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const pa=Math.min,En=Math.max,tu=Math.round,nu=Math.floor,ri=e=>({x:e,y:e});function Ax(e,t,n){return En(e,pa(t,n))}function ru(e,t){return typeof e=="function"?e(t):e}function Vo(e){return e.split("-")[0]}function Id(e){return e.split("-")[1]}function Nx(e){return e==="x"?"y":"x"}function Fj(e){return e==="y"?"height":"width"}function qo(e){return["top","bottom"].includes(Vo(e))?"y":"x"}function Bj(e){return Nx(qo(e))}function Uj(e){return{top:0,right:0,bottom:0,left:0,...e}}function zj(e){return typeof e!="number"?Uj(e):{top:e,right:e,bottom:e,left:e}}function iu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*!
269
+ `,Yl=16,Lj=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:u}=dj(n);return w.createElement("div",{style:{position:"fixed",zIndex:9999,top:Yl,left:Yl,right:Yl,bottom:Yl,pointerEvents:"none",...a},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},s.map(l=>{let c=l.position||t,f=u.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),p=Mj(c,f);return w.createElement(Dj,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?jj:"",style:p},l.type==="custom"?Hl(l.message,l):i?i(l):w.createElement(Nj,{toast:l,position:c}))}))};function $x(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$x(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$x(e))&&(r&&(r+=" "),r+=t);return r}function Xl(){return typeof window<"u"}function fa(e){return Ix(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){var t;return(t=(Ix(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ix(e){return Xl()?e instanceof Node||e instanceof _n(e).Node:!1}function Wn(e){return Xl()?e instanceof Element||e instanceof _n(e).Element:!1}function cr(e){return Xl()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function Rx(e){return!Xl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}function zo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Fj(e){return["table","td","th"].includes(fa(e))}function Ql(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Od(e){const t=Cd(),n=Wn(e)?Hn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Bj(e){let t=ti(e);for(;cr(t)&&!da(t);){if(Od(t))return t;if(Ql(t))return null;t=ti(t)}return null}function Cd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function da(e){return["html","body","#document"].includes(fa(e))}function Hn(e){return _n(e).getComputedStyle(e)}function eu(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ti(e){if(fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rx(e)&&e.host||ur(e);return Rx(t)?t.host:t}function Px(e){const t=ti(e);return da(t)?e.ownerDocument?e.ownerDocument.body:e.body:cr(t)&&zo(t)?t:Px(t)}function ni(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Px(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=_n(i);if(a){const s=$d(o);return t.concat(o,o.visualViewport||[],zo(i)?i:[],s&&n?ni(s):[])}return t.concat(i,ni(i,[],n))}function $d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const pa=Math.min,En=Math.max,tu=Math.round,nu=Math.floor,ri=e=>({x:e,y:e});function Ax(e,t,n){return En(e,pa(t,n))}function ru(e,t){return typeof e=="function"?e(t):e}function Vo(e){return e.split("-")[0]}function Id(e){return e.split("-")[1]}function Nx(e){return e==="x"?"y":"x"}function Uj(e){return e==="y"?"height":"width"}function qo(e){return["top","bottom"].includes(Vo(e))?"y":"x"}function zj(e){return Nx(qo(e))}function Vj(e){return{top:0,right:0,bottom:0,left:0,...e}}function qj(e){return typeof e!="number"?Vj(e):{top:e,right:e,bottom:e,left:e}}function iu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*!
270
270
  * tabbable 6.2.0
271
271
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
272
- */var Vj=["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])"],Rd=Vj.join(","),Dx=typeof Element>"u",Wo=Dx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,au=!Dx&&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},ou=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},qj=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Wj=function(t,n,r){if(ou(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Rd));return n&&Wo.call(t,Rd)&&i.unshift(t),i=i.filter(r),i},Hj=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!ou(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Wo.call(o,Rd);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),p=!ou(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&p){var d=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}return i},Mx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},jx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qj(t))&&!Mx(t)?0:t.tabIndex},Zj=function(t,n){var r=jx(t);return r<0&&n&&!Mx(t)?0:r},Kj=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lx=function(t){return t.tagName==="INPUT"},Gj=function(t){return Lx(t)&&t.type==="hidden"},Yj=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Jj=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Xj=function(t){if(!t.name)return!0;var n=t.form||au(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=Jj(i,t.form);return!a||a===t},Qj=function(t){return Lx(t)&&t.type==="radio"},e2=function(t){return Qj(t)&&!Xj(t)},t2=function(t){var n,r=t&&au(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==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;r=au(i),i=(l=r)===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},Fx=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},n2=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Wo.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Wo.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=au(t);if(u&&!u.shadowRoot&&i(u)===!0)return Fx(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(t2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fx(t);return!1},r2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Wo.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},i2=function(t,n){return!(n.disabled||ou(n)||Gj(n)||n2(n,t)||Yj(n)||r2(n))},Bx=function(t,n){return!(e2(n)||jx(n)<0||!i2(t,n))},a2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},o2=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=Zj(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(Kj).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Pd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Hj([t],n.includeContainer,{filter:Bx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:a2}):r=Wj(t,n.includeContainer,Bx.bind(null,n)),o2(r)};function Ux(e,t,n){let{reference:r,floating:i}=e;const a=qo(t),o=Bj(t),s=Fj(o),u=Vo(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(u){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Id(t)){case"start":d[o]-=p*(n&&l?-1:1);break;case"end":d[o]+=p*(n&&l?-1:1);break}return d}const s2=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,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}=Ux(l,r,u),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:g,y:b,data:k,reset:S}=await v({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:l,platform:o,elements:{reference:e,floating:t}});c=g??c,f=b??f,d={...d,[y]:{...d[y],...k}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=Ux(l,p,u)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function zx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=ru(t,e),m=zj(d),y=s[p?f==="floating"?"reference":"floating":f],v=iu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=f==="floating"?{x:r,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=iu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:u}):g);return{top:(v.top-S.top+m.top)/k.y,bottom:(S.bottom-v.bottom+m.bottom)/k.y,left:(v.left-S.left+m.left)/k.x,right:(S.right-v.right+m.right)/k.x}}async function l2(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Vo(n),s=Id(n),u=qo(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=ru(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),u?{x:d*c,y:p*l}:{x:p*l,y:d*c}}const u2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await l2(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},c2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...u}=ru(e,t),l={x:n,y:r},c=await zx(t,u),f=qo(Vo(i)),p=Nx(f);let d=l[p],m=l[f];if(a){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=d+c[y],b=d-c[v];d=Ax(g,d,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=m+c[y],b=m-c[v];m=Ax(g,m,b)}const h=s.fn({...t,[p]:d,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:a,[f]:o}}}}}},f2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=ru(e,t),c=await zx(t,l),f=Vo(i),p=Id(i),d=qo(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=p==="end"?"top":"bottom");const g=h-c.top-c.bottom,b=m-c.left-c.right,k=pa(h-c[y],g),S=pa(m-c[v],b),E=!t.middlewareData.shift;let O=k,L=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=g),E&&!p){const T=En(c.left,0),P=En(c.right,0),q=En(c.top,0),$=En(c.bottom,0);d?L=m-2*(T!==0||P!==0?T+P:En(c.left,c.right)):O=h-2*(q!==0||$!==0?q+$:En(c.top,c.bottom))}await u({...t,availableWidth:L,availableHeight:O});const D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Vx(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=tu(n)!==a||tu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ad(e){return Wn(e)?e:e.contextElement}function ha(e){const t=Ad(e);if(!cr(t))return ri(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Vx(t);let o=(a?tu(n.width):n.width)/r,s=(a?tu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const d2=ri(0);function qx(e){const t=_n(e);return!Cd()||!t.visualViewport?d2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function Di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ad(e);let o=ri(1);t&&(r?Wn(r)&&(o=ha(r)):o=ha(e));const s=p2(a,n,r)?qx(a):ri(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 p=_n(a),d=r&&Wn(r)?_n(r):r;let m=p,h=$d(m);for(;h&&r&&d!==m;){const y=ha(h),v=h.getBoundingClientRect(),g=Hn(h),b=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(h.clientTop+parseFloat(g.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=b,l+=k,m=_n(h),h=$d(m)}}return iu({width:c,height:f,x:u,y:l})}function h2(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ur(r),s=t?Ql(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ri(1);const c=ri(0),f=cr(r);if((f||!f&&!a)&&((fa(r)!=="body"||zo(o))&&(u=eu(r)),cr(r))){const p=Di(r);l=ha(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function m2(e){return Array.from(e.getClientRects())}function Nd(e,t){const n=eu(e).scrollLeft;return t?t.left+n:Di(ur(e)).left+n}function v2(e){const t=ur(e),n=eu(e),r=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Nd(e);const s=-n.scrollTop;return Hn(r).direction==="rtl"&&(o+=En(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function y2(e,t){const n=_n(e),r=ur(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Cd();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function g2(e,t){const n=Di(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cr(e)?ha(e):ri(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function Wx(e,t,n){let r;if(t==="viewport")r=y2(e,n);else if(t==="document")r=v2(ur(e));else if(Wn(t))r=g2(t,n);else{const i=qx(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return iu(r)}function Hx(e,t){const n=ti(e);return n===t||!Wn(n)||da(n)?!1:Hn(n).position==="fixed"||Hx(n,t)}function b2(e,t){const n=t.get(e);if(n)return n;let r=ni(e,[],!1).filter(s=>Wn(s)&&fa(s)!=="body"),i=null;const a=Hn(e).position==="fixed";let o=a?ti(e):e;for(;Wn(o)&&!da(o);){const s=Hn(o),u=Od(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zo(o)&&!u&&Hx(e,o))?r=r.filter(c=>c!==o):i=s,o=ti(o)}return t.set(e,r),r}function x2(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Ql(t)?[]:b2(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=Wx(t,c,i);return l.top=En(f.top,l.top),l.right=pa(f.right,l.right),l.bottom=pa(f.bottom,l.bottom),l.left=En(f.left,l.left),l},Wx(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function w2(e){const{width:t,height:n}=Vx(e);return{width:t,height:n}}function S2(e,t,n){const r=cr(t),i=ur(t),a=n==="fixed",o=Di(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=ri(0);if(r||!r&&!a)if((fa(t)!=="body"||zo(i))&&(s=eu(t)),r){const d=Di(t,!0,a,t);u.x=d.x+t.clientLeft,u.y=d.y+t.clientTop}else i&&(u.x=Nd(i));let l=0,c=0;if(i&&!r&&!a){const d=i.getBoundingClientRect();c=d.top+s.scrollTop,l=d.left+s.scrollLeft-Nd(i,d)}const f=o.left+s.scrollLeft-u.x-l,p=o.top+s.scrollTop-u.y-c;return{x:f,y:p,width:o.width,height:o.height}}function Dd(e){return Hn(e).position==="static"}function Zx(e,t){if(!cr(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function Kx(e,t){const n=_n(e);if(Ql(e))return n;if(!cr(e)){let i=ti(e);for(;i&&!da(i);){if(Wn(i)&&!Dd(i))return i;i=ti(i)}return n}let r=Zx(e,t);for(;r&&jj(r)&&Dd(r);)r=Zx(r,t);return r&&da(r)&&Dd(r)&&!Od(r)?n:r||Lj(e)||n}const _2=async function(e){const t=this.getOffsetParent||Kx,n=this.getDimensions,r=await n(e.floating);return{reference:S2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E2(e){return Hn(e).direction==="rtl"}const k2={convertOffsetParentRelativeRectToViewportRelativeRect:h2,getDocumentElement:ur,getClippingRect:x2,getOffsetParent:Kx,getElementRects:_2,getClientRects:m2,getDimensions:w2,getScale:ha,isElement:Wn,isRTL:E2};function T2(e,t){let n=null,r;const i=ur(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=nu(c),m=nu(i.clientWidth-(l+f)),h=nu(i.clientHeight-(c+p)),y=nu(l),g={rootMargin:-d+"px "+-m+"px "+-h+"px "+-y+"px",threshold:En(0,pa(1,u))||1};let b=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!b)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function O2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ad(e),c=i||a?[...l?ni(l):[],...ni(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?T2(l,n):null;let p=-1,d=null;o&&(d=new ResizeObserver(v=>{let[g]=v;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),l&&!u&&d.observe(l),d.observe(t));let m,h=u?Di(e):null;u&&y();function y(){const v=Di(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,u&&cancelAnimationFrame(m)}}const C2=u2,$2=c2,I2=f2,R2=(e,t,n)=>{const r=new Map,i={platform:k2,...n},a={...i.platform,_c:r};return s2(e,t,{...i,platform:a})};var su=typeof document<"u"?j.useLayoutEffect:j.useEffect;function lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!lu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Gx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yx(e,t){const n=Gx(e);return Math.round(t*n)/n}function Md(e){const t=w.useRef(e);return su(()=>{t.current=e}),t}function P2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=w.useState(r);lu(p,r)||d(r);const[m,h]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(U=>{U!==E.current&&(E.current=U,h(U))},[]),b=w.useCallback(U=>{U!==O.current&&(O.current=U,v(U))},[]),k=a||m,S=o||y,E=w.useRef(null),O=w.useRef(null),L=w.useRef(c),D=u!=null,T=Md(u),P=Md(i),q=Md(l),$=w.useCallback(()=>{if(!E.current||!O.current)return;const U={placement:t,strategy:n,middleware:p};P.current&&(U.platform=P.current),R2(E.current,O.current,U).then(N=>{const x={...N,isPositioned:q.current!==!1};F.current&&!lu(L.current,x)&&(L.current=x,sy.flushSync(()=>{f(x)}))})},[p,t,n,P,q]);su(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[l]);const F=w.useRef(!1);su(()=>(F.current=!0,()=>{F.current=!1}),[]),su(()=>{if(k&&(E.current=k),S&&(O.current=S),k&&S){if(T.current)return T.current(k,S,$);$()}},[k,S,$,T,D]);const M=w.useMemo(()=>({reference:E,floating:O,setReference:g,setFloating:b}),[g,b]),B=w.useMemo(()=>({reference:k,floating:S}),[k,S]),W=w.useMemo(()=>{const U={position:n,left:0,top:0};if(!B.floating)return U;const N=Yx(B.floating,c.x),x=Yx(B.floating,c.y);return s?{...U,transform:"translate("+N+"px, "+x+"px)",...Gx(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:x}},[n,s,B.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:$,refs:M,elements:B,floatingStyles:W}),[c,$,M,B,W])}const A2=(e,t)=>({...C2(e),options:[e,t]}),N2=(e,t)=>({...$2(e),options:[e,t]}),D2=(e,t)=>({...I2(e),options:[e,t]});var Dn=function(){return Dn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dn.apply(this,arguments)};function Jx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function M2(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function j2(){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 L2(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=j.useRef(0),i=j2(),a=j.useState(n),o=a[0],s=a[1],u=j.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(p){return Dn(Dn({},p),{loading:!0})}),e.apply(void 0,l).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[o,u]}function F2(e,t){t===void 0&&(t=[]);var n=L2(e,t,{loading:!0}),r=n[0],i=n[1];return j.useEffect(function(){i()},[i]),r}const Xx=j.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=j.useId(),{setIsLoading:o}=WM(),[s,u]=j.useState(n),[l,c]=j.useState(!1),{message:{blocks:{image:f}}}=yt;return j.useLayoutEffect(()=>{o(p=>[...p,a])},[]),F2(async()=>{if(e){try{const{width:p,height:d}=await HM(e);s==="auto"&&u(B2(p,d))}catch(p){u("square"),console.error(p)}o(p=>p.filter(d=>d!==a))}},[e]),I.jsxs(I.Fragment,{children:[l?null:I.jsx("div",{"data-orientation":s,...f.placeholder}),I.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});Xx.displayName="Image";function B2(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const U2=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return I.jsx("div",{children:I.jsx("video",{...n,"data-chromatic":"ignore",controls:!0,src:e,...i,ref:r})})}),z2=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return I.jsx("div",{children:I.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function V2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 q2=w.forwardRef(V2);function W2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 H2=w.forwardRef(W2);function Z2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 K2=w.forwardRef(Z2);function G2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 Y2=w.forwardRef(G2),J2=j.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return I.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[I.jsx("p",{...s.title,children:r}),I.jsx(Y2,{...s.icon})]})}),Qx=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,...l},c)=>{const{message:{blocks:{column:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((p,d)=>I.jsx(xa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:u,messageId:s},d))})});Qx.displayName="Column";const ew=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,...l},c)=>{const{message:{blocks:{row:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((p,d)=>I.jsx(xa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u},d))})});ew.displayName="Row";function X2(e){return Object.prototype.toString.call(e)==="[object Object]"}function tw(e){return X2(e)||Array.isArray(e)}function Q2(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function jd(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!tw(s)||!tw(u)?s===u:jd(s,u)})}function nw(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function eL(e,t){if(e.length!==t.length)return!1;const n=nw(e),r=nw(t);return n.every((i,a)=>{const o=r[a];return jd(i,o)})}function Ld(e){return typeof e=="number"}function rw(e){return typeof e=="string"}function Fd(e){return typeof e=="boolean"}function iw(e){return Object.prototype.toString.call(e)==="[object Object]"}function kt(e){return Math.abs(e)}function Bd(e){return Math.sign(e)}function uu(e,t){return kt(e-t)}function tL(e,t){if(e===0||t===0||kt(e)<=kt(t))return 0;const n=uu(kt(e),kt(t));return kt(n/e)}function Ho(e){return fu(e).map(Number)}function Dr(e){return e[cu(e)]}function cu(e){return Math.max(0,e.length-1)}function fu(e){return Object.keys(e)}function aw(e,t){return[e,t].reduce((n,r)=>(fu(r).forEach(i=>{const a=n[i],o=r[i],s=iw(a)&&iw(o);n[i]=s?aw(a,o):o}),n),{})}function ow(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function nL(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return Ld(e)?o():n[e](l)}return{measure:s}}function rL(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ii(e,t){const n=kt(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function sw(e,t,n){const{constrain:r}=ii(0,e),i=e+1;let a=o(t);function o(p){return n?kt((i+p)%i):r(p)}function s(){return a}function u(p){return a=o(p),f}function l(p){return c().set(s()+p)}function c(){return sw(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function iL(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Zo(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function aL(e,t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Zo(),O=Zo(),L=ii(50,225).constrain(m.measure(20)),D={mouse:300,touch:400},T={mouse:500,touch:600},P=h?43:25;let q=!1,$=0,F=0,M=!1,B=!1,W=!1,U=!1;function N(Q,Z){if(!Z)return;function de($e){(Fd(Z)||Z(Q,$e))&&oe($e)}const ve=n;E.add(ve,"dragstart",$e=>$e.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 x(){E.clear(),O.clear()}function V(){const Q=U?r:n;O.add(Q,"touchmove",ne,S).add(Q,"touchend",le).add(Q,"mousemove",ne,S).add(Q,"mouseup",le)}function K(Q){const Z=Q.nodeName||"";return k.includes(Z)}function _(){return(h?T:D)[U?"mouse":"touch"]}function Y(Q,Z){const de=p.add(Bd(Q)*-1),ve=f.byDistance(Q,!h).distance;return h||kt(Q)<L?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function oe(Q){const Z=ow(Q,i);U=Z,!(Z&&Q.button!==0)&&(K(Q.target)||(W=h&&Z&&!Q.buttons&&q,q=uu(a.get(),s.get())>=2,M=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),V(),$=o.readPoint(Q),F=o.readPoint(Q,b),d.emit("pointerDown")))}function ne(Q){const Z=o.readPoint(Q),de=o.readPoint(Q,b),ve=uu(Z,$),$e=uu(de,F);if(!B&&!U&&(!Q.cancelable||(B=ve>$e,!B)))return le(Q);const R=o.pointerMove(Q);ve>y&&(W=!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!==p.get(),ve=o.pointerUp(Q)*_(),$e=Y(t.apply(ve),de),R=tL(ve,$e),J=P-10*R,ae=g+R/50;B=!1,M=!1,O.clear(),c.useDuration(J).useFriction(ae),l.distance($e,!h),U=!1,d.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function he(){return M}return{init:N,pointerDown:he,destroy:x}}function oL(e,t){let r,i;function a(f){return f.timeStamp}function o(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(ow(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function u(f){const p=o(f)-o(i),d=a(f)-a(r)>170;return i=f,d&&(r=f),p}function l(f){if(!r||!i)return 0;const p=o(i)-o(r),d=a(f)-a(r),m=a(f)-a(i)>170,h=p/d;return d&&!m&&kt(h)>.1?h:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function sL(e){function t(r){return e*(r/100)}return{measure:t}}function lL(e,t,n,r,i){let a,o,s=[],u=!1;function l(d){return i.measureSize(d.getBoundingClientRect())}function c(d,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],E=l(b?e:r[k]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(Fd(m)||m(d,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function uL(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(a=0,e.set(t),O=S):(a+=S/s,a*=u,l+=a,e.add(a),O=l-c),o=Bd(O),c=l,i=kt(S)<.001,k}function p(){return i}function d(){return s}function m(){return o}function h(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return u=S,k}const k={direction:m,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function cL(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ii(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=kt(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!d&&kt(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){u=!d}return{constrain:c,toggleActive:f}}function fL(e,t,n,r){const i=ii(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],p=Dr(a),d=a.lastIndexOf(f),m=a.indexOf(p)+1;return ii(d,m)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:p}=s();return a.slice(f,p)}return{snapsContained:o}}function dL(e,t,n){const r=t[0],i=n?r-e:Dr(t);return{limit:ii(i,r)}}function pL(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=ii(a,o);function l(p){return p===1?u(n.get()):p===-1?s(n.get()):!1}function c(p){if(!l(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:c}}function hL(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function mL(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=d().map(t.measure),f=m(),p=h();function d(){return l(r).map(v=>Dr(v)[u]-v[0][s]).map(kt)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-kt(v))}function h(){const g=Dr(f)-Dr(i);return l(f).map(b=>b[0]).map((b,k,S)=>{const E=!k,O=k===cu(S);return o&&E?0:o&&O?g:b+c[k]})}return{snaps:f,snapsAligned:p}}function vL(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(m){return m.concat().sort((h,y)=>kt(h)-kt(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(g=>g-h).map(g=>c(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>kt(g.diff)-kt(b.diff)),{index:v}=y[0];return{index:v,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return u(y);const v=y.filter(g=>Bd(g)===h);return u(v)}function f(m,h){const y=t[m]-i.get(),v=c(y,h);return{index:m,distance:v}}function p(m,h){const y=i.get()+m,{index:v,distance:g}=l(y),b=!e&&a(y);if(!h||b)return{index:v,distance:m};const k=t[v]-g,S=m+c(k,0);return{index:v,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function yL(e,t,n,r,i,a,o){function s(f){const p=f.distance,d=f.index!==t.get();a.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),m=r.byIndex(d.get(),p);s(m)}return{distance:u,index:l}}function du(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return Ld(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function lw(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function u(p){a||(i.transform=r(t.apply(p)))}function l(p){a=!p}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function gL(e,t,n,r,i,a,o,s,u){const l=Ho(i),c=Ho(i).reverse(),f=h().concat(y());function p(S,E){return S.reduce((O,L)=>O-i[L],E)}function d(S,E){return S.reduce((O,L)=>p(O,E)>0?O.concat([L]):O,[])}function m(S,E){const O=E==="start",L=O?-r:r,D=o.findSlideBounds([L]);return S.map(T=>{const P=O?0:-r,q=O?r:0,F=D.filter(M=>M.index===T)[0][O?"end":"start"];return{index:T,slideLocation:du(-1),translate:lw(e,t,u[T]),target:()=>s.get()>F?P:q}})}function h(){const S=a[0]-1,E=d(c,S);return m(E,"end")}function y(){const S=n-a[0]-1,E=d(l,S);return m(E,"start")}function v(){return f.every(({index:S})=>{const E=l.filter(O=>O!==S);return p(E,n)<=.1})}function g(){f.forEach(S=>{const{target:E,translate:O,slideLocation:L}=S,D=E();D!==L.get()&&(O.to(D),L.set(D))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function bL(e,t){let n,r=!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}}n=new MutationObserver(c=>{r||(Fd(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function xL(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=d(c,o);function p(y){const v=y||0;return n.map(g=>ii(l,g-l).constrain(g*v))}function d(y,v){const g=y||c,b=p(v);return g.reduce((k,S)=>{const E=r.map((O,L)=>({start:O-n[L]+b[L]+S,end:O+e-b[L]+S,index:L}));return k.concat(E)},[])}function m(y,v){const g=a?s(y):u(y);return(v||f).reduce((k,S)=>{const{index:E,start:O,end:L}=S,D=k.includes(E),T=O<g&&L>g;return!D&&T?k.concat([E]):k},[])}return{check:m,findSlideBounds:d}}function wL(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=m(),f=h(),p=n.map(o),d=y();function m(){if(!l)return 0;const g=n[0];return kt(t[s]-g[s])}function h(){if(!l)return 0;const g=a.getComputedStyle(Dr(r));return parseFloat(g.getPropertyValue(`margin-${u}`))}function y(){return n.map((g,b,k)=>{const S=!b,E=b===cu(k);return S?p[b]+c:E?p[b]+f:k[b+1][s]-g[s]}).map(kt)}return{slideSizes:p,slideSizesWithGaps:d}}function SL(e,t,n){const r=Ld(n);function i(u,l){return Ho(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return Ho(u).reduce((l,c)=>{const p=t.slice(Dr(l),c+1).reduce((d,m)=>d+m,0);return!c||p>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function _L(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(ae=>ae.getBoundingClientRect()),E=iL(c),O=rL(l,c),L=O.measureSize(k),D=sL(L),T=nL(u,L),P=!d&&!!b,q=d||!!b,{slideSizes:$,slideSizesWithGaps:F}=wL(O,k,S,n,q,i),M=SL(L,F,v),{snaps:B,snapsAligned:W}=mL(O,T,k,S,F,M,P),U=-Dr(B)+Dr(F),{snapsContained:N}=fL(L,U,W,b),x=P?N:W,{limit:V}=dL(U,x,d),K=sw(cu(x),f,d),_=K.clone(),Y=Ho(n),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:we,animation:Re,options:{loop:We}})=>{const Ae=ae.pointerDown();We||ke.constrain(Ae);const Fe=ee.seek().settled();Fe&&!Ae&&(Re.stop(),we.emit("settle")),Fe||we.emit("scroll")},ne=({scrollBody:ae,translate:ee,location:ke,offsetLocation:we,scrollLooper:Re,slideLooper:We,options:{loop:Ae}},Fe)=>{const z=ae.velocity();we.set(ke.get()-z+z*Fe),Ae&&(Re.loop(ae.direction()),We.loop()),ee.to(we.get())},le={start:()=>s.start(J),stop:()=>s.stop(J),update:()=>oe(J),render:ae=>ne(J,ae)},pe=.68,he=x[K.get()],ue=du(he),Q=du(he),Z=du(he),de=uL(ue,Z,m,pe),ve=vL(d,x,U,V,Z),$e=yL(le,K,_,ve,de,Z,o),R=xL(L,U,$,B,V,d,p),J={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:O,direction:E,dragHandler:aL(O,E,e,r,i,Z,oL(O,i),ue,le,$e,de,ve,K,o,D,h,y,g,pe),eventStore:Zo(),percentOfView:D,index:K,indexPrevious:_,limit:V,location:ue,offsetLocation:Q,options:a,resizeHandler:lL(t,o,i,n,O),scrollBody:de,scrollBounds:cL(V,ue,Z,de,D),scrollLooper:pL(U,V,Q,[ue,Q,Z]),scrollProgress:hL(V),scrollSnaps:x,scrollTarget:ve,scrollTo:$e,slideLooper:gL(O,E,L,U,F,x,R,Q,n),slidesHandler:bL(t,o),slidesInView:R,slideIndexes:Y,slidesToScroll:M,target:Z,translate:lw(O,E,t)};return J}function EL(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=kt(i/t);n.forEach(({animation:m})=>m.render(d)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function kL(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const TL={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 OL(e){function t(a,o){return aw(a,o||{})}function n(a){const o=a.breakpoints||{},s=fu(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>fu(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function CL(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function ma(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=OL(i),o=CL(a),s=Zo(),u=Zo(),l=kL(),{animationRealms:c}=ma,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=a,{on:m,off:h,emit:y}=l,v=$;let g=!1,b,k=f(TL,ma.globalOptions),S=f(k),E=[],O,L,D;function T(){const{container:de,slides:ve}=S;L=(rw(de)?e.querySelector(de):de)||e.children[0];const R=rw(ve)?L.querySelectorAll(ve):ve;D=[].slice.call(R||L.children)}function P(de,ve){const $e=_L(e,L,D,r,i,de,l,ve);if(de.loop&&!$e.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return P(R,ve)}return $e}function q(de,ve){if(g)return;const $e=c.find(J=>J.window===i),R=$e||EL(i);$e||c.push(R),k=f(k,de),S=p(k),E=ve||E,T(),b=P(S,R),d([k,...E.map(({options:J})=>J)]).forEach(J=>s.add(J,"change",$)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),L.offsetParent&&D.length&&b.dragHandler.init(Z,S.watchDrag),O=o.init(E,Z))}function $(de,ve){const $e=oe();F(),q(f({startIndex:$e},de),ve),l.emit("reInit")}function F(){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(),u.clear()}function M(){g||(g=!0,s.clear(),F(),l.emit("destroy"))}function B(de){const ve=b[de?"target":"location"].get(),$e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[$e](ve))}function W(de){const ve=B(de);return b.slideIndexes.filter($e=>!ve.includes($e))}function U(de,ve,$e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,$e||0))}function N(de){const ve=b.index.add(1).get();U(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();U(ve,de===!0,1)}function V(){return b.index.add(1).get()!==oe()}function K(){return b.index.add(-1).get()!==oe()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function Y(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function ne(){return b.indexPrevious.get()}function le(){return O}function pe(){return b}function he(){return e}function ue(){return L}function Q(){return D}const Z={canScrollNext:V,canScrollPrev:K,containerNode:ue,internalEngine:pe,destroy:M,off:h,on:m,emit:y,plugins:le,previousScrollSnap:ne,reInit:v,rootNode:he,scrollNext:N,scrollPrev:x,scrollProgress:Y,scrollSnapList:_,scrollTo:U,selectedScrollSnap:oe,slideNodes:Q,slidesInView:B,slidesNotInView:W};return q(t,n),setTimeout(()=>l.emit("init"),0),Z}ma.animationRealms=[],ma.globalOptions=void 0;function Ud(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),u=j.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return j.useEffect(()=>{if(Q2()&&o){ma.globalOptions=Ud.globalOptions;const l=ma(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{jd(n.current,e)||(n.current=e,u())},[e,u]),j.useEffect(()=>{eL(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}Ud.globalOptions=void 0;function $L({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 IL=w.forwardRef($L);function RL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 PL=w.forwardRef(RL);function AL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 NL=w.forwardRef(AL);function DL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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"}),w.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 ML=w.forwardRef(DL);function jL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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"}),w.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 LL=w.forwardRef(jL);function FL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 BL=w.forwardRef(FL);function UL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 zL=w.forwardRef(UL);function VL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 qL=w.forwardRef(VL),uw=j.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},s)=>{const[u,l]=Ud({skipSnaps:!0,loop:!0}),[c,f]=j.useState(!0),[p,d]=j.useState(!0),m=j.useCallback(()=>l==null?void 0:l.scrollPrev(),[l]),h=j.useCallback(()=>l==null?void 0:l.scrollNext(),[l]),{message:{blocks:{carousel:y}}}=yt,v=j.useCallback(g=>{f(!g.canScrollPrev()),d(!g.canScrollNext())},[]);return j.useEffect(()=>{l&&(v(l),l.on("reInit",v),l.on("select",v))},[l,v]),I.jsxs("div",{...y==null?void 0:y.container,"data-container":"carousel",ref:u,children:[I.jsx("div",{ref:s,...y==null?void 0:y.slidesContainer,children:e.map((g,b)=>I.jsx(xa,{block:{...g,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},b))}),e.length>1&&I.jsxs(I.Fragment,{children:[I.jsx(PL,{...y==null?void 0:y.backButton,"data-disabled":c?"":void 0,onClick:m}),I.jsx(NL,{...y==null?void 0:y.nextButton,"data-disabled":p?"":void 0,onClick:h})]})]})});uw.displayName="Carousel";const cw=Math.floor;function fw(e){return dw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ko(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function WL(e){var t;return(t=(dw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dw(e){return e instanceof Node||e instanceof Ko(e).Node}function Mn(e){return e instanceof Element||e instanceof Ko(e).Element}function va(e){return e instanceof HTMLElement||e instanceof Ko(e).HTMLElement}function zd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot}function HL(e){return["html","body","#document"].includes(fw(e))}function ZL(e){return Ko(e).getComputedStyle(e)}function KL(e){if(fw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zd(e)&&e.host||WL(e);return zd(t)?t.host:t}function ai(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function mn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pw(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function GL(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function hw(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(pw())||t.test(GL()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function mw(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 vw(){return/apple/i.test(navigator.vendor)}function YL(){return pw().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function yw(e,t){return["mouse","pen"].includes(e)}function JL(e){return"nativeEvent"in e}function XL(e){return e.matches("html,body")}function Zn(e){return(e==null?void 0:e.ownerDocument)||document}function Vd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function gw(e){return"composedPath"in e?e.composedPath()[0]:e.target}const QL="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function bw(e){return va(e)&&e.matches(QL)}function Gt(e){e.preventDefault(),e.stopPropagation()}const qd="ArrowUp",pu="ArrowDown",ya="ArrowLeft",Go="ArrowRight";function hu(e,t,n){return Math.floor(e/t)!==n}function Yo(e,t){return t<0||t>=e.current.length}function Wd(e,t){return tn(e,{disabledIndices:t})}function xw(e,t){return tn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-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 eF(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===qd){if(c&&Gt(n),l===-1)f=u;else if(f=tn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const p=l%a,d=u%a,m=u-(d-p);d===p?f=u:f=d>p?m:m-a}Yo(e,f)&&(f=l)}if(n.key===pu&&(c&&Gt(n),l===-1?f=s:(f=tn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=tn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Yo(e,f)&&(f=l)),r==="both"){const p=cw(l/a);n.key===Go&&(c&&Gt(n),l%a!==a-1?(f=tn(e,{startingIndex:l,disabledIndices:o}),i&&hu(f,a,p)&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o})),hu(f,a,p)&&(f=l)),n.key===ya&&(c&&Gt(n),l%a!==0?(f=tn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&hu(f,a,p)&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),hu(f,a,p)&&(f=l));const d=cw(u/a)===p;Yo(e,f)&&(i&&d?f=n.key===ya?u:tn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let ww=0;function Mr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ww);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():ww=requestAnimationFrame(a)}var jt=typeof document<"u"?j.useLayoutEffect:j.useEffect;function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mu.apply(this,arguments)}let Hd=!1,tF=0;const Sw=()=>"floating-ui-"+tF++;function nF(){const[e,t]=w.useState(()=>Hd?Sw():void 0);return jt(()=>{e==null&&t(Sw())},[]),w.useEffect(()=>{Hd||(Hd=!0)},[]),e}const Zd=w.useId||nF;function rF(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const iF=w.createContext(null),aF=w.createContext(null),_w=()=>{var e;return((e=w.useContext(iF))==null?void 0:e.id)||null},vu=()=>w.useContext(aF);function Jo(e){return"data-floating-ui-"+e}function oi(e){const t=j.useRef(e);return jt(()=>{t.current=e}),t}function oF(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function ga(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function sF(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),ga(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let ba=new WeakMap,yu=new WeakSet,gu={},Kd=0;const lF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ew=e=>e&&(e.host||Ew(e.parentNode)),uF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ew(n);return e.contains(r)?r:null}).filter(n=>n!=null);function cF(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=uF(t,e),s=new Set,u=new Set(o),l=[];gu[i]||(gu[i]=new WeakMap);const c=gu[i];o.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(ba.get(m)||0)+1,g=(c.get(m)||0)+1;ba.set(m,v),c.set(m,g),l.push(m),v===1&&y&&yu.add(m),g===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return Kd++,()=>{l.forEach(d=>{const m=(ba.get(d)||0)-1,h=(c.get(d)||0)-1;ba.set(d,m),c.set(d,h),m||(!yu.has(d)&&a&&d.removeAttribute(a),yu.delete(d)),h||d.removeAttribute(i)}),Kd--,Kd||(ba=new WeakMap,ba=new WeakMap,yu=new WeakSet,gu={})}}function kw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zn(e[0]).body;return cF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Gd=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tw(e,t){const n=Pd(e,Gd());t==="prev"&&n.reverse();const r=n.indexOf(ai(Zn(e)));return n.slice(r+1)[0]}function Ow(){return Tw(document.body,"next")}function Cw(){return Tw(document.body,"prev")}function Xo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mn(n,r)}function fF(e){Pd(e,Gd()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function dF(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Yd={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 pF;function $w(e){e.key==="Tab"&&(e.target,clearTimeout(pF))}const bu=w.forwardRef(function(t,n){const[r,i]=w.useState();jt(()=>(vw()&&i("button"),document.addEventListener("keydown",$w),()=>{document.removeEventListener("keydown",$w)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Jo("focus-guard")]:"",style:Yd};return w.createElement("span",mu({},t,a))}),Iw=w.createContext(null);function hF(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=Zd(),o=Rw(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=w.useRef();return jt(()=>()=>{r==null||r.remove()},[r,s]),jt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,m=Jo("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Mn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=p,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function mF(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=hF({id:n,root:r}),[o,s]=w.useState(null),u=w.useRef(null),l=w.useRef(null),c=w.useRef(null),f=w.useRef(null),p=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function d(m){a&&Xo(m)&&(m.type==="focusin"?dF:fF)(a)}return a.addEventListener("focusin",d,!0),a.addEventListener("focusout",d,!0),()=>{a.removeEventListener("focusin",d,!0),a.removeEventListener("focusout",d,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(Iw.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},p&&a&&w.createElement(bu,{"data-type":"outside",ref:u,onFocus:d=>{if(Xo(d,a)){var m;(m=c.current)==null||m.focus()}else{const h=Cw()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),p&&a&&w.createElement("span",{"aria-owns":a.id,style:Yd}),a&&Ti.createPortal(t,a),p&&a&&w.createElement(bu,{"data-type":"outside",ref:l,onFocus:d=>{if(Xo(d,a)){var m;(m=f.current)==null||m.focus()}else{const h=Ow()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,d.nativeEvent))}}}))}const Rw=()=>w.useContext(Iw),vF=w.forwardRef(function(t,n){return w.createElement("button",mu({},t,{type:"button",ref:n,tabIndex:-1,style:Yd}))});function yF(e){const{context:t,children:n,disabled:r=!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:p,nodeId:d,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:g}}=t,b=lF()?a:!0,k=oi(i),S=oi(o),E=oi(s),O=vu(),L=Rw(),D=typeof o=="number"&&o<0,T=w.useRef(null),P=w.useRef(null),q=w.useRef(!1),$=w.useRef(null),F=w.useRef(!1),M=L!=null,B=v&&v.getAttribute("role")==="combobox"&&bw(v)&&D,W=w.useCallback(function(V){return V===void 0&&(V=g),V?Pd(V,Gd()):[]},[g]),U=w.useCallback(V=>{const K=W(V);return k.current.map(_=>v&&_==="reference"?v:g&&_==="floating"?g:K).filter(Boolean).flat()},[v,g,k,W]);w.useEffect(()=>{if(r||!u)return;function V(_){if(_.key==="Tab"){mn(g,ai(Zn(g)))&&W().length===0&&!B&&Gt(_);const Y=U(),oe=gw(_);k.current[0]==="reference"&&oe===v&&(Gt(_),_.shiftKey?Mr(Y[Y.length-1]):Mr(Y[1])),k.current[1]==="floating"&&oe===g&&_.shiftKey&&(Gt(_),Mr(Y[0]))}}const K=Zn(g);return K.addEventListener("keydown",V),()=>{K.removeEventListener("keydown",V)}},[r,v,g,u,k,p,B,W,U]),w.useEffect(()=>{if(r||!c)return;function V(){F.current=!0,setTimeout(()=>{F.current=!1})}function K(_){const Y=_.relatedTarget;queueMicrotask(()=>{const oe=!(mn(v,Y)||mn(g,Y)||mn(Y,g)||mn(L==null?void 0:L.portalNode,Y)||Y!=null&&Y.hasAttribute(Jo("focus-guard"))||O&&(ga(O.nodesRef.current,d).find(ne=>{var le,pe;return mn((le=ne.context)==null?void 0:le.elements.floating,Y)||mn((pe=ne.context)==null?void 0:pe.elements.domReference,Y)})||oF(O.nodesRef.current,d).find(ne=>{var le,pe;return((le=ne.context)==null?void 0:le.elements.floating)===Y||((pe=ne.context)==null?void 0:pe.elements.domReference)===Y})));Y&&oe&&!F.current&&Y!==$.current&&(q.current=!0,m(!1,_))})}if(g&&va(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",V),!u&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",V),!u&&g.removeEventListener("focusout",K)}},[r,v,g,u,d,O,L,m,c]),w.useEffect(()=>{var V;if(r)return;const K=Array.from((L==null||(V=L.portalNode)==null?void 0:V.querySelectorAll("["+Jo("portal")+"]"))||[]);if(g){const _=[g,...K,T.current,P.current,k.current.includes("reference")||B?v:null].filter(oe=>oe!=null),Y=u?kw(_,b,!b):kw(_);return()=>{Y()}}},[r,v,g,u,k,L,B,b]),jt(()=>{if(r||!g)return;const V=Zn(g),K=ai(V);queueMicrotask(()=>{const _=U(g),Y=S.current,oe=(typeof Y=="number"?_[Y]:Y.current)||g,ne=mn(g,K);!D&&!ne&&f&&Mr(oe,{preventScroll:oe===g})})},[r,f,g,D,U,S]),jt(()=>{if(r||!g)return;let V=!1;const K=Zn(g),_=ai(K),Y=y.current;$.current=_;function oe(ne){if(ne.type==="escapeKey"&&p.domReference.current&&($.current=p.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const le=ne.data.returnFocus;typeof le=="object"?(q.current=!1,V=le.preventScroll):q.current=!le}return h.on("dismiss",oe),()=>{h.off("dismiss",oe);const ne=ai(K);(mn(g,ne)||O&&ga(O.nodesRef.current,d).some(pe=>{var he;return mn((he=pe.context)==null?void 0:he.elements.floating,ne)})||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&p.domReference.current&&($.current=p.domReference.current),E.current&&va($.current)&&!q.current&&Mr($.current,{cancelPrevious:!1,preventScroll:V})}},[r,g,E,y,p,h,O,d]),jt(()=>{if(!(r||!L))return L.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:m,refs:p}),()=>{L.setFocusManagerState(null)}},[r,L,u,f,m,p,c]),jt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!D){const V=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||ai(Zn(g))!==p.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};V();const K=new MutationObserver(V);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,p,k,W,D]);function N(V){return r||!l||!u?null:w.createElement(vF,{ref:V==="start"?T:P,onClick:K=>m(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const x=!r&&b&&!B&&(M||u);return w.createElement(w.Fragment,null,x&&w.createElement(bu,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:V=>{if(u){const _=U();Mr(i[0]==="reference"?_[0]:_[_.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(q.current=!1,Xo(V,L.portalNode)){const _=Ow()||v;_==null||_.focus()}else{var K;(K=L.beforeOutsideRef.current)==null||K.focus()}}}),!B&&N("start"),n,N("end"),x&&w.createElement(bu,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:V=>{if(u)Mr(U()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(c&&(q.current=!0),Xo(V,L.portalNode)){const _=Cw()||v;_==null||_.focus()}else{var K;(K=L.afterOutsideRef.current)==null||K.focus()}}}))}function Pw(e){return va(e.target)&&e.target.tagName==="BUTTON"}function Aw(e){return bw(e)}function gF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=w.useRef(),p=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(yw(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}yw(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||Pw(d))&&(d.key===" "&&!Aw(a)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&u),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||Pw(d)||Aw(a)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&u),d.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const bF=w.useInsertionEffect||(e=>e());function si(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return bF(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const xF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},SF=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function _F(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=vu(),b=_w()!=null,k=si(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,E=w.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:L}=SF(v),D=si(P=>{if(!n||!c||!f||P.key!=="Escape")return;const q=g?ga(g.nodesRef.current,a):[];if(!O&&(P.stopPropagation(),q.length>0)){let $=!0;if(q.forEach(F=>{var M;if((M=F.context)!=null&&M.open&&!F.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,JL(P)?P.nativeEvent:P)}),T=si(P=>{const q=E.current;if(E.current=!1,q||typeof S=="function"&&!S(P))return;const $=gw(P),F="["+Jo("inert")+"]",M=Zn(u).querySelectorAll(F);let B=Mn($)?$:null;for(;B&&!HL(B);){const N=KL(B);if(N===Zn(u).body||!Mn(N))break;B=N}if(M.length&&Mn($)&&!XL($)&&!mn($,u)&&Array.from(M).every(N=>!mn(B,N)))return;if(va($)&&u){const N=$.clientWidth>0&&$.scrollWidth>$.clientWidth,x=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let V=x&&P.offsetX>$.clientWidth;if(x&&ZL($).direction==="rtl"&&(V=P.offsetX<=$.offsetWidth-$.clientWidth),V||N&&P.offsetY>$.clientHeight)return}const W=g&&ga(g.nodesRef.current,a).some(N=>{var x;return Vd(P,(x=N.context)==null?void 0:x.elements.floating)});if(Vd(P,u)||Vd(P,s)||W)return;const U=g?ga(g.nodesRef.current,a):[];if(U.length>0){let N=!0;if(U.forEach(x=>{var V;if((V=x.context)!=null&&V.open&&!x.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:hw(P)||mw(P)}}),r(!1,P)});return w.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=L;function P(F){r(!1,F)}const q=Zn(u);f&&q.addEventListener("keydown",D),S&&q.addEventListener(d,T);let $=[];return y&&(Mn(s)&&($=ni(s)),Mn(u)&&($=$.concat(ni(u))),!Mn(o)&&o&&o.contextElement&&($=$.concat(ni(o.contextElement)))),$=$.filter(F=>{var M;return F!==((M=q.defaultView)==null?void 0:M.visualViewport)}),$.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{f&&q.removeEventListener("keydown",D),S&&q.removeEventListener(d,T),$.forEach(F=>{F.removeEventListener("scroll",P)})}},[l,u,s,o,f,S,d,n,r,y,c,O,L,D,T]),w.useEffect(()=>{E.current=!1},[S,d]),w.useMemo(()=>c?{reference:{onKeyDown:D,[xF[h]]:P=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,P.nativeEvent))}},floating:{onKeyDown:D,[wF[d]]:()=>{E.current=!0}}}:{},[c,i,m,d,h,r,D])}let Jd;process.env.NODE_ENV!=="production"&&(Jd=new Set);function EF(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const O="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&&!Mn(e.elements.reference)){var o;if(!((o=Jd)!=null&&o.has(O))){var s;(s=Jd)==null||s.add(O),console.error(O)}}}const[u,l]=w.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=P2(e),p=vu(),d=si((O,L)=>{O&&(h.current.openEvent=L),r==null||r(O,L)}),m=w.useRef(null),h=w.useRef({}),y=w.useState(()=>rF())[0],v=Zd(),g=w.useCallback(O=>{const L=Mn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(L)},[f.refs]),b=w.useCallback(O=>{(Mn(O)||O===null)&&(m.current=O,l(O)),(Mn(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!Mn(O))&&f.refs.setReference(O)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:m}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:d}),[f,i,v,y,n,d,k,S]);return jt(()=>{const O=p==null?void 0:p.nodesRef.current.find(L=>L.id===i);O&&(O.context=E)}),w.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function Xd(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=u}),i),{})}}function kF(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>Xd(a,e,"reference"),t),r=w.useCallback(a=>Xd(a,e,"floating"),t),i=w.useCallback(a=>Xd(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Nw=!1;function xu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Dw(e,t){return xu(t,e===qd||e===pu,e===ya||e===Go)}function Qd(e,t,n){return xu(t,e===pu,n?e===ya:e===Go)||e==="Enter"||e==" "||e===""}function TF(e,t,n){return xu(t,n?e===ya:e===Go,e===pu)}function Mw(e,t,n){return xu(t,n?e===Go:e===ya,e===qd)}function OF(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),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 D=_w(),T=vu(),P=si(l),q=w.useRef(v),$=w.useRef(f??-1),F=w.useRef(null),M=w.useRef(!0),B=w.useRef(P),W=w.useRef(!!o),U=w.useRef(!1),N=w.useRef(!1),x=oi(k),V=oi(n),K=oi(O),[_,Y]=w.useState(),[oe,ne]=w.useState(),le=si(function(ue,Q,Z){Z===void 0&&(Z=!1);const de=ue.current[Q.current];de&&(y?(Y(de.id),T==null||T.events.emit("virtualfocus",de),L&&(L.current=de)):Mr(de,{preventScroll:!0,sync:YL()&&vw()?Nw||U.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});jt(()=>{document.createElement("div").focus({get preventScroll(){return Nw=!0,!1}})},[]),jt(()=>{c&&(n&&o?q.current&&f!=null&&(N.current=!0,P(f)):W.current&&($.current=-1,B.current(null)))},[c,n,o,f,P]),jt(()=>{if(c&&n&&o)if(u==null){if(U.current=!1,f!=null)return;if(W.current&&($.current=-1,le(s,$)),!W.current&&q.current&&(F.current!=null||q.current===!0&&F.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):($.current=F.current==null||Qd(F.current,S,h)||m?Wd(s,x.current):xw(s,x.current),F.current=null,P($.current))};Q()}}else Yo(s,u)||($.current=u,le(s,$,N.current),N.current=!1)},[c,n,o,u,f,m,s,S,h,P,le,x]),jt(()=>{var ue,Q;if(!c||o||!T||y||!W.current)return;const Z=T.nodesRef.current,de=(ue=Z.find(R=>R.id===D))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=ai(Zn(o)),$e=Z.some(R=>R.context&&mn(R.context.elements.floating,ve));de&&!$e&&M.current&&de.focus({preventScroll:!0})},[c,o,T,D,y]),jt(()=>{if(!c||!T||!y||D)return;function ue(Q){ne(Q.id),L&&(L.current=Q)}return T.events.on("virtualfocus",ue),()=>{T.events.off("virtualfocus",ue)}},[c,T,y,D,L]),jt(()=>{B.current=P,W.current=!!o}),jt(()=>{n||(F.current=null)},[n]);const pe=u!=null,he=w.useMemo(()=>{function ue(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&P(de)}return{onFocus(Z){let{currentTarget:de}=Z;ue(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ue(de)},onPointerLeave(Z){let{pointerType:de}=Z;!M.current||de==="touch"||($.current=-1,le(s,$),P(null),y||Mr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,P,y]);return w.useMemo(()=>{if(!c)return{};const ue=x.current;function Q(R){if(M.current=!1,U.current=!0,!V.current&&R.currentTarget===i.floating.current)return;if(m&&Mw(R.key,S,h)){Gt(R),r(!1,R.nativeEvent),va(a)&&!y&&a.focus();return}const J=$.current,ae=Wd(s,ue),ee=xw(s,ue);if(R.key==="Home"&&(Gt(R),$.current=ae,P($.current)),R.key==="End"&&(Gt(R),$.current=ee,P($.current)),!(E>1&&($.current=eF(s,{event:R,orientation:S,loop:d,cols:E,disabledIndices:ue,minIndex:ae,maxIndex:ee,prevIndex:$.current,stopEvent:!0}),P($.current),S==="both"))&&Dw(R.key,S)){if(Gt(R),n&&!y&&ai(R.currentTarget.ownerDocument)===R.currentTarget){$.current=Qd(R.key,S,h)?ae:ee,P($.current);return}Qd(R.key,S,h)?d?$.current=J>=ee?p&&J!==s.current.length?-1:ae:tn(s,{startingIndex:J,disabledIndices:ue}):$.current=Math.min(ee,tn(s,{startingIndex:J,disabledIndices:ue})):d?$.current=J<=ae?p&&J!==-1?s.current.length:ee:tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue}):$.current=Math.max(ae,tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue})),Yo(s,$.current)?P(null):P($.current)}}function Z(R){v==="auto"&&hw(R.nativeEvent)&&(q.current=!0)}function de(R){q.current=v,v==="auto"&&mw(R.nativeEvent)&&(q.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":oe||_},$e=s.current.find(R=>(R==null?void 0:R.id)===_);return{reference:{...ve,onKeyDown(R){M.current=!1;const J=R.key.indexOf("Arrow")===0,ae=TF(R.key,S,h),ee=Mw(R.key,S,h),ke=Dw(R.key,S),we=(m?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const Fe=T==null?void 0:T.nodesRef.current.find(A=>A.parentId==null),z=T&&Fe?sF(T.nodesRef.current,Fe.id):null;if(J&&z&&L){const A=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Re,We;const X=((Re=z.context)==null?void 0:Re.elements.domReference)===R.currentTarget,ce=ee&&!X?(We=z.context)==null?void 0:We.elements.domReference:ae?$e:null;ce&&(Gt(R),ce.dispatchEvent(A),ne(void 0))}if(ke&&z.context&&z.context.open&&z.parentId&&R.currentTarget!==z.context.elements.domReference){var Ae;Gt(R),(Ae=z.context.elements.domReference)==null||Ae.dispatchEvent(A);return}}return Q(R)}if(!(!n&&!b&&J)){if(we&&(F.current=m&&ke?null:R.key),m){ae&&(Gt(R),n?($.current=Wd(s,ue),P($.current)):r(!0,R.nativeEvent));return}ke&&(f!=null&&($.current=f),Gt(R),!n&&b?r(!0,R.nativeEvent):Q(R),n&&P($.current))}},onFocus(){n&&P(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){M.current=!0}},item:he}},[a,i,_,oe,x,V,s,c,S,h,y,n,pe,m,f,b,p,E,d,v,P,r,he,T,L])}function CF(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Zd();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function $F(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=w.useRef(),h=w.useRef(""),y=w.useRef((n=d??o)!=null?n:-1),v=w.useRef(null),g=si(s),b=si(u),k=oi(c),S=oi(p);return jt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),jt(()=>{if(r&&h.current===""){var E;y.current=(E=d??o)!=null?E:-1}},[r,d,o]),w.useMemo(()=>{if(!l)return{};function E(D){D?i.current.typing||(i.current.typing=D,b(D)):i.current.typing&&(i.current.typing=D,b(D))}function O(D,T,P){const q=k.current?k.current(T,P):T.find($=>($==null?void 0:$.toLocaleLowerCase().indexOf(P.toLocaleLowerCase()))===0);return q?D.indexOf(q):-1}function L(D){const T=a.current;if(h.current.length>0&&h.current[0]!==" "&&(O(T,T,h.current)===-1?E(!1):D.key===" "&&Gt(D)),T==null||S.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(Gt(D),E(!0)),T.every(F=>{var M,B;return F?((M=F[0])==null?void 0:M.toLocaleLowerCase())!==((B=F[1])==null?void 0:B.toLocaleLowerCase()):!0})&&h.current===D.key&&(h.current="",y.current=v.current),h.current+=D.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,E(!1)},f);const q=y.current,$=O(T,[...T.slice((q||0)+1),...T.slice(0,(q||0)+1)],h.current);$!==-1?(g($),v.current=$):D.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(D){D.key===" "&&E(!1)}}}},[l,r,i,a,f,S,k,g,b])}const IF=({options:e,label:t,reusable:n,sendMessage:r,isReadOnly:i})=>{var M,B,W,U,N;const a=ql(x=>x.messageContainerRef),[o,s]=w.useState(!1),[u,l]=w.useState(null),[c,f]=w.useState(null),{message:{blocks:{dropdown:p}}}=yt,d=e.reduce((x,V)=>(x[V.label]=V.value,x),{}),m=d?Object.keys(d):[],h=x=>{s(c!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=EF({placement:"bottom-start",open:o,onOpenChange:h,whileElementsMounted:O2,middleware:[A2(5),N2({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),D2({apply({rects:x,elements:V,availableHeight:K}){Object.assign(V.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(m),S=w.useRef(!1),E=gF(g,{event:"mousedown"}),O=_F(g),L=CF(g,{role:"listbox"}),D=OF(g,{listRef:b,activeIndex:u,selectedIndex:c,onNavigate:l,loop:!0}),T=$F(g,{listRef:k,activeIndex:u,selectedIndex:c,onMatch:o?l:f,onTypingChange(x){S.current=x}}),{getReferenceProps:P,getFloatingProps:q,getItemProps:$}=kF([O,L,D,T,E]),F=x=>{f(x),m[x]!==void 0&&(r==null||r({type:"text",text:d[m[x]]??""})),s(!1)};return c!==null&&m[c],I.jsxs(I.Fragment,{children:[I.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!n?"":void 0,...(M=p.button)==null?void 0:M.container,...P(),children:[I.jsx("span",{...(B=p.button)==null?void 0:B.text,children:"Select..."}),I.jsx(H2,{...(W=p.button)==null?void 0:W.icon})]}),o&&I.jsx(mF,{children:I.jsx(yF,{context:g,modal:!1,children:I.jsx("div",{ref:y.setFloating,className:(N=(U=p.content)==null?void 0:U.container)==null?void 0:N.className,style:{...v},...q(),children:m.map((x,V)=>{var K;return I.jsx("div",{ref:_=>{b.current[V]=_},role:"option",tabIndex:V===u?0:-1,"aria-selected":V===c&&V===u,"data-active":V===u?"":void 0,...(K=p.content)==null?void 0:K.item,...$({onClick(){i||F(V)},onKeyDown(_){i||(_.key==="Enter"&&(_.preventDefault(),F(V)),_.key===" "&&!S.current&&(_.preventDefault(),F(V)))}}),children:x},x)})})})})]})},RF=j.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return I.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[I.jsx("p",{...a.title,children:t||n}),I.jsx(K2,{...a.icon})]})}),jw={audio:z2,bubble:xx,button:VM,carousel:uw,column:Qx,dropdown:IF,file:RF,image:Xx,location:J2,row:ew,text:EM,video:U2},xa=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??jw[e.type],i={...n,...e};return I.jsx(r,{...i})};function PF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 AF=w.forwardRef(PF);function NF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.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 DF=w.forwardRef(NF);function MF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 jF=w.forwardRef(MF);function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}function LF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var FF=j.useLayoutEffect,BF=function(t){var n=w.useRef(t);return FF(function(){n.current=t}),n},Lw=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},UF=function(t,n){var r=j.useRef();return j.useCallback(function(i){t.current=i,r.current&&Lw(r.current,null),r.current=n,n&&Lw(n,i)},[n])},Fw={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},zF=function(t){Object.keys(Fw).forEach(function(n){t.style.setProperty(n,Fw[n],"important")})},Bw=zF,un=null,Uw=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function VF(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),Bw(un)),un.parentNode===null&&document.body.appendChild(un);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(p){var d=p;un.style[d]=o[d]}),Bw(un),un.value=t;var u=Uw(un,e);un.value=t,u=Uw(un,e),un.value="x";var l=un.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var zw=function(){},qF=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},WF=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],HF=!!document.documentElement.currentStyle,ZF=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=qF(WF,n),i=r.boxSizing;if(i==="")return null;HF&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},KF=ZF;function Vw(e,t,n){var r=BF(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var GF=function(t){Vw(window,"resize",t)},YF=function(t){Vw(document.fonts,"loadingdone",t)},JF=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],XF=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?zw:o,u=t.onHeightChange,l=u===void 0?zw:u,c=LF(t,JF),f=c.value!==void 0,p=w.useRef(null),d=UF(p,n),m=w.useRef(0),h=w.useRef(),y=function(){var b=p.current,k=r&&h.current?h.current:KF(b);if(k){h.current=k;var S=VF(k,b.value||b.placeholder||"x",a,i),E=S[0],O=S[1];m.current!==E&&(m.current=E,b.style.setProperty("height",E+"px","important"),l(E,{rowHeight:O}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),GF(y),YF(y),w.createElement("textarea",ep({},c,{onChange:v,ref:d}))},QF=w.forwardRef(XF);const qw=j.memo(j.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:p}=yt,[d,m]=j.useState(""),[h,y]=j.useState(-1),[v,g]=j.useState(!1),b=j.useRef(null),k=j.useRef(null),S=gx($=>$.messageHistory),E=gx($=>$.addMessageToHistory);if(r)return null;const O=()=>{var $;b.current&&(($=b.current)==null||$.click())},L=n||r||!a,D=async $=>{var M;if(!l)return;const F=(M=$.target.files)==null?void 0:M[0];if(F)try{const{fileUrl:B,type:W}=await l(F),U=W==="image"?{type:W,imageUrl:B}:W==="audio"?{type:W,audioUrl:B}:W==="video"?{type:W,videoUrl:B}:{type:W,fileUrl:B};await(u==null?void 0:u(U))}catch(B){console.error("Error sending file:",B)}},T=window.SpeechRecognition||window.webkitSpeechRecognition,P=()=>{k.current||(k.current=new T);const $=k.current;$&&($.continuous=!0,$.onresult=F=>{var B,W,U;const M=((U=(W=(B=F.results)==null?void 0:B[0])==null?void 0:W[0])==null?void 0:U.transcript)??"";m(M??""),$.stop(),g(!1)},v?($.stop(),g(!1)):($.start(),g(!0)))},q=()=>{d&&(u==null||u({type:"text",text:d}),m(""),E(d),y(-1))};return I.jsxs(I.Fragment,{children:[I.jsxs("div",{"data-disabled":L,...c,className:Jl(p.container.className,e),ref:f,children:[i&&I.jsxs(I.Fragment,{children:[I.jsx("button",{type:"button",disabled:L,...p.uploadButton.container,onClick:O,children:I.jsx(jF,{...p.uploadButton.icon})}),I.jsx("input",{type:"file",ref:b,style:{display:"none"},onChange:D})]}),I.jsx(QF,{...p==null?void 0:p.input,ref:t,placeholder:o??"Type your message...",disabled:L,value:d,"data-has-value":!!d,onChange:$=>m($.target.value),maxRows:5,onKeyDown:$=>{L||($.key==="Enter"&&$.shiftKey?($.preventDefault(),m(`${d}
273
- `)):$.key==="Enter"&&($.preventDefault(),q()),$.key==="ArrowUp"&&($.preventDefault(),h<S.length-1&&m(S[h+1]??""),y(()=>Math.min(h+1,S.length-1))),$.key==="ArrowDown"&&($.preventDefault(),m(h===0?"":S[h-1]??""),y(()=>Math.max(h-1,-1))))}}),d&&I.jsx("button",{type:"button","aria-label":"Send message",...p.button.container,disabled:!d||L,onClick:q,children:I.jsx(AF,{...p.button.icon})}),!d&&T&&I.jsx("button",{type:"button","aria-label":"Activate voice input",...p.voiceButton.container,disabled:!!d,onClick:P,"data-listens":!!v,children:I.jsx(DF,{...p.voiceButton.icon})})]}),I.jsx("a",{...p.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),Ww=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[a,o]=j.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return I.jsxs(Sx.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[I.jsx(ui,{open:t,onOpenChange:n,children:I.jsx(ui.Content,{title:r,children:a})}),e]})},Hw=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=j.useMemo(()=>ag({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return I.jsx("style",{children:a})};function jr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function e5(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,u=w.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Zw(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:p,children:d,...m}=f,h=((v=p==null?void 0:p[e])==null?void 0:v[u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:d})};l.displayName=a+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[u])||s,m=w.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,t5(i,...t)]}function t5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var n5=w.useId||(()=>{}),r5=0;function wu(e){const[t,n]=w.useState(n5());return ea(()=>{e||n(r=>r??String(r5++))},[e]),e||(t?`radix-${t}`:"")}function Kw({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=i5({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zr(n),u=w.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 i5({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=Zr(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function a5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var o5="DismissableLayer",tp="dismissableLayer.update",s5="dismissableLayer.pointerDownOutside",l5="dismissableLayer.focusOutside",Gw,Yw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jw=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=w.useContext(Yw),[c,f]=w.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=w.useState({}),m=Kr(t,O=>f(O)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),g=c?h.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=f5(O=>{const L=O.target,D=[...l.branches].some(T=>T.contains(L));!k||D||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},p),E=d5(O=>{const L=O.target;[...l.branches].some(T=>T.contains(L))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},p);return a5(O=>{g===l.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},p),w.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Gw=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),Xw(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Gw)}},[c,p,n,l]),w.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),Xw())},[c,l]),w.useEffect(()=>{const O=()=>d({});return document.addEventListener(tp,O),()=>document.removeEventListener(tp,O)},[]),I.jsx(dn.div,{...u,ref:m,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:jr(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jr(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jr(e.onPointerDownCapture,S.onPointerDownCapture)})});Jw.displayName=o5;var u5="DismissableLayerBranch",c5=w.forwardRef((e,t)=>{const n=w.useContext(Yw),r=w.useRef(null),i=Kr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),I.jsx(dn.div,{...e,ref:i})});c5.displayName=u5;function f5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){Qw(s5,n,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);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function d5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&Qw(l5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xw(){const e=new CustomEvent(tp);document.dispatchEvent(e)}function Qw(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?EC(i,a):i.dispatchEvent(a)}var np="focusScope.autoFocusOnMount",rp="focusScope.autoFocusOnUnmount",e0={bubbles:!1,cancelable:!0},p5="FocusScope",t0=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=w.useState(null),l=Zr(i),c=Zr(a),f=w.useRef(null),p=Kr(t,h=>u(h)),d=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let h=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:li(f.current,{select:!0})},y=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||li(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&li(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,d.paused]),w.useEffect(()=>{if(s){i0.add(d);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(np,e0);s.addEventListener(np,l),s.dispatchEvent(v),v.defaultPrevented||(h5(b5(n0(s)),{select:!0}),document.activeElement===h&&li(s))}return()=>{s.removeEventListener(np,l),setTimeout(()=>{const v=new CustomEvent(rp,e0);s.addEventListener(rp,c),s.dispatchEvent(v),v.defaultPrevented||li(h??document.body,{select:!0}),s.removeEventListener(rp,c),i0.remove(d)},0)}}},[s,l,c,d]);const m=w.useCallback(h=>{if(!n&&!r||d.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const g=h.currentTarget,[b,k]=m5(g);b&&k?!h.shiftKey&&v===k?(h.preventDefault(),n&&li(b,{select:!0})):h.shiftKey&&v===b&&(h.preventDefault(),n&&li(k,{select:!0})):v===g&&h.preventDefault()}},[n,r,d.paused]);return I.jsx(dn.div,{tabIndex:-1,...o,ref:p,onKeyDown:m})});t0.displayName=p5;function h5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(li(r,{select:t}),document.activeElement!==n)return}function m5(e){const t=n0(e),n=r0(t,e),r=r0(t.reverse(),e);return[n,r]}function n0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function r0(e,t){for(const n of e)if(!v5(n,{upTo:t}))return n}function v5(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 y5(e){return e instanceof HTMLInputElement&&"select"in e}function li(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&y5(e)&&t&&e.select()}}var i0=g5();function g5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=a0(e,t),e.unshift(t)},remove(t){var n;e=a0(e,t),(n=e[0])==null||n.resume()}}}function a0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function b5(e){return e.filter(t=>t.tagName!=="A")}function x5(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Su=e=>{const{present:t,children:n}=e,r=w5(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=Kr(r.ref,S5(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Su.displayName="Presence";function w5(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,u]=x5(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=_u(r.current);a.current=s==="mounted"?l:"none"},[s]),ea(()=>{const l=r.current,c=i.current;if(c!==e){const p=a.current,d=_u(l);e?u("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ea(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=d=>{const h=_u(r.current).includes(d.animationName);if(d.target===t&&h&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=d=>{d.target===t&&(a.current=_u(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function _u(e){return(e==null?void 0:e.animationName)||"none"}function S5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ip=0;function _5(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o0()),document.body.insertAdjacentElement("beforeend",e[1]??o0()),ip++,()=>{ip===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ip--}},[])}function o0(){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 Eu="right-scroll-bar-position",ku="width-before-scroll-bar",E5="with-scroll-bars-hidden",k5="--removed-body-scroll-bar-size";function ap(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function T5(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var O5=typeof window<"u"?w.useLayoutEffect:w.useEffect,s0=new WeakMap;function C5(e,t){var n=T5(null,function(r){return e.forEach(function(i){return ap(i,r)})});return O5(function(){var r=s0.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||ap(s,null)}),a.forEach(function(s){i.has(s)||ap(s,o)})}s0.set(n,e)},[e]),n}function $5(e){return e}function I5(e,t){t===void 0&&(t=$5);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function R5(e){e===void 0&&(e={});var t=I5(null);return t.options=Dn({async:!0,ssr:!1},e),t}var l0=function(e){var t=e.sideCar,n=Jx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Dn({},n))};l0.isSideCarExport=!0;function P5(e,t){return e.useMedium(t),l0}var u0=R5(),op=function(){},Tu=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:op,onWheelCapture:op,onTouchMoveCapture:op}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=Jx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,S=C5([n,t]),E=Dn(Dn({},b),i);return w.createElement(w.Fragment,null,c&&w.createElement(k,{sideCar:u0,removeScrollBar:l,shards:f,noIsolation:d,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Dn(Dn({},E),{ref:S})):w.createElement(v,Dn({},E,{className:u,ref:S}),s))});Tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tu.classNames={fullWidth:ku,zeroRight:Eu};var A5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=A5();return t&&e.setAttribute("nonce",t),e}function D5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function M5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var j5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N5())&&(D5(t,n),M5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},L5=function(){var e=j5();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},c0=function(){var e=L5(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},F5={left:0,top:0,right:0,gap:0},sp=function(e){return parseInt(e||"",10)||0},B5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[sp(n),sp(r),sp(i)]},U5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return F5;var t=B5(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},z5=c0(),wa="data-scroll-locked",V5=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
274
- .`.concat(E5,` {
272
+ */var Wj=["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])"],Rd=Wj.join(","),Dx=typeof Element>"u",Wo=Dx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,au=!Dx&&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},ou=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},Hj=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Zj=function(t,n,r){if(ou(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Rd));return n&&Wo.call(t,Rd)&&i.unshift(t),i=i.filter(r),i},Kj=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!ou(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Wo.call(o,Rd);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),p=!ou(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&p){var d=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}return i},Mx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},jx=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Hj(t))&&!Mx(t)?0:t.tabIndex},Gj=function(t,n){var r=jx(t);return r<0&&n&&!Mx(t)?0:r},Yj=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lx=function(t){return t.tagName==="INPUT"},Jj=function(t){return Lx(t)&&t.type==="hidden"},Xj=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Qj=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},e2=function(t){if(!t.name)return!0;var n=t.form||au(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=Qj(i,t.form);return!a||a===t},t2=function(t){return Lx(t)&&t.type==="radio"},n2=function(t){return t2(t)&&!e2(t)},r2=function(t){var n,r=t&&au(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==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;r=au(i),i=(l=r)===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},Fx=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},i2=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Wo.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Wo.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=au(t);if(u&&!u.shadowRoot&&i(u)===!0)return Fx(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(r2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Fx(t);return!1},a2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Wo.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},o2=function(t,n){return!(n.disabled||ou(n)||Jj(n)||i2(n,t)||Xj(n)||a2(n))},Bx=function(t,n){return!(n2(n)||jx(n)<0||!o2(t,n))},s2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},l2=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=Gj(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(Yj).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Pd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Kj([t],n.includeContainer,{filter:Bx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:s2}):r=Zj(t,n.includeContainer,Bx.bind(null,n)),l2(r)};function Ux(e,t,n){let{reference:r,floating:i}=e;const a=qo(t),o=zj(t),s=Uj(o),u=Vo(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(u){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Id(t)){case"start":d[o]-=p*(n&&l?-1:1);break;case"end":d[o]+=p*(n&&l?-1:1);break}return d}const u2=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,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}=Ux(l,r,u),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:g,y:b,data:k,reset:S}=await v({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:l,platform:o,elements:{reference:e,floating:t}});c=g??c,f=b??f,d={...d,[y]:{...d[y],...k}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=Ux(l,p,u)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function zx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=ru(t,e),m=qj(d),y=s[p?f==="floating"?"reference":"floating":f],v=iu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=f==="floating"?{x:r,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=iu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:u}):g);return{top:(v.top-S.top+m.top)/k.y,bottom:(S.bottom-v.bottom+m.bottom)/k.y,left:(v.left-S.left+m.left)/k.x,right:(S.right-v.right+m.right)/k.x}}async function c2(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Vo(n),s=Id(n),u=qo(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=ru(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),u?{x:d*c,y:p*l}:{x:p*l,y:d*c}}const f2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await c2(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},d2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...u}=ru(e,t),l={x:n,y:r},c=await zx(t,u),f=qo(Vo(i)),p=Nx(f);let d=l[p],m=l[f];if(a){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=d+c[y],b=d-c[v];d=Ax(g,d,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=m+c[y],b=m-c[v];m=Ax(g,m,b)}const h=s.fn({...t,[p]:d,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:a,[f]:o}}}}}},p2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=ru(e,t),c=await zx(t,l),f=Vo(i),p=Id(i),d=qo(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=p==="end"?"top":"bottom");const g=h-c.top-c.bottom,b=m-c.left-c.right,k=pa(h-c[y],g),S=pa(m-c[v],b),E=!t.middlewareData.shift;let O=k,L=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=g),E&&!p){const T=En(c.left,0),P=En(c.right,0),q=En(c.top,0),$=En(c.bottom,0);d?L=m-2*(T!==0||P!==0?T+P:En(c.left,c.right)):O=h-2*(q!==0||$!==0?q+$:En(c.top,c.bottom))}await u({...t,availableWidth:L,availableHeight:O});const D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Vx(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=tu(n)!==a||tu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ad(e){return Wn(e)?e:e.contextElement}function ha(e){const t=Ad(e);if(!cr(t))return ri(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Vx(t);let o=(a?tu(n.width):n.width)/r,s=(a?tu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const h2=ri(0);function qx(e){const t=_n(e);return!Cd()||!t.visualViewport?h2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function m2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_n(e)?!1:t}function Di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ad(e);let o=ri(1);t&&(r?Wn(r)&&(o=ha(r)):o=ha(e));const s=m2(a,n,r)?qx(a):ri(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 p=_n(a),d=r&&Wn(r)?_n(r):r;let m=p,h=$d(m);for(;h&&r&&d!==m;){const y=ha(h),v=h.getBoundingClientRect(),g=Hn(h),b=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(h.clientTop+parseFloat(g.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=b,l+=k,m=_n(h),h=$d(m)}}return iu({width:c,height:f,x:u,y:l})}function v2(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ur(r),s=t?Ql(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ri(1);const c=ri(0),f=cr(r);if((f||!f&&!a)&&((fa(r)!=="body"||zo(o))&&(u=eu(r)),cr(r))){const p=Di(r);l=ha(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function y2(e){return Array.from(e.getClientRects())}function Nd(e,t){const n=eu(e).scrollLeft;return t?t.left+n:Di(ur(e)).left+n}function g2(e){const t=ur(e),n=eu(e),r=e.ownerDocument.body,i=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Nd(e);const s=-n.scrollTop;return Hn(r).direction==="rtl"&&(o+=En(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function b2(e,t){const n=_n(e),r=ur(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Cd();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function x2(e,t){const n=Di(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cr(e)?ha(e):ri(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function Wx(e,t,n){let r;if(t==="viewport")r=b2(e,n);else if(t==="document")r=g2(ur(e));else if(Wn(t))r=x2(t,n);else{const i=qx(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return iu(r)}function Hx(e,t){const n=ti(e);return n===t||!Wn(n)||da(n)?!1:Hn(n).position==="fixed"||Hx(n,t)}function w2(e,t){const n=t.get(e);if(n)return n;let r=ni(e,[],!1).filter(s=>Wn(s)&&fa(s)!=="body"),i=null;const a=Hn(e).position==="fixed";let o=a?ti(e):e;for(;Wn(o)&&!da(o);){const s=Hn(o),u=Od(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zo(o)&&!u&&Hx(e,o))?r=r.filter(c=>c!==o):i=s,o=ti(o)}return t.set(e,r),r}function S2(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Ql(t)?[]:w2(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=Wx(t,c,i);return l.top=En(f.top,l.top),l.right=pa(f.right,l.right),l.bottom=pa(f.bottom,l.bottom),l.left=En(f.left,l.left),l},Wx(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function _2(e){const{width:t,height:n}=Vx(e);return{width:t,height:n}}function E2(e,t,n){const r=cr(t),i=ur(t),a=n==="fixed",o=Di(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=ri(0);if(r||!r&&!a)if((fa(t)!=="body"||zo(i))&&(s=eu(t)),r){const d=Di(t,!0,a,t);u.x=d.x+t.clientLeft,u.y=d.y+t.clientTop}else i&&(u.x=Nd(i));let l=0,c=0;if(i&&!r&&!a){const d=i.getBoundingClientRect();c=d.top+s.scrollTop,l=d.left+s.scrollLeft-Nd(i,d)}const f=o.left+s.scrollLeft-u.x-l,p=o.top+s.scrollTop-u.y-c;return{x:f,y:p,width:o.width,height:o.height}}function Dd(e){return Hn(e).position==="static"}function Zx(e,t){if(!cr(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function Kx(e,t){const n=_n(e);if(Ql(e))return n;if(!cr(e)){let i=ti(e);for(;i&&!da(i);){if(Wn(i)&&!Dd(i))return i;i=ti(i)}return n}let r=Zx(e,t);for(;r&&Fj(r)&&Dd(r);)r=Zx(r,t);return r&&da(r)&&Dd(r)&&!Od(r)?n:r||Bj(e)||n}const k2=async function(e){const t=this.getOffsetParent||Kx,n=this.getDimensions,r=await n(e.floating);return{reference:E2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function T2(e){return Hn(e).direction==="rtl"}const O2={convertOffsetParentRelativeRectToViewportRelativeRect:v2,getDocumentElement:ur,getClippingRect:S2,getOffsetParent:Kx,getElementRects:k2,getClientRects:y2,getDimensions:_2,getScale:ha,isElement:Wn,isRTL:T2};function C2(e,t){let n=null,r;const i=ur(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=nu(c),m=nu(i.clientWidth-(l+f)),h=nu(i.clientHeight-(c+p)),y=nu(l),g={rootMargin:-d+"px "+-m+"px "+-h+"px "+-y+"px",threshold:En(0,pa(1,u))||1};let b=!0;function k(S){const E=S[0].intersectionRatio;if(E!==u){if(!b)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function $2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Ad(e),c=i||a?[...l?ni(l):[],...ni(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?C2(l,n):null;let p=-1,d=null;o&&(d=new ResizeObserver(v=>{let[g]=v;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(t)})),n()}),l&&!u&&d.observe(l),d.observe(t));let m,h=u?Di(e):null;u&&y();function y(){const v=Di(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,u&&cancelAnimationFrame(m)}}const I2=f2,R2=d2,P2=p2,A2=(e,t,n)=>{const r=new Map,i={platform:O2,...n},a={...i.platform,_c:r};return u2(e,t,{...i,platform:a})};var su=typeof document<"u"?j.useLayoutEffect:j.useEffect;function lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!lu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Gx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yx(e,t){const n=Gx(e);return Math.round(t*n)/n}function Md(e){const t=w.useRef(e);return su(()=>{t.current=e}),t}function N2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=w.useState(r);lu(p,r)||d(r);const[m,h]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(U=>{U!==E.current&&(E.current=U,h(U))},[]),b=w.useCallback(U=>{U!==O.current&&(O.current=U,v(U))},[]),k=a||m,S=o||y,E=w.useRef(null),O=w.useRef(null),L=w.useRef(c),D=u!=null,T=Md(u),P=Md(i),q=Md(l),$=w.useCallback(()=>{if(!E.current||!O.current)return;const U={placement:t,strategy:n,middleware:p};P.current&&(U.platform=P.current),A2(E.current,O.current,U).then(N=>{const x={...N,isPositioned:q.current!==!1};F.current&&!lu(L.current,x)&&(L.current=x,sy.flushSync(()=>{f(x)}))})},[p,t,n,P,q]);su(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[l]);const F=w.useRef(!1);su(()=>(F.current=!0,()=>{F.current=!1}),[]),su(()=>{if(k&&(E.current=k),S&&(O.current=S),k&&S){if(T.current)return T.current(k,S,$);$()}},[k,S,$,T,D]);const M=w.useMemo(()=>({reference:E,floating:O,setReference:g,setFloating:b}),[g,b]),B=w.useMemo(()=>({reference:k,floating:S}),[k,S]),W=w.useMemo(()=>{const U={position:n,left:0,top:0};if(!B.floating)return U;const N=Yx(B.floating,c.x),x=Yx(B.floating,c.y);return s?{...U,transform:"translate("+N+"px, "+x+"px)",...Gx(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:x}},[n,s,B.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:$,refs:M,elements:B,floatingStyles:W}),[c,$,M,B,W])}const D2=(e,t)=>({...I2(e),options:[e,t]}),M2=(e,t)=>({...R2(e),options:[e,t]}),j2=(e,t)=>({...P2(e),options:[e,t]});var Dn=function(){return Dn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dn.apply(this,arguments)};function Jx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function L2(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function F2(){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 B2(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=j.useRef(0),i=F2(),a=j.useState(n),o=a[0],s=a[1],u=j.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(p){return Dn(Dn({},p),{loading:!0})}),e.apply(void 0,l).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[o,u]}function U2(e,t){t===void 0&&(t=[]);var n=B2(e,t,{loading:!0}),r=n[0],i=n[1];return j.useEffect(function(){i()},[i]),r}const Xx=j.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=j.useId(),{setIsLoading:o}=ZM(),[s,u]=j.useState(n),[l,c]=j.useState(!1),{message:{blocks:{image:f}}}=yt;return j.useLayoutEffect(()=>{o(p=>[...p,a])},[]),U2(async()=>{if(e){try{const{width:p,height:d}=await KM(e);s==="auto"&&u(z2(p,d))}catch(p){u("square"),console.error(p)}o(p=>p.filter(d=>d!==a))}},[e]),I.jsxs(I.Fragment,{children:[l?null:I.jsx("div",{"data-orientation":s,...f.placeholder}),I.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});Xx.displayName="Image";function z2(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const V2=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return I.jsx("div",{children:I.jsx("video",{...n,"data-chromatic":"ignore",controls:!0,src:e,...i,ref:r})})}),q2=j.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return I.jsx("div",{children:I.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function W2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 H2=w.forwardRef(W2);function Z2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 K2=w.forwardRef(Z2);function G2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 Y2=w.forwardRef(G2);function J2({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 X2=w.forwardRef(J2),Q2=j.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return I.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[I.jsx("p",{...s.title,children:r}),I.jsx(X2,{...s.icon})]})}),Qx=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,...l},c)=>{const{message:{blocks:{column:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((p,d)=>I.jsx(xa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:u,messageId:s},d))})});Qx.displayName="Column";const ew=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,...l},c)=>{const{message:{blocks:{row:f}}}=yt;return I.jsx("div",{"data-horizontal":t,"data-vertical":n,...l,...f,ref:c,children:e.map((p,d)=>I.jsx(xa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u},d))})});ew.displayName="Row";function eL(e){return Object.prototype.toString.call(e)==="[object Object]"}function tw(e){return eL(e)||Array.isArray(e)}function tL(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function jd(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!tw(s)||!tw(u)?s===u:jd(s,u)})}function nw(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function nL(e,t){if(e.length!==t.length)return!1;const n=nw(e),r=nw(t);return n.every((i,a)=>{const o=r[a];return jd(i,o)})}function Ld(e){return typeof e=="number"}function rw(e){return typeof e=="string"}function Fd(e){return typeof e=="boolean"}function iw(e){return Object.prototype.toString.call(e)==="[object Object]"}function kt(e){return Math.abs(e)}function Bd(e){return Math.sign(e)}function uu(e,t){return kt(e-t)}function rL(e,t){if(e===0||t===0||kt(e)<=kt(t))return 0;const n=uu(kt(e),kt(t));return kt(n/e)}function Ho(e){return fu(e).map(Number)}function Dr(e){return e[cu(e)]}function cu(e){return Math.max(0,e.length-1)}function fu(e){return Object.keys(e)}function aw(e,t){return[e,t].reduce((n,r)=>(fu(r).forEach(i=>{const a=n[i],o=r[i],s=iw(a)&&iw(o);n[i]=s?aw(a,o):o}),n),{})}function ow(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function iL(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return Ld(e)?o():n[e](l)}return{measure:s}}function aL(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ii(e,t){const n=kt(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function sw(e,t,n){const{constrain:r}=ii(0,e),i=e+1;let a=o(t);function o(p){return n?kt((i+p)%i):r(p)}function s(){return a}function u(p){return a=o(p),f}function l(p){return c().set(s()+p)}function c(){return sw(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function oL(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Zo(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function sL(e,t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=Zo(),O=Zo(),L=ii(50,225).constrain(m.measure(20)),D={mouse:300,touch:400},T={mouse:500,touch:600},P=h?43:25;let q=!1,$=0,F=0,M=!1,B=!1,W=!1,U=!1;function N(Q,Z){if(!Z)return;function de($e){(Fd(Z)||Z(Q,$e))&&oe($e)}const ve=n;E.add(ve,"dragstart",$e=>$e.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 x(){E.clear(),O.clear()}function V(){const Q=U?r:n;O.add(Q,"touchmove",ne,S).add(Q,"touchend",le).add(Q,"mousemove",ne,S).add(Q,"mouseup",le)}function K(Q){const Z=Q.nodeName||"";return k.includes(Z)}function _(){return(h?T:D)[U?"mouse":"touch"]}function Y(Q,Z){const de=p.add(Bd(Q)*-1),ve=f.byDistance(Q,!h).distance;return h||kt(Q)<L?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function oe(Q){const Z=ow(Q,i);U=Z,!(Z&&Q.button!==0)&&(K(Q.target)||(W=h&&Z&&!Q.buttons&&q,q=uu(a.get(),s.get())>=2,M=!0,o.pointerDown(Q),c.useFriction(0).useDuration(0),a.set(s),V(),$=o.readPoint(Q),F=o.readPoint(Q,b),d.emit("pointerDown")))}function ne(Q){const Z=o.readPoint(Q),de=o.readPoint(Q,b),ve=uu(Z,$),$e=uu(de,F);if(!B&&!U&&(!Q.cancelable||(B=ve>$e,!B)))return le(Q);const R=o.pointerMove(Q);ve>y&&(W=!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!==p.get(),ve=o.pointerUp(Q)*_(),$e=Y(t.apply(ve),de),R=rL(ve,$e),J=P-10*R,ae=g+R/50;B=!1,M=!1,O.clear(),c.useDuration(J).useFriction(ae),l.distance($e,!h),U=!1,d.emit("pointerUp")}function pe(Q){W&&(Q.stopPropagation(),Q.preventDefault())}function he(){return M}return{init:N,pointerDown:he,destroy:x}}function lL(e,t){let r,i;function a(f){return f.timeStamp}function o(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(ow(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function u(f){const p=o(f)-o(i),d=a(f)-a(r)>170;return i=f,d&&(r=f),p}function l(f){if(!r||!i)return 0;const p=o(i)-o(r),d=a(f)-a(r),m=a(f)-a(i)>170,h=p/d;return d&&!m&&kt(h)>.1?h:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function uL(e){function t(r){return e*(r/100)}return{measure:t}}function cL(e,t,n,r,i){let a,o,s=[],u=!1;function l(d){return i.measureSize(d.getBoundingClientRect())}function c(d,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],E=l(b?e:r[k]);if(S!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(Fd(m)||m(d,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function fL(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const S=t.get()-e.get(),E=!s;let O=0;return E?(a=0,e.set(t),O=S):(a+=S/s,a*=u,l+=a,e.add(a),O=l-c),o=Bd(O),c=l,i=kt(S)<.001,k}function p(){return i}function d(){return s}function m(){return o}function h(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return u=S,k}const k={direction:m,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function dL(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ii(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=kt(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!d&&kt(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){u=!d}return{constrain:c,toggleActive:f}}function pL(e,t,n,r){const i=ii(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],p=Dr(a),d=a.lastIndexOf(f),m=a.indexOf(p)+1;return ii(d,m)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:p}=s();return a.slice(f,p)}return{snapsContained:o}}function hL(e,t,n){const r=t[0],i=n?r-e:Dr(t);return{limit:ii(i,r)}}function mL(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=ii(a,o);function l(p){return p===1?u(n.get()):p===-1?s(n.get()):!1}function c(p){if(!l(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:c}}function vL(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function yL(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=d().map(t.measure),f=m(),p=h();function d(){return l(r).map(v=>Dr(v)[u]-v[0][s]).map(kt)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-kt(v))}function h(){const g=Dr(f)-Dr(i);return l(f).map(b=>b[0]).map((b,k,S)=>{const E=!k,O=k===cu(S);return o&&E?0:o&&O?g:b+c[k]})}return{snaps:f,snapsAligned:p}}function gL(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(m){return m.concat().sort((h,y)=>kt(h)-kt(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(g=>g-h).map(g=>c(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>kt(g.diff)-kt(b.diff)),{index:v}=y[0];return{index:v,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return u(y);const v=y.filter(g=>Bd(g)===h);return u(v)}function f(m,h){const y=t[m]-i.get(),v=c(y,h);return{index:m,distance:v}}function p(m,h){const y=i.get()+m,{index:v,distance:g}=l(y),b=!e&&a(y);if(!h||b)return{index:v,distance:m};const k=t[v]-g,S=m+c(k,0);return{index:v,distance:S}}return{byDistance:p,byIndex:f,shortcut:c}}function bL(e,t,n,r,i,a,o){function s(f){const p=f.distance,d=f.index!==t.get();a.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),m=r.byIndex(d.get(),p);s(m)}return{distance:u,index:l}}function du(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return Ld(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function lw(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function u(p){a||(i.transform=r(t.apply(p)))}function l(p){a=!p}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function xL(e,t,n,r,i,a,o,s,u){const l=Ho(i),c=Ho(i).reverse(),f=h().concat(y());function p(S,E){return S.reduce((O,L)=>O-i[L],E)}function d(S,E){return S.reduce((O,L)=>p(O,E)>0?O.concat([L]):O,[])}function m(S,E){const O=E==="start",L=O?-r:r,D=o.findSlideBounds([L]);return S.map(T=>{const P=O?0:-r,q=O?r:0,F=D.filter(M=>M.index===T)[0][O?"end":"start"];return{index:T,slideLocation:du(-1),translate:lw(e,t,u[T]),target:()=>s.get()>F?P:q}})}function h(){const S=a[0]-1,E=d(c,S);return m(E,"end")}function y(){const S=n-a[0]-1,E=d(l,S);return m(E,"start")}function v(){return f.every(({index:S})=>{const E=l.filter(O=>O!==S);return p(E,n)<=.1})}function g(){f.forEach(S=>{const{target:E,translate:O,slideLocation:L}=S,D=E();D!==L.get()&&(O.to(D),L.set(D))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function wL(e,t){let n,r=!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}}n=new MutationObserver(c=>{r||(Fd(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function SL(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=d(c,o);function p(y){const v=y||0;return n.map(g=>ii(l,g-l).constrain(g*v))}function d(y,v){const g=y||c,b=p(v);return g.reduce((k,S)=>{const E=r.map((O,L)=>({start:O-n[L]+b[L]+S,end:O+e-b[L]+S,index:L}));return k.concat(E)},[])}function m(y,v){const g=a?s(y):u(y);return(v||f).reduce((k,S)=>{const{index:E,start:O,end:L}=S,D=k.includes(E),T=O<g&&L>g;return!D&&T?k.concat([E]):k},[])}return{check:m,findSlideBounds:d}}function _L(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=m(),f=h(),p=n.map(o),d=y();function m(){if(!l)return 0;const g=n[0];return kt(t[s]-g[s])}function h(){if(!l)return 0;const g=a.getComputedStyle(Dr(r));return parseFloat(g.getPropertyValue(`margin-${u}`))}function y(){return n.map((g,b,k)=>{const S=!b,E=b===cu(k);return S?p[b]+c:E?p[b]+f:k[b+1][s]-g[s]}).map(kt)}return{slideSizes:p,slideSizesWithGaps:d}}function EL(e,t,n){const r=Ld(n);function i(u,l){return Ho(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return Ho(u).reduce((l,c)=>{const p=t.slice(Dr(l),c+1).reduce((d,m)=>d+m,0);return!c||p>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function kL(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(ae=>ae.getBoundingClientRect()),E=oL(c),O=aL(l,c),L=O.measureSize(k),D=uL(L),T=iL(u,L),P=!d&&!!b,q=d||!!b,{slideSizes:$,slideSizesWithGaps:F}=_L(O,k,S,n,q,i),M=EL(L,F,v),{snaps:B,snapsAligned:W}=yL(O,T,k,S,F,M,P),U=-Dr(B)+Dr(F),{snapsContained:N}=pL(L,U,W,b),x=P?N:W,{limit:V}=hL(U,x,d),K=sw(cu(x),f,d),_=K.clone(),Y=Ho(n),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:we,animation:Pe,options:{loop:We}})=>{const Ae=ae.pointerDown();We||ke.constrain(Ae);const Fe=ee.seek().settled();Fe&&!Ae&&(Pe.stop(),we.emit("settle")),Fe||we.emit("scroll")},ne=({scrollBody:ae,translate:ee,location:ke,offsetLocation:we,scrollLooper:Pe,slideLooper:We,options:{loop:Ae}},Fe)=>{const z=ae.velocity();we.set(ke.get()-z+z*Fe),Ae&&(Pe.loop(ae.direction()),We.loop()),ee.to(we.get())},le={start:()=>s.start(J),stop:()=>s.stop(J),update:()=>oe(J),render:ae=>ne(J,ae)},pe=.68,he=x[K.get()],ue=du(he),Q=du(he),Z=du(he),de=fL(ue,Z,m,pe),ve=gL(d,x,U,V,Z),$e=bL(le,K,_,ve,de,Z,o),R=SL(L,U,$,B,V,d,p),J={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:O,direction:E,dragHandler:sL(O,E,e,r,i,Z,lL(O,i),ue,le,$e,de,ve,K,o,D,h,y,g,pe),eventStore:Zo(),percentOfView:D,index:K,indexPrevious:_,limit:V,location:ue,offsetLocation:Q,options:a,resizeHandler:cL(t,o,i,n,O),scrollBody:de,scrollBounds:dL(V,ue,Z,de,D),scrollLooper:mL(U,V,Q,[ue,Q,Z]),scrollProgress:vL(V),scrollSnaps:x,scrollTarget:ve,scrollTo:$e,slideLooper:xL(O,E,L,U,F,x,R,Q,n),slidesHandler:wL(t,o),slidesInView:R,slideIndexes:Y,slidesToScroll:M,target:Z,translate:lw(O,E,t)};return J}function TL(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=kt(i/t);n.forEach(({animation:m})=>m.render(d)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function OL(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const CL={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 $L(e){function t(a,o){return aw(a,o||{})}function n(a){const o=a.breakpoints||{},s=fu(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>fu(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function IL(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function ma(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=$L(i),o=IL(a),s=Zo(),u=Zo(),l=OL(),{animationRealms:c}=ma,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=a,{on:m,off:h,emit:y}=l,v=$;let g=!1,b,k=f(CL,ma.globalOptions),S=f(k),E=[],O,L,D;function T(){const{container:de,slides:ve}=S;L=(rw(de)?e.querySelector(de):de)||e.children[0];const R=rw(ve)?L.querySelectorAll(ve):ve;D=[].slice.call(R||L.children)}function P(de,ve){const $e=kL(e,L,D,r,i,de,l,ve);if(de.loop&&!$e.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return P(R,ve)}return $e}function q(de,ve){if(g)return;const $e=c.find(J=>J.window===i),R=$e||TL(i);$e||c.push(R),k=f(k,de),S=p(k),E=ve||E,T(),b=P(S,R),d([k,...E.map(({options:J})=>J)]).forEach(J=>s.add(J,"change",$)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),L.offsetParent&&D.length&&b.dragHandler.init(Z,S.watchDrag),O=o.init(E,Z))}function $(de,ve){const $e=oe();F(),q(f({startIndex:$e},de),ve),l.emit("reInit")}function F(){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(),u.clear()}function M(){g||(g=!0,s.clear(),F(),l.emit("destroy"))}function B(de){const ve=b[de?"target":"location"].get(),$e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[$e](ve))}function W(de){const ve=B(de);return b.slideIndexes.filter($e=>!ve.includes($e))}function U(de,ve,$e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,$e||0))}function N(de){const ve=b.index.add(1).get();U(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();U(ve,de===!0,1)}function V(){return b.index.add(1).get()!==oe()}function K(){return b.index.add(-1).get()!==oe()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function Y(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function ne(){return b.indexPrevious.get()}function le(){return O}function pe(){return b}function he(){return e}function ue(){return L}function Q(){return D}const Z={canScrollNext:V,canScrollPrev:K,containerNode:ue,internalEngine:pe,destroy:M,off:h,on:m,emit:y,plugins:le,previousScrollSnap:ne,reInit:v,rootNode:he,scrollNext:N,scrollPrev:x,scrollProgress:Y,scrollSnapList:_,scrollTo:U,selectedScrollSnap:oe,slideNodes:Q,slidesInView:B,slidesNotInView:W};return q(t,n),setTimeout(()=>l.emit("init"),0),Z}ma.animationRealms=[],ma.globalOptions=void 0;function Ud(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),u=j.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return j.useEffect(()=>{if(tL()&&o){ma.globalOptions=Ud.globalOptions;const l=ma(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{jd(n.current,e)||(n.current=e,u())},[e,u]),j.useEffect(()=>{nL(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}Ud.globalOptions=void 0;function RL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 PL=w.forwardRef(RL);function AL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 NL=w.forwardRef(AL);function DL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 ML=w.forwardRef(DL);function jL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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"}),w.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 LL=w.forwardRef(jL);function FL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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"}),w.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 BL=w.forwardRef(FL);function UL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 zL=w.forwardRef(UL);function VL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 qL=w.forwardRef(VL);function WL({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 HL=w.forwardRef(WL),uw=j.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},s)=>{const[u,l]=Ud({skipSnaps:!0,loop:!0}),[c,f]=j.useState(!0),[p,d]=j.useState(!0),m=j.useCallback(()=>l==null?void 0:l.scrollPrev(),[l]),h=j.useCallback(()=>l==null?void 0:l.scrollNext(),[l]),{message:{blocks:{carousel:y}}}=yt,v=j.useCallback(g=>{f(!g.canScrollPrev()),d(!g.canScrollNext())},[]);return j.useEffect(()=>{l&&(v(l),l.on("reInit",v),l.on("select",v))},[l,v]),I.jsxs("div",{...y==null?void 0:y.container,"data-container":"carousel",ref:u,children:[I.jsx("div",{ref:s,...y==null?void 0:y.slidesContainer,children:e.map((g,b)=>I.jsx(xa,{block:{...g,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o},b))}),e.length>1&&I.jsxs(I.Fragment,{children:[I.jsx(NL,{...y==null?void 0:y.backButton,"data-disabled":c?"":void 0,onClick:m}),I.jsx(ML,{...y==null?void 0:y.nextButton,"data-disabled":p?"":void 0,onClick:h})]})]})});uw.displayName="Carousel";const cw=Math.floor;function fw(e){return dw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ko(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZL(e){var t;return(t=(dw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dw(e){return e instanceof Node||e instanceof Ko(e).Node}function Mn(e){return e instanceof Element||e instanceof Ko(e).Element}function va(e){return e instanceof HTMLElement||e instanceof Ko(e).HTMLElement}function zd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ko(e).ShadowRoot}function KL(e){return["html","body","#document"].includes(fw(e))}function GL(e){return Ko(e).getComputedStyle(e)}function YL(e){if(fw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zd(e)&&e.host||ZL(e);return zd(t)?t.host:t}function ai(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function mn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pw(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function JL(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function hw(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(pw())||t.test(JL()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function mw(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 vw(){return/apple/i.test(navigator.vendor)}function XL(){return pw().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function yw(e,t){return["mouse","pen"].includes(e)}function QL(e){return"nativeEvent"in e}function eF(e){return e.matches("html,body")}function Zn(e){return(e==null?void 0:e.ownerDocument)||document}function Vd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function gw(e){return"composedPath"in e?e.composedPath()[0]:e.target}const tF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function bw(e){return va(e)&&e.matches(tF)}function Gt(e){e.preventDefault(),e.stopPropagation()}const qd="ArrowUp",pu="ArrowDown",ya="ArrowLeft",Go="ArrowRight";function hu(e,t,n){return Math.floor(e/t)!==n}function Yo(e,t){return t<0||t>=e.current.length}function Wd(e,t){return tn(e,{disabledIndices:t})}function xw(e,t){return tn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-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 nF(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===qd){if(c&&Gt(n),l===-1)f=u;else if(f=tn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const p=l%a,d=u%a,m=u-(d-p);d===p?f=u:f=d>p?m:m-a}Yo(e,f)&&(f=l)}if(n.key===pu&&(c&&Gt(n),l===-1?f=s:(f=tn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=tn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Yo(e,f)&&(f=l)),r==="both"){const p=cw(l/a);n.key===Go&&(c&&Gt(n),l%a!==a-1?(f=tn(e,{startingIndex:l,disabledIndices:o}),i&&hu(f,a,p)&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l-l%a-1,disabledIndices:o})),hu(f,a,p)&&(f=l)),n.key===ya&&(c&&Gt(n),l%a!==0?(f=tn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&hu(f,a,p)&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=tn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),hu(f,a,p)&&(f=l));const d=cw(u/a)===p;Yo(e,f)&&(i&&d?f=n.key===ya?u:tn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let ww=0;function Mr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ww);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():ww=requestAnimationFrame(a)}var jt=typeof document<"u"?j.useLayoutEffect:j.useEffect;function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mu.apply(this,arguments)}let Hd=!1,rF=0;const Sw=()=>"floating-ui-"+rF++;function iF(){const[e,t]=w.useState(()=>Hd?Sw():void 0);return jt(()=>{e==null&&t(Sw())},[]),w.useEffect(()=>{Hd||(Hd=!0)},[]),e}const Zd=w.useId||iF;function aF(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const oF=w.createContext(null),sF=w.createContext(null),_w=()=>{var e;return((e=w.useContext(oF))==null?void 0:e.id)||null},vu=()=>w.useContext(sF);function Jo(e){return"data-floating-ui-"+e}function oi(e){const t=j.useRef(e);return jt(()=>{t.current=e}),t}function lF(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function ga(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function uF(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),ga(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let ba=new WeakMap,yu=new WeakSet,gu={},Kd=0;const cF=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ew=e=>e&&(e.host||Ew(e.parentNode)),fF=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ew(n);return e.contains(r)?r:null}).filter(n=>n!=null);function dF(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=fF(t,e),s=new Set,u=new Set(o),l=[];gu[i]||(gu[i]=new WeakMap);const c=gu[i];o.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(ba.get(m)||0)+1,g=(c.get(m)||0)+1;ba.set(m,v),c.set(m,g),l.push(m),v===1&&y&&yu.add(m),g===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return Kd++,()=>{l.forEach(d=>{const m=(ba.get(d)||0)-1,h=(c.get(d)||0)-1;ba.set(d,m),c.set(d,h),m||(!yu.has(d)&&a&&d.removeAttribute(a),yu.delete(d)),h||d.removeAttribute(i)}),Kd--,Kd||(ba=new WeakMap,ba=new WeakMap,yu=new WeakSet,gu={})}}function kw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Zn(e[0]).body;return dF(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Gd=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tw(e,t){const n=Pd(e,Gd());t==="prev"&&n.reverse();const r=n.indexOf(ai(Zn(e)));return n.slice(r+1)[0]}function Ow(){return Tw(document.body,"next")}function Cw(){return Tw(document.body,"prev")}function Xo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mn(n,r)}function pF(e){Pd(e,Gd()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function hF(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Yd={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 mF;function $w(e){e.key==="Tab"&&(e.target,clearTimeout(mF))}const bu=w.forwardRef(function(t,n){const[r,i]=w.useState();jt(()=>(vw()&&i("button"),document.addEventListener("keydown",$w),()=>{document.removeEventListener("keydown",$w)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Jo("focus-guard")]:"",style:Yd};return w.createElement("span",mu({},t,a))}),Iw=w.createContext(null);function vF(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=Zd(),o=Rw(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=w.useRef();return jt(()=>()=>{r==null||r.remove()},[r,s]),jt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,m=Jo("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Mn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=p,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function yF(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=vF({id:n,root:r}),[o,s]=w.useState(null),u=w.useRef(null),l=w.useRef(null),c=w.useRef(null),f=w.useRef(null),p=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function d(m){a&&Xo(m)&&(m.type==="focusin"?hF:pF)(a)}return a.addEventListener("focusin",d,!0),a.addEventListener("focusout",d,!0),()=>{a.removeEventListener("focusin",d,!0),a.removeEventListener("focusout",d,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(Iw.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},p&&a&&w.createElement(bu,{"data-type":"outside",ref:u,onFocus:d=>{if(Xo(d,a)){var m;(m=c.current)==null||m.focus()}else{const h=Cw()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),p&&a&&w.createElement("span",{"aria-owns":a.id,style:Yd}),a&&Ti.createPortal(t,a),p&&a&&w.createElement(bu,{"data-type":"outside",ref:l,onFocus:d=>{if(Xo(d,a)){var m;(m=f.current)==null||m.focus()}else{const h=Ow()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,d.nativeEvent))}}}))}const Rw=()=>w.useContext(Iw),gF=w.forwardRef(function(t,n){return w.createElement("button",mu({},t,{type:"button",ref:n,tabIndex:-1,style:Yd}))});function bF(e){const{context:t,children:n,disabled:r=!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:p,nodeId:d,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:g}}=t,b=cF()?a:!0,k=oi(i),S=oi(o),E=oi(s),O=vu(),L=Rw(),D=typeof o=="number"&&o<0,T=w.useRef(null),P=w.useRef(null),q=w.useRef(!1),$=w.useRef(null),F=w.useRef(!1),M=L!=null,B=v&&v.getAttribute("role")==="combobox"&&bw(v)&&D,W=w.useCallback(function(V){return V===void 0&&(V=g),V?Pd(V,Gd()):[]},[g]),U=w.useCallback(V=>{const K=W(V);return k.current.map(_=>v&&_==="reference"?v:g&&_==="floating"?g:K).filter(Boolean).flat()},[v,g,k,W]);w.useEffect(()=>{if(r||!u)return;function V(_){if(_.key==="Tab"){mn(g,ai(Zn(g)))&&W().length===0&&!B&&Gt(_);const Y=U(),oe=gw(_);k.current[0]==="reference"&&oe===v&&(Gt(_),_.shiftKey?Mr(Y[Y.length-1]):Mr(Y[1])),k.current[1]==="floating"&&oe===g&&_.shiftKey&&(Gt(_),Mr(Y[0]))}}const K=Zn(g);return K.addEventListener("keydown",V),()=>{K.removeEventListener("keydown",V)}},[r,v,g,u,k,p,B,W,U]),w.useEffect(()=>{if(r||!c)return;function V(){F.current=!0,setTimeout(()=>{F.current=!1})}function K(_){const Y=_.relatedTarget;queueMicrotask(()=>{const oe=!(mn(v,Y)||mn(g,Y)||mn(Y,g)||mn(L==null?void 0:L.portalNode,Y)||Y!=null&&Y.hasAttribute(Jo("focus-guard"))||O&&(ga(O.nodesRef.current,d).find(ne=>{var le,pe;return mn((le=ne.context)==null?void 0:le.elements.floating,Y)||mn((pe=ne.context)==null?void 0:pe.elements.domReference,Y)})||lF(O.nodesRef.current,d).find(ne=>{var le,pe;return((le=ne.context)==null?void 0:le.elements.floating)===Y||((pe=ne.context)==null?void 0:pe.elements.domReference)===Y})));Y&&oe&&!F.current&&Y!==$.current&&(q.current=!0,m(!1,_))})}if(g&&va(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",V),!u&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",V),!u&&g.removeEventListener("focusout",K)}},[r,v,g,u,d,O,L,m,c]),w.useEffect(()=>{var V;if(r)return;const K=Array.from((L==null||(V=L.portalNode)==null?void 0:V.querySelectorAll("["+Jo("portal")+"]"))||[]);if(g){const _=[g,...K,T.current,P.current,k.current.includes("reference")||B?v:null].filter(oe=>oe!=null),Y=u?kw(_,b,!b):kw(_);return()=>{Y()}}},[r,v,g,u,k,L,B,b]),jt(()=>{if(r||!g)return;const V=Zn(g),K=ai(V);queueMicrotask(()=>{const _=U(g),Y=S.current,oe=(typeof Y=="number"?_[Y]:Y.current)||g,ne=mn(g,K);!D&&!ne&&f&&Mr(oe,{preventScroll:oe===g})})},[r,f,g,D,U,S]),jt(()=>{if(r||!g)return;let V=!1;const K=Zn(g),_=ai(K),Y=y.current;$.current=_;function oe(ne){if(ne.type==="escapeKey"&&p.domReference.current&&($.current=p.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const le=ne.data.returnFocus;typeof le=="object"?(q.current=!1,V=le.preventScroll):q.current=!le}return h.on("dismiss",oe),()=>{h.off("dismiss",oe);const ne=ai(K);(mn(g,ne)||O&&ga(O.nodesRef.current,d).some(pe=>{var he;return mn((he=pe.context)==null?void 0:he.elements.floating,ne)})||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&p.domReference.current&&($.current=p.domReference.current),E.current&&va($.current)&&!q.current&&Mr($.current,{cancelPrevious:!1,preventScroll:V})}},[r,g,E,y,p,h,O,d]),jt(()=>{if(!(r||!L))return L.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:m,refs:p}),()=>{L.setFocusManagerState(null)}},[r,L,u,f,m,p,c]),jt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!D){const V=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||ai(Zn(g))!==p.domReference.current&&W().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};V();const K=new MutationObserver(V);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,p,k,W,D]);function N(V){return r||!l||!u?null:w.createElement(gF,{ref:V==="start"?T:P,onClick:K=>m(!1,K.nativeEvent)},typeof l=="string"?l:"Dismiss")}const x=!r&&b&&!B&&(M||u);return w.createElement(w.Fragment,null,x&&w.createElement(bu,{"data-type":"inside",ref:L==null?void 0:L.beforeInsideRef,onFocus:V=>{if(u){const _=U();Mr(i[0]==="reference"?_[0]:_[_.length-1])}else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(q.current=!1,Xo(V,L.portalNode)){const _=Ow()||v;_==null||_.focus()}else{var K;(K=L.beforeOutsideRef.current)==null||K.focus()}}}),!B&&N("start"),n,N("end"),x&&w.createElement(bu,{"data-type":"inside",ref:L==null?void 0:L.afterInsideRef,onFocus:V=>{if(u)Mr(U()[0]);else if(L!=null&&L.preserveTabOrder&&L.portalNode)if(c&&(q.current=!0),Xo(V,L.portalNode)){const _=Cw()||v;_==null||_.focus()}else{var K;(K=L.afterOutsideRef.current)==null||K.focus()}}}))}function Pw(e){return va(e.target)&&e.target.tagName==="BUTTON"}function Aw(e){return bw(e)}function xF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=w.useRef(),p=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(yw(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}yw(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||Pw(d))&&(d.key===" "&&!Aw(a)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&u),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||Pw(d)||Aw(a)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&u),d.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const wF=w.useInsertionEffect||(e=>e());function si(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wF(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const SF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},_F={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},EF=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function kF(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=vu(),b=_w()!=null,k=si(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,E=w.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:L}=EF(v),D=si(P=>{if(!n||!c||!f||P.key!=="Escape")return;const q=g?ga(g.nodesRef.current,a):[];if(!O&&(P.stopPropagation(),q.length>0)){let $=!0;if(q.forEach(F=>{var M;if((M=F.context)!=null&&M.open&&!F.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,QL(P)?P.nativeEvent:P)}),T=si(P=>{const q=E.current;if(E.current=!1,q||typeof S=="function"&&!S(P))return;const $=gw(P),F="["+Jo("inert")+"]",M=Zn(u).querySelectorAll(F);let B=Mn($)?$:null;for(;B&&!KL(B);){const N=YL(B);if(N===Zn(u).body||!Mn(N))break;B=N}if(M.length&&Mn($)&&!eF($)&&!mn($,u)&&Array.from(M).every(N=>!mn(B,N)))return;if(va($)&&u){const N=$.clientWidth>0&&$.scrollWidth>$.clientWidth,x=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let V=x&&P.offsetX>$.clientWidth;if(x&&GL($).direction==="rtl"&&(V=P.offsetX<=$.offsetWidth-$.clientWidth),V||N&&P.offsetY>$.clientHeight)return}const W=g&&ga(g.nodesRef.current,a).some(N=>{var x;return Vd(P,(x=N.context)==null?void 0:x.elements.floating)});if(Vd(P,u)||Vd(P,s)||W)return;const U=g?ga(g.nodesRef.current,a):[];if(U.length>0){let N=!0;if(U.forEach(x=>{var V;if((V=x.context)!=null&&V.open&&!x.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:hw(P)||mw(P)}}),r(!1,P)});return w.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=L;function P(F){r(!1,F)}const q=Zn(u);f&&q.addEventListener("keydown",D),S&&q.addEventListener(d,T);let $=[];return y&&(Mn(s)&&($=ni(s)),Mn(u)&&($=$.concat(ni(u))),!Mn(o)&&o&&o.contextElement&&($=$.concat(ni(o.contextElement)))),$=$.filter(F=>{var M;return F!==((M=q.defaultView)==null?void 0:M.visualViewport)}),$.forEach(F=>{F.addEventListener("scroll",P,{passive:!0})}),()=>{f&&q.removeEventListener("keydown",D),S&&q.removeEventListener(d,T),$.forEach(F=>{F.removeEventListener("scroll",P)})}},[l,u,s,o,f,S,d,n,r,y,c,O,L,D,T]),w.useEffect(()=>{E.current=!1},[S,d]),w.useMemo(()=>c?{reference:{onKeyDown:D,[SF[h]]:P=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,P.nativeEvent))}},floating:{onKeyDown:D,[_F[d]]:()=>{E.current=!0}}}:{},[c,i,m,d,h,r,D])}let Jd;process.env.NODE_ENV!=="production"&&(Jd=new Set);function TF(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const O="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&&!Mn(e.elements.reference)){var o;if(!((o=Jd)!=null&&o.has(O))){var s;(s=Jd)==null||s.add(O),console.error(O)}}}const[u,l]=w.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=N2(e),p=vu(),d=si((O,L)=>{O&&(h.current.openEvent=L),r==null||r(O,L)}),m=w.useRef(null),h=w.useRef({}),y=w.useState(()=>aF())[0],v=Zd(),g=w.useCallback(O=>{const L=Mn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(L)},[f.refs]),b=w.useCallback(O=>{(Mn(O)||O===null)&&(m.current=O,l(O)),(Mn(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!Mn(O))&&f.refs.setReference(O)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:m}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),E=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:d}),[f,i,v,y,n,d,k,S]);return jt(()=>{const O=p==null?void 0:p.nodesRef.current.find(L=>L.id===i);O&&(O.context=E)}),w.useMemo(()=>({...f,context:E,refs:k,elements:S}),[f,k,S,E])}function Xd(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=u}),i),{})}}function OF(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>Xd(a,e,"reference"),t),r=w.useCallback(a=>Xd(a,e,"floating"),t),i=w.useCallback(a=>Xd(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Nw=!1;function xu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Dw(e,t){return xu(t,e===qd||e===pu,e===ya||e===Go)}function Qd(e,t,n){return xu(t,e===pu,n?e===ya:e===Go)||e==="Enter"||e==" "||e===""}function CF(e,t,n){return xu(t,n?e===ya:e===Go,e===pu)}function Mw(e,t,n){return xu(t,n?e===Go:e===ya,e===qd)}function $F(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:E=1,scrollItemIntoView:O=!0,virtualItemRef:L}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),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 D=_w(),T=vu(),P=si(l),q=w.useRef(v),$=w.useRef(f??-1),F=w.useRef(null),M=w.useRef(!0),B=w.useRef(P),W=w.useRef(!!o),U=w.useRef(!1),N=w.useRef(!1),x=oi(k),V=oi(n),K=oi(O),[_,Y]=w.useState(),[oe,ne]=w.useState(),le=si(function(ue,Q,Z){Z===void 0&&(Z=!1);const de=ue.current[Q.current];de&&(y?(Y(de.id),T==null||T.events.emit("virtualfocus",de),L&&(L.current=de)):Mr(de,{preventScroll:!0,sync:XL()&&vw()?Nw||U.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});jt(()=>{document.createElement("div").focus({get preventScroll(){return Nw=!0,!1}})},[]),jt(()=>{c&&(n&&o?q.current&&f!=null&&(N.current=!0,P(f)):W.current&&($.current=-1,B.current(null)))},[c,n,o,f,P]),jt(()=>{if(c&&n&&o)if(u==null){if(U.current=!1,f!=null)return;if(W.current&&($.current=-1,le(s,$)),!W.current&&q.current&&(F.current!=null||q.current===!0&&F.current==null)){let ue=0;const Q=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Q),ue++):($.current=F.current==null||Qd(F.current,S,h)||m?Wd(s,x.current):xw(s,x.current),F.current=null,P($.current))};Q()}}else Yo(s,u)||($.current=u,le(s,$,N.current),N.current=!1)},[c,n,o,u,f,m,s,S,h,P,le,x]),jt(()=>{var ue,Q;if(!c||o||!T||y||!W.current)return;const Z=T.nodesRef.current,de=(ue=Z.find(R=>R.id===D))==null||(Q=ue.context)==null?void 0:Q.elements.floating,ve=ai(Zn(o)),$e=Z.some(R=>R.context&&mn(R.context.elements.floating,ve));de&&!$e&&M.current&&de.focus({preventScroll:!0})},[c,o,T,D,y]),jt(()=>{if(!c||!T||!y||D)return;function ue(Q){ne(Q.id),L&&(L.current=Q)}return T.events.on("virtualfocus",ue),()=>{T.events.off("virtualfocus",ue)}},[c,T,y,D,L]),jt(()=>{B.current=P,W.current=!!o}),jt(()=>{n||(F.current=null)},[n]);const pe=u!=null,he=w.useMemo(()=>{function ue(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&P(de)}return{onFocus(Z){let{currentTarget:de}=Z;ue(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ue(de)},onPointerLeave(Z){let{pointerType:de}=Z;!M.current||de==="touch"||($.current=-1,le(s,$),P(null),y||Mr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,P,y]);return w.useMemo(()=>{if(!c)return{};const ue=x.current;function Q(R){if(M.current=!1,U.current=!0,!V.current&&R.currentTarget===i.floating.current)return;if(m&&Mw(R.key,S,h)){Gt(R),r(!1,R.nativeEvent),va(a)&&!y&&a.focus();return}const J=$.current,ae=Wd(s,ue),ee=xw(s,ue);if(R.key==="Home"&&(Gt(R),$.current=ae,P($.current)),R.key==="End"&&(Gt(R),$.current=ee,P($.current)),!(E>1&&($.current=nF(s,{event:R,orientation:S,loop:d,cols:E,disabledIndices:ue,minIndex:ae,maxIndex:ee,prevIndex:$.current,stopEvent:!0}),P($.current),S==="both"))&&Dw(R.key,S)){if(Gt(R),n&&!y&&ai(R.currentTarget.ownerDocument)===R.currentTarget){$.current=Qd(R.key,S,h)?ae:ee,P($.current);return}Qd(R.key,S,h)?d?$.current=J>=ee?p&&J!==s.current.length?-1:ae:tn(s,{startingIndex:J,disabledIndices:ue}):$.current=Math.min(ee,tn(s,{startingIndex:J,disabledIndices:ue})):d?$.current=J<=ae?p&&J!==-1?s.current.length:ee:tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue}):$.current=Math.max(ae,tn(s,{startingIndex:J,decrement:!0,disabledIndices:ue})),Yo(s,$.current)?P(null):P($.current)}}function Z(R){v==="auto"&&hw(R.nativeEvent)&&(q.current=!0)}function de(R){q.current=v,v==="auto"&&mw(R.nativeEvent)&&(q.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":oe||_},$e=s.current.find(R=>(R==null?void 0:R.id)===_);return{reference:{...ve,onKeyDown(R){M.current=!1;const J=R.key.indexOf("Arrow")===0,ae=CF(R.key,S,h),ee=Mw(R.key,S,h),ke=Dw(R.key,S),we=(m?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const Fe=T==null?void 0:T.nodesRef.current.find(A=>A.parentId==null),z=T&&Fe?uF(T.nodesRef.current,Fe.id):null;if(J&&z&&L){const A=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Pe,We;const X=((Pe=z.context)==null?void 0:Pe.elements.domReference)===R.currentTarget,ce=ee&&!X?(We=z.context)==null?void 0:We.elements.domReference:ae?$e:null;ce&&(Gt(R),ce.dispatchEvent(A),ne(void 0))}if(ke&&z.context&&z.context.open&&z.parentId&&R.currentTarget!==z.context.elements.domReference){var Ae;Gt(R),(Ae=z.context.elements.domReference)==null||Ae.dispatchEvent(A);return}}return Q(R)}if(!(!n&&!b&&J)){if(we&&(F.current=m&&ke?null:R.key),m){ae&&(Gt(R),n?($.current=Wd(s,ue),P($.current)):r(!0,R.nativeEvent));return}ke&&(f!=null&&($.current=f),Gt(R),!n&&b?r(!0,R.nativeEvent):Q(R),n&&P($.current))}},onFocus(){n&&P(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){M.current=!0}},item:he}},[a,i,_,oe,x,V,s,c,S,h,y,n,pe,m,f,b,p,E,d,v,P,r,he,T,L])}function IF(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Zd();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function RF(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=w.useRef(),h=w.useRef(""),y=w.useRef((n=d??o)!=null?n:-1),v=w.useRef(null),g=si(s),b=si(u),k=oi(c),S=oi(p);return jt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),jt(()=>{if(r&&h.current===""){var E;y.current=(E=d??o)!=null?E:-1}},[r,d,o]),w.useMemo(()=>{if(!l)return{};function E(D){D?i.current.typing||(i.current.typing=D,b(D)):i.current.typing&&(i.current.typing=D,b(D))}function O(D,T,P){const q=k.current?k.current(T,P):T.find($=>($==null?void 0:$.toLocaleLowerCase().indexOf(P.toLocaleLowerCase()))===0);return q?D.indexOf(q):-1}function L(D){const T=a.current;if(h.current.length>0&&h.current[0]!==" "&&(O(T,T,h.current)===-1?E(!1):D.key===" "&&Gt(D)),T==null||S.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(Gt(D),E(!0)),T.every(F=>{var M,B;return F?((M=F[0])==null?void 0:M.toLocaleLowerCase())!==((B=F[1])==null?void 0:B.toLocaleLowerCase()):!0})&&h.current===D.key&&(h.current="",y.current=v.current),h.current+=D.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,E(!1)},f);const q=y.current,$=O(T,[...T.slice((q||0)+1),...T.slice(0,(q||0)+1)],h.current);$!==-1?(g($),v.current=$):D.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:L},floating:{onKeyDown:L,onKeyUp(D){D.key===" "&&E(!1)}}}},[l,r,i,a,f,S,k,g,b])}const PF=({options:e,label:t,reusable:n,sendMessage:r,isReadOnly:i})=>{var M,B,W,U,N;const a=ql(x=>x.messageContainerRef),[o,s]=w.useState(!1),[u,l]=w.useState(null),[c,f]=w.useState(null),{message:{blocks:{dropdown:p}}}=yt,d=e.reduce((x,V)=>(x[V.label]=V.value,x),{}),m=d?Object.keys(d):[],h=x=>{s(c!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=TF({placement:"bottom-start",open:o,onOpenChange:h,whileElementsMounted:$2,middleware:[D2(5),M2({padding:10,boundary:(a==null?void 0:a.current)??void 0,crossAxis:!0}),j2({apply({rects:x,elements:V,availableHeight:K}){Object.assign(V.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(m),S=w.useRef(!1),E=xF(g,{event:"mousedown"}),O=kF(g),L=IF(g,{role:"listbox"}),D=$F(g,{listRef:b,activeIndex:u,selectedIndex:c,onNavigate:l,loop:!0}),T=RF(g,{listRef:k,activeIndex:u,selectedIndex:c,onMatch:o?l:f,onTypingChange(x){S.current=x}}),{getReferenceProps:P,getFloatingProps:q,getItemProps:$}=OF([O,L,D,T,E]),F=x=>{f(x),m[x]!==void 0&&(r==null||r({type:"text",text:d[m[x]]??""})),s(!1)};return c!==null&&m[c],I.jsxs(I.Fragment,{children:[I.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!n?"":void 0,...(M=p.button)==null?void 0:M.container,...P(),children:[I.jsx("span",{...(B=p.button)==null?void 0:B.text,children:"Select..."}),I.jsx(K2,{...(W=p.button)==null?void 0:W.icon})]}),o&&I.jsx(yF,{children:I.jsx(bF,{context:g,modal:!1,children:I.jsx("div",{ref:y.setFloating,className:(N=(U=p.content)==null?void 0:U.container)==null?void 0:N.className,style:{...v},...q(),children:m.map((x,V)=>{var K;return I.jsx("div",{ref:_=>{b.current[V]=_},role:"option",tabIndex:V===u?0:-1,"aria-selected":V===c&&V===u,"data-active":V===u?"":void 0,...(K=p.content)==null?void 0:K.item,...$({onClick(){i||F(V)},onKeyDown(_){i||(_.key==="Enter"&&(_.preventDefault(),F(V)),_.key===" "&&!S.current&&(_.preventDefault(),F(V)))}}),children:x},x)})})})})]})},AF=j.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return I.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[I.jsx("p",{...a.title,children:t||n}),I.jsx(Y2,{...a.icon})]})}),jw={audio:q2,bubble:xx,button:WM,carousel:uw,column:Qx,dropdown:PF,file:AF,image:Xx,location:Q2,row:ew,text:TM,video:V2},xa=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??jw[e.type],i={...n,...e};return I.jsx(r,{...i})};function NF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 DF=w.forwardRef(NF);function MF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.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 jF=w.forwardRef(MF);function LF({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.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 FF=w.forwardRef(LF);function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}function BF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var UF=j.useLayoutEffect,zF=function(t){var n=w.useRef(t);return UF(function(){n.current=t}),n},Lw=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},VF=function(t,n){var r=j.useRef();return j.useCallback(function(i){t.current=i,r.current&&Lw(r.current,null),r.current=n,n&&Lw(n,i)},[n])},Fw={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},qF=function(t){Object.keys(Fw).forEach(function(n){t.style.setProperty(n,Fw[n],"important")})},Bw=qF,un=null,Uw=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function WF(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),Bw(un)),un.parentNode===null&&document.body.appendChild(un);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(p){var d=p;un.style[d]=o[d]}),Bw(un),un.value=t;var u=Uw(un,e);un.value=t,u=Uw(un,e),un.value="x";var l=un.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var zw=function(){},HF=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},ZF=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],KF=!!document.documentElement.currentStyle,GF=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=HF(ZF,n),i=r.boxSizing;if(i==="")return null;KF&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},YF=GF;function Vw(e,t,n){var r=zF(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var JF=function(t){Vw(window,"resize",t)},XF=function(t){Vw(document.fonts,"loadingdone",t)},QF=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],e5=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?zw:o,u=t.onHeightChange,l=u===void 0?zw:u,c=BF(t,QF),f=c.value!==void 0,p=w.useRef(null),d=VF(p,n),m=w.useRef(0),h=w.useRef(),y=function(){var b=p.current,k=r&&h.current?h.current:YF(b);if(k){h.current=k;var S=WF(k,b.value||b.placeholder||"x",a,i),E=S[0],O=S[1];m.current!==E&&(m.current=E,b.style.setProperty("height",E+"px","important"),l(E,{rowHeight:O}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),JF(y),XF(y),w.createElement("textarea",ep({},c,{onChange:v,ref:d}))},t5=w.forwardRef(e5);const qw=j.memo(j.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:p}=yt,[d,m]=j.useState(""),[h,y]=j.useState(-1),[v,g]=j.useState(!1),b=j.useRef(null),k=j.useRef(null),S=gx($=>$.messageHistory),E=gx($=>$.addMessageToHistory);if(r)return null;const O=()=>{var $;b.current&&(($=b.current)==null||$.click())},L=n||r||!a,D=async $=>{var M;if(!l)return;const F=(M=$.target.files)==null?void 0:M[0];if(F)try{const{fileUrl:B,type:W}=await l(F),U=W==="image"?{type:W,imageUrl:B}:W==="audio"?{type:W,audioUrl:B}:W==="video"?{type:W,videoUrl:B}:{type:W,fileUrl:B};await(u==null?void 0:u(U))}catch(B){console.error("Error sending file:",B)}},T=window.SpeechRecognition||window.webkitSpeechRecognition,P=()=>{k.current||(k.current=new T);const $=k.current;$&&($.continuous=!0,$.onresult=F=>{var B,W,U;const M=((U=(W=(B=F.results)==null?void 0:B[0])==null?void 0:W[0])==null?void 0:U.transcript)??"";m(M??""),$.stop(),g(!1)},v?($.stop(),g(!1)):($.start(),g(!0)))},q=()=>{d&&(u==null||u({type:"text",text:d}),m(""),E(d),y(-1))};return I.jsxs(I.Fragment,{children:[I.jsxs("div",{"data-disabled":L,...c,className:Jl(p.container.className,e),ref:f,children:[i&&I.jsxs(I.Fragment,{children:[I.jsx("button",{type:"button",disabled:L,...p.uploadButton.container,onClick:O,children:I.jsx(FF,{...p.uploadButton.icon})}),I.jsx("input",{type:"file",ref:b,style:{display:"none"},onChange:D})]}),I.jsx(t5,{...p==null?void 0:p.input,ref:t,placeholder:o??"Type your message...",disabled:L,value:d,"data-has-value":!!d,onChange:$=>m($.target.value),maxRows:5,onKeyDown:$=>{L||($.key==="Enter"&&$.shiftKey?($.preventDefault(),m(`${d}
273
+ `)):$.key==="Enter"&&($.preventDefault(),q()),$.key==="ArrowUp"&&($.preventDefault(),h<S.length-1&&m(S[h+1]??""),y(()=>Math.min(h+1,S.length-1))),$.key==="ArrowDown"&&($.preventDefault(),m(h===0?"":S[h-1]??""),y(()=>Math.max(h-1,-1))))}}),d&&I.jsx("button",{type:"button","aria-label":"Send message",...p.button.container,disabled:!d||L,onClick:q,children:I.jsx(DF,{...p.button.icon})}),!d&&T&&I.jsx("button",{type:"button","aria-label":"Activate voice input",...p.voiceButton.container,disabled:!!d,onClick:P,"data-listens":!!v,children:I.jsx(jF,{...p.voiceButton.icon})})]}),I.jsx("a",{...p.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),Ww=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[a,o]=j.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return I.jsxs(Sx.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[I.jsx(ui,{open:t,onOpenChange:n,children:I.jsx(ui.Content,{title:r,children:a})}),e]})},Hw=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=j.useMemo(()=>ag({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return I.jsx("style",{children:a})};function jr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function n5(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,u=w.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Zw(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:p,children:d,...m}=f,h=((v=p==null?void 0:p[e])==null?void 0:v[u])||s,y=w.useMemo(()=>m,Object.values(m));return I.jsx(h.Provider,{value:y,children:d})};l.displayName=a+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[u])||s,m=w.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,r5(i,...t)]}function r5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var i5=w.useId||(()=>{}),a5=0;function wu(e){const[t,n]=w.useState(i5());return ea(()=>{e||n(r=>r??String(a5++))},[e]),e||(t?`radix-${t}`:"")}function Kw({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=o5({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Zr(n),u=w.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 o5({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=Zr(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function s5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var l5="DismissableLayer",tp="dismissableLayer.update",u5="dismissableLayer.pointerDownOutside",c5="dismissableLayer.focusOutside",Gw,Yw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jw=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=w.useContext(Yw),[c,f]=w.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=w.useState({}),m=Kr(t,O=>f(O)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),g=c?h.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=p5(O=>{const L=O.target,D=[...l.branches].some(T=>T.contains(L));!k||D||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},p),E=h5(O=>{const L=O.target;[...l.branches].some(T=>T.contains(L))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},p);return s5(O=>{g===l.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},p),w.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Gw=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),Xw(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Gw)}},[c,p,n,l]),w.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),Xw())},[c,l]),w.useEffect(()=>{const O=()=>d({});return document.addEventListener(tp,O),()=>document.removeEventListener(tp,O)},[]),I.jsx(dn.div,{...u,ref:m,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:jr(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jr(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jr(e.onPointerDownCapture,S.onPointerDownCapture)})});Jw.displayName=l5;var f5="DismissableLayerBranch",d5=w.forwardRef((e,t)=>{const n=w.useContext(Yw),r=w.useRef(null),i=Kr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),I.jsx(dn.div,{...e,ref:i})});d5.displayName=f5;function p5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){Qw(u5,n,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);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function h5(e,t=globalThis==null?void 0:globalThis.document){const n=Zr(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&Qw(c5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xw(){const e=new CustomEvent(tp);document.dispatchEvent(e)}function Qw(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?TC(i,a):i.dispatchEvent(a)}var np="focusScope.autoFocusOnMount",rp="focusScope.autoFocusOnUnmount",e0={bubbles:!1,cancelable:!0},m5="FocusScope",t0=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=w.useState(null),l=Zr(i),c=Zr(a),f=w.useRef(null),p=Kr(t,h=>u(h)),d=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let h=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:li(f.current,{select:!0})},y=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||li(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&li(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,d.paused]),w.useEffect(()=>{if(s){i0.add(d);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(np,e0);s.addEventListener(np,l),s.dispatchEvent(v),v.defaultPrevented||(v5(w5(n0(s)),{select:!0}),document.activeElement===h&&li(s))}return()=>{s.removeEventListener(np,l),setTimeout(()=>{const v=new CustomEvent(rp,e0);s.addEventListener(rp,c),s.dispatchEvent(v),v.defaultPrevented||li(h??document.body,{select:!0}),s.removeEventListener(rp,c),i0.remove(d)},0)}}},[s,l,c,d]);const m=w.useCallback(h=>{if(!n&&!r||d.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const g=h.currentTarget,[b,k]=y5(g);b&&k?!h.shiftKey&&v===k?(h.preventDefault(),n&&li(b,{select:!0})):h.shiftKey&&v===b&&(h.preventDefault(),n&&li(k,{select:!0})):v===g&&h.preventDefault()}},[n,r,d.paused]);return I.jsx(dn.div,{tabIndex:-1,...o,ref:p,onKeyDown:m})});t0.displayName=m5;function v5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(li(r,{select:t}),document.activeElement!==n)return}function y5(e){const t=n0(e),n=r0(t,e),r=r0(t.reverse(),e);return[n,r]}function n0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function r0(e,t){for(const n of e)if(!g5(n,{upTo:t}))return n}function g5(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 b5(e){return e instanceof HTMLInputElement&&"select"in e}function li(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&b5(e)&&t&&e.select()}}var i0=x5();function x5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=a0(e,t),e.unshift(t)},remove(t){var n;e=a0(e,t),(n=e[0])==null||n.resume()}}}function a0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function w5(e){return e.filter(t=>t.tagName!=="A")}function S5(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Su=e=>{const{present:t,children:n}=e,r=_5(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=Kr(r.ref,E5(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Su.displayName="Presence";function _5(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,u]=S5(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=_u(r.current);a.current=s==="mounted"?l:"none"},[s]),ea(()=>{const l=r.current,c=i.current;if(c!==e){const p=a.current,d=_u(l);e?u("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ea(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=d=>{const h=_u(r.current).includes(d.animationName);if(d.target===t&&h&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=d=>{d.target===t&&(a.current=_u(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function _u(e){return(e==null?void 0:e.animationName)||"none"}function E5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ip=0;function k5(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o0()),document.body.insertAdjacentElement("beforeend",e[1]??o0()),ip++,()=>{ip===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ip--}},[])}function o0(){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 Eu="right-scroll-bar-position",ku="width-before-scroll-bar",T5="with-scroll-bars-hidden",O5="--removed-body-scroll-bar-size";function ap(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function C5(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var $5=typeof window<"u"?w.useLayoutEffect:w.useEffect,s0=new WeakMap;function I5(e,t){var n=C5(null,function(r){return e.forEach(function(i){return ap(i,r)})});return $5(function(){var r=s0.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||ap(s,null)}),a.forEach(function(s){i.has(s)||ap(s,o)})}s0.set(n,e)},[e]),n}function R5(e){return e}function P5(e,t){t===void 0&&(t=R5);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function A5(e){e===void 0&&(e={});var t=P5(null);return t.options=Dn({async:!0,ssr:!1},e),t}var l0=function(e){var t=e.sideCar,n=Jx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Dn({},n))};l0.isSideCarExport=!0;function N5(e,t){return e.useMedium(t),l0}var u0=A5(),op=function(){},Tu=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:op,onWheelCapture:op,onTouchMoveCapture:op}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=Jx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,S=I5([n,t]),E=Dn(Dn({},b),i);return w.createElement(w.Fragment,null,c&&w.createElement(k,{sideCar:u0,removeScrollBar:l,shards:f,noIsolation:d,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Dn(Dn({},E),{ref:S})):w.createElement(v,Dn({},E,{className:u,ref:S}),s))});Tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tu.classNames={fullWidth:ku,zeroRight:Eu};var c0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function D5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c0();return t&&e.setAttribute("nonce",t),e}function M5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function j5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var L5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=D5())&&(M5(t,n),j5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},F5=function(){var e=L5();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},B5=function(){var e=F5(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},U5={left:0,top:0,right:0,gap:0},sp=function(e){return parseInt(e||"",10)||0},z5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[sp(n),sp(r),sp(i)]},V5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return U5;var t=z5(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q5=B5(),wa="data-scroll-locked",W5=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
274
+ .`.concat(T5,` {
275
275
  overflow: hidden `).concat(r,`;
276
276
  padding-right: `).concat(s,"px ").concat(r,`;
277
277
  }
@@ -305,51 +305,51 @@ to {
305
305
  }
306
306
 
307
307
  body[`).concat(wa,`] {
308
- `).concat(k5,": ").concat(s,`px;
308
+ `).concat(O5,": ").concat(s,`px;
309
309
  }
310
- `)},f0=function(){var e=parseInt(document.body.getAttribute(wa)||"0",10);return isFinite(e)?e:0},q5=function(){w.useEffect(function(){return document.body.setAttribute(wa,(f0()+1).toString()),function(){var e=f0()-1;e<=0?document.body.removeAttribute(wa):document.body.setAttribute(wa,e.toString())}},[])},W5=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;q5();var a=w.useMemo(function(){return U5(i)},[i]);return w.createElement(z5,{styles:V5(a,!t,i,n?"":"!important")})},lp=!1;if(typeof window<"u")try{var Ou=Object.defineProperty({},"passive",{get:function(){return lp=!0,!0}});window.addEventListener("test",Ou,Ou),window.removeEventListener("test",Ou,Ou)}catch{lp=!1}var Sa=lp?{passive:!1}:!1,H5=function(e){return e.tagName==="TEXTAREA"},d0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!H5(e)&&n[t]==="visible")},Z5=function(e){return d0(e,"overflowY")},K5=function(e){return d0(e,"overflowX")},p0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=h0(e,r);if(i){var a=m0(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},G5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Y5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},h0=function(e,t){return e==="v"?Z5(t):K5(t)},m0=function(e,t){return e==="v"?G5(t):Y5(t)},J5=function(e,t){return e==="h"&&t==="rtl"?-1:1},X5=function(e,t,n,r,i){var a=J5(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,f=0,p=0;do{var d=m0(e,s),m=d[0],h=d[1],y=d[2],v=h-y-a*m;(m||v)&&h0(e,s)&&(f+=v,p+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(l=!0),l},Cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v0=function(e){return[e.deltaX,e.deltaY]},y0=function(e){return e&&"current"in e?e.current:e},Q5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eB=function(e){return`
310
+ `)},f0=function(){var e=parseInt(document.body.getAttribute(wa)||"0",10);return isFinite(e)?e:0},H5=function(){w.useEffect(function(){return document.body.setAttribute(wa,(f0()+1).toString()),function(){var e=f0()-1;e<=0?document.body.removeAttribute(wa):document.body.setAttribute(wa,e.toString())}},[])},Z5=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;H5();var a=w.useMemo(function(){return V5(i)},[i]);return w.createElement(q5,{styles:W5(a,!t,i,n?"":"!important")})};function K5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c0();return t&&e.setAttribute("nonce",t),e}function G5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Y5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var J5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=K5())&&(G5(t,n),Y5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X5=function(){var e=J5();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Q5=function(){var e=X5(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},lp=!1;if(typeof window<"u")try{var Ou=Object.defineProperty({},"passive",{get:function(){return lp=!0,!0}});window.addEventListener("test",Ou,Ou),window.removeEventListener("test",Ou,Ou)}catch{lp=!1}var Sa=lp?{passive:!1}:!1,eB=function(e){return e.tagName==="TEXTAREA"},d0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eB(e)&&n[t]==="visible")},tB=function(e){return d0(e,"overflowY")},nB=function(e){return d0(e,"overflowX")},p0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=h0(e,r);if(i){var a=m0(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},iB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},h0=function(e,t){return e==="v"?tB(t):nB(t)},m0=function(e,t){return e==="v"?rB(t):iB(t)},aB=function(e,t){return e==="h"&&t==="rtl"?-1:1},oB=function(e,t,n,r,i){var a=aB(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,f=0,p=0;do{var d=m0(e,s),m=d[0],h=d[1],y=d[2],v=h-y-a*m;(m||v)&&h0(e,s)&&(f+=v,p+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(l=!0),l},Cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v0=function(e){return[e.deltaX,e.deltaY]},y0=function(e){return e&&"current"in e?e.current:e},sB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lB=function(e){return`
311
311
  .block-interactivity-`.concat(e,` {pointer-events: none;}
312
312
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
313
- `)},tB=0,_a=[];function nB(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(tB++)[0],a=w.useState(c0)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=M2([e.lockRef.current],(e.shards||[]).map(y0),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!o.current.allowPinchZoom;var v=Cu(h),g=n.current,b="deltaX"in h?h.deltaX:g[0]-v[0],k="deltaY"in h?h.deltaY:g[1]-v[1],S,E=h.target,O=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in h&&O==="h"&&E.type==="range")return!1;var L=p0(O,E);if(!L)return!0;if(L?S=O:(S=O==="v"?"h":"v",L=p0(O,E)),!L)return!1;if(!r.current&&"changedTouches"in h&&(b||k)&&(r.current=S),!S)return!0;var D=r.current||S;return X5(D,y,h,D==="h"?b:k,!0)},[]),u=w.useCallback(function(h){var y=h;if(!(!_a.length||_a[_a.length-1]!==a)){var v="deltaY"in y?v0(y):Cu(y),g=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&Q5(S.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var b=(o.current.shards||[]).map(y0).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=b.length>0?s(y,b[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),l=w.useCallback(function(h,y,v,g){var b={name:h,delta:y,target:v,should:g,shadowParent:rB(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),c=w.useCallback(function(h){n.current=Cu(h),r.current=void 0},[]),f=w.useCallback(function(h){l(h.type,v0(h),h.target,s(h,e.lockRef.current))},[]),p=w.useCallback(function(h){l(h.type,Cu(h),h.target,s(h,e.lockRef.current))},[]);w.useEffect(function(){return _a.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Sa),document.addEventListener("touchmove",u,Sa),document.addEventListener("touchstart",c,Sa),function(){_a=_a.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Sa),document.removeEventListener("touchmove",u,Sa),document.removeEventListener("touchstart",c,Sa)}},[]);var d=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:eB(i)}):null,d?w.createElement(W5,{gapMode:e.gapMode}):null)}function rB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iB=P5(u0,nB);var g0=w.forwardRef(function(e,t){return w.createElement(Tu,Dn({},e,{ref:t,sideCar:iB}))});g0.classNames=Tu.classNames;var aB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ea=new WeakMap,$u=new WeakMap,Iu={},up=0,b0=function(e){return e&&(e.host||b0(e.parentNode))},oB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=b0(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sB=function(e,t,n,r){var i=oB(t,Array.isArray(e)?e:[e]);Iu[n]||(Iu[n]=new WeakMap);var a=Iu[n],o=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(Ea.get(p)||0)+1,y=(a.get(p)||0)+1;Ea.set(p,h),a.set(p,y),o.push(p),h===1&&m&&$u.set(p,!0),y===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),s.clear(),up++,function(){o.forEach(function(f){var p=Ea.get(f)-1,d=a.get(f)-1;Ea.set(f,p),a.set(f,d),p||($u.has(f)||f.removeAttribute(r),$u.delete(f)),d||f.removeAttribute(n)}),up--,up||(Ea=new WeakMap,Ea=new WeakMap,$u=new WeakMap,Iu={})}},lB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=aB(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),sB(r,i,n,"aria-hidden")):function(){return null}},cp="Dialog",[x0,bse]=Zw(cp),[uB,fr]=x0(cp),w0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),u=w.useRef(null),[l=!1,c]=Kw({prop:r,defaultProp:i,onChange:a});return I.jsx(uB,{scope:t,triggerRef:s,contentRef:u,contentId:wu(),titleId:wu(),descriptionId:wu(),open:l,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};w0.displayName=cp;var S0="DialogTrigger",_0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(S0,n),a=Kr(t,i.triggerRef);return I.jsx(dn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dp(i.open),...r,ref:a,onClick:jr(e.onClick,i.onOpenToggle)})});_0.displayName=S0;var cB="DialogPortal",[xse,E0]=x0(cB,{forceMount:void 0}),Ru="DialogOverlay",k0=w.forwardRef((e,t)=>{const n=E0(Ru,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Ru,e.__scopeDialog);return a.modal?I.jsx(Su,{present:r||a.open,children:I.jsx(fB,{...i,ref:t})}):null});k0.displayName=Ru;var fB=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(Ru,n);return I.jsx(g0,{as:df,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(dn.div,{"data-state":dp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mi="DialogContent",T0=w.forwardRef((e,t)=>{const n=E0(Mi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Mi,e.__scopeDialog);return I.jsx(Su,{present:r||a.open,children:a.modal?I.jsx(dB,{...i,ref:t}):I.jsx(pB,{...i,ref:t})})});T0.displayName=Mi;var dB=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(null),i=Kr(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return lB(a)},[]),I.jsx(O0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:jr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:jr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:jr(e.onFocusOutside,a=>a.preventDefault())})}),pB=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return I.jsx(O0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),O0=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fr(Mi,n),u=w.useRef(null),l=Kr(t,u);return _5(),I.jsxs(I.Fragment,{children:[I.jsx(t0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:I.jsx(Jw,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":dp(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(mB,{titleId:s.titleId}),I.jsx(yB,{contentRef:u,descriptionId:s.descriptionId})]})]})}),fp="DialogTitle",C0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(fp,n);return I.jsx(dn.h2,{id:i.titleId,...r,ref:t})});C0.displayName=fp;var $0="DialogDescription",hB=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr($0,n);return I.jsx(dn.p,{id:i.descriptionId,...r,ref:t})});hB.displayName=$0;var I0="DialogClose",R0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(I0,n);return I.jsx(dn.button,{type:"button",...r,ref:t,onClick:jr(e.onClick,()=>i.onOpenChange(!1))})});R0.displayName=I0;function dp(e){return e?"open":"closed"}var P0="DialogTitleWarning",[wse,A0]=e5(P0,{contentName:Mi,titleName:fp,docsSlug:"dialog"}),mB=({titleId:e})=>{const t=A0(P0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
313
+ `)},uB=0,_a=[];function cB(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(uB++)[0],a=w.useState(Q5)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=L2([e.lockRef.current],(e.shards||[]).map(y0),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!o.current.allowPinchZoom;var v=Cu(h),g=n.current,b="deltaX"in h?h.deltaX:g[0]-v[0],k="deltaY"in h?h.deltaY:g[1]-v[1],S,E=h.target,O=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in h&&O==="h"&&E.type==="range")return!1;var L=p0(O,E);if(!L)return!0;if(L?S=O:(S=O==="v"?"h":"v",L=p0(O,E)),!L)return!1;if(!r.current&&"changedTouches"in h&&(b||k)&&(r.current=S),!S)return!0;var D=r.current||S;return oB(D,y,h,D==="h"?b:k,!0)},[]),u=w.useCallback(function(h){var y=h;if(!(!_a.length||_a[_a.length-1]!==a)){var v="deltaY"in y?v0(y):Cu(y),g=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&sB(S.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var b=(o.current.shards||[]).map(y0).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=b.length>0?s(y,b[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),l=w.useCallback(function(h,y,v,g){var b={name:h,delta:y,target:v,should:g,shadowParent:fB(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),c=w.useCallback(function(h){n.current=Cu(h),r.current=void 0},[]),f=w.useCallback(function(h){l(h.type,v0(h),h.target,s(h,e.lockRef.current))},[]),p=w.useCallback(function(h){l(h.type,Cu(h),h.target,s(h,e.lockRef.current))},[]);w.useEffect(function(){return _a.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Sa),document.addEventListener("touchmove",u,Sa),document.addEventListener("touchstart",c,Sa),function(){_a=_a.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Sa),document.removeEventListener("touchmove",u,Sa),document.removeEventListener("touchstart",c,Sa)}},[]);var d=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:lB(i)}):null,d?w.createElement(Z5,{gapMode:e.gapMode}):null)}function fB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dB=N5(u0,cB);var g0=w.forwardRef(function(e,t){return w.createElement(Tu,Dn({},e,{ref:t,sideCar:dB}))});g0.classNames=Tu.classNames;var pB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ea=new WeakMap,$u=new WeakMap,Iu={},up=0,b0=function(e){return e&&(e.host||b0(e.parentNode))},hB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=b0(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mB=function(e,t,n,r){var i=hB(t,Array.isArray(e)?e:[e]);Iu[n]||(Iu[n]=new WeakMap);var a=Iu[n],o=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(Ea.get(p)||0)+1,y=(a.get(p)||0)+1;Ea.set(p,h),a.set(p,y),o.push(p),h===1&&m&&$u.set(p,!0),y===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),s.clear(),up++,function(){o.forEach(function(f){var p=Ea.get(f)-1,d=a.get(f)-1;Ea.set(f,p),a.set(f,d),p||($u.has(f)||f.removeAttribute(r),$u.delete(f)),d||f.removeAttribute(n)}),up--,up||(Ea=new WeakMap,Ea=new WeakMap,$u=new WeakMap,Iu={})}},vB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=pB(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),mB(r,i,n,"aria-hidden")):function(){return null}},cp="Dialog",[x0,Tse]=Zw(cp),[yB,fr]=x0(cp),w0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),u=w.useRef(null),[l=!1,c]=Kw({prop:r,defaultProp:i,onChange:a});return I.jsx(yB,{scope:t,triggerRef:s,contentRef:u,contentId:wu(),titleId:wu(),descriptionId:wu(),open:l,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};w0.displayName=cp;var S0="DialogTrigger",_0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(S0,n),a=Kr(t,i.triggerRef);return I.jsx(dn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":dp(i.open),...r,ref:a,onClick:jr(e.onClick,i.onOpenToggle)})});_0.displayName=S0;var gB="DialogPortal",[Ose,E0]=x0(gB,{forceMount:void 0}),Ru="DialogOverlay",k0=w.forwardRef((e,t)=>{const n=E0(Ru,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Ru,e.__scopeDialog);return a.modal?I.jsx(Su,{present:r||a.open,children:I.jsx(bB,{...i,ref:t})}):null});k0.displayName=Ru;var bB=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(Ru,n);return I.jsx(g0,{as:df,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(dn.div,{"data-state":dp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Mi="DialogContent",T0=w.forwardRef((e,t)=>{const n=E0(Mi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=fr(Mi,e.__scopeDialog);return I.jsx(Su,{present:r||a.open,children:a.modal?I.jsx(xB,{...i,ref:t}):I.jsx(wB,{...i,ref:t})})});T0.displayName=Mi;var xB=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(null),i=Kr(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return vB(a)},[]),I.jsx(O0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:jr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:jr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:jr(e.onFocusOutside,a=>a.preventDefault())})}),wB=w.forwardRef((e,t)=>{const n=fr(Mi,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return I.jsx(O0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),O0=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=fr(Mi,n),u=w.useRef(null),l=Kr(t,u);return k5(),I.jsxs(I.Fragment,{children:[I.jsx(t0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:I.jsx(Jw,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":dp(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(_B,{titleId:s.titleId}),I.jsx(kB,{contentRef:u,descriptionId:s.descriptionId})]})]})}),fp="DialogTitle",C0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(fp,n);return I.jsx(dn.h2,{id:i.titleId,...r,ref:t})});C0.displayName=fp;var $0="DialogDescription",SB=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr($0,n);return I.jsx(dn.p,{id:i.descriptionId,...r,ref:t})});SB.displayName=$0;var I0="DialogClose",R0=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fr(I0,n);return I.jsx(dn.button,{type:"button",...r,ref:t,onClick:jr(e.onClick,()=>i.onOpenChange(!1))})});R0.displayName=I0;function dp(e){return e?"open":"closed"}var P0="DialogTitleWarning",[Cse,A0]=n5(P0,{contentName:Mi,titleName:fp,docsSlug:"dialog"}),_B=({titleId:e})=>{const t=A0(P0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
314
314
 
315
315
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
316
316
 
317
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},vB="DialogDescriptionWarning",yB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${A0(vB).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gB=w0,bB=_0,xB=k0,wB=T0,SB=C0,N0=R0;function _B({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const D0=w.forwardRef(_B);function ui({open:e,onOpenChange:t,children:n}){return I.jsx(gB,{open:e,onOpenChange:t,children:n})}function EB({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=yt;return I.jsxs(I.Fragment,{children:[I.jsx(xB,{...n==null?void 0:n.overlay}),I.jsx("div",{...n==null?void 0:n.container,children:I.jsxs(wB,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[I.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[I.jsx(SB,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),I.jsx(N0,{children:I.jsx(D0,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),I.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}ui.Button=bB,ui.Close=N0,ui.Content=EB;const pp=({children:e,className:t,connected:n,...r})=>{const{container:{className:i}}=yt,a=ql(s=>s.setMessageContainerRef),o=j.useRef(null);return j.useEffect(()=>{a(o)},[o]),I.jsxs("div",{...r,className:Jl(i,t),ref:o,children:[I.jsx(Mj,{}),I.jsxs(Ww,{children:[I.jsx(kB,{connected:n}),e]})]})},kB=({connected:e})=>{const{modal:t}=yt,{showModal:n}=_x();return j.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:I.jsxs(I.Fragment,{children:[I.jsx("p",{...(i=(r=t==null?void 0:t.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),I.jsx(I.Fragment,{})};pp.displayName="Container";const M0=j.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return I.jsx("div",{...n,...a,ref:r,onClick:t,children:I.jsx("div",{...o})})});M0.displayName="Fab";var hp="Collapsible",[TB,Sse]=Zw(hp),[OB,mp]=TB(hp),j0=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=Kw({prop:r,defaultProp:i,onChange:o});return I.jsx(OB,{scope:n,disabled:a,contentId:wu(),open:u,onOpenToggle:w.useCallback(()=>l(c=>!c),[l]),children:I.jsx(dn.div,{"data-state":yp(u),"data-disabled":a?"":void 0,...s,ref:t})})});j0.displayName=hp;var L0="CollapsibleTrigger",F0=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=mp(L0,n);return I.jsx(dn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":yp(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:jr(e.onClick,i.onOpenToggle)})});F0.displayName=L0;var vp="CollapsibleContent",B0=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mp(vp,e.__scopeCollapsible);return I.jsx(Su,{present:n||i.open,children:({present:a})=>I.jsx(CB,{...r,ref:t,present:a})})});B0.displayName=vp;var CB=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=mp(vp,n),[s,u]=w.useState(r),l=w.useRef(null),c=Kr(t,l),f=w.useRef(0),p=f.current,d=w.useRef(0),m=d.current,h=o.open||s,y=w.useRef(h),v=w.useRef();return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),ea(()=>{const g=l.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),u(r)}},[o.open,r]),I.jsx(dn.div,{"data-state":yp(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function yp(e){return e?"open":"closed"}var $B=j0,IB=B0;const U0=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=yt,{showModal:i}=_x(),a=u=>{var l,c,f,p;u.stopPropagation(),i({title:"Restart Conversation",content:I.jsxs(I.Fragment,{children:[I.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?"}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(p=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:e,children:"Restart"})})]})})};return I.jsx(q2,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},RB=({onClick:e,...t})=>{const{header:n}=yt,r=i=>{i.stopPropagation(),e==null||e()};return I.jsx(D0,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Qo=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,p,d,m,h,y,v;const{header:i}=yt,a=e??IL;return t?n?I.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[I.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),I.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):I.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[I.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),I.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},z0=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var l,c,f,p,d,m,h,y,v,g,b,k,S,E,O,L,D,T,P,q,$,F;const{header:a}=yt,[o,s]=j.useState(!!e),u=!!((l=n.email)!=null&&l.title)||!!((c=n.phone)!=null&&c.title)||!!((f=n.website)!=null&&f.title)||!!((p=n.termsOfService)!=null&&p.link)||!!((d=n.privacyPolicy)!=null&&d.link);return I.jsxs($B,{open:u?o:!1,onOpenChange:s,"data-disabled":u?void 0:"",...a.container,...i,children:[I.jsxs(F0,{...a.content.container,children:[I.jsx(Sl,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),I.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&I.jsx("p",{...a.content.description,children:n.botDescription}),I.jsxs("div",{...a.content.actions.container,children:[I.jsx(U0,{onClick:r}),t&&I.jsx(RB,{onClick:t})]})]}),I.jsxs(IB,{...a.expandedContent.container,children:[I.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[I.jsx(Qo,{"data-email":"",icon:LL,title:(m=n.email)==null?void 0:m.title,link:(y=(h=n.email)==null?void 0:h.link)!=null&&y.startsWith("mailto:")?(v=n.email)==null?void 0:v.link:`mailto:${(g=n.email)==null?void 0:g.link}`}),I.jsx(Qo,{"data-phone":"",icon:qL,title:(b=n.phone)==null?void 0:b.title,link:(S=(k=n.phone)==null?void 0:k.link)!=null&&S.startsWith("tel:")?(E=n.phone)==null?void 0:E.link:`tel:${(O=n.phone)==null?void 0:O.link}`}),I.jsx(Qo,{"data-website":"",link:(L=n.website)==null?void 0:L.link,icon:BL,title:(D=n.website)==null?void 0:D.title})]}),I.jsxs("div",{"data-legal":"",...(T=a.expandedContent)==null?void 0:T.group,children:[I.jsx(Qo,{"data-terms":"",link:(P=n.termsOfService)==null?void 0:P.link,icon:ML,title:(q=n.termsOfService)==null?void 0:q.title}),I.jsx(Qo,{"data-privacy":"",link:($=n.privacyPolicy)==null?void 0:$.link,icon:zL,title:(F=n.privacyPolicy)==null?void 0:F.title})]})]})]})},V0=j.memo(({...e})=>{const{typingIndicator:t}=yt;return I.jsx("div",{...e,...t==null?void 0:t.container,children:I.jsx("div",{...t==null?void 0:t.loader})})}),gp=j.memo(j.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,metadata:o,authorId:s,renderers:u,sendMessage:l,isReadOnly:c,...f},p)=>{var v,g,b;const[d,m]=j.useState([]),{message:h}=yt,y=Py(s??"",15);return I.jsx(wx.Provider,{value:{isLoading:d,setIsLoading:m},children:I.jsxs("div",{...f,...h==null?void 0:h.container,"data-loaded":d.length===0,"data-disable-input":!!n,"data-direction":e,ref:p,children:[I.jsxs(mf,{"data-color":y,...(v=h==null?void 0:h.avatar)==null?void 0:v.container,children:[I.jsx(vf,{...(g=h==null?void 0:h.avatar)==null?void 0:g.image,src:i==null?void 0:i.avatar}),I.jsx(yf,{...(b=h==null?void 0:h.avatar)==null?void 0:b.fallback,children:i==null?void 0:i.name[0]})]}),t&&I.jsx(xa,{block:{...t,direction:e,timestamp:f.timestamp,sender:i,messageId:a,sendMessage:l},direction:e,sendMessage:l,isReadOnly:c,sender:i,timestamp:f.timestamp,messageId:a,metadata:o,renderers:u}),r]})})}));function PB({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=yt;return I.jsxs("li",{...r.container,children:[I.jsx(Sl,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),I.jsxs("div",{...r.content,children:[I.jsx("h1",{...r.title,children:n||"Bot"}),I.jsx("p",{...r.description,children:t})]})]})}function AB(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function NB(){AB("react-scroll-to-bottom:version","4.2.0")}var es=function(e){return e&&e.Math===Math&&e},Lt=es(typeof globalThis=="object"&&globalThis)||es(typeof window=="object"&&window)||es(typeof self=="object"&&self)||es(typeof ht=="object"&&ht)||es(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Ft=function(e){try{return!!e()}catch{return!0}},DB=Ft,Pu=!DB(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),MB=Pu,q0=Function.prototype,W0=q0.apply,H0=q0.call,bp=typeof Reflect=="object"&&Reflect.apply||(MB?H0.bind(W0):function(){return H0.apply(W0,arguments)}),Z0=Pu,K0=Function.prototype,xp=K0.call,jB=Z0&&K0.bind.bind(xp,xp),Rt=Z0?jB:function(e){return function(){return xp.apply(e,arguments)}},G0=Rt,LB=G0({}.toString),FB=G0("".slice),ji=function(e){return FB(LB(e),8,-1)},BB=ji,UB=Rt,wp=function(e){if(BB(e)==="Function")return UB(e)},Sp=typeof document=="object"&&document.all,nn=typeof Sp>"u"&&Sp!==void 0?function(e){return typeof e=="function"||e===Sp}:function(e){return typeof e=="function"},ts={},zB=Ft,vn=!zB(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),VB=Pu,Au=Function.prototype.call,dr=VB?Au.bind(Au):function(){return Au.apply(Au,arguments)},_p={},Y0={}.propertyIsEnumerable,J0=Object.getOwnPropertyDescriptor,qB=J0&&!Y0.call({1:2},1);_p.f=qB?function(t){var n=J0(this,t);return!!n&&n.enumerable}:Y0;var ns=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},WB=Rt,HB=Ft,ZB=ji,Ep=Object,KB=WB("".split),X0=HB(function(){return!Ep("z").propertyIsEnumerable(0)})?function(e){return ZB(e)==="String"?KB(e,""):Ep(e)}:Ep,kp=function(e){return e==null},GB=kp,YB=TypeError,Nu=function(e){if(GB(e))throw new YB("Can't call method on "+e);return e},JB=X0,XB=Nu,pr=function(e){return JB(XB(e))},QB=nn,Kn=function(e){return typeof e=="object"?e!==null:QB(e)},Yt={},Tp=Yt,Op=Lt,e3=nn,Q0=function(e){return e3(e)?e:void 0},hr=function(e,t){return arguments.length<2?Q0(Tp[e])||Q0(Op[e]):Tp[e]&&Tp[e][t]||Op[e]&&Op[e][t]},t3=Rt,Lr=t3({}.isPrototypeOf),n3=Lt,e1=n3.navigator,t1=e1&&e1.userAgent,Cp=t1?String(t1):"",n1=Lt,$p=Cp,r1=n1.process,i1=n1.Deno,a1=r1&&r1.versions||i1&&i1.version,o1=a1&&a1.v8,Gn,Du;o1&&(Gn=o1.split("."),Du=Gn[0]>0&&Gn[0]<4?1:+(Gn[0]+Gn[1])),!Du&&$p&&(Gn=$p.match(/Edge\/(\d+)/),(!Gn||Gn[1]>=74)&&(Gn=$p.match(/Chrome\/(\d+)/),Gn&&(Du=+Gn[1])));var Ip=Du,s1=Ip,r3=Ft,i3=Lt,a3=i3.String,ka=!!Object.getOwnPropertySymbols&&!r3(function(){var e=Symbol("symbol detection");return!a3(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s1&&s1<41}),o3=ka,l1=o3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",s3=hr,l3=nn,u3=Lr,c3=l1,f3=Object,rs=c3?function(e){return typeof e=="symbol"}:function(e){var t=s3("Symbol");return l3(t)&&u3(t.prototype,f3(e))},d3=String,Mu=function(e){try{return d3(e)}catch{return"Object"}},p3=nn,h3=Mu,m3=TypeError,ju=function(e){if(p3(e))return e;throw new m3(h3(e)+" is not a function")},v3=ju,y3=kp,Rp=function(e,t){var n=e[t];return y3(n)?void 0:v3(n)},Pp=dr,Ap=nn,Np=Kn,g3=TypeError,b3=function(e,t){var n,r;if(t==="string"&&Ap(n=e.toString)&&!Np(r=Pp(n,e))||Ap(n=e.valueOf)&&!Np(r=Pp(n,e))||t!=="string"&&Ap(n=e.toString)&&!Np(r=Pp(n,e)))return r;throw new g3("Can't convert object to primitive value")},u1={exports:{}},c1=Lt,x3=Object.defineProperty,w3=function(e,t){try{x3(c1,e,{value:t,configurable:!0,writable:!0})}catch{c1[e]=t}return t},S3=Lt,_3=w3,f1="__core-js_shared__",d1=u1.exports=S3[f1]||_3(f1,{});(d1.versions||(d1.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 Dp=u1.exports,p1=Dp,Ta=function(e,t){return p1[e]||(p1[e]=t||{})},E3=Nu,k3=Object,Fr=function(e){return k3(E3(e))},T3=Rt,O3=Fr,C3=T3({}.hasOwnProperty),kn=Object.hasOwn||function(t,n){return C3(O3(t),n)},$3=Rt,I3=0,R3=Math.random(),P3=$3(1 .toString),Mp=function(e){return"Symbol("+(e===void 0?"":e)+")_"+P3(++I3+R3,36)},A3=Lt,N3=Ta,h1=kn,D3=Mp,M3=ka,j3=l1,Oa=A3.Symbol,jp=N3("wks"),L3=j3?Oa.for||Oa:Oa&&Oa.withoutSetter||D3,Wt=function(e){return h1(jp,e)||(jp[e]=M3&&h1(Oa,e)?Oa[e]:L3("Symbol."+e)),jp[e]},F3=dr,m1=Kn,v1=rs,B3=Rp,U3=b3,z3=Wt,V3=TypeError,q3=z3("toPrimitive"),W3=function(e,t){if(!m1(e)||v1(e))return e;var n=B3(e,q3),r;if(n){if(t===void 0&&(t="default"),r=F3(n,e,t),!m1(r)||v1(r))return r;throw new V3("Can't convert object to primitive value")}return t===void 0&&(t="number"),U3(e,t)},H3=W3,Z3=rs,Lp=function(e){var t=H3(e,"string");return Z3(t)?t:t+""},K3=Lt,y1=Kn,Fp=K3.document,G3=y1(Fp)&&y1(Fp.createElement),g1=function(e){return G3?Fp.createElement(e):{}},Y3=vn,J3=Ft,X3=g1,b1=!Y3&&!J3(function(){return Object.defineProperty(X3("div"),"a",{get:function(){return 7}}).a!==7}),Q3=vn,e4=dr,t4=_p,n4=ns,r4=pr,i4=Lp,a4=kn,o4=b1,x1=Object.getOwnPropertyDescriptor;ts.f=Q3?x1:function(t,n){if(t=r4(t),n=i4(n),o4)try{return x1(t,n)}catch{}if(a4(t,n))return n4(!e4(t4.f,t,n),t[n])};var s4=Ft,l4=nn,u4=/#|\.prototype\./,is=function(e,t){var n=f4[c4(e)];return n===p4?!0:n===d4?!1:l4(t)?s4(t):!!t},c4=is.normalize=function(e){return String(e).replace(u4,".").toLowerCase()},f4=is.data={},d4=is.NATIVE="N",p4=is.POLYFILL="P",h4=is,w1=wp,m4=ju,v4=Pu,y4=w1(w1.bind),Bp=function(e,t){return m4(e),t===void 0?e:v4?y4(e,t):function(){return e.apply(t,arguments)}},Yn={},g4=vn,b4=Ft,S1=g4&&b4(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),x4=Kn,w4=String,S4=TypeError,ci=function(e){if(x4(e))return e;throw new S4(w4(e)+" is not an object")},_4=vn,E4=b1,k4=S1,Lu=ci,_1=Lp,T4=TypeError,Up=Object.defineProperty,O4=Object.getOwnPropertyDescriptor,zp="enumerable",Vp="configurable",qp="writable";Yn.f=_4?k4?function(t,n,r){if(Lu(t),n=_1(n),Lu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&qp in r&&!r[qp]){var i=O4(t,n);i&&i[qp]&&(t[n]=r.value,r={configurable:Vp in r?r[Vp]:i[Vp],enumerable:zp in r?r[zp]:i[zp],writable:!1})}return Up(t,n,r)}:Up:function(t,n,r){if(Lu(t),n=_1(n),Lu(r),E4)try{return Up(t,n,r)}catch{}if("get"in r||"set"in r)throw new T4("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var C4=vn,$4=Yn,I4=ns,Fu=C4?function(e,t,n){return $4.f(e,t,I4(1,n))}:function(e,t,n){return e[t]=n,e},as=Lt,R4=bp,P4=wp,A4=nn,N4=ts.f,D4=h4,Ca=Yt,M4=Bp,$a=Fu,E1=kn,j4=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return R4(e,this,arguments)};return t.prototype=e.prototype,t},mt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?as:i?as[n]:as[n]&&as[n].prototype,s=r?Ca:Ca[n]||$a(Ca,n,{})[n],u=s.prototype,l,c,f,p,d,m,h,y,v;for(p in t)l=D4(r?p:n+(i?".":"#")+p,e.forced),c=!l&&o&&E1(o,p),m=s[p],c&&(e.dontCallGetSet?(v=N4(o,p),h=v&&v.value):h=o[p]),d=c&&h?h:t[p],!(!l&&!a&&typeof m==typeof d)&&(e.bind&&c?y=M4(d,as):e.wrap&&c?y=j4(d):a&&A4(d)?y=P4(d):y=d,(e.sham||d&&d.sham||m&&m.sham)&&$a(y,"sham",!0),$a(s,p,y),a&&(f=n+"Prototype",E1(Ca,f)||$a(Ca,f,{}),$a(Ca[f],p,d),e.real&&u&&(l||!u[p])&&$a(u,p,d)))},L4=ji,Ia=Array.isArray||function(t){return L4(t)==="Array"},F4=mt,B4=Ia;F4({target:"Array",stat:!0},{isArray:B4});var U4=Yt,z4=U4.Array.isArray,V4=z4,k1=V4,q4=k1,W4=q4,H4=W4,Z4=H4,K4=Z4;const T1=Ke(K4);function G4(e){if(T1(e))return e}var Y4=Math.ceil,J4=Math.floor,X4=Math.trunc||function(t){var n=+t;return(n>0?J4:Y4)(n)},Q4=X4,Bu=function(e){var t=+e;return t!==t||t===0?0:Q4(t)},eU=Bu,tU=Math.min,nU=function(e){var t=eU(e);return t>0?tU(t,9007199254740991):0},rU=nU,Li=function(e){return rU(e.length)},iU=TypeError,aU=9007199254740991,Wp=function(e){if(e>aU)throw iU("Maximum allowed index exceeded");return e},oU=vn,sU=Yn,lU=ns,os=function(e,t,n){oU?sU.f(e,t,lU(0,n)):e[t]=n},uU=Wt,cU=uU("toStringTag"),O1={};O1[cU]="z";var Hp=String(O1)==="[object z]",fU=Hp,dU=nn,Uu=ji,pU=Wt,hU=pU("toStringTag"),mU=Object,vU=Uu(function(){return arguments}())==="Arguments",yU=function(e,t){try{return e[t]}catch{}},ss=fU?Uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=yU(t=mU(e),hU))=="string"?n:vU?Uu(t):(r=Uu(t))==="Object"&&dU(t.callee)?"Arguments":r},gU=Rt,bU=nn,Zp=Dp,xU=gU(Function.toString);bU(Zp.inspectSource)||(Zp.inspectSource=function(e){return xU(e)});var wU=Zp.inspectSource,SU=Rt,_U=Ft,C1=nn,EU=ss,kU=hr,TU=wU,$1=function(){},I1=kU("Reflect","construct"),Kp=/^\s*(?:class|function)\b/,OU=SU(Kp.exec),CU=!Kp.test($1),ls=function(t){if(!C1(t))return!1;try{return I1($1,[],t),!0}catch{return!1}},R1=function(t){if(!C1(t))return!1;switch(EU(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return CU||!!OU(Kp,TU(t))}catch{return!0}};R1.sham=!0;var Gp=!I1||_U(function(){var e;return ls(ls.call)||!ls(Object)||!ls(function(){e=!0})||e})?R1:ls,P1=Ia,$U=Gp,IU=Kn,RU=Wt,PU=RU("species"),A1=Array,AU=function(e){var t;return P1(e)&&(t=e.constructor,$U(t)&&(t===A1||P1(t.prototype))?t=void 0:IU(t)&&(t=t[PU],t===null&&(t=void 0))),t===void 0?A1:t},NU=AU,Yp=function(e,t){return new(NU(e))(t===0?0:t)},DU=Ft,MU=Wt,jU=Ip,LU=MU("species"),zu=function(e){return jU>=51||!DU(function(){var t=[],n=t.constructor={};return n[LU]=function(){return{foo:1}},t[e](Boolean).foo!==1})},FU=mt,BU=Ft,UU=Ia,zU=Kn,VU=Fr,qU=Li,N1=Wp,D1=os,WU=Yp,HU=zu,ZU=Wt,KU=Ip,M1=ZU("isConcatSpreadable"),GU=KU>=51||!BU(function(){var e=[];return e[M1]=!1,e.concat()[0]!==e}),YU=function(e){if(!zU(e))return!1;var t=e[M1];return t!==void 0?!!t:UU(e)},JU=!GU||!HU("concat");FU({target:"Array",proto:!0,arity:1,forced:JU},{concat:function(t){var n=VU(this),r=WU(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],YU(l))for(u=qU(l),N1(i+u),o=0;o<u;o++,i++)o in l&&D1(r,i,l[o]);else N1(i+1),D1(r,i++,l);return r.length=i,r}});var XU=ss,QU=String,us=function(e){if(XU(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return QU(e)},Vu={},ez=Bu,tz=Math.max,nz=Math.min,Jp=function(e,t){var n=ez(e);return n<0?tz(n+t,0):nz(n,t)},rz=pr,iz=Jp,az=Li,j1=function(e){return function(t,n,r){var i=rz(t),a=az(i);if(a===0)return!e&&-1;var o=iz(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},L1={includes:j1(!0),indexOf:j1(!1)},qu={},oz=Rt,Xp=kn,sz=pr,lz=L1.indexOf,uz=qu,F1=oz([].push),B1=function(e,t){var n=sz(e),r=0,i=[],a;for(a in n)!Xp(uz,a)&&Xp(n,a)&&F1(i,a);for(;t.length>r;)Xp(n,a=t[r++])&&(~lz(i,a)||F1(i,a));return i},Qp=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],cz=B1,fz=Qp,eh=Object.keys||function(t){return cz(t,fz)},dz=vn,pz=S1,hz=Yn,mz=ci,vz=pr,yz=eh;Vu.f=dz&&!pz?Object.defineProperties:function(t,n){mz(t);for(var r=vz(n),i=yz(n),a=i.length,o=0,s;a>o;)hz.f(t,s=i[o++],r[s]);return t};var gz=hr,bz=gz("document","documentElement"),xz=Ta,wz=Mp,U1=xz("keys"),Wu=function(e){return U1[e]||(U1[e]=wz(e))},Sz=ci,_z=Vu,z1=Qp,Ez=qu,kz=bz,Tz=g1,Oz=Wu,V1=">",q1="<",th="prototype",nh="script",W1=Oz("IE_PROTO"),rh=function(){},H1=function(e){return q1+nh+V1+e+q1+"/"+nh+V1},Z1=function(e){e.write(H1("")),e.close();var t=e.parentWindow.Object;return e=null,t},Cz=function(){var e=Tz("iframe"),t="java"+nh+":",n;return e.style.display="none",kz.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(H1("document.F=Object")),n.close(),n.F},Hu,Zu=function(){try{Hu=new ActiveXObject("htmlfile")}catch{}Zu=typeof document<"u"?document.domain&&Hu?Z1(Hu):Cz():Z1(Hu);for(var e=z1.length;e--;)delete Zu[th][z1[e]];return Zu()};Ez[W1]=!0;var ih=Object.create||function(t,n){var r;return t!==null?(rh[th]=Sz(t),r=new rh,rh[th]=null,r[W1]=t):r=Zu(),n===void 0?r:_z.f(r,n)},Ku={},$z=B1,Iz=Qp,Rz=Iz.concat("length","prototype");Ku.f=Object.getOwnPropertyNames||function(t){return $z(t,Rz)};var K1={},Pz=Rt,Gu=Pz([].slice),Az=ji,Nz=pr,G1=Ku.f,Dz=Gu,Y1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Mz=function(e){try{return G1(e)}catch{return Dz(Y1)}};K1.f=function(t){return Y1&&Az(t)==="Window"?Mz(t):G1(Nz(t))};var Yu={};Yu.f=Object.getOwnPropertySymbols;var jz=Fu,Ju=function(e,t,n,r){return r&&r.enumerable?e[t]=n:jz(e,t,n),e},Lz=Yn,Fz=function(e,t,n){return Lz.f(e,t,n)},cs={},Bz=Wt;cs.f=Bz;var J1=Yt,Uz=kn,zz=cs,Vz=Yn.f,St=function(e){var t=J1.Symbol||(J1.Symbol={});Uz(t,e)||Vz(t,e,{value:zz.f(e)})},qz=dr,Wz=hr,Hz=Wt,Zz=Ju,X1=function(){var e=Wz("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Hz("toPrimitive");t&&!t[r]&&Zz(t,r,function(i){return qz(n,this)},{arity:1})},Kz=Hp,Gz=ss,Yz=Kz?{}.toString:function(){return"[object "+Gz(this)+"]"},Jz=Hp,Xz=Yn.f,Qz=Fu,e6=kn,t6=Yz,n6=Wt,Q1=n6("toStringTag"),Ra=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(e6(i,Q1)||Xz(i,Q1,{configurable:!0,value:t}),r&&!Jz&&Qz(i,"toString",t6))},r6=Lt,i6=nn,eS=r6.WeakMap,a6=i6(eS)&&/native code/.test(String(eS)),o6=a6,tS=Lt,s6=Kn,l6=Fu,ah=kn,oh=Dp,u6=Wu,c6=qu,nS="Object already initialized",sh=tS.TypeError,f6=tS.WeakMap,Xu,fs,Qu,d6=function(e){return Qu(e)?fs(e):Xu(e,{})},p6=function(e){return function(t){var n;if(!s6(t)||(n=fs(t)).type!==e)throw new sh("Incompatible receiver, "+e+" required");return n}};if(o6||oh.state){var mr=oh.state||(oh.state=new f6);mr.get=mr.get,mr.has=mr.has,mr.set=mr.set,Xu=function(e,t){if(mr.has(e))throw new sh(nS);return t.facade=e,mr.set(e,t),t},fs=function(e){return mr.get(e)||{}},Qu=function(e){return mr.has(e)}}else{var Pa=u6("state");c6[Pa]=!0,Xu=function(e,t){if(ah(e,Pa))throw new sh(nS);return t.facade=e,l6(e,Pa,t),t},fs=function(e){return ah(e,Pa)?e[Pa]:{}},Qu=function(e){return ah(e,Pa)}}var lh={set:Xu,get:fs,has:Qu,enforce:d6,getterFor:p6},h6=Bp,m6=Rt,v6=X0,y6=Fr,g6=Li,b6=Yp,rS=m6([].push),fi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var p=y6(u),d=v6(p),m=g6(d),h=h6(l,c),y=0,v=f||b6,g=t?v(u,m):n||o?v(u,0):void 0,b,k;m>y;y++)if((s||y in d)&&(b=d[y],k=h(b,y,p),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:rS(g,b)}else switch(e){case 4:return!1;case 7:rS(g,b)}return a?-1:r||i?i:g}},uh={forEach:fi(0),map:fi(1),filter:fi(2),some:fi(3),every:fi(4),find:fi(5),findIndex:fi(6),filterReject:fi(7)},ec=mt,ds=Lt,ch=dr,x6=Rt,Aa=vn,Na=ka,w6=Ft,Ht=kn,S6=Lr,fh=ci,tc=pr,dh=Lp,_6=us,ph=ns,Da=ih,iS=eh,E6=Ku,aS=K1,k6=Yu,oS=ts,sS=Yn,T6=Vu,lS=_p,uS=Ju,O6=Fz,hh=Ta,C6=Wu,cS=qu,fS=Mp,$6=Wt,I6=cs,R6=St,P6=X1,A6=Ra,dS=lh,nc=uh.forEach,yn=C6("hidden"),rc="Symbol",ps="prototype",N6=dS.set,pS=dS.getterFor(rc),Jn=Object[ps],Fi=ds.Symbol,hs=Fi&&Fi[ps],D6=ds.RangeError,M6=ds.TypeError,mh=ds.QObject,hS=oS.f,Bi=sS.f,mS=aS.f,j6=lS.f,vS=x6([].push),Br=hh("symbols"),ms=hh("op-symbols"),L6=hh("wks"),vh=!mh||!mh[ps]||!mh[ps].findChild,yS=function(e,t,n){var r=hS(Jn,t);r&&delete Jn[t],Bi(e,t,n),r&&e!==Jn&&Bi(Jn,t,r)},yh=Aa&&w6(function(){return Da(Bi({},"a",{get:function(){return Bi(this,"a",{value:7}).a}})).a!==7})?yS:Bi,gh=function(e,t){var n=Br[e]=Da(hs);return N6(n,{type:rc,tag:e,description:t}),Aa||(n.description=t),n},ic=function(t,n,r){t===Jn&&ic(ms,n,r),fh(t);var i=dh(n);return fh(r),Ht(Br,i)?(r.enumerable?(Ht(t,yn)&&t[yn][i]&&(t[yn][i]=!1),r=Da(r,{enumerable:ph(0,!1)})):(Ht(t,yn)||Bi(t,yn,ph(1,Da(null))),t[yn][i]=!0),yh(t,i,r)):Bi(t,i,r)},bh=function(t,n){fh(t);var r=tc(n),i=iS(r).concat(wS(r));return nc(i,function(a){(!Aa||ch(gS,r,a))&&ic(t,a,r[a])}),t},F6=function(t,n){return n===void 0?Da(t):bh(Da(t),n)},gS=function(t){var n=dh(t),r=ch(j6,this,n);return this===Jn&&Ht(Br,n)&&!Ht(ms,n)?!1:r||!Ht(this,n)||!Ht(Br,n)||Ht(this,yn)&&this[yn][n]?r:!0},bS=function(t,n){var r=tc(t),i=dh(n);if(!(r===Jn&&Ht(Br,i)&&!Ht(ms,i))){var a=hS(r,i);return a&&Ht(Br,i)&&!(Ht(r,yn)&&r[yn][i])&&(a.enumerable=!0),a}},xS=function(t){var n=mS(tc(t)),r=[];return nc(n,function(i){!Ht(Br,i)&&!Ht(cS,i)&&vS(r,i)}),r},wS=function(e){var t=e===Jn,n=mS(t?ms:tc(e)),r=[];return nc(n,function(i){Ht(Br,i)&&(!t||Ht(Jn,i))&&vS(r,Br[i])}),r};Na||(Fi=function(){if(S6(hs,this))throw new M6("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:_6(arguments[0]),n=fS(t),r=function(i){var a=this===void 0?ds:this;a===Jn&&ch(r,ms,i),Ht(a,yn)&&Ht(a[yn],n)&&(a[yn][n]=!1);var o=ph(1,i);try{yh(a,n,o)}catch(s){if(!(s instanceof D6))throw s;yS(a,n,o)}};return Aa&&vh&&yh(Jn,n,{configurable:!0,set:r}),gh(n,t)},hs=Fi[ps],uS(hs,"toString",function(){return pS(this).tag}),uS(Fi,"withoutSetter",function(e){return gh(fS(e),e)}),lS.f=gS,sS.f=ic,T6.f=bh,oS.f=bS,E6.f=aS.f=xS,k6.f=wS,I6.f=function(e){return gh($6(e),e)},Aa&&O6(hs,"description",{configurable:!0,get:function(){return pS(this).description}})),ec({global:!0,constructor:!0,wrap:!0,forced:!Na,sham:!Na},{Symbol:Fi}),nc(iS(L6),function(e){R6(e)}),ec({target:rc,stat:!0,forced:!Na},{useSetter:function(){vh=!0},useSimple:function(){vh=!1}}),ec({target:"Object",stat:!0,forced:!Na,sham:!Aa},{create:F6,defineProperty:ic,defineProperties:bh,getOwnPropertyDescriptor:bS}),ec({target:"Object",stat:!0,forced:!Na},{getOwnPropertyNames:xS}),P6(),A6(Fi,rc),cS[yn]=!0;var B6=ka,SS=B6&&!!Symbol.for&&!!Symbol.keyFor,U6=mt,z6=hr,V6=kn,q6=us,_S=Ta,W6=SS,xh=_S("string-to-symbol-registry"),H6=_S("symbol-to-string-registry");U6({target:"Symbol",stat:!0,forced:!W6},{for:function(e){var t=q6(e);if(V6(xh,t))return xh[t];var n=z6("Symbol")(t);return xh[t]=n,H6[n]=t,n}});var Z6=mt,K6=kn,G6=rs,Y6=Mu,J6=Ta,X6=SS,ES=J6("symbol-to-string-registry");Z6({target:"Symbol",stat:!0,forced:!X6},{keyFor:function(t){if(!G6(t))throw new TypeError(Y6(t)+" is not a symbol");if(K6(ES,t))return ES[t]}});var Q6=Rt,kS=Ia,e9=nn,TS=ji,t9=us,OS=Q6([].push),n9=function(e){if(e9(e))return e;if(kS(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?OS(n,i):(typeof i=="number"||TS(i)==="Number"||TS(i)==="String")&&OS(n,t9(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(kS(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},r9=mt,CS=hr,$S=bp,i9=dr,vs=Rt,IS=Ft,RS=nn,PS=rs,AS=Gu,a9=n9,o9=ka,s9=String,di=CS("JSON","stringify"),ac=vs(/./.exec),NS=vs("".charAt),l9=vs("".charCodeAt),u9=vs("".replace),c9=vs(1 .toString),f9=/[\uD800-\uDFFF]/g,DS=/^[\uD800-\uDBFF]$/,MS=/^[\uDC00-\uDFFF]$/,jS=!o9||IS(function(){var e=CS("Symbol")("stringify detection");return di([e])!=="[null]"||di({a:e})!=="{}"||di(Object(e))!=="{}"}),LS=IS(function(){return di("\uDF06\uD834")!=='"\\udf06\\ud834"'||di("\uDEAD")!=='"\\udead"'}),d9=function(e,t){var n=AS(arguments),r=a9(t);if(!(!RS(r)&&(e===void 0||PS(e))))return n[1]=function(i,a){if(RS(r)&&(a=i9(r,this,s9(i),a)),!PS(a))return a},$S(di,null,n)},p9=function(e,t,n){var r=NS(n,t-1),i=NS(n,t+1);return ac(DS,e)&&!ac(MS,i)||ac(MS,e)&&!ac(DS,r)?"\\u"+c9(l9(e,0),16):e};di&&r9({target:"JSON",stat:!0,arity:3,forced:jS||LS},{stringify:function(t,n,r){var i=AS(arguments),a=$S(jS?d9:di,null,i);return LS&&typeof a=="string"?u9(a,f9,p9):a}});var h9=mt,m9=ka,v9=Ft,FS=Yu,y9=Fr,g9=!m9||v9(function(){FS.f(1)});h9({target:"Object",stat:!0,forced:g9},{getOwnPropertySymbols:function(t){var n=FS.f;return n?n(y9(t)):[]}});var b9=St;b9("asyncIterator");var x9=St;x9("hasInstance");var w9=St;w9("isConcatSpreadable");var S9=St;S9("iterator");var _9=St;_9("match");var E9=St;E9("matchAll");var k9=St;k9("replace");var T9=St;T9("search");var O9=St;O9("species");var C9=St;C9("split");var $9=St,I9=X1;$9("toPrimitive"),I9();var R9=hr,P9=St,A9=Ra;P9("toStringTag"),A9(R9("Symbol"),"Symbol");var N9=St;N9("unscopables");var D9=Lt,M9=Ra;M9(D9.JSON,"JSON",!0);var j9=Yt,L9=j9.Symbol,Ma={},wh=vn,F9=kn,BS=Function.prototype,B9=wh&&Object.getOwnPropertyDescriptor,Sh=F9(BS,"name"),U9=Sh&&(function(){}).name==="something",z9=Sh&&(!wh||wh&&B9(BS,"name").configurable),V9={EXISTS:Sh,PROPER:U9,CONFIGURABLE:z9},q9=Ft,W9=!q9(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),H9=kn,Z9=nn,K9=Fr,G9=Wu,Y9=W9,US=G9("IE_PROTO"),_h=Object,J9=_h.prototype,zS=Y9?_h.getPrototypeOf:function(e){var t=K9(e);if(H9(t,US))return t[US];var n=t.constructor;return Z9(n)&&t instanceof n?n.prototype:t instanceof _h?J9:null},X9=Ft,Q9=nn,e7=Kn,t7=ih,VS=zS,n7=Ju,r7=Wt,Eh=r7("iterator"),qS=!1,Ur,kh,Th;[].keys&&(Th=[].keys(),"next"in Th?(kh=VS(VS(Th)),kh!==Object.prototype&&(Ur=kh)):qS=!0);var i7=!e7(Ur)||X9(function(){var e={};return Ur[Eh].call(e)!==e});i7?Ur={}:Ur=t7(Ur),Q9(Ur[Eh])||n7(Ur,Eh,function(){return this});var WS={IteratorPrototype:Ur,BUGGY_SAFARI_ITERATORS:qS},a7=WS.IteratorPrototype,o7=ih,s7=ns,l7=Ra,u7=Ma,c7=function(){return this},f7=function(e,t,n,r){var i=t+" Iterator";return e.prototype=o7(a7,{next:s7(+!r,n)}),l7(e,i,!1,!0),u7[i]=c7,e},d7=Rt,p7=ju,h7=function(e,t,n){try{return d7(p7(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},m7=Kn,v7=function(e){return m7(e)||e===null},y7=v7,g7=String,b7=TypeError,x7=function(e){if(y7(e))return e;throw new b7("Can't set "+g7(e)+" as a prototype")},w7=h7,S7=Kn,_7=Nu,E7=x7;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=w7(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return _7(i),E7(a),S7(i)&&(e?n(i,a):i.__proto__=a),i}}();var k7=mt,T7=dr,HS=V9,O7=f7,C7=zS,$7=Ra,ZS=Ju,I7=Wt,KS=Ma,GS=WS,R7=HS.PROPER;HS.CONFIGURABLE,GS.IteratorPrototype;var oc=GS.BUGGY_SAFARI_ITERATORS,Oh=I7("iterator"),YS="keys",sc="values",JS="entries",P7=function(){return this},XS=function(e,t,n,r,i,a,o){O7(n,t,r);var s=function(v){if(v===i&&p)return p;if(!oc&&v&&v in c)return c[v];switch(v){case YS:return function(){return new n(this,v)};case sc:return function(){return new n(this,v)};case JS:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Oh]||c["@@iterator"]||i&&c[i],p=!oc&&f||s(i),d=t==="Array"&&c.entries||f,m,h,y;if(d&&(m=C7(d.call(new e)),m!==Object.prototype&&m.next&&($7(m,u,!0,!0),KS[u]=P7)),R7&&i===sc&&f&&f.name!==sc&&(l=!0,p=function(){return T7(f,this)}),i)if(h={values:s(sc),keys:a?p:s(YS),entries:s(JS)},o)for(y in h)(oc||l||!(y in c))&&ZS(c,y,h[y]);else k7({target:t,proto:!0,forced:oc||l},h);return o&&c[Oh]!==p&&ZS(c,Oh,p,{name:i}),KS[t]=p,h},QS=function(e,t){return{value:e,done:t}},A7=pr,e_=Ma,t_=lh;Yn.f;var N7=XS,lc=QS,n_="Array Iterator",D7=t_.set,M7=t_.getterFor(n_);N7(Array,"Array",function(e,t){D7(this,{type:n_,target:A7(e),index:0,kind:t})},function(){var e=M7(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,lc(void 0,!0);switch(e.kind){case"keys":return lc(n,!1);case"values":return lc(t[n],!1)}return lc([n,t[n]],!1)},"values"),e_.Arguments=e_.Array;var j7={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},L7=j7,F7=Lt,B7=Ra,r_=Ma;for(var Ch in L7)B7(F7[Ch],Ch),r_[Ch]=r_.Array;var U7=L9,z7=U7,V7=Wt,q7=Yn.f,i_=V7("metadata"),a_=Function.prototype;a_[i_]===void 0&&q7(a_,i_,{value:null});var W7=St;W7("asyncDispose");var H7=St;H7("dispose");var Z7=St;Z7("metadata");var K7=z7,G7=K7,Y7=hr,J7=Rt,$h=Y7("Symbol"),X7=$h.keyFor,Q7=J7($h.prototype.valueOf),o_=$h.isRegisteredSymbol||function(t){try{return X7(Q7(t))!==void 0}catch{return!1}},eV=mt,tV=o_;eV({target:"Symbol",stat:!0},{isRegisteredSymbol:tV});for(var nV=Ta,s_=hr,rV=Rt,iV=rs,aV=Wt,uc=s_("Symbol"),l_=uc.isWellKnownSymbol,u_=s_("Object","getOwnPropertyNames"),oV=rV(uc.prototype.valueOf),c_=nV("wks"),Ih=0,f_=u_(uc),sV=f_.length;Ih<sV;Ih++)try{var d_=f_[Ih];iV(uc[d_])&&aV(d_)}catch{}var p_=function(t){if(l_&&l_(t))return!0;try{for(var n=oV(t),r=0,i=u_(c_),a=i.length;r<a;r++)if(c_[i[r]]==n)return!0}catch{}return!1},lV=mt,uV=p_;lV({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:uV});var cV=St;cV("customMatcher");var fV=St;fV("observable");var dV=mt,pV=o_;dV({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:pV});var hV=mt,mV=p_;hV({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:mV});var vV=St;vV("matcher");var yV=St;yV("metadataKey");var gV=St;gV("patternMatch");var bV=St;bV("replaceAll");var xV=G7,wV=xV,SV=wV;const ja=Ke(SV);var Rh=Rt,_V=Bu,EV=us,kV=Nu,TV=Rh("".charAt),h_=Rh("".charCodeAt),OV=Rh("".slice),m_=function(e){return function(t,n){var r=EV(kV(t)),i=_V(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=h_(r,i),o<55296||o>56319||i+1===a||(s=h_(r,i+1))<56320||s>57343?e?TV(r,i):o:e?OV(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},CV={codeAt:m_(!1),charAt:m_(!0)},$V=CV.charAt,IV=us,v_=lh,RV=XS,y_=QS,g_="String Iterator",PV=v_.set,AV=v_.getterFor(g_);RV(String,"String",function(e){PV(this,{type:g_,string:IV(e),index:0})},function(){var t=AV(this),n=t.string,r=t.index,i;return r>=n.length?y_(void 0,!0):(i=$V(n,r),t.index+=i.length,y_(i,!1))});var NV=ss,b_=Rp,DV=kp,MV=Ma,jV=Wt,LV=jV("iterator"),Ph=function(e){if(!DV(e))return b_(e,LV)||b_(e,"@@iterator")||MV[NV(e)]},FV=Ph,BV=FV,UV=BV,zV=UV,VV=zV,qV=VV,WV=qV,HV=WV,ZV=HV;const x_=Ke(ZV);var KV=vn,GV=Ia,YV=TypeError,JV=Object.getOwnPropertyDescriptor,XV=KV&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),w_=XV?function(e,t){if(GV(e)&&!JV(e,"length").writable)throw new YV("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},QV=mt,eq=Fr,tq=Li,nq=w_,rq=Wp,iq=Ft,aq=iq(function(){return[].push.call({length:4294967296},1)!==4294967297}),oq=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},sq=aq||!oq();QV({target:"Array",proto:!0,arity:1,forced:sq},{push:function(t){var n=eq(this),r=tq(n),i=arguments.length;rq(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return nq(n,r),r}});var lq=Lt,uq=Yt,Ui=function(e,t){var n=uq[e+"Prototype"],r=n&&n[t];if(r)return r;var i=lq[e],a=i&&i.prototype;return a&&a[t]},cq=Ui,fq=cq("Array","push"),dq=Lr,pq=fq,Ah=Array.prototype,hq=function(e){var t=e.push;return e===Ah||dq(Ah,e)&&t===Ah.push?pq:t},mq=hq,vq=mq,yq=vq,gq=yq,bq=gq,xq=bq,wq=xq;const Sq=Ke(wq);function _q(e,t){var n=e==null?null:typeof ja<"u"&&x_(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(Sq(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Eq=mt,S_=Ia,kq=Gp,Tq=Kn,__=Jp,Oq=Li,Cq=pr,$q=os,Iq=Wt,Rq=zu,Pq=Gu,Aq=Rq("slice"),Nq=Iq("species"),Nh=Array,Dq=Math.max;Eq({target:"Array",proto:!0,forced:!Aq},{slice:function(t,n){var r=Cq(this),i=Oq(r),a=__(t,i),o=__(n===void 0?i:n,i),s,u,l;if(S_(r)&&(s=r.constructor,kq(s)&&(s===Nh||S_(s.prototype))?s=void 0:Tq(s)&&(s=s[Nq],s===null&&(s=void 0)),s===Nh||s===void 0))return Pq(r,a,o);for(u=new(s===void 0?Nh:s)(Dq(o-a,0)),l=0;a<o;a++,l++)a in r&&$q(u,l,r[a]);return u.length=l,u}});var Mq=Ui,jq=Mq("Array","slice"),Lq=Lr,Fq=jq,Dh=Array.prototype,Bq=function(e){var t=e.slice;return e===Dh||Lq(Dh,e)&&t===Dh.slice?Fq:t},Uq=Bq,zq=Uq,Vq=zq,qq=Vq,Wq=qq,Hq=Wq,Zq=Hq;const Kq=Ke(Zq);var Gq=dr,E_=ci,Yq=Rp,Jq=function(e,t,n){var r,i;E_(e);try{if(r=Yq(e,"return"),!r){if(t==="throw")throw n;return n}r=Gq(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return E_(r),n},Xq=ci,Qq=Jq,eW=function(e,t,n,r){try{return r?t(Xq(n)[0],n[1]):t(n)}catch(i){Qq(e,"throw",i)}},tW=Wt,nW=Ma,rW=tW("iterator"),iW=Array.prototype,aW=function(e){return e!==void 0&&(nW.Array===e||iW[rW]===e)},oW=dr,sW=ju,lW=ci,uW=Mu,cW=Ph,fW=TypeError,dW=function(e,t){var n=arguments.length<2?cW(e):t;if(sW(n))return lW(oW(n,e));throw new fW(uW(e)+" is not iterable")},pW=Bp,hW=dr,mW=Fr,vW=eW,yW=aW,gW=Gp,bW=Li,k_=os,xW=dW,wW=Ph,T_=Array,SW=function(t){var n=mW(t),r=gW(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=pW(a,i>2?arguments[2]:void 0));var s=wW(n),u=0,l,c,f,p,d,m;if(s&&!(this===T_&&yW(s)))for(c=r?new this:[],p=xW(n,s),d=p.next;!(f=hW(d,p)).done;u++)m=o?vW(p,a,[f.value,u],!0):f.value,k_(c,u,m);else for(l=bW(n),c=r?new this(l):T_(l);l>u;u++)m=o?a(n[u],u):n[u],k_(c,u,m);return c.length=u,c},_W=Wt,O_=_W("iterator"),C_=!1;try{var EW=0,$_={next:function(){return{done:!!EW++}},return:function(){C_=!0}};$_[O_]=function(){return this},Array.from($_,function(){throw 2})}catch{}var kW=function(e,t){try{if(!t&&!C_)return!1}catch{return!1}var n=!1;try{var r={};r[O_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},TW=mt,OW=SW,CW=kW,$W=!CW(function(e){Array.from(e)});TW({target:"Array",stat:!0,forced:$W},{from:OW});var IW=Yt,RW=IW.Array.from,PW=RW,AW=PW,NW=AW,DW=NW,MW=DW,jW=MW,LW=jW;const I_=Ke(LW);function Mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R_(e,t){if(e){var n;if(typeof e=="string")return Mh(e,t);var r=Kq(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?I_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mh(e,t):void 0}}function FW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
318
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vr(e,t){return G4(e)||_q(e,t)||R_(e,t)||FW()}var P_={exports:{}};/*!
317
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},EB="DialogDescriptionWarning",kB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${A0(EB).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},TB=w0,OB=_0,CB=k0,$B=T0,IB=C0,N0=R0;function RB({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const D0=w.forwardRef(RB);function ui({open:e,onOpenChange:t,children:n}){return I.jsx(TB,{open:e,onOpenChange:t,children:n})}function PB({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=yt;return I.jsxs(I.Fragment,{children:[I.jsx(CB,{...n==null?void 0:n.overlay}),I.jsx("div",{...n==null?void 0:n.container,children:I.jsxs($B,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[I.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[I.jsx(IB,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),I.jsx(N0,{children:I.jsx(D0,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),I.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}ui.Button=OB,ui.Close=N0,ui.Content=PB;const pp=({children:e,className:t,connected:n,...r})=>{const{container:{className:i}}=yt,a=ql(s=>s.setMessageContainerRef),o=j.useRef(null);return j.useEffect(()=>{a(o)},[o]),I.jsxs("div",{...r,className:Jl(i,t),ref:o,children:[I.jsx(Lj,{}),I.jsxs(Ww,{children:[I.jsx(AB,{connected:n}),e]})]})},AB=({connected:e})=>{const{modal:t}=yt,{showModal:n}=_x();return j.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:I.jsxs(I.Fragment,{children:[I.jsx("p",{...(i=(r=t==null?void 0:t.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),I.jsx(I.Fragment,{})};pp.displayName="Container";const M0=j.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return I.jsx("div",{...n,...a,ref:r,onClick:t,children:I.jsx("div",{...o})})});M0.displayName="Fab";var hp="Collapsible",[NB,$se]=Zw(hp),[DB,mp]=NB(hp),j0=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=Kw({prop:r,defaultProp:i,onChange:o});return I.jsx(DB,{scope:n,disabled:a,contentId:wu(),open:u,onOpenToggle:w.useCallback(()=>l(c=>!c),[l]),children:I.jsx(dn.div,{"data-state":yp(u),"data-disabled":a?"":void 0,...s,ref:t})})});j0.displayName=hp;var L0="CollapsibleTrigger",F0=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=mp(L0,n);return I.jsx(dn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":yp(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:jr(e.onClick,i.onOpenToggle)})});F0.displayName=L0;var vp="CollapsibleContent",B0=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=mp(vp,e.__scopeCollapsible);return I.jsx(Su,{present:n||i.open,children:({present:a})=>I.jsx(MB,{...r,ref:t,present:a})})});B0.displayName=vp;var MB=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=mp(vp,n),[s,u]=w.useState(r),l=w.useRef(null),c=Kr(t,l),f=w.useRef(0),p=f.current,d=w.useRef(0),m=d.current,h=o.open||s,y=w.useRef(h),v=w.useRef();return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),ea(()=>{const g=l.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),u(r)}},[o.open,r]),I.jsx(dn.div,{"data-state":yp(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function yp(e){return e?"open":"closed"}var jB=j0,LB=B0;const U0=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=yt,{showModal:i}=_x(),a=u=>{var l,c,f,p;u.stopPropagation(),i({title:"Restart Conversation",content:I.jsxs(I.Fragment,{children:[I.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?"}),I.jsx(ui.Close,{asChild:!0,children:I.jsx("button",{type:"button",...(p=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:e,children:"Restart"})})]})})};return I.jsx(H2,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},FB=({onClick:e,...t})=>{const{header:n}=yt,r=i=>{i.stopPropagation(),e==null||e()};return I.jsx(D0,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Qo=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,p,d,m,h,y,v;const{header:i}=yt,a=e??PL;return t?n?I.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[I.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),I.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):I.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[I.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),I.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},z0=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var l,c,f,p,d,m,h,y,v,g,b,k,S,E,O,L,D,T,P,q,$,F;const{header:a}=yt,[o,s]=j.useState(!!e),u=!!((l=n.email)!=null&&l.title)||!!((c=n.phone)!=null&&c.title)||!!((f=n.website)!=null&&f.title)||!!((p=n.termsOfService)!=null&&p.link)||!!((d=n.privacyPolicy)!=null&&d.link);return I.jsxs(jB,{open:u?o:!1,onOpenChange:s,"data-disabled":u?void 0:"",...a.container,...i,children:[I.jsxs(F0,{...a.content.container,children:[I.jsx(Sl,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),I.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&I.jsx("p",{...a.content.description,children:n.botDescription}),I.jsxs("div",{...a.content.actions.container,children:[I.jsx(U0,{onClick:r}),t&&I.jsx(FB,{onClick:t})]})]}),I.jsxs(LB,{...a.expandedContent.container,children:[I.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[I.jsx(Qo,{"data-email":"",icon:BL,title:(m=n.email)==null?void 0:m.title,link:(y=(h=n.email)==null?void 0:h.link)!=null&&y.startsWith("mailto:")?(v=n.email)==null?void 0:v.link:`mailto:${(g=n.email)==null?void 0:g.link}`}),I.jsx(Qo,{"data-phone":"",icon:HL,title:(b=n.phone)==null?void 0:b.title,link:(S=(k=n.phone)==null?void 0:k.link)!=null&&S.startsWith("tel:")?(E=n.phone)==null?void 0:E.link:`tel:${(O=n.phone)==null?void 0:O.link}`}),I.jsx(Qo,{"data-website":"",link:(L=n.website)==null?void 0:L.link,icon:zL,title:(D=n.website)==null?void 0:D.title})]}),I.jsxs("div",{"data-legal":"",...(T=a.expandedContent)==null?void 0:T.group,children:[I.jsx(Qo,{"data-terms":"",link:(P=n.termsOfService)==null?void 0:P.link,icon:LL,title:(q=n.termsOfService)==null?void 0:q.title}),I.jsx(Qo,{"data-privacy":"",link:($=n.privacyPolicy)==null?void 0:$.link,icon:qL,title:(F=n.privacyPolicy)==null?void 0:F.title})]})]})]})},V0=j.memo(({...e})=>{const{typingIndicator:t}=yt;return I.jsx("div",{...e,...t==null?void 0:t.container,children:I.jsx("div",{...t==null?void 0:t.loader})})}),gp=j.memo(j.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,metadata:o,authorId:s,renderers:u,sendMessage:l,isReadOnly:c,...f},p)=>{var v,g,b;const[d,m]=j.useState([]),{message:h}=yt,y=Py(s??"",15);return I.jsx(wx.Provider,{value:{isLoading:d,setIsLoading:m},children:I.jsxs("div",{...f,...h==null?void 0:h.container,"data-loaded":d.length===0,"data-disable-input":!!n,"data-direction":e,ref:p,children:[I.jsxs(mf,{"data-color":y,...(v=h==null?void 0:h.avatar)==null?void 0:v.container,children:[I.jsx(vf,{...(g=h==null?void 0:h.avatar)==null?void 0:g.image,src:i==null?void 0:i.avatar}),I.jsx(yf,{...(b=h==null?void 0:h.avatar)==null?void 0:b.fallback,children:i==null?void 0:i.name[0]})]}),t&&I.jsx(xa,{block:{...t,direction:e,timestamp:f.timestamp,sender:i,messageId:a,sendMessage:l},direction:e,sendMessage:l,isReadOnly:c,sender:i,timestamp:f.timestamp,messageId:a,metadata:o,renderers:u}),r]})})}));function BB({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=yt;return I.jsxs("li",{...r.container,children:[I.jsx(Sl,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),I.jsxs("div",{...r.content,children:[I.jsx("h1",{...r.title,children:n||"Bot"}),I.jsx("p",{...r.description,children:t})]})]})}function UB(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function zB(){UB("react-scroll-to-bottom:version","4.2.0")}var es=function(e){return e&&e.Math===Math&&e},Lt=es(typeof globalThis=="object"&&globalThis)||es(typeof window=="object"&&window)||es(typeof self=="object"&&self)||es(typeof ht=="object"&&ht)||es(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Ft=function(e){try{return!!e()}catch{return!0}},VB=Ft,Pu=!VB(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),qB=Pu,q0=Function.prototype,W0=q0.apply,H0=q0.call,bp=typeof Reflect=="object"&&Reflect.apply||(qB?H0.bind(W0):function(){return H0.apply(W0,arguments)}),Z0=Pu,K0=Function.prototype,xp=K0.call,WB=Z0&&K0.bind.bind(xp,xp),Rt=Z0?WB:function(e){return function(){return xp.apply(e,arguments)}},G0=Rt,HB=G0({}.toString),ZB=G0("".slice),ji=function(e){return ZB(HB(e),8,-1)},KB=ji,GB=Rt,wp=function(e){if(KB(e)==="Function")return GB(e)},Sp=typeof document=="object"&&document.all,nn=typeof Sp>"u"&&Sp!==void 0?function(e){return typeof e=="function"||e===Sp}:function(e){return typeof e=="function"},ts={},YB=Ft,vn=!YB(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),JB=Pu,Au=Function.prototype.call,dr=JB?Au.bind(Au):function(){return Au.apply(Au,arguments)},_p={},Y0={}.propertyIsEnumerable,J0=Object.getOwnPropertyDescriptor,XB=J0&&!Y0.call({1:2},1);_p.f=XB?function(t){var n=J0(this,t);return!!n&&n.enumerable}:Y0;var ns=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},QB=Rt,e3=Ft,t3=ji,Ep=Object,n3=QB("".split),X0=e3(function(){return!Ep("z").propertyIsEnumerable(0)})?function(e){return t3(e)==="String"?n3(e,""):Ep(e)}:Ep,kp=function(e){return e==null},r3=kp,i3=TypeError,Nu=function(e){if(r3(e))throw new i3("Can't call method on "+e);return e},a3=X0,o3=Nu,pr=function(e){return a3(o3(e))},s3=nn,Kn=function(e){return typeof e=="object"?e!==null:s3(e)},Yt={},Tp=Yt,Op=Lt,l3=nn,Q0=function(e){return l3(e)?e:void 0},hr=function(e,t){return arguments.length<2?Q0(Tp[e])||Q0(Op[e]):Tp[e]&&Tp[e][t]||Op[e]&&Op[e][t]},u3=Rt,Lr=u3({}.isPrototypeOf),c3=Lt,e1=c3.navigator,t1=e1&&e1.userAgent,Cp=t1?String(t1):"",n1=Lt,$p=Cp,r1=n1.process,i1=n1.Deno,a1=r1&&r1.versions||i1&&i1.version,o1=a1&&a1.v8,Gn,Du;o1&&(Gn=o1.split("."),Du=Gn[0]>0&&Gn[0]<4?1:+(Gn[0]+Gn[1])),!Du&&$p&&(Gn=$p.match(/Edge\/(\d+)/),(!Gn||Gn[1]>=74)&&(Gn=$p.match(/Chrome\/(\d+)/),Gn&&(Du=+Gn[1])));var Ip=Du,s1=Ip,f3=Ft,d3=Lt,p3=d3.String,ka=!!Object.getOwnPropertySymbols&&!f3(function(){var e=Symbol("symbol detection");return!p3(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s1&&s1<41}),h3=ka,l1=h3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",m3=hr,v3=nn,y3=Lr,g3=l1,b3=Object,rs=g3?function(e){return typeof e=="symbol"}:function(e){var t=m3("Symbol");return v3(t)&&y3(t.prototype,b3(e))},x3=String,Mu=function(e){try{return x3(e)}catch{return"Object"}},w3=nn,S3=Mu,_3=TypeError,ju=function(e){if(w3(e))return e;throw new _3(S3(e)+" is not a function")},E3=ju,k3=kp,Rp=function(e,t){var n=e[t];return k3(n)?void 0:E3(n)},Pp=dr,Ap=nn,Np=Kn,T3=TypeError,O3=function(e,t){var n,r;if(t==="string"&&Ap(n=e.toString)&&!Np(r=Pp(n,e))||Ap(n=e.valueOf)&&!Np(r=Pp(n,e))||t!=="string"&&Ap(n=e.toString)&&!Np(r=Pp(n,e)))return r;throw new T3("Can't convert object to primitive value")},u1={exports:{}},c1=Lt,C3=Object.defineProperty,$3=function(e,t){try{C3(c1,e,{value:t,configurable:!0,writable:!0})}catch{c1[e]=t}return t},I3=Lt,R3=$3,f1="__core-js_shared__",d1=u1.exports=I3[f1]||R3(f1,{});(d1.versions||(d1.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 Dp=u1.exports,p1=Dp,Ta=function(e,t){return p1[e]||(p1[e]=t||{})},P3=Nu,A3=Object,Fr=function(e){return A3(P3(e))},N3=Rt,D3=Fr,M3=N3({}.hasOwnProperty),kn=Object.hasOwn||function(t,n){return M3(D3(t),n)},j3=Rt,L3=0,F3=Math.random(),B3=j3(1 .toString),Mp=function(e){return"Symbol("+(e===void 0?"":e)+")_"+B3(++L3+F3,36)},U3=Lt,z3=Ta,h1=kn,V3=Mp,q3=ka,W3=l1,Oa=U3.Symbol,jp=z3("wks"),H3=W3?Oa.for||Oa:Oa&&Oa.withoutSetter||V3,Wt=function(e){return h1(jp,e)||(jp[e]=q3&&h1(Oa,e)?Oa[e]:H3("Symbol."+e)),jp[e]},Z3=dr,m1=Kn,v1=rs,K3=Rp,G3=O3,Y3=Wt,J3=TypeError,X3=Y3("toPrimitive"),Q3=function(e,t){if(!m1(e)||v1(e))return e;var n=K3(e,X3),r;if(n){if(t===void 0&&(t="default"),r=Z3(n,e,t),!m1(r)||v1(r))return r;throw new J3("Can't convert object to primitive value")}return t===void 0&&(t="number"),G3(e,t)},e4=Q3,t4=rs,Lp=function(e){var t=e4(e,"string");return t4(t)?t:t+""},n4=Lt,y1=Kn,Fp=n4.document,r4=y1(Fp)&&y1(Fp.createElement),g1=function(e){return r4?Fp.createElement(e):{}},i4=vn,a4=Ft,o4=g1,b1=!i4&&!a4(function(){return Object.defineProperty(o4("div"),"a",{get:function(){return 7}}).a!==7}),s4=vn,l4=dr,u4=_p,c4=ns,f4=pr,d4=Lp,p4=kn,h4=b1,x1=Object.getOwnPropertyDescriptor;ts.f=s4?x1:function(t,n){if(t=f4(t),n=d4(n),h4)try{return x1(t,n)}catch{}if(p4(t,n))return c4(!l4(u4.f,t,n),t[n])};var m4=Ft,v4=nn,y4=/#|\.prototype\./,is=function(e,t){var n=b4[g4(e)];return n===w4?!0:n===x4?!1:v4(t)?m4(t):!!t},g4=is.normalize=function(e){return String(e).replace(y4,".").toLowerCase()},b4=is.data={},x4=is.NATIVE="N",w4=is.POLYFILL="P",S4=is,w1=wp,_4=ju,E4=Pu,k4=w1(w1.bind),Bp=function(e,t){return _4(e),t===void 0?e:E4?k4(e,t):function(){return e.apply(t,arguments)}},Yn={},T4=vn,O4=Ft,S1=T4&&O4(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),C4=Kn,$4=String,I4=TypeError,ci=function(e){if(C4(e))return e;throw new I4($4(e)+" is not an object")},R4=vn,P4=b1,A4=S1,Lu=ci,_1=Lp,N4=TypeError,Up=Object.defineProperty,D4=Object.getOwnPropertyDescriptor,zp="enumerable",Vp="configurable",qp="writable";Yn.f=R4?A4?function(t,n,r){if(Lu(t),n=_1(n),Lu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&qp in r&&!r[qp]){var i=D4(t,n);i&&i[qp]&&(t[n]=r.value,r={configurable:Vp in r?r[Vp]:i[Vp],enumerable:zp in r?r[zp]:i[zp],writable:!1})}return Up(t,n,r)}:Up:function(t,n,r){if(Lu(t),n=_1(n),Lu(r),P4)try{return Up(t,n,r)}catch{}if("get"in r||"set"in r)throw new N4("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var M4=vn,j4=Yn,L4=ns,Fu=M4?function(e,t,n){return j4.f(e,t,L4(1,n))}:function(e,t,n){return e[t]=n,e},as=Lt,F4=bp,B4=wp,U4=nn,z4=ts.f,V4=S4,Ca=Yt,q4=Bp,$a=Fu,E1=kn,W4=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return F4(e,this,arguments)};return t.prototype=e.prototype,t},mt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?as:i?as[n]:as[n]&&as[n].prototype,s=r?Ca:Ca[n]||$a(Ca,n,{})[n],u=s.prototype,l,c,f,p,d,m,h,y,v;for(p in t)l=V4(r?p:n+(i?".":"#")+p,e.forced),c=!l&&o&&E1(o,p),m=s[p],c&&(e.dontCallGetSet?(v=z4(o,p),h=v&&v.value):h=o[p]),d=c&&h?h:t[p],!(!l&&!a&&typeof m==typeof d)&&(e.bind&&c?y=q4(d,as):e.wrap&&c?y=W4(d):a&&U4(d)?y=B4(d):y=d,(e.sham||d&&d.sham||m&&m.sham)&&$a(y,"sham",!0),$a(s,p,y),a&&(f=n+"Prototype",E1(Ca,f)||$a(Ca,f,{}),$a(Ca[f],p,d),e.real&&u&&(l||!u[p])&&$a(u,p,d)))},H4=ji,Ia=Array.isArray||function(t){return H4(t)==="Array"},Z4=mt,K4=Ia;Z4({target:"Array",stat:!0},{isArray:K4});var G4=Yt,Y4=G4.Array.isArray,J4=Y4,k1=J4,X4=k1,Q4=X4,eU=Q4,tU=eU,nU=tU;const T1=Ke(nU);function rU(e){if(T1(e))return e}var iU=Math.ceil,aU=Math.floor,oU=Math.trunc||function(t){var n=+t;return(n>0?aU:iU)(n)},sU=oU,Bu=function(e){var t=+e;return t!==t||t===0?0:sU(t)},lU=Bu,uU=Math.min,cU=function(e){var t=lU(e);return t>0?uU(t,9007199254740991):0},fU=cU,Li=function(e){return fU(e.length)},dU=TypeError,pU=9007199254740991,Wp=function(e){if(e>pU)throw dU("Maximum allowed index exceeded");return e},hU=vn,mU=Yn,vU=ns,os=function(e,t,n){hU?mU.f(e,t,vU(0,n)):e[t]=n},yU=Wt,gU=yU("toStringTag"),O1={};O1[gU]="z";var Hp=String(O1)==="[object z]",bU=Hp,xU=nn,Uu=ji,wU=Wt,SU=wU("toStringTag"),_U=Object,EU=Uu(function(){return arguments}())==="Arguments",kU=function(e,t){try{return e[t]}catch{}},ss=bU?Uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=kU(t=_U(e),SU))=="string"?n:EU?Uu(t):(r=Uu(t))==="Object"&&xU(t.callee)?"Arguments":r},TU=Rt,OU=nn,Zp=Dp,CU=TU(Function.toString);OU(Zp.inspectSource)||(Zp.inspectSource=function(e){return CU(e)});var $U=Zp.inspectSource,IU=Rt,RU=Ft,C1=nn,PU=ss,AU=hr,NU=$U,$1=function(){},I1=AU("Reflect","construct"),Kp=/^\s*(?:class|function)\b/,DU=IU(Kp.exec),MU=!Kp.test($1),ls=function(t){if(!C1(t))return!1;try{return I1($1,[],t),!0}catch{return!1}},R1=function(t){if(!C1(t))return!1;switch(PU(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return MU||!!DU(Kp,NU(t))}catch{return!0}};R1.sham=!0;var Gp=!I1||RU(function(){var e;return ls(ls.call)||!ls(Object)||!ls(function(){e=!0})||e})?R1:ls,P1=Ia,jU=Gp,LU=Kn,FU=Wt,BU=FU("species"),A1=Array,UU=function(e){var t;return P1(e)&&(t=e.constructor,jU(t)&&(t===A1||P1(t.prototype))?t=void 0:LU(t)&&(t=t[BU],t===null&&(t=void 0))),t===void 0?A1:t},zU=UU,Yp=function(e,t){return new(zU(e))(t===0?0:t)},VU=Ft,qU=Wt,WU=Ip,HU=qU("species"),zu=function(e){return WU>=51||!VU(function(){var t=[],n=t.constructor={};return n[HU]=function(){return{foo:1}},t[e](Boolean).foo!==1})},ZU=mt,KU=Ft,GU=Ia,YU=Kn,JU=Fr,XU=Li,N1=Wp,D1=os,QU=Yp,ez=zu,tz=Wt,nz=Ip,M1=tz("isConcatSpreadable"),rz=nz>=51||!KU(function(){var e=[];return e[M1]=!1,e.concat()[0]!==e}),iz=function(e){if(!YU(e))return!1;var t=e[M1];return t!==void 0?!!t:GU(e)},az=!rz||!ez("concat");ZU({target:"Array",proto:!0,arity:1,forced:az},{concat:function(t){var n=JU(this),r=QU(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],iz(l))for(u=XU(l),N1(i+u),o=0;o<u;o++,i++)o in l&&D1(r,i,l[o]);else N1(i+1),D1(r,i++,l);return r.length=i,r}});var oz=ss,sz=String,us=function(e){if(oz(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return sz(e)},Vu={},lz=Bu,uz=Math.max,cz=Math.min,Jp=function(e,t){var n=lz(e);return n<0?uz(n+t,0):cz(n,t)},fz=pr,dz=Jp,pz=Li,j1=function(e){return function(t,n,r){var i=fz(t),a=pz(i);if(a===0)return!e&&-1;var o=dz(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},L1={includes:j1(!0),indexOf:j1(!1)},qu={},hz=Rt,Xp=kn,mz=pr,vz=L1.indexOf,yz=qu,F1=hz([].push),B1=function(e,t){var n=mz(e),r=0,i=[],a;for(a in n)!Xp(yz,a)&&Xp(n,a)&&F1(i,a);for(;t.length>r;)Xp(n,a=t[r++])&&(~vz(i,a)||F1(i,a));return i},Qp=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gz=B1,bz=Qp,eh=Object.keys||function(t){return gz(t,bz)},xz=vn,wz=S1,Sz=Yn,_z=ci,Ez=pr,kz=eh;Vu.f=xz&&!wz?Object.defineProperties:function(t,n){_z(t);for(var r=Ez(n),i=kz(n),a=i.length,o=0,s;a>o;)Sz.f(t,s=i[o++],r[s]);return t};var Tz=hr,Oz=Tz("document","documentElement"),Cz=Ta,$z=Mp,U1=Cz("keys"),Wu=function(e){return U1[e]||(U1[e]=$z(e))},Iz=ci,Rz=Vu,z1=Qp,Pz=qu,Az=Oz,Nz=g1,Dz=Wu,V1=">",q1="<",th="prototype",nh="script",W1=Dz("IE_PROTO"),rh=function(){},H1=function(e){return q1+nh+V1+e+q1+"/"+nh+V1},Z1=function(e){e.write(H1("")),e.close();var t=e.parentWindow.Object;return e=null,t},Mz=function(){var e=Nz("iframe"),t="java"+nh+":",n;return e.style.display="none",Az.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(H1("document.F=Object")),n.close(),n.F},Hu,Zu=function(){try{Hu=new ActiveXObject("htmlfile")}catch{}Zu=typeof document<"u"?document.domain&&Hu?Z1(Hu):Mz():Z1(Hu);for(var e=z1.length;e--;)delete Zu[th][z1[e]];return Zu()};Pz[W1]=!0;var ih=Object.create||function(t,n){var r;return t!==null?(rh[th]=Iz(t),r=new rh,rh[th]=null,r[W1]=t):r=Zu(),n===void 0?r:Rz.f(r,n)},Ku={},jz=B1,Lz=Qp,Fz=Lz.concat("length","prototype");Ku.f=Object.getOwnPropertyNames||function(t){return jz(t,Fz)};var K1={},Bz=Rt,Gu=Bz([].slice),Uz=ji,zz=pr,G1=Ku.f,Vz=Gu,Y1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],qz=function(e){try{return G1(e)}catch{return Vz(Y1)}};K1.f=function(t){return Y1&&Uz(t)==="Window"?qz(t):G1(zz(t))};var Yu={};Yu.f=Object.getOwnPropertySymbols;var Wz=Fu,Ju=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Wz(e,t,n),e},Hz=Yn,Zz=function(e,t,n){return Hz.f(e,t,n)},cs={},Kz=Wt;cs.f=Kz;var J1=Yt,Gz=kn,Yz=cs,Jz=Yn.f,St=function(e){var t=J1.Symbol||(J1.Symbol={});Gz(t,e)||Jz(t,e,{value:Yz.f(e)})},Xz=dr,Qz=hr,e6=Wt,t6=Ju,X1=function(){var e=Qz("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=e6("toPrimitive");t&&!t[r]&&t6(t,r,function(i){return Xz(n,this)},{arity:1})},n6=Hp,r6=ss,i6=n6?{}.toString:function(){return"[object "+r6(this)+"]"},a6=Hp,o6=Yn.f,s6=Fu,l6=kn,u6=i6,c6=Wt,Q1=c6("toStringTag"),Ra=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(l6(i,Q1)||o6(i,Q1,{configurable:!0,value:t}),r&&!a6&&s6(i,"toString",u6))},f6=Lt,d6=nn,eS=f6.WeakMap,p6=d6(eS)&&/native code/.test(String(eS)),h6=p6,tS=Lt,m6=Kn,v6=Fu,ah=kn,oh=Dp,y6=Wu,g6=qu,nS="Object already initialized",sh=tS.TypeError,b6=tS.WeakMap,Xu,fs,Qu,x6=function(e){return Qu(e)?fs(e):Xu(e,{})},w6=function(e){return function(t){var n;if(!m6(t)||(n=fs(t)).type!==e)throw new sh("Incompatible receiver, "+e+" required");return n}};if(h6||oh.state){var mr=oh.state||(oh.state=new b6);mr.get=mr.get,mr.has=mr.has,mr.set=mr.set,Xu=function(e,t){if(mr.has(e))throw new sh(nS);return t.facade=e,mr.set(e,t),t},fs=function(e){return mr.get(e)||{}},Qu=function(e){return mr.has(e)}}else{var Pa=y6("state");g6[Pa]=!0,Xu=function(e,t){if(ah(e,Pa))throw new sh(nS);return t.facade=e,v6(e,Pa,t),t},fs=function(e){return ah(e,Pa)?e[Pa]:{}},Qu=function(e){return ah(e,Pa)}}var lh={set:Xu,get:fs,has:Qu,enforce:x6,getterFor:w6},S6=Bp,_6=Rt,E6=X0,k6=Fr,T6=Li,O6=Yp,rS=_6([].push),fi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var p=k6(u),d=E6(p),m=T6(d),h=S6(l,c),y=0,v=f||O6,g=t?v(u,m):n||o?v(u,0):void 0,b,k;m>y;y++)if((s||y in d)&&(b=d[y],k=h(b,y,p),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:rS(g,b)}else switch(e){case 4:return!1;case 7:rS(g,b)}return a?-1:r||i?i:g}},uh={forEach:fi(0),map:fi(1),filter:fi(2),some:fi(3),every:fi(4),find:fi(5),findIndex:fi(6),filterReject:fi(7)},ec=mt,ds=Lt,ch=dr,C6=Rt,Aa=vn,Na=ka,$6=Ft,Ht=kn,I6=Lr,fh=ci,tc=pr,dh=Lp,R6=us,ph=ns,Da=ih,iS=eh,P6=Ku,aS=K1,A6=Yu,oS=ts,sS=Yn,N6=Vu,lS=_p,uS=Ju,D6=Zz,hh=Ta,M6=Wu,cS=qu,fS=Mp,j6=Wt,L6=cs,F6=St,B6=X1,U6=Ra,dS=lh,nc=uh.forEach,yn=M6("hidden"),rc="Symbol",ps="prototype",z6=dS.set,pS=dS.getterFor(rc),Jn=Object[ps],Fi=ds.Symbol,hs=Fi&&Fi[ps],V6=ds.RangeError,q6=ds.TypeError,mh=ds.QObject,hS=oS.f,Bi=sS.f,mS=aS.f,W6=lS.f,vS=C6([].push),Br=hh("symbols"),ms=hh("op-symbols"),H6=hh("wks"),vh=!mh||!mh[ps]||!mh[ps].findChild,yS=function(e,t,n){var r=hS(Jn,t);r&&delete Jn[t],Bi(e,t,n),r&&e!==Jn&&Bi(Jn,t,r)},yh=Aa&&$6(function(){return Da(Bi({},"a",{get:function(){return Bi(this,"a",{value:7}).a}})).a!==7})?yS:Bi,gh=function(e,t){var n=Br[e]=Da(hs);return z6(n,{type:rc,tag:e,description:t}),Aa||(n.description=t),n},ic=function(t,n,r){t===Jn&&ic(ms,n,r),fh(t);var i=dh(n);return fh(r),Ht(Br,i)?(r.enumerable?(Ht(t,yn)&&t[yn][i]&&(t[yn][i]=!1),r=Da(r,{enumerable:ph(0,!1)})):(Ht(t,yn)||Bi(t,yn,ph(1,Da(null))),t[yn][i]=!0),yh(t,i,r)):Bi(t,i,r)},bh=function(t,n){fh(t);var r=tc(n),i=iS(r).concat(wS(r));return nc(i,function(a){(!Aa||ch(gS,r,a))&&ic(t,a,r[a])}),t},Z6=function(t,n){return n===void 0?Da(t):bh(Da(t),n)},gS=function(t){var n=dh(t),r=ch(W6,this,n);return this===Jn&&Ht(Br,n)&&!Ht(ms,n)?!1:r||!Ht(this,n)||!Ht(Br,n)||Ht(this,yn)&&this[yn][n]?r:!0},bS=function(t,n){var r=tc(t),i=dh(n);if(!(r===Jn&&Ht(Br,i)&&!Ht(ms,i))){var a=hS(r,i);return a&&Ht(Br,i)&&!(Ht(r,yn)&&r[yn][i])&&(a.enumerable=!0),a}},xS=function(t){var n=mS(tc(t)),r=[];return nc(n,function(i){!Ht(Br,i)&&!Ht(cS,i)&&vS(r,i)}),r},wS=function(e){var t=e===Jn,n=mS(t?ms:tc(e)),r=[];return nc(n,function(i){Ht(Br,i)&&(!t||Ht(Jn,i))&&vS(r,Br[i])}),r};Na||(Fi=function(){if(I6(hs,this))throw new q6("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:R6(arguments[0]),n=fS(t),r=function(i){var a=this===void 0?ds:this;a===Jn&&ch(r,ms,i),Ht(a,yn)&&Ht(a[yn],n)&&(a[yn][n]=!1);var o=ph(1,i);try{yh(a,n,o)}catch(s){if(!(s instanceof V6))throw s;yS(a,n,o)}};return Aa&&vh&&yh(Jn,n,{configurable:!0,set:r}),gh(n,t)},hs=Fi[ps],uS(hs,"toString",function(){return pS(this).tag}),uS(Fi,"withoutSetter",function(e){return gh(fS(e),e)}),lS.f=gS,sS.f=ic,N6.f=bh,oS.f=bS,P6.f=aS.f=xS,A6.f=wS,L6.f=function(e){return gh(j6(e),e)},Aa&&D6(hs,"description",{configurable:!0,get:function(){return pS(this).description}})),ec({global:!0,constructor:!0,wrap:!0,forced:!Na,sham:!Na},{Symbol:Fi}),nc(iS(H6),function(e){F6(e)}),ec({target:rc,stat:!0,forced:!Na},{useSetter:function(){vh=!0},useSimple:function(){vh=!1}}),ec({target:"Object",stat:!0,forced:!Na,sham:!Aa},{create:Z6,defineProperty:ic,defineProperties:bh,getOwnPropertyDescriptor:bS}),ec({target:"Object",stat:!0,forced:!Na},{getOwnPropertyNames:xS}),B6(),U6(Fi,rc),cS[yn]=!0;var K6=ka,SS=K6&&!!Symbol.for&&!!Symbol.keyFor,G6=mt,Y6=hr,J6=kn,X6=us,_S=Ta,Q6=SS,xh=_S("string-to-symbol-registry"),e9=_S("symbol-to-string-registry");G6({target:"Symbol",stat:!0,forced:!Q6},{for:function(e){var t=X6(e);if(J6(xh,t))return xh[t];var n=Y6("Symbol")(t);return xh[t]=n,e9[n]=t,n}});var t9=mt,n9=kn,r9=rs,i9=Mu,a9=Ta,o9=SS,ES=a9("symbol-to-string-registry");t9({target:"Symbol",stat:!0,forced:!o9},{keyFor:function(t){if(!r9(t))throw new TypeError(i9(t)+" is not a symbol");if(n9(ES,t))return ES[t]}});var s9=Rt,kS=Ia,l9=nn,TS=ji,u9=us,OS=s9([].push),c9=function(e){if(l9(e))return e;if(kS(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?OS(n,i):(typeof i=="number"||TS(i)==="Number"||TS(i)==="String")&&OS(n,u9(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(kS(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},f9=mt,CS=hr,$S=bp,d9=dr,vs=Rt,IS=Ft,RS=nn,PS=rs,AS=Gu,p9=c9,h9=ka,m9=String,di=CS("JSON","stringify"),ac=vs(/./.exec),NS=vs("".charAt),v9=vs("".charCodeAt),y9=vs("".replace),g9=vs(1 .toString),b9=/[\uD800-\uDFFF]/g,DS=/^[\uD800-\uDBFF]$/,MS=/^[\uDC00-\uDFFF]$/,jS=!h9||IS(function(){var e=CS("Symbol")("stringify detection");return di([e])!=="[null]"||di({a:e})!=="{}"||di(Object(e))!=="{}"}),LS=IS(function(){return di("\uDF06\uD834")!=='"\\udf06\\ud834"'||di("\uDEAD")!=='"\\udead"'}),x9=function(e,t){var n=AS(arguments),r=p9(t);if(!(!RS(r)&&(e===void 0||PS(e))))return n[1]=function(i,a){if(RS(r)&&(a=d9(r,this,m9(i),a)),!PS(a))return a},$S(di,null,n)},w9=function(e,t,n){var r=NS(n,t-1),i=NS(n,t+1);return ac(DS,e)&&!ac(MS,i)||ac(MS,e)&&!ac(DS,r)?"\\u"+g9(v9(e,0),16):e};di&&f9({target:"JSON",stat:!0,arity:3,forced:jS||LS},{stringify:function(t,n,r){var i=AS(arguments),a=$S(jS?x9:di,null,i);return LS&&typeof a=="string"?y9(a,b9,w9):a}});var S9=mt,_9=ka,E9=Ft,FS=Yu,k9=Fr,T9=!_9||E9(function(){FS.f(1)});S9({target:"Object",stat:!0,forced:T9},{getOwnPropertySymbols:function(t){var n=FS.f;return n?n(k9(t)):[]}});var O9=St;O9("asyncIterator");var C9=St;C9("hasInstance");var $9=St;$9("isConcatSpreadable");var I9=St;I9("iterator");var R9=St;R9("match");var P9=St;P9("matchAll");var A9=St;A9("replace");var N9=St;N9("search");var D9=St;D9("species");var M9=St;M9("split");var j9=St,L9=X1;j9("toPrimitive"),L9();var F9=hr,B9=St,U9=Ra;B9("toStringTag"),U9(F9("Symbol"),"Symbol");var z9=St;z9("unscopables");var V9=Lt,q9=Ra;q9(V9.JSON,"JSON",!0);var W9=Yt,H9=W9.Symbol,Ma={},wh=vn,Z9=kn,BS=Function.prototype,K9=wh&&Object.getOwnPropertyDescriptor,Sh=Z9(BS,"name"),G9=Sh&&(function(){}).name==="something",Y9=Sh&&(!wh||wh&&K9(BS,"name").configurable),J9={EXISTS:Sh,PROPER:G9,CONFIGURABLE:Y9},X9=Ft,Q9=!X9(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),e7=kn,t7=nn,n7=Fr,r7=Wu,i7=Q9,US=r7("IE_PROTO"),_h=Object,a7=_h.prototype,zS=i7?_h.getPrototypeOf:function(e){var t=n7(e);if(e7(t,US))return t[US];var n=t.constructor;return t7(n)&&t instanceof n?n.prototype:t instanceof _h?a7:null},o7=Ft,s7=nn,l7=Kn,u7=ih,VS=zS,c7=Ju,f7=Wt,Eh=f7("iterator"),qS=!1,Ur,kh,Th;[].keys&&(Th=[].keys(),"next"in Th?(kh=VS(VS(Th)),kh!==Object.prototype&&(Ur=kh)):qS=!0);var d7=!l7(Ur)||o7(function(){var e={};return Ur[Eh].call(e)!==e});d7?Ur={}:Ur=u7(Ur),s7(Ur[Eh])||c7(Ur,Eh,function(){return this});var WS={IteratorPrototype:Ur,BUGGY_SAFARI_ITERATORS:qS},p7=WS.IteratorPrototype,h7=ih,m7=ns,v7=Ra,y7=Ma,g7=function(){return this},b7=function(e,t,n,r){var i=t+" Iterator";return e.prototype=h7(p7,{next:m7(+!r,n)}),v7(e,i,!1,!0),y7[i]=g7,e},x7=Rt,w7=ju,S7=function(e,t,n){try{return x7(w7(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},_7=Kn,E7=function(e){return _7(e)||e===null},k7=E7,T7=String,O7=TypeError,C7=function(e){if(k7(e))return e;throw new O7("Can't set "+T7(e)+" as a prototype")},$7=S7,I7=Kn,R7=Nu,P7=C7;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=$7(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return R7(i),P7(a),I7(i)&&(e?n(i,a):i.__proto__=a),i}}();var A7=mt,N7=dr,HS=J9,D7=b7,M7=zS,j7=Ra,ZS=Ju,L7=Wt,KS=Ma,GS=WS,F7=HS.PROPER;HS.CONFIGURABLE,GS.IteratorPrototype;var oc=GS.BUGGY_SAFARI_ITERATORS,Oh=L7("iterator"),YS="keys",sc="values",JS="entries",B7=function(){return this},XS=function(e,t,n,r,i,a,o){D7(n,t,r);var s=function(v){if(v===i&&p)return p;if(!oc&&v&&v in c)return c[v];switch(v){case YS:return function(){return new n(this,v)};case sc:return function(){return new n(this,v)};case JS:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Oh]||c["@@iterator"]||i&&c[i],p=!oc&&f||s(i),d=t==="Array"&&c.entries||f,m,h,y;if(d&&(m=M7(d.call(new e)),m!==Object.prototype&&m.next&&(j7(m,u,!0,!0),KS[u]=B7)),F7&&i===sc&&f&&f.name!==sc&&(l=!0,p=function(){return N7(f,this)}),i)if(h={values:s(sc),keys:a?p:s(YS),entries:s(JS)},o)for(y in h)(oc||l||!(y in c))&&ZS(c,y,h[y]);else A7({target:t,proto:!0,forced:oc||l},h);return o&&c[Oh]!==p&&ZS(c,Oh,p,{name:i}),KS[t]=p,h},QS=function(e,t){return{value:e,done:t}},U7=pr,e_=Ma,t_=lh;Yn.f;var z7=XS,lc=QS,n_="Array Iterator",V7=t_.set,q7=t_.getterFor(n_);z7(Array,"Array",function(e,t){V7(this,{type:n_,target:U7(e),index:0,kind:t})},function(){var e=q7(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,lc(void 0,!0);switch(e.kind){case"keys":return lc(n,!1);case"values":return lc(t[n],!1)}return lc([n,t[n]],!1)},"values"),e_.Arguments=e_.Array;var W7={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},H7=W7,Z7=Lt,K7=Ra,r_=Ma;for(var Ch in H7)K7(Z7[Ch],Ch),r_[Ch]=r_.Array;var G7=H9,Y7=G7,J7=Wt,X7=Yn.f,i_=J7("metadata"),a_=Function.prototype;a_[i_]===void 0&&X7(a_,i_,{value:null});var Q7=St;Q7("asyncDispose");var eV=St;eV("dispose");var tV=St;tV("metadata");var nV=Y7,rV=nV,iV=hr,aV=Rt,$h=iV("Symbol"),oV=$h.keyFor,sV=aV($h.prototype.valueOf),o_=$h.isRegisteredSymbol||function(t){try{return oV(sV(t))!==void 0}catch{return!1}},lV=mt,uV=o_;lV({target:"Symbol",stat:!0},{isRegisteredSymbol:uV});for(var cV=Ta,s_=hr,fV=Rt,dV=rs,pV=Wt,uc=s_("Symbol"),l_=uc.isWellKnownSymbol,u_=s_("Object","getOwnPropertyNames"),hV=fV(uc.prototype.valueOf),c_=cV("wks"),Ih=0,f_=u_(uc),mV=f_.length;Ih<mV;Ih++)try{var d_=f_[Ih];dV(uc[d_])&&pV(d_)}catch{}var p_=function(t){if(l_&&l_(t))return!0;try{for(var n=hV(t),r=0,i=u_(c_),a=i.length;r<a;r++)if(c_[i[r]]==n)return!0}catch{}return!1},vV=mt,yV=p_;vV({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:yV});var gV=St;gV("customMatcher");var bV=St;bV("observable");var xV=mt,wV=o_;xV({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:wV});var SV=mt,_V=p_;SV({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:_V});var EV=St;EV("matcher");var kV=St;kV("metadataKey");var TV=St;TV("patternMatch");var OV=St;OV("replaceAll");var CV=rV,$V=CV,IV=$V;const ja=Ke(IV);var Rh=Rt,RV=Bu,PV=us,AV=Nu,NV=Rh("".charAt),h_=Rh("".charCodeAt),DV=Rh("".slice),m_=function(e){return function(t,n){var r=PV(AV(t)),i=RV(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=h_(r,i),o<55296||o>56319||i+1===a||(s=h_(r,i+1))<56320||s>57343?e?NV(r,i):o:e?DV(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},MV={codeAt:m_(!1),charAt:m_(!0)},jV=MV.charAt,LV=us,v_=lh,FV=XS,y_=QS,g_="String Iterator",BV=v_.set,UV=v_.getterFor(g_);FV(String,"String",function(e){BV(this,{type:g_,string:LV(e),index:0})},function(){var t=UV(this),n=t.string,r=t.index,i;return r>=n.length?y_(void 0,!0):(i=jV(n,r),t.index+=i.length,y_(i,!1))});var zV=ss,b_=Rp,VV=kp,qV=Ma,WV=Wt,HV=WV("iterator"),Ph=function(e){if(!VV(e))return b_(e,HV)||b_(e,"@@iterator")||qV[zV(e)]},ZV=Ph,KV=ZV,GV=KV,YV=GV,JV=YV,XV=JV,QV=XV,eq=QV,tq=eq;const x_=Ke(tq);var nq=vn,rq=Ia,iq=TypeError,aq=Object.getOwnPropertyDescriptor,oq=nq&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),w_=oq?function(e,t){if(rq(e)&&!aq(e,"length").writable)throw new iq("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},sq=mt,lq=Fr,uq=Li,cq=w_,fq=Wp,dq=Ft,pq=dq(function(){return[].push.call({length:4294967296},1)!==4294967297}),hq=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},mq=pq||!hq();sq({target:"Array",proto:!0,arity:1,forced:mq},{push:function(t){var n=lq(this),r=uq(n),i=arguments.length;fq(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return cq(n,r),r}});var vq=Lt,yq=Yt,Ui=function(e,t){var n=yq[e+"Prototype"],r=n&&n[t];if(r)return r;var i=vq[e],a=i&&i.prototype;return a&&a[t]},gq=Ui,bq=gq("Array","push"),xq=Lr,wq=bq,Ah=Array.prototype,Sq=function(e){var t=e.push;return e===Ah||xq(Ah,e)&&t===Ah.push?wq:t},_q=Sq,Eq=_q,kq=Eq,Tq=kq,Oq=Tq,Cq=Oq,$q=Cq;const Iq=Ke($q);function Rq(e,t){var n=e==null?null:typeof ja<"u"&&x_(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(Iq(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Pq=mt,S_=Ia,Aq=Gp,Nq=Kn,__=Jp,Dq=Li,Mq=pr,jq=os,Lq=Wt,Fq=zu,Bq=Gu,Uq=Fq("slice"),zq=Lq("species"),Nh=Array,Vq=Math.max;Pq({target:"Array",proto:!0,forced:!Uq},{slice:function(t,n){var r=Mq(this),i=Dq(r),a=__(t,i),o=__(n===void 0?i:n,i),s,u,l;if(S_(r)&&(s=r.constructor,Aq(s)&&(s===Nh||S_(s.prototype))?s=void 0:Nq(s)&&(s=s[zq],s===null&&(s=void 0)),s===Nh||s===void 0))return Bq(r,a,o);for(u=new(s===void 0?Nh:s)(Vq(o-a,0)),l=0;a<o;a++,l++)a in r&&jq(u,l,r[a]);return u.length=l,u}});var qq=Ui,Wq=qq("Array","slice"),Hq=Lr,Zq=Wq,Dh=Array.prototype,Kq=function(e){var t=e.slice;return e===Dh||Hq(Dh,e)&&t===Dh.slice?Zq:t},Gq=Kq,Yq=Gq,Jq=Yq,Xq=Jq,Qq=Xq,eW=Qq,tW=eW;const nW=Ke(tW);var rW=dr,E_=ci,iW=Rp,aW=function(e,t,n){var r,i;E_(e);try{if(r=iW(e,"return"),!r){if(t==="throw")throw n;return n}r=rW(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return E_(r),n},oW=ci,sW=aW,lW=function(e,t,n,r){try{return r?t(oW(n)[0],n[1]):t(n)}catch(i){sW(e,"throw",i)}},uW=Wt,cW=Ma,fW=uW("iterator"),dW=Array.prototype,pW=function(e){return e!==void 0&&(cW.Array===e||dW[fW]===e)},hW=dr,mW=ju,vW=ci,yW=Mu,gW=Ph,bW=TypeError,xW=function(e,t){var n=arguments.length<2?gW(e):t;if(mW(n))return vW(hW(n,e));throw new bW(yW(e)+" is not iterable")},wW=Bp,SW=dr,_W=Fr,EW=lW,kW=pW,TW=Gp,OW=Li,k_=os,CW=xW,$W=Ph,T_=Array,IW=function(t){var n=_W(t),r=TW(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=wW(a,i>2?arguments[2]:void 0));var s=$W(n),u=0,l,c,f,p,d,m;if(s&&!(this===T_&&kW(s)))for(c=r?new this:[],p=CW(n,s),d=p.next;!(f=SW(d,p)).done;u++)m=o?EW(p,a,[f.value,u],!0):f.value,k_(c,u,m);else for(l=OW(n),c=r?new this(l):T_(l);l>u;u++)m=o?a(n[u],u):n[u],k_(c,u,m);return c.length=u,c},RW=Wt,O_=RW("iterator"),C_=!1;try{var PW=0,$_={next:function(){return{done:!!PW++}},return:function(){C_=!0}};$_[O_]=function(){return this},Array.from($_,function(){throw 2})}catch{}var AW=function(e,t){try{if(!t&&!C_)return!1}catch{return!1}var n=!1;try{var r={};r[O_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},NW=mt,DW=IW,MW=AW,jW=!MW(function(e){Array.from(e)});NW({target:"Array",stat:!0,forced:jW},{from:DW});var LW=Yt,FW=LW.Array.from,BW=FW,UW=BW,zW=UW,VW=zW,qW=VW,WW=qW,HW=WW;const I_=Ke(HW);function Mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R_(e,t){if(e){var n;if(typeof e=="string")return Mh(e,t);var r=nW(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?I_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mh(e,t):void 0}}function ZW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
318
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vr(e,t){return rU(e)||Rq(e,t)||R_(e,t)||ZW()}var P_={exports:{}};/*!
319
319
  Copyright (c) 2018 Jed Watson.
320
320
  Licensed under the MIT License (MIT), see
321
321
  http://jedwatson.github.io/classnames
322
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(P_);var BW=P_.exports;const jh=Ke(BW);var Lh={exports:{}},cc={exports:{}},ut={};/** @license React v16.13.1
322
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(P_);var KW=P_.exports;const jh=Ke(KW);var Lh={exports:{}},cc={exports:{}},ut={};/** @license React v16.13.1
323
323
  * react-is.production.min.js
324
324
  *
325
325
  * Copyright (c) Facebook, Inc. and its affiliates.
326
326
  *
327
327
  * This source code is licensed under the MIT license found in the
328
328
  * LICENSE file in the root directory of this source tree.
329
- */var A_;function UW(){if(A_)return ut;A_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case u:case l:case r:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case m:case d:case o:return S;default:return E}}case n:return E}}}function k(S){return b(S)===l}return ut.AsyncMode=u,ut.ConcurrentMode=l,ut.ContextConsumer=s,ut.ContextProvider=o,ut.Element=t,ut.ForwardRef=c,ut.Fragment=r,ut.Lazy=m,ut.Memo=d,ut.Portal=n,ut.Profiler=a,ut.StrictMode=i,ut.Suspense=f,ut.isAsyncMode=function(S){return k(S)||b(S)===u},ut.isConcurrentMode=k,ut.isContextConsumer=function(S){return b(S)===s},ut.isContextProvider=function(S){return b(S)===o},ut.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ut.isForwardRef=function(S){return b(S)===c},ut.isFragment=function(S){return b(S)===r},ut.isLazy=function(S){return b(S)===m},ut.isMemo=function(S){return b(S)===d},ut.isPortal=function(S){return b(S)===n},ut.isProfiler=function(S){return b(S)===a},ut.isStrictMode=function(S){return b(S)===i},ut.isSuspense=function(S){return b(S)===f},ut.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===a||S===i||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===d||S.$$typeof===o||S.$$typeof===s||S.$$typeof===c||S.$$typeof===y||S.$$typeof===v||S.$$typeof===g||S.$$typeof===h)},ut.typeOf=b,ut}var ct={};/** @license React v16.13.1
329
+ */var A_;function GW(){if(A_)return ut;A_=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case u:case l:case r:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case m:case d:case o:return S;default:return E}}case n:return E}}}function k(S){return b(S)===l}return ut.AsyncMode=u,ut.ConcurrentMode=l,ut.ContextConsumer=s,ut.ContextProvider=o,ut.Element=t,ut.ForwardRef=c,ut.Fragment=r,ut.Lazy=m,ut.Memo=d,ut.Portal=n,ut.Profiler=a,ut.StrictMode=i,ut.Suspense=f,ut.isAsyncMode=function(S){return k(S)||b(S)===u},ut.isConcurrentMode=k,ut.isContextConsumer=function(S){return b(S)===s},ut.isContextProvider=function(S){return b(S)===o},ut.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ut.isForwardRef=function(S){return b(S)===c},ut.isFragment=function(S){return b(S)===r},ut.isLazy=function(S){return b(S)===m},ut.isMemo=function(S){return b(S)===d},ut.isPortal=function(S){return b(S)===n},ut.isProfiler=function(S){return b(S)===a},ut.isStrictMode=function(S){return b(S)===i},ut.isSuspense=function(S){return b(S)===f},ut.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===a||S===i||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===d||S.$$typeof===o||S.$$typeof===s||S.$$typeof===c||S.$$typeof===y||S.$$typeof===v||S.$$typeof===g||S.$$typeof===h)},ut.typeOf=b,ut}var ct={};/** @license React v16.13.1
330
330
  * react-is.development.js
331
331
  *
332
332
  * Copyright (c) Facebook, Inc. and its affiliates.
333
333
  *
334
334
  * This source code is licensed under the MIT license found in the
335
335
  * LICENSE file in the root directory of this source tree.
336
- */var N_;function zW(){return N_||(N_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===a||Z===i||Z===f||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===m||Z.$$typeof===d||Z.$$typeof===o||Z.$$typeof===s||Z.$$typeof===c||Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===g||Z.$$typeof===h)}function k(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ve=Z.type;switch(ve){case u:case l:case r:case a:case i:case f:return ve;default:var $e=ve&&ve.$$typeof;switch($e){case s:case c:case m:case d:case o:return $e;default:return de}}case n:return de}}}var S=u,E=l,O=s,L=o,D=t,T=c,P=r,q=m,$=d,F=n,M=a,B=i,W=f,U=!1;function N(Z){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.")),x(Z)||k(Z)===u}function x(Z){return k(Z)===l}function V(Z){return k(Z)===s}function K(Z){return k(Z)===o}function _(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function Y(Z){return k(Z)===c}function oe(Z){return k(Z)===r}function ne(Z){return k(Z)===m}function le(Z){return k(Z)===d}function pe(Z){return k(Z)===n}function he(Z){return k(Z)===a}function ue(Z){return k(Z)===i}function Q(Z){return k(Z)===f}ct.AsyncMode=S,ct.ConcurrentMode=E,ct.ContextConsumer=O,ct.ContextProvider=L,ct.Element=D,ct.ForwardRef=T,ct.Fragment=P,ct.Lazy=q,ct.Memo=$,ct.Portal=F,ct.Profiler=M,ct.StrictMode=B,ct.Suspense=W,ct.isAsyncMode=N,ct.isConcurrentMode=x,ct.isContextConsumer=V,ct.isContextProvider=K,ct.isElement=_,ct.isForwardRef=Y,ct.isFragment=oe,ct.isLazy=ne,ct.isMemo=le,ct.isPortal=pe,ct.isProfiler=he,ct.isStrictMode=ue,ct.isSuspense=Q,ct.isValidElementType=b,ct.typeOf=k}()),ct}var D_;function M_(){return D_||(D_=1,process.env.NODE_ENV==="production"?cc.exports=UW():cc.exports=zW()),cc.exports}/*
336
+ */var N_;function YW(){return N_||(N_=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===a||Z===i||Z===f||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===m||Z.$$typeof===d||Z.$$typeof===o||Z.$$typeof===s||Z.$$typeof===c||Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===g||Z.$$typeof===h)}function k(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ve=Z.type;switch(ve){case u:case l:case r:case a:case i:case f:return ve;default:var $e=ve&&ve.$$typeof;switch($e){case s:case c:case m:case d:case o:return $e;default:return de}}case n:return de}}}var S=u,E=l,O=s,L=o,D=t,T=c,P=r,q=m,$=d,F=n,M=a,B=i,W=f,U=!1;function N(Z){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.")),x(Z)||k(Z)===u}function x(Z){return k(Z)===l}function V(Z){return k(Z)===s}function K(Z){return k(Z)===o}function _(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function Y(Z){return k(Z)===c}function oe(Z){return k(Z)===r}function ne(Z){return k(Z)===m}function le(Z){return k(Z)===d}function pe(Z){return k(Z)===n}function he(Z){return k(Z)===a}function ue(Z){return k(Z)===i}function Q(Z){return k(Z)===f}ct.AsyncMode=S,ct.ConcurrentMode=E,ct.ContextConsumer=O,ct.ContextProvider=L,ct.Element=D,ct.ForwardRef=T,ct.Fragment=P,ct.Lazy=q,ct.Memo=$,ct.Portal=F,ct.Profiler=M,ct.StrictMode=B,ct.Suspense=W,ct.isAsyncMode=N,ct.isConcurrentMode=x,ct.isContextConsumer=V,ct.isContextProvider=K,ct.isElement=_,ct.isForwardRef=Y,ct.isFragment=oe,ct.isLazy=ne,ct.isMemo=le,ct.isPortal=pe,ct.isProfiler=he,ct.isStrictMode=ue,ct.isSuspense=Q,ct.isValidElementType=b,ct.typeOf=k}()),ct}var D_;function M_(){return D_||(D_=1,process.env.NODE_ENV==="production"?cc.exports=GW():cc.exports=YW()),cc.exports}/*
337
337
  object-assign
338
338
  (c) Sindre Sorhus
339
339
  @license MIT
340
- */var Fh,j_;function VW(){if(j_)return Fh;j_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(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 u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fh=i()?Object.assign:function(a,o){for(var s,u=r(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},Fh}var Bh,L_;function Uh(){if(L_)return Bh;L_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bh=e,Bh}var zh,F_;function qW(){if(F_)return zh;F_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uh(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var p=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw p.name="Invariant Violation",p}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},zh=i,zh}var Vh,B_;function WW(){if(B_)return Vh;B_=1;var e=M_(),t=VW(),n=Uh(),r=qW(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Vh=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(N){var x=N&&(l&&N[l]||N[c]);if(typeof x=="function")return x}var p="<<anonymous>>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:E,node:T(),objectOf:L,oneOf:O,oneOfType:D,shape:P,exact:q};function m(N,x){return N===x?N!==0||1/N===1/x:N!==N&&x!==x}function h(N){this.message=N,this.stack=""}h.prototype=Error.prototype;function y(N){if(process.env.NODE_ENV!=="production")var x={},V=0;function K(Y,oe,ne,le,pe,he,ue){if(le=le||p,he=he||ne,ue!==n){if(u){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 Z=le+":"+ne;!x[Z]&&V<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."),x[Z]=!0,V++)}}return oe[ne]==null?Y?oe[ne]===null?new h("The "+pe+" `"+he+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new h("The "+pe+" `"+he+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:N(oe,ne,le,pe,he)}var _=K.bind(null,!1);return _.isRequired=K.bind(null,!0),_}function v(N){function x(V,K,_,Y,oe,ne){var le=V[K],pe=M(le);if(pe!==N){var he=B(le);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+he+"` supplied to `"+_+"`, expected ")+("`"+N+"`."))}return null}return y(x)}function g(){return y(o)}function b(N){function x(V,K,_,Y,oe){if(typeof N!="function")return new h("Property `"+oe+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var ne=V[K];if(!Array.isArray(ne)){var le=M(ne);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an array."))}for(var pe=0;pe<ne.length;pe++){var he=N(ne,pe,_,Y,oe+"["+pe+"]",n);if(he instanceof Error)return he}return null}return y(x)}function k(){function N(x,V,K,_,Y){var oe=x[V];if(!s(oe)){var ne=M(oe);return new h("Invalid "+_+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(N)}function S(){function N(x,V,K,_,Y){var oe=x[V];if(!e.isValidElementType(oe)){var ne=M(oe);return new h("Invalid "+_+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(N)}function E(N){function x(V,K,_,Y,oe){if(!(V[K]instanceof N)){var ne=N.name||p,le=U(V[K]);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected ")+("instance of `"+ne+"`."))}return null}return y(x)}function O(N){if(!Array.isArray(N))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 x(V,K,_,Y,oe){for(var ne=V[K],le=0;le<N.length;le++)if(m(ne,N[le]))return null;var pe=JSON.stringify(N,function(ue,Q){var Z=B(Q);return Z==="symbol"?String(Q):Q});return new h("Invalid "+Y+" `"+oe+"` of value `"+String(ne)+"` "+("supplied to `"+_+"`, expected one of "+pe+"."))}return y(x)}function L(N){function x(V,K,_,Y,oe){if(typeof N!="function")return new h("Property `"+oe+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an object."));for(var pe in ne)if(i(ne,pe)){var he=N(ne,pe,_,Y,oe+"."+pe,n);if(he instanceof Error)return he}return null}return y(x)}function D(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var x=0;x<N.length;x++){var V=N[x];if(typeof V!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(V)+" at index "+x+"."),o}function K(_,Y,oe,ne,le){for(var pe=0;pe<N.length;pe++){var he=N[pe];if(he(_,Y,oe,ne,le,n)==null)return null}return new h("Invalid "+ne+" `"+le+"` supplied to "+("`"+oe+"`."))}return y(K)}function T(){function N(x,V,K,_,Y){return $(x[V])?null:new h("Invalid "+_+" `"+Y+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(N)}function P(N){function x(V,K,_,Y,oe){var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));for(var pe in N){var he=N[pe];if(he){var ue=he(ne,pe,_,Y,oe+"."+pe,n);if(ue)return ue}}return null}return y(x)}function q(N){function x(V,K,_,Y,oe){var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));var pe=t({},V[K],N);for(var he in pe){var ue=N[he];if(!ue)return new h("Invalid "+Y+" `"+oe+"` key `"+he+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(V[K],null," ")+`
341
- Valid keys: `+JSON.stringify(Object.keys(N),null," "));var Q=ue(ne,he,_,Y,oe+"."+he,n);if(Q)return Q}return null}return y(x)}function $(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every($);if(N===null||s(N))return!0;var x=f(N);if(x){var V=x.call(N),K;if(x!==N.entries){for(;!(K=V.next()).done;)if(!$(K.value))return!1}else for(;!(K=V.next()).done;){var _=K.value;if(_&&!$(_[1]))return!1}}else return!1;return!0;default:return!1}}function F(N,x){return N==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function M(N){var x=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":F(x,N)?"symbol":x}function B(N){if(typeof N>"u"||N===null)return""+N;var x=M(N);if(x==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return x}function W(N){var x=B(N);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function U(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Vh}var qh,U_;function HW(){if(U_)return qh;U_=1;var e=Uh();function t(){}function n(){}return n.resetWarningCache=t,qh=function(){function r(o,s,u,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},qh}if(process.env.NODE_ENV!=="production"){var ZW=M_(),KW=!0;Lh.exports=WW()(ZW.isElement,KW)}else Lh.exports=HW()();var GW=Lh.exports;const rt=Ke(GW);var Wh=j.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});Wh.displayName="ScrollToBottomFunctionContext";function YW(){return j.useContext(Wh)}function JW(){var e=YW(),t=e.scrollToEnd;return t}var Hh=j.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Hh.displayName="ScrollToBottomState1Context";var Zh=j.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Zh.displayName="ScrollToBottomState2Context";var Kh=j.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Kh.displayName="ScrollToBottomStateContext";var z_=[Kh,Hh,Zh];function XW(e){return j.useContext(z_[e]||z_[0])}function QW(){var e=XW(2),t=e.sticky;return[t]}var fc=j.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});fc.displayName="ScrollToBottomInternalContext";function eH(){return j.useContext(fc)}function Gh(){var e=eH(),t=e.styleToClassName;return t}var tH={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)"}},Yh=function(t){var n=t.children,r=t.className,i=QW(),a=vr(i,1),o=a[0],s=Gh()(tH),u=JW();return!o&&j.createElement("button",{className:jh(s,(r||"")+""),onClick:u,type:"button"},n)};Yh.defaultProps={children:void 0,className:""},Yh.propTypes={children:rt.any,className:rt.string};var V_={exports:{}},nH=mt,rH=vn,q_=Yn.f;nH({target:"Object",stat:!0,forced:Object.defineProperty!==q_,sham:!rH},{defineProperty:q_});var iH=Yt,W_=iH.Object,aH=V_.exports=function(t,n,r){return W_.defineProperty(t,n,r)};W_.defineProperty.sham&&(aH.sham=!0);var oH=V_.exports,sH=oH,H_=sH,lH=H_,uH=lH,cH=uH,fH=cH,dH=fH;const pH=Ke(dH);var hH=cs,mH=hH.f("iterator"),vH=mH,yH=vH,gH=yH,bH=gH,xH=bH,wH=xH,SH=wH;const _H=Ke(SH);function ys(e){"@babel/helpers - typeof";return ys=typeof ja=="function"&&typeof _H=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ja=="function"&&t.constructor===ja&&t!==ja.prototype?"symbol":typeof t},ys(e)}var EH=cs,kH=EH.f("toPrimitive"),TH=kH,OH=TH,CH=OH,$H=CH,IH=$H,RH=IH,PH=RH;const AH=Ke(PH);function NH(e,t){if(ys(e)!="object"||!e)return e;var n=e[AH];if(n!==void 0){var r=n.call(e,t||"default");if(ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DH(e){var t=NH(e,"string");return ys(t)=="symbol"?t:t+""}function MH(e,t,n){return(t=DH(t))in e?pH(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jH(e){if(T1(e))return Mh(e)}function LH(e){if(typeof ja<"u"&&x_(e)!=null||e["@@iterator"]!=null)return I_(e)}function FH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
342
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(e){return jH(e)||LH(e)||R_(e)||FH()}var dc=function(e){return e&&e.Math==Math&&e},Tn=dc(typeof globalThis=="object"&&globalThis)||dc(typeof window=="object"&&window)||dc(typeof self=="object"&&self)||dc(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Jh={},Xn=function(e){try{return!!e()}catch{return!0}},BH=Xn,zi=!BH(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Z_={},K_={}.propertyIsEnumerable,G_=Object.getOwnPropertyDescriptor,UH=G_&&!K_.call({1:2},1);Z_.f=UH?function(t){var n=G_(this,t);return!!n&&n.enumerable}:K_;var Y_=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},zH={}.toString,Xh=function(e){return zH.call(e).slice(8,-1)},VH=Xn,qH=Xh,WH="".split,HH=VH(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return qH(e)=="String"?WH.call(e,""):Object(e)}:Object,pc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},ZH=HH,KH=pc,Qh=function(e){return ZH(KH(e))},jn=function(e){return typeof e=="function"},GH=jn,gs=function(e){return typeof e=="object"?e!==null:GH(e)},em=Tn,YH=jn,JH=function(e){return YH(e)?e:void 0},hc=function(e,t){return arguments.length<2?JH(em[e]):em[e]&&em[e][t]},XH=hc,QH=XH("navigator","userAgent")||"",J_=Tn,tm=QH,X_=J_.process,Q_=J_.Deno,eE=X_&&X_.versions||Q_&&Q_.version,tE=eE&&eE.v8,yr,mc;tE?(yr=tE.split("."),mc=yr[0]<4?1:yr[0]+yr[1]):tm&&(yr=tm.match(/Edge\/(\d+)/),(!yr||yr[1]>=74)&&(yr=tm.match(/Chrome\/(\d+)/),yr&&(mc=yr[1])));var e8=mc&&+mc,nE=e8,t8=Xn,rE=!!Object.getOwnPropertySymbols&&!t8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nE&&nE<41}),n8=rE,iE=n8&&!Symbol.sham&&typeof Symbol.iterator=="symbol",r8=jn,i8=hc,a8=iE,aE=a8?function(e){return typeof e=="symbol"}:function(e){var t=i8("Symbol");return r8(t)&&Object(e)instanceof t},o8=function(e){try{return String(e)}catch{return"Object"}},s8=jn,l8=o8,u8=function(e){if(s8(e))return e;throw TypeError(l8(e)+" is not a function")},c8=u8,oE=function(e,t){var n=e[t];return n==null?void 0:c8(n)},nm=jn,rm=gs,f8=function(e,t){var n,r;if(t==="string"&&nm(n=e.toString)&&!rm(r=n.call(e))||nm(n=e.valueOf)&&!rm(r=n.call(e))||t!=="string"&&nm(n=e.toString)&&!rm(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},sE={exports:{}},lE=Tn,im=function(e,t){try{Object.defineProperty(lE,e,{value:t,configurable:!0,writable:!0})}catch{lE[e]=t}return t},d8=Tn,p8=im,uE="__core-js_shared__",h8=d8[uE]||p8(uE,{}),am=h8,cE=am;(sE.exports=function(e,t){return cE[e]||(cE[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var om=sE.exports,m8=pc,fE=function(e){return Object(m8(e))},v8=fE,y8={}.hasOwnProperty,Vi=Object.hasOwn||function(t,n){return y8.call(v8(t),n)},g8=0,b8=Math.random(),dE=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++g8+b8).toString(36)},x8=Tn,w8=om,pE=Vi,S8=dE,hE=rE,_8=iE,bs=w8("wks"),xs=x8.Symbol,E8=_8?xs:xs&&xs.withoutSetter||S8,ws=function(e){return(!pE(bs,e)||!(hE||typeof bs[e]=="string"))&&(hE&&pE(xs,e)?bs[e]=xs[e]:bs[e]=E8("Symbol."+e)),bs[e]},mE=gs,vE=aE,k8=oE,T8=f8,O8=ws,C8=O8("toPrimitive"),$8=function(e,t){if(!mE(e)||vE(e))return e;var n=k8(e,C8),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!mE(r)||vE(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),T8(e,t)},I8=$8,R8=aE,yE=function(e){var t=I8(e,"string");return R8(t)?t:String(t)},P8=Tn,gE=gs,sm=P8.document,A8=gE(sm)&&gE(sm.createElement),bE=function(e){return A8?sm.createElement(e):{}},N8=zi,D8=Xn,M8=bE,xE=!N8&&!D8(function(){return Object.defineProperty(M8("div"),"a",{get:function(){return 7}}).a!=7}),j8=zi,L8=Z_,F8=Y_,B8=Qh,U8=yE,z8=Vi,V8=xE,wE=Object.getOwnPropertyDescriptor;Jh.f=j8?wE:function(t,n){if(t=B8(t),n=U8(n),V8)try{return wE(t,n)}catch{}if(z8(t,n))return F8(!L8.f.call(t,n),t[n])};var Ss={},q8=gs,pi=function(e){if(q8(e))return e;throw TypeError(String(e)+" is not an object")},W8=zi,H8=xE,SE=pi,Z8=yE,_E=Object.defineProperty;Ss.f=W8?_E:function(t,n,r){if(SE(t),n=Z8(n),SE(r),H8)try{return _E(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var K8=zi,G8=Ss,Y8=Y_,vc=K8?function(e,t,n){return G8.f(e,t,Y8(1,n))}:function(e,t,n){return e[t]=n,e},EE={exports:{}},J8=jn,lm=am,X8=Function.toString;J8(lm.inspectSource)||(lm.inspectSource=function(e){return X8.call(e)});var kE=lm.inspectSource,Q8=Tn,eZ=jn,tZ=kE,TE=Q8.WeakMap,nZ=eZ(TE)&&/native code/.test(tZ(TE)),rZ=om,iZ=dE,OE=rZ("keys"),CE=function(e){return OE[e]||(OE[e]=iZ(e))},um={},aZ=nZ,oZ=Tn,sZ=gs,lZ=vc,cm=Vi,fm=am,uZ=CE,cZ=um,$E="Object already initialized",fZ=oZ.WeakMap,yc,_s,gc,dZ=function(e){return gc(e)?_s(e):yc(e,{})},pZ=function(e){return function(t){var n;if(!sZ(t)||(n=_s(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(aZ||fm.state){var qi=fm.state||(fm.state=new fZ),hZ=qi.get,IE=qi.has,mZ=qi.set;yc=function(e,t){if(IE.call(qi,e))throw new TypeError($E);return t.facade=e,mZ.call(qi,e,t),t},_s=function(e){return hZ.call(qi,e)||{}},gc=function(e){return IE.call(qi,e)}}else{var La=uZ("state");cZ[La]=!0,yc=function(e,t){if(cm(e,La))throw new TypeError($E);return t.facade=e,lZ(e,La,t),t},_s=function(e){return cm(e,La)?e[La]:{}},gc=function(e){return cm(e,La)}}var RE={set:yc,get:_s,has:gc,enforce:dZ,getterFor:pZ},dm=zi,vZ=Vi,PE=Function.prototype,yZ=dm&&Object.getOwnPropertyDescriptor,pm=vZ(PE,"name"),gZ=pm&&(function(){}).name==="something",bZ=pm&&(!dm||dm&&yZ(PE,"name").configurable),hm={EXISTS:pm,PROPER:gZ,CONFIGURABLE:bZ},xZ=Tn,AE=jn,wZ=Vi,NE=vc,SZ=im,_Z=kE,DE=RE,EZ=hm.CONFIGURABLE,kZ=DE.get,TZ=DE.enforce,OZ=String(String).split("String");(EE.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(AE(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!wZ(n,"name")||EZ&&n.name!==s)&&NE(n,"name",s),u=TZ(n),u.source||(u.source=OZ.join(typeof s=="string"?s:""))),e===xZ){a?e[t]=n:SZ(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:NE(e,t,n)})(Function.prototype,"toString",function(){return AE(this)&&kZ(this).source||_Z(this)});var Es=EE.exports,ME={},CZ=Math.ceil,$Z=Math.floor,bc=function(e){var t=+e;return t!==t||t===0?0:(t>0?$Z:CZ)(t)},IZ=bc,RZ=Math.max,PZ=Math.min,AZ=function(e,t){var n=IZ(e);return n<0?RZ(n+t,0):PZ(n,t)},NZ=bc,DZ=Math.min,jE=function(e){return e>0?DZ(NZ(e),9007199254740991):0},MZ=jE,jZ=function(e){return MZ(e.length)},LZ=Qh,FZ=AZ,BZ=jZ,LE=function(e){return function(t,n,r){var i=LZ(t),a=BZ(i),o=FZ(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},UZ={includes:LE(!0),indexOf:LE(!1)},mm=Vi,zZ=Qh,VZ=UZ.indexOf,qZ=um,FE=function(e,t){var n=zZ(e),r=0,i=[],a;for(a in n)!mm(qZ,a)&&mm(n,a)&&i.push(a);for(;t.length>r;)mm(n,a=t[r++])&&(~VZ(i,a)||i.push(a));return i},vm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],WZ=FE,HZ=vm,ZZ=HZ.concat("length","prototype");ME.f=Object.getOwnPropertyNames||function(t){return WZ(t,ZZ)};var BE={};BE.f=Object.getOwnPropertySymbols;var KZ=hc,GZ=ME,YZ=BE,JZ=pi,XZ=KZ("Reflect","ownKeys")||function(t){var n=GZ.f(JZ(t)),r=YZ.f;return r?n.concat(r(t)):n},QZ=Vi,eK=XZ,tK=Jh,nK=Ss,rK=function(e,t){for(var n=eK(t),r=nK.f,i=tK.f,a=0;a<n.length;a++){var o=n[a];QZ(e,o)||r(e,o,i(t,o))}},iK=Xn,aK=jn,oK=/#|\.prototype\./,ks=function(e,t){var n=lK[sK(e)];return n==cK?!0:n==uK?!1:aK(t)?iK(t):!!t},sK=ks.normalize=function(e){return String(e).replace(oK,".").toLowerCase()},lK=ks.data={},uK=ks.NATIVE="N",cK=ks.POLYFILL="P",fK=ks,ym=Tn,dK=Jh.f,pK=vc,hK=Es,mK=im,vK=rK,yK=fK,gK=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=ym:i?o=ym[n]||mK(n,{}):o=(ym[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=dK(o,s),u=c&&c.value):u=o[s],a=yK(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;vK(l,u)}(e.sham||u&&u.sham)&&pK(l,"sham",!0),hK(o,s,l,e)}},bK=ws,xK=bK("toStringTag"),UE={};UE[xK]="z";var gm=String(UE)==="[object z]",wK=gm,SK=jn,xc=Xh,_K=ws,EK=_K("toStringTag"),kK=xc(function(){return arguments}())=="Arguments",TK=function(e,t){try{return e[t]}catch{}},zE=wK?xc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=TK(t=Object(e),EK))=="string"?n:kK?xc(t):(r=xc(t))=="Object"&&SK(t.callee)?"Arguments":r},OK=zE,wc=function(e){if(OK(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},CK=pi,VE=function(){var e=CK(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},bm={},qE=Xn,$K=Tn,WE=$K.RegExp;bm.UNSUPPORTED_Y=qE(function(){var e=WE("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),bm.BROKEN_CARET=qE(function(){var e=WE("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var IK=FE,RK=vm,PK=Object.keys||function(t){return IK(t,RK)},AK=zi,NK=Ss,DK=pi,MK=PK,jK=AK?Object.defineProperties:function(t,n){DK(t);for(var r=MK(n),i=r.length,a=0,o;i>a;)NK.f(t,o=r[a++],n[o]);return t},LK=hc,FK=LK("document","documentElement"),BK=pi,UK=jK,HE=vm,zK=um,VK=FK,qK=bE,WK=CE,ZE=">",KE="<",xm="prototype",wm="script",GE=WK("IE_PROTO"),Sm=function(){},YE=function(e){return KE+wm+ZE+e+KE+"/"+wm+ZE},JE=function(e){e.write(YE("")),e.close();var t=e.parentWindow.Object;return e=null,t},HK=function(){var e=qK("iframe"),t="java"+wm+":",n;return e.style.display="none",VK.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(YE("document.F=Object")),n.close(),n.F},Sc,_c=function(){try{Sc=new ActiveXObject("htmlfile")}catch{}_c=typeof document<"u"?document.domain&&Sc?JE(Sc):HK():JE(Sc);for(var e=HE.length;e--;)delete _c[xm][HE[e]];return _c()};zK[GE]=!0;var ZK=Object.create||function(t,n){var r;return t!==null?(Sm[xm]=BK(t),r=new Sm,Sm[xm]=null,r[GE]=t):r=_c(),n===void 0?r:UK(r,n)},KK=Xn,GK=Tn,YK=GK.RegExp,JK=KK(function(){var e=YK(".","s");return!(e.dotAll&&e.exec(`
343
- `)&&e.flags==="s")}),XK=Xn,QK=Tn,eG=QK.RegExp,tG=XK(function(){var e=eG("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),nG=wc,rG=VE,XE=bm,iG=om,aG=ZK,oG=RE.get,sG=JK,lG=tG,Ec=RegExp.prototype.exec,uG=iG("native-string-replace",String.prototype.replace),_m=Ec,Em=function(){var e=/a/,t=/b*/g;return Ec.call(e,"a"),Ec.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),QE=XE.UNSUPPORTED_Y||XE.BROKEN_CARET,km=/()??/.exec("")[1]!==void 0,cG=Em||km||QE||sG||lG;cG&&(_m=function(t){var n=this,r=oG(n),i=nG(t),a=r.raw,o,s,u,l,c,f,p;if(a)return a.lastIndex=n.lastIndex,o=_m.call(a,i),n.lastIndex=a.lastIndex,o;var d=r.groups,m=QE&&n.sticky,h=rG.call(n),y=n.source,v=0,g=i;if(m&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),g=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
344
- `)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",h)),km&&(s=new RegExp("^"+y+"$(?!\\s)",h)),Em&&(u=n.lastIndex),l=Ec.call(m?s:n,g),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:Em&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),km&&l&&l.length>1&&uG.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&d)for(l.groups=f=aG(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=l[p[1]];return l});var Tm=_m,fG=gK,ek=Tm;fG({target:"RegExp",proto:!0,forced:/./.exec!==ek},{exec:ek});var tk=Es,dG=Tm,nk=Xn,rk=ws,pG=vc,hG=rk("species"),Om=RegExp.prototype,mG=function(e,t,n,r){var i=rk(e),a=!nk(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!nk(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[hG]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,p,d){var m=c.exec;return m===dG||m===Om.exec?a&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:l.call(f,c,p)}:{done:!1}});tk(String.prototype,e,u[0]),tk(Om,i,u[1])}r&&pG(Om[i],"sham",!0)},vG=bc,yG=wc,gG=pc,ik=function(e){return function(t,n){var r=yG(gG(t)),i=vG(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},bG={codeAt:ik(!1),charAt:ik(!0)},xG=bG.charAt,wG=function(e,t,n){return t+(n?xG(e,t).length:1)},SG=fE,_G=Math.floor,EG="".replace,kG=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,TG=/\$([$&'`]|\d{1,2})/g,OG=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=TG;return i!==void 0&&(i=SG(i),u=kG),EG.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return l;if(p>s){var d=_G(p/10);return d===0?l:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},CG=pi,$G=jn,IG=Xh,RG=Tm,PG=function(e,t){var n=e.exec;if($G(n)){var r=n.call(e,t);return r!==null&&CG(r),r}if(IG(e)==="RegExp")return RG.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},AG=mG,NG=Xn,DG=pi,MG=jn,jG=bc,LG=jE,Fa=wc,FG=pc,BG=wG,UG=oE,zG=OG,VG=PG,qG=ws,Cm=qG("replace"),WG=Math.max,HG=Math.min,ZG=function(e){return e===void 0?e:String(e)},KG=function(){return"a".replace(/./,"$0")==="$0"}(),ak=function(){return/./[Cm]?/./[Cm]("a","$0")==="":!1}(),GG=!NG(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});AG("replace",function(e,t,n){var r=ak?"$":"$0";return[function(a,o){var s=FG(this),u=a==null?void 0:UG(a,Cm);return u?u.call(a,s,o):t.call(Fa(s),a,o)},function(i,a){var o=DG(this),s=Fa(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=MG(a);l||(a=Fa(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var p=[];;){var d=VG(o,s);if(d===null||(p.push(d),!c))break;var m=Fa(d[0]);m===""&&(o.lastIndex=BG(s,LG(o.lastIndex),f))}for(var h="",y=0,v=0;v<p.length;v++){d=p[v];for(var g=Fa(d[0]),b=WG(HG(jG(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(ZG(d[S]));var E=d.groups;if(l){var O=[g].concat(k,b,s);E!==void 0&&O.push(E);var L=Fa(a.apply(void 0,O))}else L=zG(g,s,b,k,E,a);b>=y&&(h+=s.slice(y,b)+L,y=b+g.length)}return h+s.slice(y)}]},!GG||!KG||ak);var Ts=Lt,YG=Cp,JG=ji,kc=function(e){return YG.slice(0,e.length)===e},XG=function(){return kc("Bun/")?"BUN":kc("Cloudflare-Workers")?"CLOUDFLARE":kc("Deno/")?"DENO":kc("Node.js/")?"NODE":Ts.Bun&&typeof Bun.version=="string"?"BUN":Ts.Deno&&typeof Deno.version=="object"?"DENO":JG(Ts.process)==="process"?"NODE":Ts.window&&Ts.document?"BROWSER":"REST"}(),QG=TypeError,eY=function(e,t){if(e<t)throw new QG("Not enough arguments");return e},ok=Lt,tY=bp,nY=nn,rY=XG,iY=Cp,aY=Gu,oY=eY,sY=ok.Function,lY=/MSIE .\./.test(iY)||rY==="BUN"&&function(){var e=ok.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),sk=function(e,t){var n=t?2:1;return lY?function(r,i){var a=oY(arguments.length,1)>n,o=nY(r)?r:sY(r),s=a?aY(arguments,n):[],u=a?function(){tY(o,this,s)}:o;return t?e(u,i):e(u)}:e},uY=mt,lk=Lt,cY=sk,uk=cY(lk.setInterval,!0);uY({global:!0,bind:!0,forced:lk.setInterval!==uk},{setInterval:uk});var fY=mt,ck=Lt,dY=sk,fk=dY(ck.setTimeout,!0);fY({global:!0,bind:!0,forced:ck.setTimeout!==fk},{setTimeout:fk});var pY=Yt,hY=pY.setInterval,mY=hY;const vY=Ke(mY);var yY=Ft,dk=function(e,t){var n=[][e];return!!n&&yY(function(){n.call(null,t||function(){return 1},1)})},gY=mt,bY=wp,xY=L1.indexOf,wY=dk,$m=bY([].indexOf),pk=!!$m&&1/$m([1],1,-0)<0,SY=pk||!wY("indexOf");gY({target:"Array",proto:!0,forced:SY},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return pk?$m(this,t,n)||0:xY(this,t,n)}});var _Y=Ui,EY=_Y("Array","indexOf"),kY=Lr,TY=EY,Im=Array.prototype,OY=function(e){var t=e.indexOf;return e===Im||kY(Im,e)&&t===Im.indexOf?TY:t},CY=OY,$Y=CY,IY=$Y;const RY=Ke(IY);var hk=Mu,PY=TypeError,AY=function(e,t){if(!delete e[t])throw new PY("Cannot delete property "+hk(t)+" of "+hk(e))},NY=mt,DY=Fr,MY=Jp,jY=Bu,LY=Li,FY=w_,BY=Wp,UY=Yp,zY=os,Rm=AY,VY=zu,qY=VY("splice"),WY=Math.max,HY=Math.min;NY({target:"Array",proto:!0,forced:!qY},{splice:function(t,n){var r=DY(this),i=LY(r),a=MY(t,i),o=arguments.length,s,u,l,c,f,p;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=HY(WY(jY(n),0),i-a)),BY(i+s-u),l=UY(r,u),c=0;c<u;c++)f=a+c,f in r&&zY(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,p=c+s,f in r?r[p]=r[f]:Rm(r,p);for(c=i;c>i-u+s;c--)Rm(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,p=c+s-1,f in r?r[p]=r[f]:Rm(r,p);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return FY(r,i-u+s),l}});var ZY=Ui,KY=ZY("Array","splice"),GY=Lr,YY=KY,Pm=Array.prototype,JY=function(e){var t=e.splice;return e===Pm||GY(Pm,e)&&t===Pm.splice?YY:t},XY=JY,QY=XY,eJ=QY;const tJ=Ke(eJ);var nJ=Ui,rJ=nJ("Array","concat"),iJ=Lr,aJ=rJ,Am=Array.prototype,oJ=function(e){var t=e.concat;return e===Am||iJ(Am,e)&&t===Am.concat?aJ:t},sJ=oJ,lJ=sJ,uJ=lJ;const _t=Ke(uJ);var cJ=mt,fJ=Rt,mk=Date,dJ=fJ(mk.prototype.getTime);cJ({target:"Date",stat:!0},{now:function(){return dJ(new mk)}});var pJ=Yt,hJ=pJ.Date.now,mJ=hJ,vJ=mJ,yJ=vJ;const hi=Ke(yJ);var gJ=uh.forEach,bJ=dk,xJ=bJ("forEach"),wJ=xJ?[].forEach:function(t){return gJ(this,t,arguments.length>1?arguments[1]:void 0)},SJ=mt,vk=wJ;SJ({target:"Array",proto:!0,forced:[].forEach!==vk},{forEach:vk});var _J=Ui,EJ=_J("Array","forEach"),kJ=EJ,TJ=kJ,OJ=ss,CJ=kn,$J=Lr,IJ=TJ,Nm=Array.prototype,RJ={DOMTokenList:!0,NodeList:!0},PJ=function(e){var t=e.forEach;return e===Nm||$J(Nm,e)&&t===Nm.forEach||CJ(RJ,OJ(e))?IJ:t},AJ=PJ;const Tc=Ke(AJ);var NJ=mt,DJ=Fr,yk=eh,MJ=Ft,jJ=MJ(function(){yk(1)});NJ({target:"Object",stat:!0,forced:jJ},{keys:function(t){return yk(DJ(t))}});var LJ=Yt,FJ=LJ.Object.keys,BJ=FJ,UJ=BJ,zJ=UJ;const VJ=Ke(zJ);var qJ=Yt,WJ=qJ.Object.getOwnPropertySymbols,HJ=WJ,ZJ=HJ,KJ=ZJ;const gk=Ke(KJ);var GJ=mt,YJ=uh.filter,JJ=zu,XJ=JJ("filter");GJ({target:"Array",proto:!0,forced:!XJ},{filter:function(t){return YJ(this,t,arguments.length>1?arguments[1]:void 0)}});var QJ=Ui,eX=QJ("Array","filter"),tX=Lr,nX=eX,Dm=Array.prototype,rX=function(e){var t=e.filter;return e===Dm||tX(Dm,e)&&t===Dm.filter?nX:t},iX=rX,aX=iX,oX=aX;const sX=Ke(oX);var bk={exports:{}},lX=mt,uX=Ft,cX=pr,xk=ts.f,wk=vn,fX=!wk||uX(function(){xk(1)});lX({target:"Object",stat:!0,forced:fX,sham:!wk},{getOwnPropertyDescriptor:function(t,n){return xk(cX(t),n)}});var dX=Yt,Sk=dX.Object,pX=bk.exports=function(t,n){return Sk.getOwnPropertyDescriptor(t,n)};Sk.getOwnPropertyDescriptor.sham&&(pX.sham=!0);var hX=bk.exports,mX=hX,vX=mX,yX=vX;const _k=Ke(yX);var gX=hr,bX=Rt,xX=Ku,wX=Yu,SX=ci,_X=bX([].concat),EX=gX("Reflect","ownKeys")||function(t){var n=xX.f(SX(t)),r=wX.f;return r?_X(n,r(t)):n},kX=mt,TX=vn,OX=EX,CX=pr,$X=ts,IX=os;kX({target:"Object",stat:!0,sham:!TX},{getOwnPropertyDescriptors:function(t){for(var n=CX(t),r=$X.f,i=OX(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&IX(a,s,u);return a}});var RX=Yt,PX=RX.Object.getOwnPropertyDescriptors,AX=PX,NX=AX,DX=NX;const Ek=Ke(DX);var kk={exports:{}},MX=mt,jX=vn,Tk=Vu.f;MX({target:"Object",stat:!0,forced:Object.defineProperties!==Tk,sham:!jX},{defineProperties:Tk});var LX=Yt,Ok=LX.Object,FX=kk.exports=function(t,n){return Ok.defineProperties(t,n)};Ok.defineProperties.sham&&(FX.sham=!0);var BX=kk.exports,UX=BX,zX=UX,VX=zX;const qX=Ke(VX);var WX=H_;const HX=Ke(WX);var ZX=!1;function KX(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 GX(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 YX=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!ZX:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(GX(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=KX(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),rn="-ms-",Oc="-moz-",ot="-webkit-",Ck="comm",Mm="rule",jm="decl",JX="@import",$k="@keyframes",XX="@layer",QX=Math.abs,Cc=String.fromCharCode,eQ=Object.assign;function tQ(e,t){return Jt(e,0)^45?(((t<<2^Jt(e,0))<<2^Jt(e,1))<<2^Jt(e,2))<<2^Jt(e,3):0}function Ik(e){return e.trim()}function nQ(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function Lm(e,t){return e.indexOf(t)}function Jt(e,t){return e.charCodeAt(t)|0}function Os(e,t,n){return e.slice(t,n)}function gr(e){return e.length}function Fm(e){return e.length}function $c(e,t){return t.push(e),e}function rQ(e,t){return e.map(t).join("")}var Ic=1,Ba=1,Rk=0,gn=0,Pt=0,Ua="";function Rc(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Ic,column:Ba,length:o,return:""}}function Cs(e,t){return eQ(Rc("",null,null,"",null,null,0),e,{length:-e.length},t)}function iQ(){return Pt}function aQ(){return Pt=gn>0?Jt(Ua,--gn):0,Ba--,Pt===10&&(Ba=1,Ic--),Pt}function On(){return Pt=gn<Rk?Jt(Ua,gn++):0,Ba++,Pt===10&&(Ba=1,Ic++),Pt}function br(){return Jt(Ua,gn)}function Pc(){return gn}function $s(e,t){return Os(Ua,e,t)}function Is(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 Pk(e){return Ic=Ba=1,Rk=gr(Ua=e),gn=0,[]}function Ak(e){return Ua="",e}function Ac(e){return Ik($s(gn-1,Bm(e===91?e+2:e===40?e+1:e)))}function oQ(e){for(;(Pt=br())&&Pt<33;)On();return Is(e)>2||Is(Pt)>3?"":" "}function sQ(e,t){for(;--t&&On()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return $s(e,Pc()+(t<6&&br()==32&&On()==32))}function Bm(e){for(;On();)switch(Pt){case e:return gn;case 34:case 39:e!==34&&e!==39&&Bm(Pt);break;case 40:e===41&&Bm(e);break;case 92:On();break}return gn}function lQ(e,t){for(;On()&&e+Pt!==57;)if(e+Pt===84&&br()===47)break;return"/*"+$s(t,gn-1)+"*"+Cc(e===47?e:On())}function uQ(e){for(;!Is(br());)On();return $s(e,gn)}function cQ(e){return Ak(Nc("",null,null,null,[""],e=Pk(e),0,[0],e))}function Nc(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,p=0,d=0,m=0,h=1,y=1,v=1,g=0,b="",k=i,S=a,E=r,O=b;y;)switch(m=g,g=On()){case 40:if(m!=108&&Jt(O,f-1)==58){Lm(O+=st(Ac(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Ac(g);break;case 9:case 10:case 13:case 32:O+=oQ(m);break;case 92:O+=sQ(Pc()-1,7);continue;case 47:switch(br()){case 42:case 47:$c(fQ(lQ(On(),Pc()),t,n),u);break;default:O+="/"}break;case 123*h:s[l++]=gr(O)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:v==-1&&(O=st(O,/\f/g,"")),d>0&&gr(O)-f&&$c(d>32?Dk(O+";",r,n,f-1):Dk(st(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if($c(E=Nk(O,t,n,l,c,i,s,b,k=[],S=[],f),a),g===123)if(c===0)Nc(O,t,E,E,k,a,f,s,S);else switch(p===99&&Jt(O,3)===110?100:p){case 100:case 108:case 109:case 115:Nc(e,E,E,r&&$c(Nk(e,E,E,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Nc(O,E,E,E,[""],S,0,s,S)}}l=c=d=0,h=v=1,b=O="",f=o;break;case 58:f=1+gr(O),d=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&aQ()==125)continue}switch(O+=Cc(g),g*h){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[l++]=(gr(O)-1)*v,v=1;break;case 64:br()===45&&(O+=Ac(On())),p=br(),c=f=gr(b=O+=uQ(Pc())),g++;break;case 45:m===45&&gr(O)==2&&(h=0)}}return a}function Nk(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,p=i===0?a:[""],d=Fm(p),m=0,h=0,y=0;m<r;++m)for(var v=0,g=Os(e,f+1,f=QX(h=o[m])),b=e;v<d;++v)(b=Ik(h>0?p[v]+" "+g:st(g,/&\f/g,p[v])))&&(u[y++]=b);return Rc(e,t,n,i===0?Mm:s,u,l,c)}function fQ(e,t,n){return Rc(e,t,n,Ck,Cc(iQ()),Os(e,2,-2),0)}function Dk(e,t,n,r){return Rc(e,t,n,jm,Os(e,0,r),Os(e,r+1,-1),r)}function za(e,t){for(var n="",r=Fm(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function dQ(e,t,n,r){switch(e.type){case XX:if(e.children.length)break;case JX:case jm:return e.return=e.return||e.value;case Ck:return"";case $k:return e.return=e.value+"{"+za(e.children,r)+"}";case Mm:e.value=e.props.join(",")}return gr(n=za(e.children,r))?e.return=e.value+"{"+n+"}":""}function pQ(e){var t=Fm(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function hQ(e){return function(t){t.root||(t=t.return)&&e(t)}}function mQ(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var vQ=function(t,n,r){for(var i=0,a=0;i=a,a=br(),i===38&&a===12&&(n[r]=1),!Is(a);)On();return $s(t,gn)},yQ=function(t,n){var r=-1,i=44;do switch(Is(i)){case 0:i===38&&br()===12&&(n[r]=1),t[r]+=vQ(gn-1,n,r);break;case 2:t[r]+=Ac(i);break;case 4:if(i===44){t[++r]=br()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Cc(i)}while(i=On());return t},gQ=function(t,n){return Ak(yQ(Pk(t),n))},Mk=new WeakMap,bQ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Mk.get(r))&&!i){Mk.set(t,!0);for(var a=[],o=gQ(n,a),s=r.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]}}},xQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function jk(e,t){switch(tQ(e,t)){case 5103:return ot+"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 ot+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ot+e+Oc+e+rn+e+e;case 6828:case 4268:return ot+e+rn+e+e;case 6165:return ot+e+rn+"flex-"+e+e;case 5187:return ot+e+st(e,/(\w+).+(:[^]+)/,ot+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return ot+e+rn+"flex-item-"+st(e,/flex-|-self/,"")+e;case 4675:return ot+e+rn+"flex-line-pack"+st(e,/align-content|flex-|-self/,"")+e;case 5548:return ot+e+rn+st(e,"shrink","negative")+e;case 5292:return ot+e+rn+st(e,"basis","preferred-size")+e;case 6060:return ot+"box-"+st(e,"-grow","")+ot+e+rn+st(e,"grow","positive")+e;case 4554:return ot+st(e,/([^-])(transform)/g,"$1"+ot+"$2")+e;case 6187:return st(st(st(e,/(zoom-|grab)/,ot+"$1"),/(image-set)/,ot+"$1"),e,"")+e;case 5495:case 3959:return st(e,/(image-set\([^]*)/,ot+"$1$`$1");case 4968:return st(st(e,/(.+:)(flex-)?(.*)/,ot+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ot+e+e;case 4095:case 3583:case 4068:case 2532:return st(e,/(.+)-inline(.+)/,ot+"$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(gr(e)-1-t>6)switch(Jt(e,t+1)){case 109:if(Jt(e,t+4)!==45)break;case 102:return st(e,/(.+:)(.+)-([^]+)/,"$1"+ot+"$2-$3$1"+Oc+(Jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Lm(e,"stretch")?jk(st(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jt(e,t+1)!==115)break;case 6444:switch(Jt(e,gr(e)-3-(~Lm(e,"!important")&&10))){case 107:return st(e,":",":"+ot)+e;case 101:return st(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ot+(Jt(e,14)===45?"inline-":"")+"box$3$1"+ot+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(Jt(e,t+11)){case 114:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ot+e+rn+e+e}return e}var wQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case jm:t.return=jk(t.value,t.length);break;case $k:return za([Cs(t,{value:st(t.value,"@","@"+ot)})],i);case Mm:if(t.length)return rQ(t.props,function(a){switch(nQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return za([Cs(t,{props:[st(a,/:(read-\w+)/,":"+Oc+"$1")]})],i);case"::placeholder":return za([Cs(t,{props:[st(a,/:(plac\w+)/,":"+ot+"input-$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,":"+Oc+"$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,rn+"input-$1")]})],i)}return""})}},SQ=[wQ],_Q=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||SQ,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var u,l=[bQ,xQ];{var c,f=[dQ,hQ(function(h){c.insert(h)})],p=pQ(l.concat(i,f)),d=function(y){return za(cQ(y),p)};u=function(y,v,g,b){c=g,d(y?y+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new YX({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return m.sheet.hydrate(s),m};function EQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kQ={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},TQ=!1,OQ=/[A-Z]|^ms/g,CQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Lk=function(t){return t.charCodeAt(1)===45},Fk=function(t){return t!=null&&typeof t!="boolean"},Um=mQ(function(e){return Lk(e)?e:e.replace(OQ,"-$&").toLowerCase()}),Bk=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(CQ,function(r,i,a){return mi={name:i,styles:a,next:mi},i})}return kQ[t]!==1&&!Lk(t)&&typeof n=="number"&&n!==0?n+"px":n},$Q="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Dc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return mi={name:i.name,styles:i.styles,next:mi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)mi={name:o.name,styles:o.styles,next:mi},o=o.next;var s=a.styles+";";return s}return IQ(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function IQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Dc(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":Fk(s)&&(r+=Um(a)+":"+Bk(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&TQ)throw new Error($Q);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)Fk(o[u])&&(r+=Um(a)+":"+Bk(a,o[u])+";");else{var l=Dc(e,t,o);switch(a){case"animation":case"animationName":{r+=Um(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var Uk=/label:\s*([^\s;{]+)\s*(;|$)/g,mi;function zm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";mi=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Dc(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Dc(n,t,e[s]),r){var u=a;i+=u[s]}Uk.lastIndex=0;for(var l="",c;(c=Uk.exec(i))!==null;)l+="-"+c[1];var f=EQ(i)+l;return{name:f,styles:i,next:mi}}function zk(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var RQ=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},PQ=function(t,n,r){RQ(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function Vk(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function qk(e,t,n){var r=[],i=zk(e,r,n);return r.length<2?n:i+t(r)}var AQ=function(t){var n=_Q(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=zm(l,n.registered,void 0);return PQ(n,f),n.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=zm(l,n.registered),p="animation-"+f.name;return Vk(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=zm(l,n.registered);Vk(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return qk(n.registered,r,NQ(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:zk.bind(null,n.registered),merge:qk.bind(null,n.registered,r)}},NQ=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},DQ=Es,Vm=Date.prototype,Wk="Invalid Date",Hk="toString",MQ=Vm[Hk],jQ=Vm.getTime;String(new Date(NaN))!=Wk&&DQ(Vm,Hk,function(){var t=jQ.call(this);return t===t?MQ.call(this):Wk});var LQ=gm,FQ=zE,BQ=LQ?{}.toString:function(){return"[object "+FQ(this)+"]"},UQ=gm,zQ=Es,VQ=BQ;UQ||zQ(Object.prototype,"toString",VQ,{unsafe:!0});var qQ=hm.PROPER,WQ=Es,HQ=pi,Zk=wc,ZQ=Xn,KQ=VE,qm="toString",Kk=RegExp.prototype,Gk=Kk[qm],GQ=ZQ(function(){return Gk.call({source:"a",flags:"b"})!="/a/b"}),YQ=qQ&&Gk.name!=qm;(GQ||YQ)&&WQ(RegExp.prototype,qm,function(){var t=HQ(this),n=Zk(t.source),r=t.flags,i=Zk(r===void 0&&t instanceof RegExp&&!("flags"in Kk)?KQ.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var Yk=typeof window<"u"?window:self,JQ=Yk.crypto||Yk.msCrypto,XQ=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(JQ);const QQ=Ke(XQ);function eee(){return QQ().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var tee=k1;const Jk=Ke(tee);function dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function Xk(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return _t(n=[_t(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Qe(dt("green","white")),a)}function nee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=vr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=Jk(a[0])?a:[a],f=c.length===1;Tc(c).call(c,function(p,d){if(f){var m,h;(m=console).log.apply(m,Qe(Xk.apply(void 0,_t(h=[e]).call(h,Qe(p)))))}else if(d){var y;(y=console).log.apply(y,Qe(Jk(p)?p:[p]))}else{var v,g;(v=console).groupCollapsed.apply(v,Qe(Xk.apply(void 0,_t(g=[e]).call(g,Qe(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var ree=zi,iee=hm.EXISTS,aee=Ss.f,Qk=Function.prototype,oee=Qk.toString,see=/^\s*function ([^ (]*)/,lee="name";ree&&!iee&&aee(Qk,lee,{configurable:!0,get:function(){try{return oee.call(this).match(see)[1]}catch{return""}}});var uee=Yt,cee=uee.setTimeout,fee=cee;const dee=Ke(fee);function pee(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=hi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=dee(function(){e.apply(void 0,a),n=hi()},Math.max(0,t-s+n)))}}var eT=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return pee(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=j.useCallback(function(l){l.timeStampLow=hi(),s(l)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};eT.defaultProps={debounce:200};var hee=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},mee=mt,vee=hee;mee({target:"Math",stat:!0},{sign:vee});var yee=Yt,gee=yee.Math.sign,bee=gee,xee=bee,wee=xee;const See=Ke(wee);function _ee(e,t){var n=See(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function Eee(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var tT=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(l,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:hi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=Eee(c,m,_ee,(hi()-d)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,c,f,p+1,d)}}))},[o,r,i]),u=j.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return j.useLayoutEffect(function(){return s(n,i[n],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,n,i,a]),!1};tT.propTypes={name:rt.string.isRequired,onEnd:rt.func,target:rt.any.isRequired,value:rt.oneOfType([rt.number,rt.oneOf(["100%"])]).isRequired};function Wm(e){var t=j.useState(e),n=vr(t,2),r=n[0],i=n[1],a=j.useRef(),o=j.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=r,[r,i,a]}function nT(e,t){var n=VJ(e);if(gk){var r=gk(e);t&&(r=sX(r).call(r,function(i){return _k(e,i).enumerable})),n.push.apply(n,r)}return n}function rT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Tc(r=nT(Object(n),!0)).call(r,function(a){MH(e,a,n[a])})}else if(Ek)qX(e,Ek(n));else{var i;Tc(i=nT(Object(n))).call(i,function(a){HX(e,a,_k(n,a))})}}return e}var kee=function(){return 1/0},iT=17,Tee="bottom",Qn="top",aT=1,Oee=34,oT={};function Cee(e,t){return e(),vY(e,t)}function sT(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<aT,s=a<aT,u=t===Qn?s:o,l=t!==Qn?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function Rs(e,t){return e===(t===Qn?0:"100%")}var Hm=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=j.useMemo(function(){return nee("<ScrollToBottom>",{force:a})},[a]);s=s===Qn?Qn:Tee;var f=j.useRef(0),p=j.useRef(o),d=Wm(s===Qn?0:"100%"),m=vr(d,3),h=m[0],y=m[1],v=m[2],g=Wm(null),b=vr(g,3),k=b[0],S=b[1],E=b[2],O=j.useRef(0),L=j.useRef(0),D=j.useRef(0),T=j.useState(!0),P=vr(T,2),q=P[0],$=P[1],F=j.useState(!0),M=vr(F,2),B=M[0],W=M[1],U=j.useState(!0),N=vr(U,2),x=N[0],V=N[1],K=j.useState(!1),_=vr(K,2),Y=_[0],oe=_[1],ne=Wm(!0),le=vr(ne,3),pe=le[0],he=le[1],ue=le[2],Q=j.useRef([]),Z=j.useCallback(function(A){var X=E.current;return Q.current.push(A),X&&A({scrollTop:X.scrollTop}),function(){var ce=Q.current,Ee=RY(ce).call(ce,A);~Ee&&tJ(ce).call(ce,Ee,1)}},[Q,E]),de=j.useCallback(function(){var A=v.current;c(function(){var X;return _t(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,Qe(dt("magenta")),Qe(dt("orange")),[{animateTo:A}])}),f.current=hi(),Rs(A,s)||he(!1),y(null)},[v,c,f,s,y,he]),ve=j.useCallback(function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,Ee=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[_t(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof A=="number"?A+"px":A.replace(/%/g,"%%"),"%c")]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),{behavior:ce,nextAnimateTo:A,target:Ee}]}),ce==="auto"?(de(),Ee&&(Ee.scrollTop=A==="100%"?Ee.scrollHeight-Ee.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.'),y(A)),Rs(A,s)&&(c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),[{mode:s,nextAnimateTo:A}]]}),he(!0))},[c,de,s,y,he,E]),$e=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToBottom%c: Called"]).call(ce,Qe(dt("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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToTop%c: Called"]).call(ce,Qe(dt("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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToEnd%c: Called"]).call(Ee,Qe(dt("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===Qn?R(ce):$e(ce)},[c,s,$e,R]),ae=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToStart%c: Called"]).call(Ee,Qe(dt("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===Qn?$e(ce):R(ce)},[c,s,$e,R]),ee=j.useCallback(function(){var A=E.current;if(A){if(p.current==="auto"){c(function(){var Ct;return _t(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,Qe(dt("blue")))}),A.scrollTop=s===Qn?0:A.scrollHeight-A.offsetHeight,p.current=!1;return}var X=O.current,ce=A.offsetHeight,Ee=A.scrollHeight,Oe=A.scrollTop,Je=s===Qn?0:Math.max(0,Ee-ce-Oe),lt=Math.max(0,X-Oe),Ut=l({maxValue:Je,minValue:lt,offsetHeight:ce,scrollHeight:Ee,scrollTop:Oe}),Ot=Math.max(0,Math.min(Je,Ut)),Ze;s===Qn||Ot!==Je?Ze=Oe+Ot:Ze="100%",c(function(){var Ct,tt,xn;return[_t(Ct=[_t(tt=_t(xn="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(xn,typeof Ze=="number"?Ze+"px":Ze.replace(/%/g,"%%"),"%c (%c")).call(tt,(Ze==="100%"?Je:Ze)+X,"px%c)")]).call(Ct,Qe(dt("orange")),Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple"))),{animateFrom:X,maxValue:Je,minValue:lt,nextAnimateTo:Ze,nextValue:Ot,offsetHeight:ce,rawNextValue:Ut,scrollHeight:Ee,scrollTop:Oe}]}),ve(Ze,{behavior:"smooth"})}},[O,c,s,l,ve,E]),ke=j.useCallback(function(A){var X,ce=A.timeStampLow,Ee=v.current,Oe=E.current,Je=Ee!==null;if(!(ce<=f.current||!Oe)){var lt=sT({mode:s,target:Oe}),Ut=lt.atBottom,Ot=lt.atEnd,Ze=lt.atStart,Ct=lt.atTop;$(Ut),W(Ot),oe(Ze),V(Ct);var tt=Oe.offsetHeight,xn=Oe.scrollHeight,$n=L.current,rr=D.current,Wr=tt!==$n,$r=xn!==rr;if(Wr&&(L.current=tt),$r&&(D.current=xn),!Wr&&!$r){var ir=Je&&Rs(Ee,s)||Ot;ue.current!==ir&&(c(function(){var pt,wt,zt,Vt;return[_t(pt=["%conScroll%c: %csetSticky%c(%c".concat(ir,"%c)")]).call(pt,Qe(dt("red")),Qe(dt("red")),Qe(dt("purple"))),_t(wt=[_t(zt=_t(Vt="(animating = %c".concat(Je,"%c && isEnd = %c")).call(Vt,Rs(Ee,s),"%c) || atEnd = %c")).call(zt,Ot,"%c")]).call(wt,Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple")),[{animating:Je,animateTo:Ee,atEnd:Ot,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:ir}])]}),he(ir))}else ue.current&&(c(function(){var pt;return[_t(pt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(pt,Qe(dt("red")),Qe(dt("orange")),[{offsetHeightChanged:Wr,scrollHeightChanged:$r}]),{nextOffsetHeight:tt,prevOffsetHeight:$n,nextScrollHeight:xn,prevScrollHeight:rr}]}),ee());var Hr=Oe.scrollTop;Tc(X=Q.current).call(X,function(pt){return pt({scrollTop:Hr})})}},[v,c,f,s,L,D,Q,ee,$,W,oe,V,he,ue,E]);j.useEffect(function(){if(k){var A=!1,X=Cee(function(){var ce=E.current,Ee=v.current!==null;ue.current?sT({mode:s,target:ce}).atEnd?A=!1:A?hi()-A>Oee&&(Ee||(O.current=ce.scrollTop,c(function(){var Oe;return _t(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,Qe(dt("navy")),Qe(dt("orange")))}),ee()),A=!1):A=hi():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[_t(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,Qe(dt("navy")),Qe(dt("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(iT,n)||iT);return function(){return clearInterval(X)}}},[v,n,c,s,ee,he,ue,k,E]);var we=j.useMemo(function(){var A=oT[u]||(oT[u]=AQ({key:"react-scroll-to-bottom--css-"+eee(),nonce:u}));return function(X){return A.css(X)+""}},[u]),Re=j.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:we}},[Z,S,we]),We=j.useMemo(function(){return{atBottom:q,atEnd:B,atStart:Y,atTop:x,mode:s}},[q,B,Y,x,s]),Ae=j.useMemo(function(){var A=h!==null;return{animating:A,animatingToEnd:A&&Rs(h,s),sticky:pe}},[h,s,pe]),Fe=j.useMemo(function(){return rT(rT({},We),Ae)},[We,Ae]),z=j.useMemo(function(){return{scrollTo:ve,scrollToBottom:$e,scrollToEnd:J,scrollToStart:ae,scrollToTop:R}},[ve,$e,J,ae,R]);return j.useEffect(function(){if(k){var A=function(){D.current=k.scrollHeight};return k.addEventListener("focus",A,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",A)}}},[k]),c(function(){var A;return[_t(A=["%cRender%c: Render"]).call(A,Qe(dt("cyan",""))),{animateTo:h,animating:h!==null,sticky:pe,target:k}]}),j.createElement(fc.Provider,{value:Re},j.createElement(Wh.Provider,{value:z},j.createElement(Kh.Provider,{value:Fe},j.createElement(Hh.Provider,{value:We},j.createElement(Zh.Provider,{value:Ae},r,k&&j.createElement(eT,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&h!==null&&j.createElement(tT,{name:"scrollTop",onEnd:de,target:k,value:h}))))))};Hm.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:kee},Hm.propTypes={checkInterval:rt.number,children:rt.any,debounce:rt.number,debug:rt.bool,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func};var $ee={height:"100%",overflowY:"auto",width:"100%"},Zm=function(t){var n=t.children,r=t.className,i=j.useContext(fc),a=i.setTarget,o=Gh()($ee);return j.createElement("div",{className:jh(o,(r||"")+""),ref:a},n)};Zm.defaultProps={children:void 0,className:void 0},Zm.propTypes={children:rt.any,className:rt.string};var Iee={position:"relative"},Km=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=Gh()(Iee);return j.createElement("div",{className:jh(o,(r||"")+"")},j.createElement(Zm,{className:(a||"")+""},n),j.createElement(Yh,{className:(i||"")+""}))};Km.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Km.propTypes={children:rt.any,className:rt.string,followButtonClassName:rt.string,scrollViewClassName:rt.string};var Gm=function(t){var n=t.checkInterval,r=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,p=t.scrollViewClassName;return j.createElement(Hm,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},j.createElement(Km,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};Gm.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},Gm.propTypes={checkInterval:rt.number,children:rt.any,className:rt.string,debounce:rt.number,debug:rt.bool,followButtonClassName:rt.string,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func,scrollViewClassName:rt.string},NB();let lT=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Ym=j.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=yt,p=j.useMemo(()=>JC(t),[t]);return I.jsxs(Gm,{...c,className:Jl(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&I.jsx("span",{...f.headerMessage,children:r}),l&&I.jsx(PB,{botAvatar:a,botDescription:o,botName:s}),p.map(d=>I.jsx(gp,{renderers:i,sendMessage:u,...d},d.id)),n&&I.jsx(gp,{id:lT(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:I.jsx(V0,{})})]})});Ym.displayName="MessageList";const Ree=({className:e,...t})=>{const{className:n}=yt.loader;return I.jsx("div",{...t,className:Jl(e,n)})},Pee=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:p})=>{const{color:d,fontFamily:m,radius:h,themeMode:y,variant:v,botAvatar:g,botDescription:b,botName:k}=t,S={color:d,fontFamily:m,radius:h,themeMode:y,variant:v},E=j.useMemo(()=>i.map(O=>{const{authorId:L}=O,D=L===a.id?"outgoing":"incoming";return{...O,direction:D,sender:D==="outgoing"?{name:a.name??"You",avatar:a.pictureUrl}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i,a.id,a.name,a.pictureUrl]);return I.jsxs(I.Fragment,{children:[I.jsx(Hw,{...S}),I.jsxs(pp,{connected:e,children:[I.jsx(z0,{closeWindow:n,configuration:t,restartConversation:p}),u?I.jsx(Ree,{}):I.jsx(I.Fragment,{children:I.jsx(Ym,{botAvatar:g,botDescription:b,botName:k,renderers:l,isTyping:r,sendMessage:o,messages:E})}),I.jsx(qw,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f})]})]})},uT=["audio","file","image","video"],Jm=e=>uT.includes(e);function cT(e,t){return function(){return e.apply(t,arguments)}}const{toString:fT}=Object.prototype,{getPrototypeOf:Xm}=Object,Qm=(e=>t=>{const n=fT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Qm(t)===e),Mc=e=>t=>typeof t===e,{isArray:Va}=Array,Ps=Mc("undefined");function Aee(e){return e!==null&&!Ps(e)&&e.constructor!==null&&!Ps(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dT=zr("ArrayBuffer");function Nee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dT(e.buffer),t}const Dee=Mc("string"),Wi=Mc("function"),pT=Mc("number"),ev=e=>e!==null&&typeof e=="object",Mee=e=>e===!0||e===!1,jc=e=>{if(Qm(e)!=="object")return!1;const t=Xm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jee=zr("Date"),Lee=zr("File"),Fee=zr("Blob"),Bee=zr("FileList"),Uee=e=>ev(e)&&Wi(e.pipe),zee=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||fT.call(e)===t||Wi(e.toString)&&e.toString()===t)},Vee=zr("URLSearchParams"),qee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Va(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function hT(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const mT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vT=e=>!Ps(e)&&e!==mT;function tv(){const{caseless:e}=vT(this)&&this||{},t={},n=(r,i)=>{const a=e&&hT(t,i)||i;jc(t[a])&&jc(r)?t[a]=tv(t[a],r):jc(r)?t[a]=tv({},r):Va(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&As(arguments[r],n);return t}const Wee=(e,t,n,{allOwnKeys:r}={})=>(As(t,(i,a)=>{n&&Wi(i)?e[a]=cT(i,n):e[a]=i},{allOwnKeys:r}),e),Hee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zee=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Kee=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Xm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Yee=e=>{if(!e)return null;if(Va(e))return e;let t=e.length;if(!pT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jee=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xm(Uint8Array)),Xee=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Qee=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ete=zr("HTMLFormElement"),tte=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),yT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nte=zr("RegExp"),gT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};As(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:Va,isArrayBuffer:dT,isBuffer:Aee,isFormData:zee,isArrayBufferView:Nee,isString:Dee,isNumber:pT,isBoolean:Mee,isObject:ev,isPlainObject:jc,isUndefined:Ps,isDate:jee,isFile:Lee,isBlob:Fee,isRegExp:nte,isFunction:Wi,isStream:Uee,isURLSearchParams:Vee,isTypedArray:Jee,isFileList:Bee,forEach:As,merge:tv,extend:Wee,trim:qee,stripBOM:Hee,inherits:Zee,toFlatObject:Kee,kindOf:Qm,kindOfTest:zr,endsWith:Gee,toArray:Yee,forEachEntry:Xee,matchAll:Qee,isHTMLForm:ete,hasOwnProperty:yT,hasOwnProp:yT,reduceDescriptors:gT,freezeMethods:e=>{gT(e,(t,n)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Va(e)?r(e):r(String(e).split(t)),n},toCamelCase:tte,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:hT,global:mT,isContextDefined:vT,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(ev(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=Va(r)?[]:{};return As(r,(o,s)=>{const u=n(o,i+1);!Ps(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}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 bT=it.prototype,xT={};["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=>{xT[e]={value:e}}),Object.defineProperties(it,xT),Object.defineProperty(bT,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(bT);return G.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var rte=typeof self=="object"?self.FormData:window.FormData;const ite=Ke(rte);function nv(e){return G.isPlainObject(e)||G.isArray(e)}function wT(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ST(e,t,n){return e?e.concat(t).map(function(i,a){return i=wT(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function ate(e){return G.isArray(e)&&!e.some(nv)}const ote=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function ste(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Lc(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(ite||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!G.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&ste(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(G.isDate(m))return m.toISOString();if(!u&&G.isBlob(m))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(m)||G.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(G.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(G.isArray(m)&&ate(m)||G.isFileList(m)||G.endsWith(h,"[]")&&(v=G.toArray(m)))return h=wT(h),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?ST([h],k,a):o===null?h:h+"[]",l(b))}),!1}return nv(m)?!0:(t.append(ST(y,h,a),l(m)),!1)}const f=[],p=Object.assign(ote,{defaultVisitor:c,convertValue:l,isVisitable:nv});function d(m,h){if(!G.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),G.forEach(m,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,h,p))===!0&&d(v,h?h.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return d(e),t}function _T(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function rv(e,t){this._pairs=[],e&&Lc(e,this,t)}const ET=rv.prototype;ET.append=function(t,n){this._pairs.push([t,n])},ET.toString=function(t){const n=t?function(r){return t.call(this,r,_T)}:_T;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function lte(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kT(e,t,n){if(!t)return e;const r=n&&n.encode||lte,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new rv(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class TT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const OT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ute=typeof URLSearchParams<"u"?URLSearchParams:rv,cte=FormData,fte=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),dte=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xr={isBrowser:!0,classes:{URLSearchParams:ute,FormData:cte,Blob},isStandardBrowserEnv:fte,isStandardBrowserWebWorkerEnv:dte,protocols:["http","https","file","blob","url","data"]};function pte(e,t){return Lc(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return xr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function hte(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mte(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function CT(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,u?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=mte(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(hte(r),i,n,0)}),n}return null}const vte={"Content-Type":void 0};function yte(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qa={transitional:OT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.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(CT(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return pte(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Lc(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),yte(t)):t}],transformResponse:[function(t){const n=this.transitional||qa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?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:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){qa.headers[t]={}}),G.forEach(["post","put","patch"],function(t){qa.headers[t]=G.merge(vte)});const gte=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"]),bte=e=>{const t={};let n,r,i;return e&&e.split(`
345
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&gte[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$T=Symbol("internals");function Ns(e){return e&&String(e).trim().toLowerCase()}function Fc(e){return e===!1||e==null?e:G.isArray(e)?e.map(Fc):String(e)}function xte(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function wte(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function IT(e,t,n,r){if(G.isFunction(r))return r.call(this,t,n);if(G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function Ste(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function _te(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Ln{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,u,l){const c=Ns(u);if(!c)throw new Error("header name must be a non-empty string");const f=G.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Fc(s))}const o=(s,u)=>G.forEach(s,(l,c)=>a(l,c,u));return G.isPlainObject(t)||t instanceof this.constructor?o(t,n):G.isString(t)&&(t=t.trim())&&!wte(t)?o(bte(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return xte(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);return!!(r&&(!n||IT(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Ns(o),o){const s=G.findKey(r,o);s&&(!n||IT(r,r[s],s,n))&&(delete r[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 n=this,r={};return G.forEach(this,(i,a)=>{const o=G.findKey(r,a);if(o){n[o]=Fc(i),delete n[a];return}const s=t?Ste(a):String(a).trim();s!==a&&delete n[a],n[s]=Fc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
346
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[$T]=this[$T]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ns(o);r[s]||(_te(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Ln.prototype),G.freezeMethods(Ln);function iv(e,t){const n=this||qa,r=t||n,i=Ln.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function RT(e){return!!(e&&e.__CANCEL__)}function Ds(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ds,it,{__CANCEL__:!0});const Ete=null;function kte(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Tte=xr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),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(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ote(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cte(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function PT(e,t){return e&&!Ote(t)?Cte(e,t):t}const $te=xr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Ite(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Rte(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const d=c&&l-c;return d?Math.round(p*1e3/d):void 0}}function AT(e,t){let n=0;const r=Rte(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=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 Bc={http:Ete,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Ln.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)&&(xr.isStandardBrowserEnv||xr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(d+":"+m))}const c=PT(e.baseURL,e.url);l.open(e.method.toUpperCase(),kT(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Ln.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};kte(function(v){n(v),u()},function(v){r(v),u()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new it("Request aborted",it.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||OT;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new it(m,h.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,l)),l=null},xr.isStandardBrowserEnv){const d=(e.withCredentials||$te(c))&&e.xsrfCookieName&&Tte.read(e.xsrfCookieName);d&&a.set(e.xsrfHeaderName,d)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&G.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",AT(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",AT(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ds(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=Ite(c);if(p&&xr.protocols.indexOf(p)===-1){r(new it("Unsupported protocol "+p+":",it.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};G.forEach(Bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pte={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?Bc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Bc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Bc};function av(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function NT(e){return av(e),e.headers=Ln.from(e.headers),e.data=iv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pte.getAdapter(e.adapter||qa.adapter)(e).then(function(r){return av(e),r.data=iv.call(e,e.transformResponse,r),r.headers=Ln.from(r.headers),r},function(r){return RT(r)||(av(e),r&&r.response&&(r.response.data=iv.call(e,e.transformResponse,r.response),r.response.headers=Ln.from(r.response.headers))),Promise.reject(r)})}const DT=e=>e instanceof Ln?e.toJSON():e;function Wa(e,t){t=t||{};const n={};function r(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 r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!G.isUndefined(c))return r(void 0,c)}function o(l,c){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(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(DT(l),DT(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,p=f(e[c],t[c],c);G.isUndefined(p)&&f!==s||(n[c]=p)}),n}const MT="1.2.5",ov={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ov[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const jT={};ov.transitional=function(t,n,r){function i(a,o){return"[Axios v"+MT+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!jT[o]&&(jT[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function Ate(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],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(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const sv={assertOptions:Ate,validators:ov},vi=sv.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new TT,response:new TT}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wa(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&sv.assertOptions(r,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),i!==void 0&&sv.assertOptions(i,{encode:vi.function,serialize:vi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Ln.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,p;if(!u){const m=[NT.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),p=m.length,c=Promise.resolve(n);f<p;)c=c.then(m[f++],m[f++]);return c}p=s.length;let d=n;for(f=0;f<p;){const m=s[f++],h=s[f++];try{d=m(d)}catch(y){h.call(this,y);break}}try{c=NT.call(this,d)}catch(m){return Promise.reject(m)}for(f=0,p=l.length;f<p;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Wa(this.defaults,t);const n=PT(t.baseURL,t.url);return kT(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Wa(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Wa(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=n(),Hi.prototype[t+"Form"]=n(!0)});class lv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ds(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new lv(function(i){t=i}),cancel:t}}}function Nte(e){return function(n){return e.apply(null,n)}}function Dte(e){return G.isObject(e)&&e.isAxiosError===!0}const uv={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(uv).forEach(([e,t])=>{uv[t]=e});function LT(e){const t=new Hi(e),n=cT(Hi.prototype.request,t);return G.extend(n,Hi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return LT(Wa(e,i))},n}const At=LT(qa);At.Axios=Hi,At.CanceledError=Ds,At.CancelToken=lv,At.isCancel=RT,At.VERSION=MT,At.toFormData=Lc,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=Nte,At.isAxiosError=Dte,At.mergeConfig=Wa,At.AxiosHeaders=Ln,At.formToJSON=e=>CT(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=uv,At.default=At;const FT={},Mte=Object.freeze(Object.defineProperty({__proto__:null,default:FT},Symbol.toStringTag,{value:"Module"}));var jte=Error,Lte=EvalError,Fte=RangeError,Bte=ReferenceError,BT=SyntaxError,Ms=TypeError,Ute=URIError,zte=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0},UT=typeof Symbol<"u"&&Symbol,Vte=zte,qte=function(){return typeof UT!="function"||typeof Symbol!="function"||typeof UT("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Vte()},cv={__proto__:null,foo:{}},Wte=Object,Hte=function(){return{__proto__:cv}.foo===cv.foo&&!(cv instanceof Wte)},Zte="Function.prototype.bind called on incompatible ",Kte=Object.prototype.toString,Gte=Math.max,Yte="[object Function]",zT=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},Jte=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},Xte=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Qte=function(t){var n=this;if(typeof n!="function"||Kte.apply(n)!==Yte)throw new TypeError(Zte+n);for(var r=Jte(arguments,1),i,a=function(){if(this instanceof i){var c=n.apply(this,zT(r,arguments));return Object(c)===c?c:this}return n.apply(t,zT(r,arguments))},o=Gte(0,n.length-r.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+Xte(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var l=function(){};l.prototype=n.prototype,i.prototype=new l,l.prototype=null}return i},ene=Qte,fv=Function.prototype.bind||ene,tne=Function.prototype.call,nne=Object.prototype.hasOwnProperty,rne=fv,ine=rne.call(tne,nne),Ge,ane=jte,one=Lte,sne=Fte,lne=Bte,Ha=BT,Za=Ms,une=Ute,VT=Function,dv=function(e){try{return VT('"use strict"; return ('+e+").constructor;")()}catch{}},Zi=Object.getOwnPropertyDescriptor;if(Zi)try{Zi({},"")}catch{Zi=null}var pv=function(){throw new Za},cne=Zi?function(){try{return arguments.callee,pv}catch{try{return Zi(arguments,"callee").get}catch{return pv}}}():pv,Ka=qte(),fne=Hte(),Zt=Object.getPrototypeOf||(fne?function(e){return e.__proto__}:null),Ga={},dne=typeof Uint8Array>"u"||!Zt?Ge:Zt(Uint8Array),Ki={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ka&&Zt?Zt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ga,"%AsyncGenerator%":Ga,"%AsyncGeneratorFunction%":Ga,"%AsyncIteratorPrototype%":Ga,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ane,"%eval%":eval,"%EvalError%":one,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":VT,"%GeneratorFunction%":Ga,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ka&&Zt?Zt(Zt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ka||!Zt?Ge:Zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":sne,"%ReferenceError%":lne,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ka||!Zt?Ge:Zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ka&&Zt?Zt(""[Symbol.iterator]()):Ge,"%Symbol%":Ka?Symbol:Ge,"%SyntaxError%":Ha,"%ThrowTypeError%":cne,"%TypedArray%":dne,"%TypeError%":Za,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":une,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(Zt)try{null.error}catch(e){var pne=Zt(Zt(e));Ki["%Error.prototype%"]=pne}var hne=function e(t){var n;if(t==="%AsyncFunction%")n=dv("async function () {}");else if(t==="%GeneratorFunction%")n=dv("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=dv("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Zt&&(n=Zt(i.prototype))}return Ki[t]=n,n},qT={__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"]},js=fv,Uc=ine,mne=js.call(Function.call,Array.prototype.concat),vne=js.call(Function.apply,Array.prototype.splice),WT=js.call(Function.call,String.prototype.replace),zc=js.call(Function.call,String.prototype.slice),yne=js.call(Function.call,RegExp.prototype.exec),gne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bne=/\\(\\)?/g,xne=function(t){var n=zc(t,0,1),r=zc(t,-1);if(n==="%"&&r!=="%")throw new Ha("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ha("invalid intrinsic syntax, expected opening `%`");var i=[];return WT(t,gne,function(a,o,s,u){i[i.length]=s?WT(u,bne,"$1"):o||a}),i},wne=function(t,n){var r=t,i;if(Uc(qT,r)&&(i=qT[r],r="%"+i[0]+"%"),Uc(Ki,r)){var a=Ki[r];if(a===Ga&&(a=hne(r)),typeof a>"u"&&!n)throw new Za("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Ha("intrinsic "+t+" does not exist!")},Ya=function(t,n){if(typeof t!="string"||t.length===0)throw new Za("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Za('"allowMissing" argument must be a boolean');if(yne(/^%?[^%]*%?$/,t)===null)throw new Ha("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=xne(t),i=r.length>0?r[0]:"",a=wne("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],vne(r,mne([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var p=r[c],d=zc(p,0,1),m=zc(p,-1);if((d==='"'||d==="'"||d==="`"||m==='"'||m==="'"||m==="`")&&d!==m)throw new Ha("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(u=!0),i+="."+p,o="%"+i+"%",Uc(Ki,o))s=Ki[o];else if(s!=null){if(!(p in s)){if(!n)throw new Za("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zi&&c+1>=r.length){var h=Zi(s,p);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[p]}else f=Uc(s,p),s=s[p];f&&!u&&(Ki[o]=s)}}return s},HT={exports:{}},hv,ZT;function mv(){if(ZT)return hv;ZT=1;var e=Ya,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return hv=t,hv}var Sne=Ya,Vc=Sne("%Object.getOwnPropertyDescriptor%",!0);if(Vc)try{Vc([],"length")}catch{Vc=null}var KT=Vc,GT=mv(),_ne=BT,Ja=Ms,YT=KT,Ene=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ja("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ja("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ja("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ja("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ja("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ja("`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=!!YT&&YT(t,n);if(GT)GT(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new _ne("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},vv=mv(),JT=function(){return!!vv};JT.hasArrayLengthDefineBug=function(){if(!vv)return null;try{return vv([],"length",{value:1}).length!==1}catch{return!0}};var kne=JT,Tne=Ya,XT=Ene,One=kne(),QT=KT,eO=Ms,Cne=Tne("%Math.floor%"),$ne=function(t,n){if(typeof t!="function")throw new eO("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Cne(n)!==n)throw new eO("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&QT){var o=QT(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(One?XT(t,"length",n,!0,!0):XT(t,"length",n)),t};(function(e){var t=fv,n=Ya,r=$ne,i=Ms,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=mv(),l=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new i("a function is required");var d=s(t,o,arguments);return r(d,1+l(0,p.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(HT);var Ine=HT.exports,tO=Ya,nO=Ine,Rne=nO(tO("String.prototype.indexOf")),Pne=function(t,n){var r=tO(t,!!n);return typeof r=="function"&&Rne(t,".prototype.")>-1?nO(r):r};const Ane=pC(Mte);var yv=typeof Map=="function"&&Map.prototype,gv=Object.getOwnPropertyDescriptor&&yv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qc=yv&&gv&&typeof gv.get=="function"?gv.get:null,rO=yv&&Map.prototype.forEach,bv=typeof Set=="function"&&Set.prototype,xv=Object.getOwnPropertyDescriptor&&bv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wc=bv&&xv&&typeof xv.get=="function"?xv.get:null,iO=bv&&Set.prototype.forEach,Nne=typeof WeakMap=="function"&&WeakMap.prototype,Ls=Nne?WeakMap.prototype.has:null,Dne=typeof WeakSet=="function"&&WeakSet.prototype,Fs=Dne?WeakSet.prototype.has:null,Mne=typeof WeakRef=="function"&&WeakRef.prototype,aO=Mne?WeakRef.prototype.deref:null,jne=Boolean.prototype.valueOf,Lne=Object.prototype.toString,Fne=Function.prototype.toString,Bne=String.prototype.match,wv=String.prototype.slice,yi=String.prototype.replace,Une=String.prototype.toUpperCase,oO=String.prototype.toLowerCase,sO=RegExp.prototype.test,lO=Array.prototype.concat,wr=Array.prototype.join,zne=Array.prototype.slice,uO=Math.floor,Sv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_v=Object.getOwnPropertySymbols,Ev=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",an=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xa||!0)?Symbol.toStringTag:null,cO=Object.prototype.propertyIsEnumerable,fO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function dO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||sO.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-uO(-e):uO(e);if(r!==e){var i=String(r),a=wv.call(t,i.length+1);return yi.call(i,n,"$&_")+"."+yi.call(yi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yi.call(t,n,"$&_")}var kv=Ane,pO=kv.custom,hO=yO(pO)?pO:null,Vne=function e(t,n,r,i){var a=n||{};if(gi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gi(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=gi(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(gi(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(gi(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 bO(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?dO(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?dO(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return Tv(t)?"[Array]":"[Object]";var f=sre(a,r);if(typeof i>"u")i=[];else if(gO(i,t)>=0)return"[Circular]";function p($,F,M){if(F&&(i=zne.call(i),i.push(F)),M){var B={depth:a.depth};return gi(a,"quoteStyle")&&(B.quoteStyle=a.quoteStyle),e($,B,r+1,i)}return e($,a,r+1,i)}if(typeof t=="function"&&!vO(t)){var d=Xne(t),m=Hc(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(m.length>0?" { "+wr.call(m,", ")+" }":"")}if(yO(t)){var h=Xa?yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ev.call(t);return typeof t=="object"&&!Xa?Bs(h):h}if(ire(t)){for(var y="<"+oO.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+mO(qne(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+oO.call(String(t.nodeName))+">",y}if(Tv(t)){if(t.length===0)return"[]";var b=Hc(t,p);return f&&!ore(b)?"["+Cv(b,f)+"]":"[ "+wr.call(b,", ")+" ]"}if(Hne(t)){var k=Hc(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!cO.call(t,"cause")?"{ ["+String(t)+"] "+wr.call(lO.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+wr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(hO&&typeof t[hO]=="function"&&kv)return kv(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Qne(t)){var S=[];return rO&&rO.call(t,function($,F){S.push(p(F,t,!0)+" => "+p($,t))}),xO("Map",qc.call(t),S,f)}if(nre(t)){var E=[];return iO&&iO.call(t,function($){E.push(p($,t))}),xO("Set",Wc.call(t),E,f)}if(ere(t))return Ov("WeakMap");if(rre(t))return Ov("WeakSet");if(tre(t))return Ov("WeakRef");if(Kne(t))return Bs(p(Number(t)));if(Yne(t))return Bs(p(Sv.call(t)));if(Gne(t))return Bs(jne.call(t));if(Zne(t))return Bs(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ht<"u"&&t===ht)return"{ [object globalThis] }";if(!Wne(t)&&!vO(t)){var O=Hc(t,p),L=fO?fO(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",T=!L&&an&&Object(t)===t&&an in t?wv.call(bi(t),8,-1):D?"Object":"",P=L||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=P+(T||D?"["+wr.call(lO.call([],T||[],D||[]),": ")+"] ":"");return O.length===0?q+"{}":f?q+"{"+Cv(O,f)+"}":q+"{ "+wr.call(O,", ")+" }"}return String(t)};function mO(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function qne(e){return yi.call(String(e),/"/g,"&quot;")}function Tv(e){return bi(e)==="[object Array]"&&(!an||!(typeof e=="object"&&an in e))}function Wne(e){return bi(e)==="[object Date]"&&(!an||!(typeof e=="object"&&an in e))}function vO(e){return bi(e)==="[object RegExp]"&&(!an||!(typeof e=="object"&&an in e))}function Hne(e){return bi(e)==="[object Error]"&&(!an||!(typeof e=="object"&&an in e))}function Zne(e){return bi(e)==="[object String]"&&(!an||!(typeof e=="object"&&an in e))}function Kne(e){return bi(e)==="[object Number]"&&(!an||!(typeof e=="object"&&an in e))}function Gne(e){return bi(e)==="[object Boolean]"&&(!an||!(typeof e=="object"&&an in e))}function yO(e){if(Xa)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ev)return!1;try{return Ev.call(e),!0}catch{}return!1}function Yne(e){if(!e||typeof e!="object"||!Sv)return!1;try{return Sv.call(e),!0}catch{}return!1}var Jne=Object.prototype.hasOwnProperty||function(e){return e in this};function gi(e,t){return Jne.call(e,t)}function bi(e){return Lne.call(e)}function Xne(e){if(e.name)return e.name;var t=Bne.call(Fne.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function gO(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Qne(e){if(!qc||!e||typeof e!="object")return!1;try{qc.call(e);try{Wc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ere(e){if(!Ls||!e||typeof e!="object")return!1;try{Ls.call(e,Ls);try{Fs.call(e,Fs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function tre(e){if(!aO||!e||typeof e!="object")return!1;try{return aO.call(e),!0}catch{}return!1}function nre(e){if(!Wc||!e||typeof e!="object")return!1;try{Wc.call(e);try{qc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function rre(e){if(!Fs||!e||typeof e!="object")return!1;try{Fs.call(e,Fs);try{Ls.call(e,Ls)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ire(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bO(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bO(wv.call(e,0,t.maxStringLength),t)+r}var i=yi.call(yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,are);return mO(i,"single",t)}function are(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Une.call(t.toString(16))}function Bs(e){return"Object("+e+")"}function Ov(e){return e+" { ? }"}function xO(e,t,n,r){var i=r?Cv(n,r):wr.call(n,", ");return e+" ("+t+") {"+i+"}"}function ore(e){for(var t=0;t<e.length;t++)if(gO(e[t],`
347
- `)>=0)return!1;return!0}function sre(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=wr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:wr.call(Array(t+1),n)}}function Cv(e,t){if(e.length===0)return"";var n=`
340
+ */var Fh,j_;function JW(){if(j_)return Fh;j_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(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 u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fh=i()?Object.assign:function(a,o){for(var s,u=r(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},Fh}var Bh,L_;function Uh(){if(L_)return Bh;L_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bh=e,Bh}var zh,F_;function XW(){if(F_)return zh;F_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uh(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var p=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw p.name="Invariant Violation",p}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},zh=i,zh}var Vh,B_;function QW(){if(B_)return Vh;B_=1;var e=M_(),t=JW(),n=Uh(),r=XW(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Vh=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(N){var x=N&&(l&&N[l]||N[c]);if(typeof x=="function")return x}var p="<<anonymous>>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:E,node:T(),objectOf:L,oneOf:O,oneOfType:D,shape:P,exact:q};function m(N,x){return N===x?N!==0||1/N===1/x:N!==N&&x!==x}function h(N){this.message=N,this.stack=""}h.prototype=Error.prototype;function y(N){if(process.env.NODE_ENV!=="production")var x={},V=0;function K(Y,oe,ne,le,pe,he,ue){if(le=le||p,he=he||ne,ue!==n){if(u){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 Z=le+":"+ne;!x[Z]&&V<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."),x[Z]=!0,V++)}}return oe[ne]==null?Y?oe[ne]===null?new h("The "+pe+" `"+he+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new h("The "+pe+" `"+he+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:N(oe,ne,le,pe,he)}var _=K.bind(null,!1);return _.isRequired=K.bind(null,!0),_}function v(N){function x(V,K,_,Y,oe,ne){var le=V[K],pe=M(le);if(pe!==N){var he=B(le);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+he+"` supplied to `"+_+"`, expected ")+("`"+N+"`."))}return null}return y(x)}function g(){return y(o)}function b(N){function x(V,K,_,Y,oe){if(typeof N!="function")return new h("Property `"+oe+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var ne=V[K];if(!Array.isArray(ne)){var le=M(ne);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an array."))}for(var pe=0;pe<ne.length;pe++){var he=N(ne,pe,_,Y,oe+"["+pe+"]",n);if(he instanceof Error)return he}return null}return y(x)}function k(){function N(x,V,K,_,Y){var oe=x[V];if(!s(oe)){var ne=M(oe);return new h("Invalid "+_+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(N)}function S(){function N(x,V,K,_,Y){var oe=x[V];if(!e.isValidElementType(oe)){var ne=M(oe);return new h("Invalid "+_+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(N)}function E(N){function x(V,K,_,Y,oe){if(!(V[K]instanceof N)){var ne=N.name||p,le=U(V[K]);return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected ")+("instance of `"+ne+"`."))}return null}return y(x)}function O(N){if(!Array.isArray(N))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 x(V,K,_,Y,oe){for(var ne=V[K],le=0;le<N.length;le++)if(m(ne,N[le]))return null;var pe=JSON.stringify(N,function(ue,Q){var Z=B(Q);return Z==="symbol"?String(Q):Q});return new h("Invalid "+Y+" `"+oe+"` of value `"+String(ne)+"` "+("supplied to `"+_+"`, expected one of "+pe+"."))}return y(x)}function L(N){function x(V,K,_,Y,oe){if(typeof N!="function")return new h("Property `"+oe+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an object."));for(var pe in ne)if(i(ne,pe)){var he=N(ne,pe,_,Y,oe+"."+pe,n);if(he instanceof Error)return he}return null}return y(x)}function D(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var x=0;x<N.length;x++){var V=N[x];if(typeof V!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(V)+" at index "+x+"."),o}function K(_,Y,oe,ne,le){for(var pe=0;pe<N.length;pe++){var he=N[pe];if(he(_,Y,oe,ne,le,n)==null)return null}return new h("Invalid "+ne+" `"+le+"` supplied to "+("`"+oe+"`."))}return y(K)}function T(){function N(x,V,K,_,Y){return $(x[V])?null:new h("Invalid "+_+" `"+Y+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(N)}function P(N){function x(V,K,_,Y,oe){var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));for(var pe in N){var he=N[pe];if(he){var ue=he(ne,pe,_,Y,oe+"."+pe,n);if(ue)return ue}}return null}return y(x)}function q(N){function x(V,K,_,Y,oe){var ne=V[K],le=M(ne);if(le!=="object")return new h("Invalid "+Y+" `"+oe+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));var pe=t({},V[K],N);for(var he in pe){var ue=N[he];if(!ue)return new h("Invalid "+Y+" `"+oe+"` key `"+he+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(V[K],null," ")+`
341
+ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var Q=ue(ne,he,_,Y,oe+"."+he,n);if(Q)return Q}return null}return y(x)}function $(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every($);if(N===null||s(N))return!0;var x=f(N);if(x){var V=x.call(N),K;if(x!==N.entries){for(;!(K=V.next()).done;)if(!$(K.value))return!1}else for(;!(K=V.next()).done;){var _=K.value;if(_&&!$(_[1]))return!1}}else return!1;return!0;default:return!1}}function F(N,x){return N==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function M(N){var x=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":F(x,N)?"symbol":x}function B(N){if(typeof N>"u"||N===null)return""+N;var x=M(N);if(x==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return x}function W(N){var x=B(N);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function U(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Vh}var qh,U_;function eH(){if(U_)return qh;U_=1;var e=Uh();function t(){}function n(){}return n.resetWarningCache=t,qh=function(){function r(o,s,u,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},qh}if(process.env.NODE_ENV!=="production"){var tH=M_(),nH=!0;Lh.exports=QW()(tH.isElement,nH)}else Lh.exports=eH()();var rH=Lh.exports;const rt=Ke(rH);var Wh=j.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});Wh.displayName="ScrollToBottomFunctionContext";function iH(){return j.useContext(Wh)}function aH(){var e=iH(),t=e.scrollToEnd;return t}var Hh=j.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Hh.displayName="ScrollToBottomState1Context";var Zh=j.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Zh.displayName="ScrollToBottomState2Context";var Kh=j.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Kh.displayName="ScrollToBottomStateContext";var z_=[Kh,Hh,Zh];function oH(e){return j.useContext(z_[e]||z_[0])}function sH(){var e=oH(2),t=e.sticky;return[t]}var fc=j.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});fc.displayName="ScrollToBottomInternalContext";function lH(){return j.useContext(fc)}function Gh(){var e=lH(),t=e.styleToClassName;return t}var uH={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)"}},Yh=function(t){var n=t.children,r=t.className,i=sH(),a=vr(i,1),o=a[0],s=Gh()(uH),u=aH();return!o&&j.createElement("button",{className:jh(s,(r||"")+""),onClick:u,type:"button"},n)};Yh.defaultProps={children:void 0,className:""},Yh.propTypes={children:rt.any,className:rt.string};var V_={exports:{}},cH=mt,fH=vn,q_=Yn.f;cH({target:"Object",stat:!0,forced:Object.defineProperty!==q_,sham:!fH},{defineProperty:q_});var dH=Yt,W_=dH.Object,pH=V_.exports=function(t,n,r){return W_.defineProperty(t,n,r)};W_.defineProperty.sham&&(pH.sham=!0);var hH=V_.exports,mH=hH,H_=mH,vH=H_,yH=vH,gH=yH,bH=gH,xH=bH;const wH=Ke(xH);var SH=cs,_H=SH.f("iterator"),EH=_H,kH=EH,TH=kH,OH=TH,CH=OH,$H=CH,IH=$H;const RH=Ke(IH);function ys(e){"@babel/helpers - typeof";return ys=typeof ja=="function"&&typeof RH=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ja=="function"&&t.constructor===ja&&t!==ja.prototype?"symbol":typeof t},ys(e)}var PH=cs,AH=PH.f("toPrimitive"),NH=AH,DH=NH,MH=DH,jH=MH,LH=jH,FH=LH,BH=FH;const UH=Ke(BH);function zH(e,t){if(ys(e)!="object"||!e)return e;var n=e[UH];if(n!==void 0){var r=n.call(e,t||"default");if(ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VH(e){var t=zH(e,"string");return ys(t)=="symbol"?t:t+""}function qH(e,t,n){return(t=VH(t))in e?wH(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WH(e){if(T1(e))return Mh(e)}function HH(e){if(typeof ja<"u"&&x_(e)!=null||e["@@iterator"]!=null)return I_(e)}function ZH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
342
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(e){return WH(e)||HH(e)||R_(e)||ZH()}var dc=function(e){return e&&e.Math==Math&&e},Tn=dc(typeof globalThis=="object"&&globalThis)||dc(typeof window=="object"&&window)||dc(typeof self=="object"&&self)||dc(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),Jh={},Xn=function(e){try{return!!e()}catch{return!0}},KH=Xn,zi=!KH(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Z_={},K_={}.propertyIsEnumerable,G_=Object.getOwnPropertyDescriptor,GH=G_&&!K_.call({1:2},1);Z_.f=GH?function(t){var n=G_(this,t);return!!n&&n.enumerable}:K_;var Y_=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},YH={}.toString,Xh=function(e){return YH.call(e).slice(8,-1)},JH=Xn,XH=Xh,QH="".split,e8=JH(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return XH(e)=="String"?QH.call(e,""):Object(e)}:Object,pc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},t8=e8,n8=pc,Qh=function(e){return t8(n8(e))},jn=function(e){return typeof e=="function"},r8=jn,gs=function(e){return typeof e=="object"?e!==null:r8(e)},em=Tn,i8=jn,a8=function(e){return i8(e)?e:void 0},hc=function(e,t){return arguments.length<2?a8(em[e]):em[e]&&em[e][t]},o8=hc,s8=o8("navigator","userAgent")||"",J_=Tn,tm=s8,X_=J_.process,Q_=J_.Deno,eE=X_&&X_.versions||Q_&&Q_.version,tE=eE&&eE.v8,yr,mc;tE?(yr=tE.split("."),mc=yr[0]<4?1:yr[0]+yr[1]):tm&&(yr=tm.match(/Edge\/(\d+)/),(!yr||yr[1]>=74)&&(yr=tm.match(/Chrome\/(\d+)/),yr&&(mc=yr[1])));var l8=mc&&+mc,nE=l8,u8=Xn,rE=!!Object.getOwnPropertySymbols&&!u8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nE&&nE<41}),c8=rE,iE=c8&&!Symbol.sham&&typeof Symbol.iterator=="symbol",f8=jn,d8=hc,p8=iE,aE=p8?function(e){return typeof e=="symbol"}:function(e){var t=d8("Symbol");return f8(t)&&Object(e)instanceof t},h8=function(e){try{return String(e)}catch{return"Object"}},m8=jn,v8=h8,y8=function(e){if(m8(e))return e;throw TypeError(v8(e)+" is not a function")},g8=y8,oE=function(e,t){var n=e[t];return n==null?void 0:g8(n)},nm=jn,rm=gs,b8=function(e,t){var n,r;if(t==="string"&&nm(n=e.toString)&&!rm(r=n.call(e))||nm(n=e.valueOf)&&!rm(r=n.call(e))||t!=="string"&&nm(n=e.toString)&&!rm(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},sE={exports:{}},lE=Tn,im=function(e,t){try{Object.defineProperty(lE,e,{value:t,configurable:!0,writable:!0})}catch{lE[e]=t}return t},x8=Tn,w8=im,uE="__core-js_shared__",S8=x8[uE]||w8(uE,{}),am=S8,cE=am;(sE.exports=function(e,t){return cE[e]||(cE[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var om=sE.exports,_8=pc,fE=function(e){return Object(_8(e))},E8=fE,k8={}.hasOwnProperty,Vi=Object.hasOwn||function(t,n){return k8.call(E8(t),n)},T8=0,O8=Math.random(),dE=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++T8+O8).toString(36)},C8=Tn,$8=om,pE=Vi,I8=dE,hE=rE,R8=iE,bs=$8("wks"),xs=C8.Symbol,P8=R8?xs:xs&&xs.withoutSetter||I8,ws=function(e){return(!pE(bs,e)||!(hE||typeof bs[e]=="string"))&&(hE&&pE(xs,e)?bs[e]=xs[e]:bs[e]=P8("Symbol."+e)),bs[e]},mE=gs,vE=aE,A8=oE,N8=b8,D8=ws,M8=D8("toPrimitive"),j8=function(e,t){if(!mE(e)||vE(e))return e;var n=A8(e,M8),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!mE(r)||vE(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),N8(e,t)},L8=j8,F8=aE,yE=function(e){var t=L8(e,"string");return F8(t)?t:String(t)},B8=Tn,gE=gs,sm=B8.document,U8=gE(sm)&&gE(sm.createElement),bE=function(e){return U8?sm.createElement(e):{}},z8=zi,V8=Xn,q8=bE,xE=!z8&&!V8(function(){return Object.defineProperty(q8("div"),"a",{get:function(){return 7}}).a!=7}),W8=zi,H8=Z_,Z8=Y_,K8=Qh,G8=yE,Y8=Vi,J8=xE,wE=Object.getOwnPropertyDescriptor;Jh.f=W8?wE:function(t,n){if(t=K8(t),n=G8(n),J8)try{return wE(t,n)}catch{}if(Y8(t,n))return Z8(!H8.f.call(t,n),t[n])};var Ss={},X8=gs,pi=function(e){if(X8(e))return e;throw TypeError(String(e)+" is not an object")},Q8=zi,eZ=xE,SE=pi,tZ=yE,_E=Object.defineProperty;Ss.f=Q8?_E:function(t,n,r){if(SE(t),n=tZ(n),SE(r),eZ)try{return _E(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var nZ=zi,rZ=Ss,iZ=Y_,vc=nZ?function(e,t,n){return rZ.f(e,t,iZ(1,n))}:function(e,t,n){return e[t]=n,e},EE={exports:{}},aZ=jn,lm=am,oZ=Function.toString;aZ(lm.inspectSource)||(lm.inspectSource=function(e){return oZ.call(e)});var kE=lm.inspectSource,sZ=Tn,lZ=jn,uZ=kE,TE=sZ.WeakMap,cZ=lZ(TE)&&/native code/.test(uZ(TE)),fZ=om,dZ=dE,OE=fZ("keys"),CE=function(e){return OE[e]||(OE[e]=dZ(e))},um={},pZ=cZ,hZ=Tn,mZ=gs,vZ=vc,cm=Vi,fm=am,yZ=CE,gZ=um,$E="Object already initialized",bZ=hZ.WeakMap,yc,_s,gc,xZ=function(e){return gc(e)?_s(e):yc(e,{})},wZ=function(e){return function(t){var n;if(!mZ(t)||(n=_s(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(pZ||fm.state){var qi=fm.state||(fm.state=new bZ),SZ=qi.get,IE=qi.has,_Z=qi.set;yc=function(e,t){if(IE.call(qi,e))throw new TypeError($E);return t.facade=e,_Z.call(qi,e,t),t},_s=function(e){return SZ.call(qi,e)||{}},gc=function(e){return IE.call(qi,e)}}else{var La=yZ("state");gZ[La]=!0,yc=function(e,t){if(cm(e,La))throw new TypeError($E);return t.facade=e,vZ(e,La,t),t},_s=function(e){return cm(e,La)?e[La]:{}},gc=function(e){return cm(e,La)}}var RE={set:yc,get:_s,has:gc,enforce:xZ,getterFor:wZ},dm=zi,EZ=Vi,PE=Function.prototype,kZ=dm&&Object.getOwnPropertyDescriptor,pm=EZ(PE,"name"),TZ=pm&&(function(){}).name==="something",OZ=pm&&(!dm||dm&&kZ(PE,"name").configurable),hm={EXISTS:pm,PROPER:TZ,CONFIGURABLE:OZ},CZ=Tn,AE=jn,$Z=Vi,NE=vc,IZ=im,RZ=kE,DE=RE,PZ=hm.CONFIGURABLE,AZ=DE.get,NZ=DE.enforce,DZ=String(String).split("String");(EE.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(AE(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!$Z(n,"name")||PZ&&n.name!==s)&&NE(n,"name",s),u=NZ(n),u.source||(u.source=DZ.join(typeof s=="string"?s:""))),e===CZ){a?e[t]=n:IZ(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:NE(e,t,n)})(Function.prototype,"toString",function(){return AE(this)&&AZ(this).source||RZ(this)});var Es=EE.exports,ME={},MZ=Math.ceil,jZ=Math.floor,bc=function(e){var t=+e;return t!==t||t===0?0:(t>0?jZ:MZ)(t)},LZ=bc,FZ=Math.max,BZ=Math.min,UZ=function(e,t){var n=LZ(e);return n<0?FZ(n+t,0):BZ(n,t)},zZ=bc,VZ=Math.min,jE=function(e){return e>0?VZ(zZ(e),9007199254740991):0},qZ=jE,WZ=function(e){return qZ(e.length)},HZ=Qh,ZZ=UZ,KZ=WZ,LE=function(e){return function(t,n,r){var i=HZ(t),a=KZ(i),o=ZZ(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},GZ={includes:LE(!0),indexOf:LE(!1)},mm=Vi,YZ=Qh,JZ=GZ.indexOf,XZ=um,FE=function(e,t){var n=YZ(e),r=0,i=[],a;for(a in n)!mm(XZ,a)&&mm(n,a)&&i.push(a);for(;t.length>r;)mm(n,a=t[r++])&&(~JZ(i,a)||i.push(a));return i},vm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],QZ=FE,eK=vm,tK=eK.concat("length","prototype");ME.f=Object.getOwnPropertyNames||function(t){return QZ(t,tK)};var BE={};BE.f=Object.getOwnPropertySymbols;var nK=hc,rK=ME,iK=BE,aK=pi,oK=nK("Reflect","ownKeys")||function(t){var n=rK.f(aK(t)),r=iK.f;return r?n.concat(r(t)):n},sK=Vi,lK=oK,uK=Jh,cK=Ss,fK=function(e,t){for(var n=lK(t),r=cK.f,i=uK.f,a=0;a<n.length;a++){var o=n[a];sK(e,o)||r(e,o,i(t,o))}},dK=Xn,pK=jn,hK=/#|\.prototype\./,ks=function(e,t){var n=vK[mK(e)];return n==gK?!0:n==yK?!1:pK(t)?dK(t):!!t},mK=ks.normalize=function(e){return String(e).replace(hK,".").toLowerCase()},vK=ks.data={},yK=ks.NATIVE="N",gK=ks.POLYFILL="P",bK=ks,ym=Tn,xK=Jh.f,wK=vc,SK=Es,_K=im,EK=fK,kK=bK,TK=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=ym:i?o=ym[n]||_K(n,{}):o=(ym[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=xK(o,s),u=c&&c.value):u=o[s],a=kK(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;EK(l,u)}(e.sham||u&&u.sham)&&wK(l,"sham",!0),SK(o,s,l,e)}},OK=ws,CK=OK("toStringTag"),UE={};UE[CK]="z";var gm=String(UE)==="[object z]",$K=gm,IK=jn,xc=Xh,RK=ws,PK=RK("toStringTag"),AK=xc(function(){return arguments}())=="Arguments",NK=function(e,t){try{return e[t]}catch{}},zE=$K?xc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=NK(t=Object(e),PK))=="string"?n:AK?xc(t):(r=xc(t))=="Object"&&IK(t.callee)?"Arguments":r},DK=zE,wc=function(e){if(DK(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},MK=pi,VE=function(){var e=MK(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},bm={},qE=Xn,jK=Tn,WE=jK.RegExp;bm.UNSUPPORTED_Y=qE(function(){var e=WE("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),bm.BROKEN_CARET=qE(function(){var e=WE("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var LK=FE,FK=vm,BK=Object.keys||function(t){return LK(t,FK)},UK=zi,zK=Ss,VK=pi,qK=BK,WK=UK?Object.defineProperties:function(t,n){VK(t);for(var r=qK(n),i=r.length,a=0,o;i>a;)zK.f(t,o=r[a++],n[o]);return t},HK=hc,ZK=HK("document","documentElement"),KK=pi,GK=WK,HE=vm,YK=um,JK=ZK,XK=bE,QK=CE,ZE=">",KE="<",xm="prototype",wm="script",GE=QK("IE_PROTO"),Sm=function(){},YE=function(e){return KE+wm+ZE+e+KE+"/"+wm+ZE},JE=function(e){e.write(YE("")),e.close();var t=e.parentWindow.Object;return e=null,t},eG=function(){var e=XK("iframe"),t="java"+wm+":",n;return e.style.display="none",JK.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(YE("document.F=Object")),n.close(),n.F},Sc,_c=function(){try{Sc=new ActiveXObject("htmlfile")}catch{}_c=typeof document<"u"?document.domain&&Sc?JE(Sc):eG():JE(Sc);for(var e=HE.length;e--;)delete _c[xm][HE[e]];return _c()};YK[GE]=!0;var tG=Object.create||function(t,n){var r;return t!==null?(Sm[xm]=KK(t),r=new Sm,Sm[xm]=null,r[GE]=t):r=_c(),n===void 0?r:GK(r,n)},nG=Xn,rG=Tn,iG=rG.RegExp,aG=nG(function(){var e=iG(".","s");return!(e.dotAll&&e.exec(`
343
+ `)&&e.flags==="s")}),oG=Xn,sG=Tn,lG=sG.RegExp,uG=oG(function(){var e=lG("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),cG=wc,fG=VE,XE=bm,dG=om,pG=tG,hG=RE.get,mG=aG,vG=uG,Ec=RegExp.prototype.exec,yG=dG("native-string-replace",String.prototype.replace),_m=Ec,Em=function(){var e=/a/,t=/b*/g;return Ec.call(e,"a"),Ec.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),QE=XE.UNSUPPORTED_Y||XE.BROKEN_CARET,km=/()??/.exec("")[1]!==void 0,gG=Em||km||QE||mG||vG;gG&&(_m=function(t){var n=this,r=hG(n),i=cG(t),a=r.raw,o,s,u,l,c,f,p;if(a)return a.lastIndex=n.lastIndex,o=_m.call(a,i),n.lastIndex=a.lastIndex,o;var d=r.groups,m=QE&&n.sticky,h=fG.call(n),y=n.source,v=0,g=i;if(m&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),g=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
344
+ `)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",h)),km&&(s=new RegExp("^"+y+"$(?!\\s)",h)),Em&&(u=n.lastIndex),l=Ec.call(m?s:n,g),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:Em&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),km&&l&&l.length>1&&yG.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&d)for(l.groups=f=pG(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=l[p[1]];return l});var Tm=_m,bG=TK,ek=Tm;bG({target:"RegExp",proto:!0,forced:/./.exec!==ek},{exec:ek});var tk=Es,xG=Tm,nk=Xn,rk=ws,wG=vc,SG=rk("species"),Om=RegExp.prototype,_G=function(e,t,n,r){var i=rk(e),a=!nk(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!nk(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[SG]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,p,d){var m=c.exec;return m===xG||m===Om.exec?a&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:l.call(f,c,p)}:{done:!1}});tk(String.prototype,e,u[0]),tk(Om,i,u[1])}r&&wG(Om[i],"sham",!0)},EG=bc,kG=wc,TG=pc,ik=function(e){return function(t,n){var r=kG(TG(t)),i=EG(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},OG={codeAt:ik(!1),charAt:ik(!0)},CG=OG.charAt,$G=function(e,t,n){return t+(n?CG(e,t).length:1)},IG=fE,RG=Math.floor,PG="".replace,AG=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,NG=/\$([$&'`]|\d{1,2})/g,DG=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=NG;return i!==void 0&&(i=IG(i),u=AG),PG.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return l;if(p>s){var d=RG(p/10);return d===0?l:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},MG=pi,jG=jn,LG=Xh,FG=Tm,BG=function(e,t){var n=e.exec;if(jG(n)){var r=n.call(e,t);return r!==null&&MG(r),r}if(LG(e)==="RegExp")return FG.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},UG=_G,zG=Xn,VG=pi,qG=jn,WG=bc,HG=jE,Fa=wc,ZG=pc,KG=$G,GG=oE,YG=DG,JG=BG,XG=ws,Cm=XG("replace"),QG=Math.max,eY=Math.min,tY=function(e){return e===void 0?e:String(e)},nY=function(){return"a".replace(/./,"$0")==="$0"}(),ak=function(){return/./[Cm]?/./[Cm]("a","$0")==="":!1}(),rY=!zG(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});UG("replace",function(e,t,n){var r=ak?"$":"$0";return[function(a,o){var s=ZG(this),u=a==null?void 0:GG(a,Cm);return u?u.call(a,s,o):t.call(Fa(s),a,o)},function(i,a){var o=VG(this),s=Fa(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=qG(a);l||(a=Fa(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var p=[];;){var d=JG(o,s);if(d===null||(p.push(d),!c))break;var m=Fa(d[0]);m===""&&(o.lastIndex=KG(s,HG(o.lastIndex),f))}for(var h="",y=0,v=0;v<p.length;v++){d=p[v];for(var g=Fa(d[0]),b=QG(eY(WG(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(tY(d[S]));var E=d.groups;if(l){var O=[g].concat(k,b,s);E!==void 0&&O.push(E);var L=Fa(a.apply(void 0,O))}else L=YG(g,s,b,k,E,a);b>=y&&(h+=s.slice(y,b)+L,y=b+g.length)}return h+s.slice(y)}]},!rY||!nY||ak);var Ts=Lt,iY=Cp,aY=ji,kc=function(e){return iY.slice(0,e.length)===e},oY=function(){return kc("Bun/")?"BUN":kc("Cloudflare-Workers")?"CLOUDFLARE":kc("Deno/")?"DENO":kc("Node.js/")?"NODE":Ts.Bun&&typeof Bun.version=="string"?"BUN":Ts.Deno&&typeof Deno.version=="object"?"DENO":aY(Ts.process)==="process"?"NODE":Ts.window&&Ts.document?"BROWSER":"REST"}(),sY=TypeError,lY=function(e,t){if(e<t)throw new sY("Not enough arguments");return e},ok=Lt,uY=bp,cY=nn,fY=oY,dY=Cp,pY=Gu,hY=lY,mY=ok.Function,vY=/MSIE .\./.test(dY)||fY==="BUN"&&function(){var e=ok.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),sk=function(e,t){var n=t?2:1;return vY?function(r,i){var a=hY(arguments.length,1)>n,o=cY(r)?r:mY(r),s=a?pY(arguments,n):[],u=a?function(){uY(o,this,s)}:o;return t?e(u,i):e(u)}:e},yY=mt,lk=Lt,gY=sk,uk=gY(lk.setInterval,!0);yY({global:!0,bind:!0,forced:lk.setInterval!==uk},{setInterval:uk});var bY=mt,ck=Lt,xY=sk,fk=xY(ck.setTimeout,!0);bY({global:!0,bind:!0,forced:ck.setTimeout!==fk},{setTimeout:fk});var wY=Yt,SY=wY.setInterval,_Y=SY;const EY=Ke(_Y);var kY=Ft,dk=function(e,t){var n=[][e];return!!n&&kY(function(){n.call(null,t||function(){return 1},1)})},TY=mt,OY=wp,CY=L1.indexOf,$Y=dk,$m=OY([].indexOf),pk=!!$m&&1/$m([1],1,-0)<0,IY=pk||!$Y("indexOf");TY({target:"Array",proto:!0,forced:IY},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return pk?$m(this,t,n)||0:CY(this,t,n)}});var RY=Ui,PY=RY("Array","indexOf"),AY=Lr,NY=PY,Im=Array.prototype,DY=function(e){var t=e.indexOf;return e===Im||AY(Im,e)&&t===Im.indexOf?NY:t},MY=DY,jY=MY,LY=jY;const FY=Ke(LY);var hk=Mu,BY=TypeError,UY=function(e,t){if(!delete e[t])throw new BY("Cannot delete property "+hk(t)+" of "+hk(e))},zY=mt,VY=Fr,qY=Jp,WY=Bu,HY=Li,ZY=w_,KY=Wp,GY=Yp,YY=os,Rm=UY,JY=zu,XY=JY("splice"),QY=Math.max,eJ=Math.min;zY({target:"Array",proto:!0,forced:!XY},{splice:function(t,n){var r=VY(this),i=HY(r),a=qY(t,i),o=arguments.length,s,u,l,c,f,p;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=eJ(QY(WY(n),0),i-a)),KY(i+s-u),l=GY(r,u),c=0;c<u;c++)f=a+c,f in r&&YY(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,p=c+s,f in r?r[p]=r[f]:Rm(r,p);for(c=i;c>i-u+s;c--)Rm(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,p=c+s-1,f in r?r[p]=r[f]:Rm(r,p);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return ZY(r,i-u+s),l}});var tJ=Ui,nJ=tJ("Array","splice"),rJ=Lr,iJ=nJ,Pm=Array.prototype,aJ=function(e){var t=e.splice;return e===Pm||rJ(Pm,e)&&t===Pm.splice?iJ:t},oJ=aJ,sJ=oJ,lJ=sJ;const uJ=Ke(lJ);var cJ=Ui,fJ=cJ("Array","concat"),dJ=Lr,pJ=fJ,Am=Array.prototype,hJ=function(e){var t=e.concat;return e===Am||dJ(Am,e)&&t===Am.concat?pJ:t},mJ=hJ,vJ=mJ,yJ=vJ;const _t=Ke(yJ);var gJ=mt,bJ=Rt,mk=Date,xJ=bJ(mk.prototype.getTime);gJ({target:"Date",stat:!0},{now:function(){return xJ(new mk)}});var wJ=Yt,SJ=wJ.Date.now,_J=SJ,EJ=_J,kJ=EJ;const hi=Ke(kJ);var TJ=uh.forEach,OJ=dk,CJ=OJ("forEach"),$J=CJ?[].forEach:function(t){return TJ(this,t,arguments.length>1?arguments[1]:void 0)},IJ=mt,vk=$J;IJ({target:"Array",proto:!0,forced:[].forEach!==vk},{forEach:vk});var RJ=Ui,PJ=RJ("Array","forEach"),AJ=PJ,NJ=AJ,DJ=ss,MJ=kn,jJ=Lr,LJ=NJ,Nm=Array.prototype,FJ={DOMTokenList:!0,NodeList:!0},BJ=function(e){var t=e.forEach;return e===Nm||jJ(Nm,e)&&t===Nm.forEach||MJ(FJ,DJ(e))?LJ:t},UJ=BJ;const Tc=Ke(UJ);var zJ=mt,VJ=Fr,yk=eh,qJ=Ft,WJ=qJ(function(){yk(1)});zJ({target:"Object",stat:!0,forced:WJ},{keys:function(t){return yk(VJ(t))}});var HJ=Yt,ZJ=HJ.Object.keys,KJ=ZJ,GJ=KJ,YJ=GJ;const JJ=Ke(YJ);var XJ=Yt,QJ=XJ.Object.getOwnPropertySymbols,eX=QJ,tX=eX,nX=tX;const gk=Ke(nX);var rX=mt,iX=uh.filter,aX=zu,oX=aX("filter");rX({target:"Array",proto:!0,forced:!oX},{filter:function(t){return iX(this,t,arguments.length>1?arguments[1]:void 0)}});var sX=Ui,lX=sX("Array","filter"),uX=Lr,cX=lX,Dm=Array.prototype,fX=function(e){var t=e.filter;return e===Dm||uX(Dm,e)&&t===Dm.filter?cX:t},dX=fX,pX=dX,hX=pX;const mX=Ke(hX);var bk={exports:{}},vX=mt,yX=Ft,gX=pr,xk=ts.f,wk=vn,bX=!wk||yX(function(){xk(1)});vX({target:"Object",stat:!0,forced:bX,sham:!wk},{getOwnPropertyDescriptor:function(t,n){return xk(gX(t),n)}});var xX=Yt,Sk=xX.Object,wX=bk.exports=function(t,n){return Sk.getOwnPropertyDescriptor(t,n)};Sk.getOwnPropertyDescriptor.sham&&(wX.sham=!0);var SX=bk.exports,_X=SX,EX=_X,kX=EX;const _k=Ke(kX);var TX=hr,OX=Rt,CX=Ku,$X=Yu,IX=ci,RX=OX([].concat),PX=TX("Reflect","ownKeys")||function(t){var n=CX.f(IX(t)),r=$X.f;return r?RX(n,r(t)):n},AX=mt,NX=vn,DX=PX,MX=pr,jX=ts,LX=os;AX({target:"Object",stat:!0,sham:!NX},{getOwnPropertyDescriptors:function(t){for(var n=MX(t),r=jX.f,i=DX(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&LX(a,s,u);return a}});var FX=Yt,BX=FX.Object.getOwnPropertyDescriptors,UX=BX,zX=UX,VX=zX;const Ek=Ke(VX);var kk={exports:{}},qX=mt,WX=vn,Tk=Vu.f;qX({target:"Object",stat:!0,forced:Object.defineProperties!==Tk,sham:!WX},{defineProperties:Tk});var HX=Yt,Ok=HX.Object,ZX=kk.exports=function(t,n){return Ok.defineProperties(t,n)};Ok.defineProperties.sham&&(ZX.sham=!0);var KX=kk.exports,GX=KX,YX=GX,JX=YX;const XX=Ke(JX);var QX=H_;const eQ=Ke(QX);var tQ=!1;function nQ(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 rQ(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 iQ=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!tQ:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=nQ(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),rn="-ms-",Oc="-moz-",ot="-webkit-",Ck="comm",Mm="rule",jm="decl",aQ="@import",$k="@keyframes",oQ="@layer",sQ=Math.abs,Cc=String.fromCharCode,lQ=Object.assign;function uQ(e,t){return Jt(e,0)^45?(((t<<2^Jt(e,0))<<2^Jt(e,1))<<2^Jt(e,2))<<2^Jt(e,3):0}function Ik(e){return e.trim()}function cQ(e,t){return(e=t.exec(e))?e[0]:e}function st(e,t,n){return e.replace(t,n)}function Lm(e,t){return e.indexOf(t)}function Jt(e,t){return e.charCodeAt(t)|0}function Os(e,t,n){return e.slice(t,n)}function gr(e){return e.length}function Fm(e){return e.length}function $c(e,t){return t.push(e),e}function fQ(e,t){return e.map(t).join("")}var Ic=1,Ba=1,Rk=0,gn=0,Pt=0,Ua="";function Rc(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Ic,column:Ba,length:o,return:""}}function Cs(e,t){return lQ(Rc("",null,null,"",null,null,0),e,{length:-e.length},t)}function dQ(){return Pt}function pQ(){return Pt=gn>0?Jt(Ua,--gn):0,Ba--,Pt===10&&(Ba=1,Ic--),Pt}function On(){return Pt=gn<Rk?Jt(Ua,gn++):0,Ba++,Pt===10&&(Ba=1,Ic++),Pt}function br(){return Jt(Ua,gn)}function Pc(){return gn}function $s(e,t){return Os(Ua,e,t)}function Is(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 Pk(e){return Ic=Ba=1,Rk=gr(Ua=e),gn=0,[]}function Ak(e){return Ua="",e}function Ac(e){return Ik($s(gn-1,Bm(e===91?e+2:e===40?e+1:e)))}function hQ(e){for(;(Pt=br())&&Pt<33;)On();return Is(e)>2||Is(Pt)>3?"":" "}function mQ(e,t){for(;--t&&On()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return $s(e,Pc()+(t<6&&br()==32&&On()==32))}function Bm(e){for(;On();)switch(Pt){case e:return gn;case 34:case 39:e!==34&&e!==39&&Bm(Pt);break;case 40:e===41&&Bm(e);break;case 92:On();break}return gn}function vQ(e,t){for(;On()&&e+Pt!==57;)if(e+Pt===84&&br()===47)break;return"/*"+$s(t,gn-1)+"*"+Cc(e===47?e:On())}function yQ(e){for(;!Is(br());)On();return $s(e,gn)}function gQ(e){return Ak(Nc("",null,null,null,[""],e=Pk(e),0,[0],e))}function Nc(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,p=0,d=0,m=0,h=1,y=1,v=1,g=0,b="",k=i,S=a,E=r,O=b;y;)switch(m=g,g=On()){case 40:if(m!=108&&Jt(O,f-1)==58){Lm(O+=st(Ac(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Ac(g);break;case 9:case 10:case 13:case 32:O+=hQ(m);break;case 92:O+=mQ(Pc()-1,7);continue;case 47:switch(br()){case 42:case 47:$c(bQ(vQ(On(),Pc()),t,n),u);break;default:O+="/"}break;case 123*h:s[l++]=gr(O)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:v==-1&&(O=st(O,/\f/g,"")),d>0&&gr(O)-f&&$c(d>32?Dk(O+";",r,n,f-1):Dk(st(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if($c(E=Nk(O,t,n,l,c,i,s,b,k=[],S=[],f),a),g===123)if(c===0)Nc(O,t,E,E,k,a,f,s,S);else switch(p===99&&Jt(O,3)===110?100:p){case 100:case 108:case 109:case 115:Nc(e,E,E,r&&$c(Nk(e,E,E,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Nc(O,E,E,E,[""],S,0,s,S)}}l=c=d=0,h=v=1,b=O="",f=o;break;case 58:f=1+gr(O),d=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&pQ()==125)continue}switch(O+=Cc(g),g*h){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[l++]=(gr(O)-1)*v,v=1;break;case 64:br()===45&&(O+=Ac(On())),p=br(),c=f=gr(b=O+=yQ(Pc())),g++;break;case 45:m===45&&gr(O)==2&&(h=0)}}return a}function Nk(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,p=i===0?a:[""],d=Fm(p),m=0,h=0,y=0;m<r;++m)for(var v=0,g=Os(e,f+1,f=sQ(h=o[m])),b=e;v<d;++v)(b=Ik(h>0?p[v]+" "+g:st(g,/&\f/g,p[v])))&&(u[y++]=b);return Rc(e,t,n,i===0?Mm:s,u,l,c)}function bQ(e,t,n){return Rc(e,t,n,Ck,Cc(dQ()),Os(e,2,-2),0)}function Dk(e,t,n,r){return Rc(e,t,n,jm,Os(e,0,r),Os(e,r+1,-1),r)}function za(e,t){for(var n="",r=Fm(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function xQ(e,t,n,r){switch(e.type){case oQ:if(e.children.length)break;case aQ:case jm:return e.return=e.return||e.value;case Ck:return"";case $k:return e.return=e.value+"{"+za(e.children,r)+"}";case Mm:e.value=e.props.join(",")}return gr(n=za(e.children,r))?e.return=e.value+"{"+n+"}":""}function wQ(e){var t=Fm(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function SQ(e){return function(t){t.root||(t=t.return)&&e(t)}}function _Q(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var EQ=function(t,n,r){for(var i=0,a=0;i=a,a=br(),i===38&&a===12&&(n[r]=1),!Is(a);)On();return $s(t,gn)},kQ=function(t,n){var r=-1,i=44;do switch(Is(i)){case 0:i===38&&br()===12&&(n[r]=1),t[r]+=EQ(gn-1,n,r);break;case 2:t[r]+=Ac(i);break;case 4:if(i===44){t[++r]=br()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Cc(i)}while(i=On());return t},TQ=function(t,n){return Ak(kQ(Pk(t),n))},Mk=new WeakMap,OQ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Mk.get(r))&&!i){Mk.set(t,!0);for(var a=[],o=TQ(n,a),s=r.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]}}},CQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function jk(e,t){switch(uQ(e,t)){case 5103:return ot+"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 ot+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ot+e+Oc+e+rn+e+e;case 6828:case 4268:return ot+e+rn+e+e;case 6165:return ot+e+rn+"flex-"+e+e;case 5187:return ot+e+st(e,/(\w+).+(:[^]+)/,ot+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return ot+e+rn+"flex-item-"+st(e,/flex-|-self/,"")+e;case 4675:return ot+e+rn+"flex-line-pack"+st(e,/align-content|flex-|-self/,"")+e;case 5548:return ot+e+rn+st(e,"shrink","negative")+e;case 5292:return ot+e+rn+st(e,"basis","preferred-size")+e;case 6060:return ot+"box-"+st(e,"-grow","")+ot+e+rn+st(e,"grow","positive")+e;case 4554:return ot+st(e,/([^-])(transform)/g,"$1"+ot+"$2")+e;case 6187:return st(st(st(e,/(zoom-|grab)/,ot+"$1"),/(image-set)/,ot+"$1"),e,"")+e;case 5495:case 3959:return st(e,/(image-set\([^]*)/,ot+"$1$`$1");case 4968:return st(st(e,/(.+:)(flex-)?(.*)/,ot+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ot+e+e;case 4095:case 3583:case 4068:case 2532:return st(e,/(.+)-inline(.+)/,ot+"$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(gr(e)-1-t>6)switch(Jt(e,t+1)){case 109:if(Jt(e,t+4)!==45)break;case 102:return st(e,/(.+:)(.+)-([^]+)/,"$1"+ot+"$2-$3$1"+Oc+(Jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Lm(e,"stretch")?jk(st(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jt(e,t+1)!==115)break;case 6444:switch(Jt(e,gr(e)-3-(~Lm(e,"!important")&&10))){case 107:return st(e,":",":"+ot)+e;case 101:return st(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ot+(Jt(e,14)===45?"inline-":"")+"box$3$1"+ot+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(Jt(e,t+11)){case 114:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ot+e+rn+st(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ot+e+rn+e+e}return e}var $Q=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case jm:t.return=jk(t.value,t.length);break;case $k:return za([Cs(t,{value:st(t.value,"@","@"+ot)})],i);case Mm:if(t.length)return fQ(t.props,function(a){switch(cQ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return za([Cs(t,{props:[st(a,/:(read-\w+)/,":"+Oc+"$1")]})],i);case"::placeholder":return za([Cs(t,{props:[st(a,/:(plac\w+)/,":"+ot+"input-$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,":"+Oc+"$1")]}),Cs(t,{props:[st(a,/:(plac\w+)/,rn+"input-$1")]})],i)}return""})}},IQ=[$Q],RQ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||IQ,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var u,l=[OQ,CQ];{var c,f=[xQ,SQ(function(h){c.insert(h)})],p=wQ(l.concat(i,f)),d=function(y){return za(gQ(y),p)};u=function(y,v,g,b){c=g,d(y?y+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new iQ({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return m.sheet.hydrate(s),m};function PQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var AQ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},NQ=!1,DQ=/[A-Z]|^ms/g,MQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Lk=function(t){return t.charCodeAt(1)===45},Fk=function(t){return t!=null&&typeof t!="boolean"},Um=_Q(function(e){return Lk(e)?e:e.replace(DQ,"-$&").toLowerCase()}),Bk=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(MQ,function(r,i,a){return mi={name:i,styles:a,next:mi},i})}return AQ[t]!==1&&!Lk(t)&&typeof n=="number"&&n!==0?n+"px":n},jQ="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Dc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return mi={name:i.name,styles:i.styles,next:mi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)mi={name:o.name,styles:o.styles,next:mi},o=o.next;var s=a.styles+";";return s}return LQ(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function LQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Dc(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":Fk(s)&&(r+=Um(a)+":"+Bk(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&NQ)throw new Error(jQ);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)Fk(o[u])&&(r+=Um(a)+":"+Bk(a,o[u])+";");else{var l=Dc(e,t,o);switch(a){case"animation":case"animationName":{r+=Um(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var Uk=/label:\s*([^\s;{]+)\s*(;|$)/g,mi;function zm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";mi=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Dc(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Dc(n,t,e[s]),r){var u=a;i+=u[s]}Uk.lastIndex=0;for(var l="",c;(c=Uk.exec(i))!==null;)l+="-"+c[1];var f=PQ(i)+l;return{name:f,styles:i,next:mi}}function zk(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var FQ=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},BQ=function(t,n,r){FQ(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function Vk(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function qk(e,t,n){var r=[],i=zk(e,r,n);return r.length<2?n:i+t(r)}var UQ=function(t){var n=RQ(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=zm(l,n.registered,void 0);return BQ(n,f),n.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=zm(l,n.registered),p="animation-"+f.name;return Vk(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=zm(l,n.registered);Vk(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return qk(n.registered,r,zQ(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:zk.bind(null,n.registered),merge:qk.bind(null,n.registered,r)}},zQ=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},VQ=Es,Vm=Date.prototype,Wk="Invalid Date",Hk="toString",qQ=Vm[Hk],WQ=Vm.getTime;String(new Date(NaN))!=Wk&&VQ(Vm,Hk,function(){var t=WQ.call(this);return t===t?qQ.call(this):Wk});var HQ=gm,ZQ=zE,KQ=HQ?{}.toString:function(){return"[object "+ZQ(this)+"]"},GQ=gm,YQ=Es,JQ=KQ;GQ||YQ(Object.prototype,"toString",JQ,{unsafe:!0});var XQ=hm.PROPER,QQ=Es,eee=pi,Zk=wc,tee=Xn,nee=VE,qm="toString",Kk=RegExp.prototype,Gk=Kk[qm],ree=tee(function(){return Gk.call({source:"a",flags:"b"})!="/a/b"}),iee=XQ&&Gk.name!=qm;(ree||iee)&&QQ(RegExp.prototype,qm,function(){var t=eee(this),n=Zk(t.source),r=t.flags,i=Zk(r===void 0&&t instanceof RegExp&&!("flags"in Kk)?nee.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var Yk=typeof window<"u"?window:self,aee=Yk.crypto||Yk.msCrypto,oee=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(aee);const see=Ke(oee);function lee(){return see().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var uee=k1;const Jk=Ke(uee);function dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function Xk(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return _t(n=[_t(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Qe(dt("green","white")),a)}function cee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=vr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=Jk(a[0])?a:[a],f=c.length===1;Tc(c).call(c,function(p,d){if(f){var m,h;(m=console).log.apply(m,Qe(Xk.apply(void 0,_t(h=[e]).call(h,Qe(p)))))}else if(d){var y;(y=console).log.apply(y,Qe(Jk(p)?p:[p]))}else{var v,g;(v=console).groupCollapsed.apply(v,Qe(Xk.apply(void 0,_t(g=[e]).call(g,Qe(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var fee=zi,dee=hm.EXISTS,pee=Ss.f,Qk=Function.prototype,hee=Qk.toString,mee=/^\s*function ([^ (]*)/,vee="name";fee&&!dee&&pee(Qk,vee,{configurable:!0,get:function(){try{return hee.call(this).match(mee)[1]}catch{return""}}});var yee=Yt,gee=yee.setTimeout,bee=gee;const xee=Ke(bee);function wee(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=hi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=xee(function(){e.apply(void 0,a),n=hi()},Math.max(0,t-s+n)))}}var eT=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return wee(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=j.useCallback(function(l){l.timeStampLow=hi(),s(l)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};eT.defaultProps={debounce:200};var See=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},_ee=mt,Eee=See;_ee({target:"Math",stat:!0},{sign:Eee});var kee=Yt,Tee=kee.Math.sign,Oee=Tee,Cee=Oee,$ee=Cee;const Iee=Ke($ee);function Ree(e,t){var n=Iee(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function Pee(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var tT=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(l,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:hi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=Pee(c,m,Ree,(hi()-d)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,c,f,p+1,d)}}))},[o,r,i]),u=j.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return j.useLayoutEffect(function(){return s(n,i[n],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,n,i,a]),!1};tT.propTypes={name:rt.string.isRequired,onEnd:rt.func,target:rt.any.isRequired,value:rt.oneOfType([rt.number,rt.oneOf(["100%"])]).isRequired};function Wm(e){var t=j.useState(e),n=vr(t,2),r=n[0],i=n[1],a=j.useRef(),o=j.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=r,[r,i,a]}function nT(e,t){var n=JJ(e);if(gk){var r=gk(e);t&&(r=mX(r).call(r,function(i){return _k(e,i).enumerable})),n.push.apply(n,r)}return n}function rT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Tc(r=nT(Object(n),!0)).call(r,function(a){qH(e,a,n[a])})}else if(Ek)XX(e,Ek(n));else{var i;Tc(i=nT(Object(n))).call(i,function(a){eQ(e,a,_k(n,a))})}}return e}var Aee=function(){return 1/0},iT=17,Nee="bottom",Qn="top",aT=1,Dee=34,oT={};function Mee(e,t){return e(),EY(e,t)}function sT(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<aT,s=a<aT,u=t===Qn?s:o,l=t!==Qn?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function Rs(e,t){return e===(t===Qn?0:"100%")}var Hm=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=j.useMemo(function(){return cee("<ScrollToBottom>",{force:a})},[a]);s=s===Qn?Qn:Nee;var f=j.useRef(0),p=j.useRef(o),d=Wm(s===Qn?0:"100%"),m=vr(d,3),h=m[0],y=m[1],v=m[2],g=Wm(null),b=vr(g,3),k=b[0],S=b[1],E=b[2],O=j.useRef(0),L=j.useRef(0),D=j.useRef(0),T=j.useState(!0),P=vr(T,2),q=P[0],$=P[1],F=j.useState(!0),M=vr(F,2),B=M[0],W=M[1],U=j.useState(!0),N=vr(U,2),x=N[0],V=N[1],K=j.useState(!1),_=vr(K,2),Y=_[0],oe=_[1],ne=Wm(!0),le=vr(ne,3),pe=le[0],he=le[1],ue=le[2],Q=j.useRef([]),Z=j.useCallback(function(A){var X=E.current;return Q.current.push(A),X&&A({scrollTop:X.scrollTop}),function(){var ce=Q.current,Ee=FY(ce).call(ce,A);~Ee&&uJ(ce).call(ce,Ee,1)}},[Q,E]),de=j.useCallback(function(){var A=v.current;c(function(){var X;return _t(X=["%cSpineTo%c: %conEnd%c is fired."]).call(X,Qe(dt("magenta")),Qe(dt("orange")),[{animateTo:A}])}),f.current=hi(),Rs(A,s)||he(!1),y(null)},[v,c,f,s,y,he]),ve=j.useCallback(function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=X.behavior,Ee=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[_t(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof A=="number"?A+"px":A.replace(/%/g,"%%"),"%c")]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),{behavior:ce,nextAnimateTo:A,target:Ee}]}),ce==="auto"?(de(),Ee&&(Ee.scrollTop=A==="100%"?Ee.scrollHeight-Ee.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.'),y(A)),Rs(A,s)&&(c(function(){var Oe;return[_t(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,Qe(dt("lime","")),Qe(dt("purple"))),[{mode:s,nextAnimateTo:A}]]}),he(!0))},[c,de,s,y,he,E]),$e=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToBottom%c: Called"]).call(ce,Qe(dt("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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var ce;return _t(ce=["%cscrollToTop%c: Called"]).call(ce,Qe(dt("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 A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToEnd%c: Called"]).call(Ee,Qe(dt("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===Qn?R(ce):$e(ce)},[c,s,$e,R]),ae=j.useCallback(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=A.behavior;c(function(){var Ee;return _t(Ee=["%cscrollToStart%c: Called"]).call(Ee,Qe(dt("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===Qn?$e(ce):R(ce)},[c,s,$e,R]),ee=j.useCallback(function(){var A=E.current;if(A){if(p.current==="auto"){c(function(){var Ct;return _t(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,Qe(dt("blue")))}),A.scrollTop=s===Qn?0:A.scrollHeight-A.offsetHeight,p.current=!1;return}var X=O.current,ce=A.offsetHeight,Ee=A.scrollHeight,Oe=A.scrollTop,Je=s===Qn?0:Math.max(0,Ee-ce-Oe),lt=Math.max(0,X-Oe),Ut=l({maxValue:Je,minValue:lt,offsetHeight:ce,scrollHeight:Ee,scrollTop:Oe}),Ot=Math.max(0,Math.min(Je,Ut)),Ze;s===Qn||Ot!==Je?Ze=Oe+Ot:Ze="100%",c(function(){var Ct,tt,xn;return[_t(Ct=[_t(tt=_t(xn="%cscrollToSticky%c: Will animate from %c".concat(X,"px%c to %c")).call(xn,typeof Ze=="number"?Ze+"px":Ze.replace(/%/g,"%%"),"%c (%c")).call(tt,(Ze==="100%"?Je:Ze)+X,"px%c)")]).call(Ct,Qe(dt("orange")),Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple"))),{animateFrom:X,maxValue:Je,minValue:lt,nextAnimateTo:Ze,nextValue:Ot,offsetHeight:ce,rawNextValue:Ut,scrollHeight:Ee,scrollTop:Oe}]}),ve(Ze,{behavior:"smooth"})}},[O,c,s,l,ve,E]),ke=j.useCallback(function(A){var X,ce=A.timeStampLow,Ee=v.current,Oe=E.current,Je=Ee!==null;if(!(ce<=f.current||!Oe)){var lt=sT({mode:s,target:Oe}),Ut=lt.atBottom,Ot=lt.atEnd,Ze=lt.atStart,Ct=lt.atTop;$(Ut),W(Ot),oe(Ze),V(Ct);var tt=Oe.offsetHeight,xn=Oe.scrollHeight,$n=L.current,rr=D.current,Wr=tt!==$n,$r=xn!==rr;if(Wr&&(L.current=tt),$r&&(D.current=xn),!Wr&&!$r){var ir=Je&&Rs(Ee,s)||Ot;ue.current!==ir&&(c(function(){var pt,wt,zt,Vt;return[_t(pt=["%conScroll%c: %csetSticky%c(%c".concat(ir,"%c)")]).call(pt,Qe(dt("red")),Qe(dt("red")),Qe(dt("purple"))),_t(wt=[_t(zt=_t(Vt="(animating = %c".concat(Je,"%c && isEnd = %c")).call(Vt,Rs(Ee,s),"%c) || atEnd = %c")).call(zt,Ot,"%c")]).call(wt,Qe(dt("purple")),Qe(dt("purple")),Qe(dt("purple")),[{animating:Je,animateTo:Ee,atEnd:Ot,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ue.current,nextSticky:ir}])]}),he(ir))}else ue.current&&(c(function(){var pt;return[_t(pt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(pt,Qe(dt("red")),Qe(dt("orange")),[{offsetHeightChanged:Wr,scrollHeightChanged:$r}]),{nextOffsetHeight:tt,prevOffsetHeight:$n,nextScrollHeight:xn,prevScrollHeight:rr}]}),ee());var Hr=Oe.scrollTop;Tc(X=Q.current).call(X,function(pt){return pt({scrollTop:Hr})})}},[v,c,f,s,L,D,Q,ee,$,W,oe,V,he,ue,E]);j.useEffect(function(){if(k){var A=!1,X=Mee(function(){var ce=E.current,Ee=v.current!==null;ue.current?sT({mode:s,target:ce}).atEnd?A=!1:A?hi()-A>Dee&&(Ee||(O.current=ce.scrollTop,c(function(){var Oe;return _t(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,Qe(dt("navy")),Qe(dt("orange")))}),ee()),A=!1):A=hi():ce.scrollHeight<=ce.offsetHeight&&!ue.current&&(c(function(){var Oe;return[_t(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,Qe(dt("navy")),Qe(dt("purple"))),[{offsetHeight:ce.offsetHeight,scrollHeight:ce.scrollHeight,sticky:ue.current}]]}),he(!0))},Math.max(iT,n)||iT);return function(){return clearInterval(X)}}},[v,n,c,s,ee,he,ue,k,E]);var we=j.useMemo(function(){var A=oT[u]||(oT[u]=UQ({key:"react-scroll-to-bottom--css-"+lee(),nonce:u}));return function(X){return A.css(X)+""}},[u]),Pe=j.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:we}},[Z,S,we]),We=j.useMemo(function(){return{atBottom:q,atEnd:B,atStart:Y,atTop:x,mode:s}},[q,B,Y,x,s]),Ae=j.useMemo(function(){var A=h!==null;return{animating:A,animatingToEnd:A&&Rs(h,s),sticky:pe}},[h,s,pe]),Fe=j.useMemo(function(){return rT(rT({},We),Ae)},[We,Ae]),z=j.useMemo(function(){return{scrollTo:ve,scrollToBottom:$e,scrollToEnd:J,scrollToStart:ae,scrollToTop:R}},[ve,$e,J,ae,R]);return j.useEffect(function(){if(k){var A=function(){D.current=k.scrollHeight};return k.addEventListener("focus",A,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",A)}}},[k]),c(function(){var A;return[_t(A=["%cRender%c: Render"]).call(A,Qe(dt("cyan",""))),{animateTo:h,animating:h!==null,sticky:pe,target:k}]}),j.createElement(fc.Provider,{value:Pe},j.createElement(Wh.Provider,{value:z},j.createElement(Kh.Provider,{value:Fe},j.createElement(Hh.Provider,{value:We},j.createElement(Zh.Provider,{value:Ae},r,k&&j.createElement(eT,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&h!==null&&j.createElement(tT,{name:"scrollTop",onEnd:de,target:k,value:h}))))))};Hm.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Aee},Hm.propTypes={checkInterval:rt.number,children:rt.any,debounce:rt.number,debug:rt.bool,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func};var jee={height:"100%",overflowY:"auto",width:"100%"},Zm=function(t){var n=t.children,r=t.className,i=j.useContext(fc),a=i.setTarget,o=Gh()(jee);return j.createElement("div",{className:jh(o,(r||"")+""),ref:a},n)};Zm.defaultProps={children:void 0,className:void 0},Zm.propTypes={children:rt.any,className:rt.string};var Lee={position:"relative"},Km=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=Gh()(Lee);return j.createElement("div",{className:jh(o,(r||"")+"")},j.createElement(Zm,{className:(a||"")+""},n),j.createElement(Yh,{className:(i||"")+""}))};Km.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Km.propTypes={children:rt.any,className:rt.string,followButtonClassName:rt.string,scrollViewClassName:rt.string};var Gm=function(t){var n=t.checkInterval,r=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,p=t.scrollViewClassName;return j.createElement(Hm,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},j.createElement(Km,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};Gm.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},Gm.propTypes={checkInterval:rt.number,children:rt.any,className:rt.string,debounce:rt.number,debug:rt.bool,followButtonClassName:rt.string,initialScrollBehavior:rt.oneOf(["auto","smooth"]),mode:rt.oneOf(["bottom","top"]),nonce:rt.string,scroller:rt.func,scrollViewClassName:rt.string},zB();let lT=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Ym=j.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=yt,p=j.useMemo(()=>QC(t),[t]);return I.jsxs(Gm,{...c,className:Jl(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&I.jsx("span",{...f.headerMessage,children:r}),l&&I.jsx(BB,{botAvatar:a,botDescription:o,botName:s}),p.map(d=>I.jsx(gp,{renderers:i,sendMessage:u,...d},d.id)),n&&I.jsx(gp,{id:lT(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:I.jsx(V0,{})})]})});Ym.displayName="MessageList";const Fee=({className:e,...t})=>{const{className:n}=yt.loader;return I.jsx("div",{...t,className:Jl(e,n)})},uT=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:p,allowFileUpload:d,...m})=>{const{color:h,fontFamily:y,radius:v,themeMode:g,variant:b,botAvatar:k,botDescription:S,botName:E,composerPlaceholder:O}=t,L={color:h,fontFamily:y,radius:v,themeMode:g,variant:b},D=j.useMemo(()=>i.map(T=>{const{authorId:P}=T,q=P===a.id?"outgoing":"incoming";return{...T,direction:q,sender:q==="outgoing"?{name:a.name??"You",avatar:a.pictureUrl}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i,a.id,a.name,a.pictureUrl]);return I.jsxs(I.Fragment,{children:[I.jsx(Hw,{...L}),I.jsxs(pp,{connected:e,...m,children:[I.jsx(z0,{closeWindow:n,configuration:t,restartConversation:p}),u?I.jsx(Fee,{}):I.jsx(I.Fragment,{children:I.jsx(Ym,{botAvatar:k,botDescription:S,botName:E,renderers:l,isTyping:r,sendMessage:o,messages:D})}),I.jsx(qw,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f,composerPlaceholder:O,allowFileUpload:d})]})]})};function cT(e,t){return function(){return e.apply(t,arguments)}}const{toString:fT}=Object.prototype,{getPrototypeOf:Jm}=Object,Xm=(e=>t=>{const n=fT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Xm(t)===e),Mc=e=>t=>typeof t===e,{isArray:Va}=Array,Ps=Mc("undefined");function Bee(e){return e!==null&&!Ps(e)&&e.constructor!==null&&!Ps(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dT=zr("ArrayBuffer");function Uee(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dT(e.buffer),t}const zee=Mc("string"),Wi=Mc("function"),pT=Mc("number"),Qm=e=>e!==null&&typeof e=="object",Vee=e=>e===!0||e===!1,jc=e=>{if(Xm(e)!=="object")return!1;const t=Jm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qee=zr("Date"),Wee=zr("File"),Hee=zr("Blob"),Zee=zr("FileList"),Kee=e=>Qm(e)&&Wi(e.pipe),Gee=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||fT.call(e)===t||Wi(e.toString)&&e.toString()===t)},Yee=zr("URLSearchParams"),Jee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Va(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function hT(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const mT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vT=e=>!Ps(e)&&e!==mT;function ev(){const{caseless:e}=vT(this)&&this||{},t={},n=(r,i)=>{const a=e&&hT(t,i)||i;jc(t[a])&&jc(r)?t[a]=ev(t[a],r):jc(r)?t[a]=ev({},r):Va(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&As(arguments[r],n);return t}const Xee=(e,t,n,{allOwnKeys:r}={})=>(As(t,(i,a)=>{n&&Wi(i)?e[a]=cT(i,n):e[a]=i},{allOwnKeys:r}),e),Qee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ete=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tte=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Jm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nte=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rte=e=>{if(!e)return null;if(Va(e))return e;let t=e.length;if(!pT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ite=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Jm(Uint8Array)),ate=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},ote=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ste=zr("HTMLFormElement"),lte=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),yT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ute=zr("RegExp"),gT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};As(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:Va,isArrayBuffer:dT,isBuffer:Bee,isFormData:Gee,isArrayBufferView:Uee,isString:zee,isNumber:pT,isBoolean:Vee,isObject:Qm,isPlainObject:jc,isUndefined:Ps,isDate:qee,isFile:Wee,isBlob:Hee,isRegExp:ute,isFunction:Wi,isStream:Kee,isURLSearchParams:Yee,isTypedArray:ite,isFileList:Zee,forEach:As,merge:ev,extend:Xee,trim:Jee,stripBOM:Qee,inherits:ete,toFlatObject:tte,kindOf:Xm,kindOfTest:zr,endsWith:nte,toArray:rte,forEachEntry:ate,matchAll:ote,isHTMLForm:ste,hasOwnProperty:yT,hasOwnProp:yT,reduceDescriptors:gT,freezeMethods:e=>{gT(e,(t,n)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Va(e)?r(e):r(String(e).split(t)),n},toCamelCase:lte,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:hT,global:mT,isContextDefined:vT,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(Qm(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=Va(r)?[]:{};return As(r,(o,s)=>{const u=n(o,i+1);!Ps(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}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 bT=it.prototype,xT={};["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=>{xT[e]={value:e}}),Object.defineProperties(it,xT),Object.defineProperty(bT,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(bT);return G.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var cte=typeof self=="object"?self.FormData:window.FormData;const fte=Ke(cte);function tv(e){return G.isPlainObject(e)||G.isArray(e)}function wT(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ST(e,t,n){return e?e.concat(t).map(function(i,a){return i=wT(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function dte(e){return G.isArray(e)&&!e.some(tv)}const pte=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function hte(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Lc(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(fte||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!G.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&hte(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(G.isDate(m))return m.toISOString();if(!u&&G.isBlob(m))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(m)||G.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(G.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(G.isArray(m)&&dte(m)||G.isFileList(m)||G.endsWith(h,"[]")&&(v=G.toArray(m)))return h=wT(h),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?ST([h],k,a):o===null?h:h+"[]",l(b))}),!1}return tv(m)?!0:(t.append(ST(y,h,a),l(m)),!1)}const f=[],p=Object.assign(pte,{defaultVisitor:c,convertValue:l,isVisitable:tv});function d(m,h){if(!G.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),G.forEach(m,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,h,p))===!0&&d(v,h?h.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return d(e),t}function _T(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nv(e,t){this._pairs=[],e&&Lc(e,this,t)}const ET=nv.prototype;ET.append=function(t,n){this._pairs.push([t,n])},ET.toString=function(t){const n=t?function(r){return t.call(this,r,_T)}:_T;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function mte(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kT(e,t,n){if(!t)return e;const r=n&&n.encode||mte,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new nv(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class TT{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const OT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vte=typeof URLSearchParams<"u"?URLSearchParams:nv,yte=FormData,gte=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),bte=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xr={isBrowser:!0,classes:{URLSearchParams:vte,FormData:yte,Blob},isStandardBrowserEnv:gte,isStandardBrowserWebWorkerEnv:bte,protocols:["http","https","file","blob","url","data"]};function xte(e,t){return Lc(e,new xr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return xr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function wte(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ste(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function CT(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,u?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=Ste(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(wte(r),i,n,0)}),n}return null}const _te={"Content-Type":void 0};function Ete(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qa={transitional:OT,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.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(CT(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return xte(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Lc(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Ete(t)):t}],transformResponse:[function(t){const n=this.transitional||qa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?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:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){qa.headers[t]={}}),G.forEach(["post","put","patch"],function(t){qa.headers[t]=G.merge(_te)});const kte=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"]),Tte=e=>{const t={};let n,r,i;return e&&e.split(`
345
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&kte[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$T=Symbol("internals");function Ns(e){return e&&String(e).trim().toLowerCase()}function Fc(e){return e===!1||e==null?e:G.isArray(e)?e.map(Fc):String(e)}function Ote(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Cte(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function IT(e,t,n,r){if(G.isFunction(r))return r.call(this,t,n);if(G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function $te(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ite(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Ln{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,u,l){const c=Ns(u);if(!c)throw new Error("header name must be a non-empty string");const f=G.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Fc(s))}const o=(s,u)=>G.forEach(s,(l,c)=>a(l,c,u));return G.isPlainObject(t)||t instanceof this.constructor?o(t,n):G.isString(t)&&(t=t.trim())&&!Cte(t)?o(Tte(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Ote(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ns(t),t){const r=G.findKey(this,t);return!!(r&&(!n||IT(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Ns(o),o){const s=G.findKey(r,o);s&&(!n||IT(r,r[s],s,n))&&(delete r[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 n=this,r={};return G.forEach(this,(i,a)=>{const o=G.findKey(r,a);if(o){n[o]=Fc(i),delete n[a];return}const s=t?$te(a):String(a).trim();s!==a&&delete n[a],n[s]=Fc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
346
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[$T]=this[$T]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ns(o);r[s]||(Ite(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Ln.prototype),G.freezeMethods(Ln);function rv(e,t){const n=this||qa,r=t||n,i=Ln.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function RT(e){return!!(e&&e.__CANCEL__)}function Ds(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ds,it,{__CANCEL__:!0});const Rte=null;function Pte(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ate=xr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),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(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Nte(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Dte(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function PT(e,t){return e&&!Nte(t)?Dte(e,t):t}const Mte=xr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function jte(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lte(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const d=c&&l-c;return d?Math.round(p*1e3/d):void 0}}function AT(e,t){let n=0;const r=Lte(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=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 Bc={http:Rte,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Ln.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)&&(xr.isStandardBrowserEnv||xr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(d+":"+m))}const c=PT(e.baseURL,e.url);l.open(e.method.toUpperCase(),kT(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Ln.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};Pte(function(v){n(v),u()},function(v){r(v),u()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new it("Request aborted",it.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||OT;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new it(m,h.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,l)),l=null},xr.isStandardBrowserEnv){const d=(e.withCredentials||Mte(c))&&e.xsrfCookieName&&Ate.read(e.xsrfCookieName);d&&a.set(e.xsrfHeaderName,d)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&G.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",AT(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",AT(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ds(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=jte(c);if(p&&xr.protocols.indexOf(p)===-1){r(new it("Unsupported protocol "+p+":",it.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};G.forEach(Bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fte={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?Bc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(Bc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Bc};function iv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function NT(e){return iv(e),e.headers=Ln.from(e.headers),e.data=rv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fte.getAdapter(e.adapter||qa.adapter)(e).then(function(r){return iv(e),r.data=rv.call(e,e.transformResponse,r),r.headers=Ln.from(r.headers),r},function(r){return RT(r)||(iv(e),r&&r.response&&(r.response.data=rv.call(e,e.transformResponse,r.response),r.response.headers=Ln.from(r.response.headers))),Promise.reject(r)})}const DT=e=>e instanceof Ln?e.toJSON():e;function Wa(e,t){t=t||{};const n={};function r(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 r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!G.isUndefined(c))return r(void 0,c)}function o(l,c){if(G.isUndefined(c)){if(!G.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(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(DT(l),DT(c),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,p=f(e[c],t[c],c);G.isUndefined(p)&&f!==s||(n[c]=p)}),n}const MT="1.2.5",av={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{av[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const jT={};av.transitional=function(t,n,r){function i(a,o){return"[Axios v"+MT+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!jT[o]&&(jT[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function Bte(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],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(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const ov={assertOptions:Bte,validators:av},vi=ov.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new TT,response:new TT}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wa(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ov.assertOptions(r,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),i!==void 0&&ov.assertOptions(i,{encode:vi.function,serialize:vi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Ln.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,p;if(!u){const m=[NT.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),p=m.length,c=Promise.resolve(n);f<p;)c=c.then(m[f++],m[f++]);return c}p=s.length;let d=n;for(f=0;f<p;){const m=s[f++],h=s[f++];try{d=m(d)}catch(y){h.call(this,y);break}}try{c=NT.call(this,d)}catch(m){return Promise.reject(m)}for(f=0,p=l.length;f<p;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Wa(this.defaults,t);const n=PT(t.baseURL,t.url);return kT(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Wa(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Wa(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=n(),Hi.prototype[t+"Form"]=n(!0)});class sv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ds(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new sv(function(i){t=i}),cancel:t}}}function Ute(e){return function(n){return e.apply(null,n)}}function zte(e){return G.isObject(e)&&e.isAxiosError===!0}const lv={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(lv).forEach(([e,t])=>{lv[t]=e});function LT(e){const t=new Hi(e),n=cT(Hi.prototype.request,t);return G.extend(n,Hi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return LT(Wa(e,i))},n}const At=LT(qa);At.Axios=Hi,At.CanceledError=Ds,At.CancelToken=sv,At.isCancel=RT,At.VERSION=MT,At.toFormData=Lc,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=Ute,At.isAxiosError=zte,At.mergeConfig=Wa,At.AxiosHeaders=Ln,At.formToJSON=e=>CT(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=lv,At.default=At;const FT={},Vte=Object.freeze(Object.defineProperty({__proto__:null,default:FT},Symbol.toStringTag,{value:"Module"}));var qte=Error,Wte=EvalError,Hte=RangeError,Zte=ReferenceError,BT=SyntaxError,Ms=TypeError,Kte=URIError,Gte=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0},UT=typeof Symbol<"u"&&Symbol,Yte=Gte,Jte=function(){return typeof UT!="function"||typeof Symbol!="function"||typeof UT("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Yte()},uv={__proto__:null,foo:{}},Xte=Object,Qte=function(){return{__proto__:uv}.foo===uv.foo&&!(uv instanceof Xte)},ene="Function.prototype.bind called on incompatible ",tne=Object.prototype.toString,nne=Math.max,rne="[object Function]",zT=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},ine=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},ane=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},one=function(t){var n=this;if(typeof n!="function"||tne.apply(n)!==rne)throw new TypeError(ene+n);for(var r=ine(arguments,1),i,a=function(){if(this instanceof i){var c=n.apply(this,zT(r,arguments));return Object(c)===c?c:this}return n.apply(t,zT(r,arguments))},o=nne(0,n.length-r.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+ane(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var l=function(){};l.prototype=n.prototype,i.prototype=new l,l.prototype=null}return i},sne=one,cv=Function.prototype.bind||sne,lne=Function.prototype.call,une=Object.prototype.hasOwnProperty,cne=cv,fne=cne.call(lne,une),Ge,dne=qte,pne=Wte,hne=Hte,mne=Zte,Ha=BT,Za=Ms,vne=Kte,VT=Function,fv=function(e){try{return VT('"use strict"; return ('+e+").constructor;")()}catch{}},Zi=Object.getOwnPropertyDescriptor;if(Zi)try{Zi({},"")}catch{Zi=null}var dv=function(){throw new Za},yne=Zi?function(){try{return arguments.callee,dv}catch{try{return Zi(arguments,"callee").get}catch{return dv}}}():dv,Ka=Jte(),gne=Qte(),Zt=Object.getPrototypeOf||(gne?function(e){return e.__proto__}:null),Ga={},bne=typeof Uint8Array>"u"||!Zt?Ge:Zt(Uint8Array),Ki={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ge:ArrayBuffer,"%ArrayIteratorPrototype%":Ka&&Zt?Zt([][Symbol.iterator]()):Ge,"%AsyncFromSyncIteratorPrototype%":Ge,"%AsyncFunction%":Ga,"%AsyncGenerator%":Ga,"%AsyncGeneratorFunction%":Ga,"%AsyncIteratorPrototype%":Ga,"%Atomics%":typeof Atomics>"u"?Ge:Atomics,"%BigInt%":typeof BigInt>"u"?Ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":dne,"%eval%":eval,"%EvalError%":pne,"%Float32Array%":typeof Float32Array>"u"?Ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ge:FinalizationRegistry,"%Function%":VT,"%GeneratorFunction%":Ga,"%Int8Array%":typeof Int8Array>"u"?Ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ka&&Zt?Zt(Zt([][Symbol.iterator]())):Ge,"%JSON%":typeof JSON=="object"?JSON:Ge,"%Map%":typeof Map>"u"?Ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ka||!Zt?Ge:Zt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ge:Promise,"%Proxy%":typeof Proxy>"u"?Ge:Proxy,"%RangeError%":hne,"%ReferenceError%":mne,"%Reflect%":typeof Reflect>"u"?Ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ka||!Zt?Ge:Zt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ka&&Zt?Zt(""[Symbol.iterator]()):Ge,"%Symbol%":Ka?Symbol:Ge,"%SyntaxError%":Ha,"%ThrowTypeError%":yne,"%TypedArray%":bne,"%TypeError%":Za,"%Uint8Array%":typeof Uint8Array>"u"?Ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ge:Uint32Array,"%URIError%":vne,"%WeakMap%":typeof WeakMap>"u"?Ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ge:WeakSet};if(Zt)try{null.error}catch(e){var xne=Zt(Zt(e));Ki["%Error.prototype%"]=xne}var wne=function e(t){var n;if(t==="%AsyncFunction%")n=fv("async function () {}");else if(t==="%GeneratorFunction%")n=fv("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=fv("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Zt&&(n=Zt(i.prototype))}return Ki[t]=n,n},qT={__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"]},js=cv,Uc=fne,Sne=js.call(Function.call,Array.prototype.concat),_ne=js.call(Function.apply,Array.prototype.splice),WT=js.call(Function.call,String.prototype.replace),zc=js.call(Function.call,String.prototype.slice),Ene=js.call(Function.call,RegExp.prototype.exec),kne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tne=/\\(\\)?/g,One=function(t){var n=zc(t,0,1),r=zc(t,-1);if(n==="%"&&r!=="%")throw new Ha("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ha("invalid intrinsic syntax, expected opening `%`");var i=[];return WT(t,kne,function(a,o,s,u){i[i.length]=s?WT(u,Tne,"$1"):o||a}),i},Cne=function(t,n){var r=t,i;if(Uc(qT,r)&&(i=qT[r],r="%"+i[0]+"%"),Uc(Ki,r)){var a=Ki[r];if(a===Ga&&(a=wne(r)),typeof a>"u"&&!n)throw new Za("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Ha("intrinsic "+t+" does not exist!")},Ya=function(t,n){if(typeof t!="string"||t.length===0)throw new Za("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Za('"allowMissing" argument must be a boolean');if(Ene(/^%?[^%]*%?$/,t)===null)throw new Ha("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=One(t),i=r.length>0?r[0]:"",a=Cne("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],_ne(r,Sne([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var p=r[c],d=zc(p,0,1),m=zc(p,-1);if((d==='"'||d==="'"||d==="`"||m==='"'||m==="'"||m==="`")&&d!==m)throw new Ha("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(u=!0),i+="."+p,o="%"+i+"%",Uc(Ki,o))s=Ki[o];else if(s!=null){if(!(p in s)){if(!n)throw new Za("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zi&&c+1>=r.length){var h=Zi(s,p);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[p]}else f=Uc(s,p),s=s[p];f&&!u&&(Ki[o]=s)}}return s},HT={exports:{}},pv,ZT;function hv(){if(ZT)return pv;ZT=1;var e=Ya,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return pv=t,pv}var $ne=Ya,Vc=$ne("%Object.getOwnPropertyDescriptor%",!0);if(Vc)try{Vc([],"length")}catch{Vc=null}var KT=Vc,GT=hv(),Ine=BT,Ja=Ms,YT=KT,Rne=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ja("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ja("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ja("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ja("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ja("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ja("`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=!!YT&&YT(t,n);if(GT)GT(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new Ine("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},mv=hv(),JT=function(){return!!mv};JT.hasArrayLengthDefineBug=function(){if(!mv)return null;try{return mv([],"length",{value:1}).length!==1}catch{return!0}};var Pne=JT,Ane=Ya,XT=Rne,Nne=Pne(),QT=KT,eO=Ms,Dne=Ane("%Math.floor%"),Mne=function(t,n){if(typeof t!="function")throw new eO("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Dne(n)!==n)throw new eO("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&QT){var o=QT(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(Nne?XT(t,"length",n,!0,!0):XT(t,"length",n)),t};(function(e){var t=cv,n=Ya,r=Mne,i=Ms,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=hv(),l=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new i("a function is required");var d=s(t,o,arguments);return r(d,1+l(0,p.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(HT);var jne=HT.exports,tO=Ya,nO=jne,Lne=nO(tO("String.prototype.indexOf")),Fne=function(t,n){var r=tO(t,!!n);return typeof r=="function"&&Lne(t,".prototype.")>-1?nO(r):r};const Bne=mC(Vte);var vv=typeof Map=="function"&&Map.prototype,yv=Object.getOwnPropertyDescriptor&&vv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qc=vv&&yv&&typeof yv.get=="function"?yv.get:null,rO=vv&&Map.prototype.forEach,gv=typeof Set=="function"&&Set.prototype,bv=Object.getOwnPropertyDescriptor&&gv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wc=gv&&bv&&typeof bv.get=="function"?bv.get:null,iO=gv&&Set.prototype.forEach,Une=typeof WeakMap=="function"&&WeakMap.prototype,Ls=Une?WeakMap.prototype.has:null,zne=typeof WeakSet=="function"&&WeakSet.prototype,Fs=zne?WeakSet.prototype.has:null,Vne=typeof WeakRef=="function"&&WeakRef.prototype,aO=Vne?WeakRef.prototype.deref:null,qne=Boolean.prototype.valueOf,Wne=Object.prototype.toString,Hne=Function.prototype.toString,Zne=String.prototype.match,xv=String.prototype.slice,yi=String.prototype.replace,Kne=String.prototype.toUpperCase,oO=String.prototype.toLowerCase,sO=RegExp.prototype.test,lO=Array.prototype.concat,wr=Array.prototype.join,Gne=Array.prototype.slice,uO=Math.floor,wv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Sv=Object.getOwnPropertySymbols,_v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",an=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xa||!0)?Symbol.toStringTag:null,cO=Object.prototype.propertyIsEnumerable,fO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function dO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||sO.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-uO(-e):uO(e);if(r!==e){var i=String(r),a=xv.call(t,i.length+1);return yi.call(i,n,"$&_")+"."+yi.call(yi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yi.call(t,n,"$&_")}var Ev=Bne,pO=Ev.custom,hO=yO(pO)?pO:null,Yne=function e(t,n,r,i){var a=n||{};if(gi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gi(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=gi(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(gi(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(gi(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 bO(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?dO(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?dO(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return kv(t)?"[Array]":"[Object]";var f=hre(a,r);if(typeof i>"u")i=[];else if(gO(i,t)>=0)return"[Circular]";function p($,F,M){if(F&&(i=Gne.call(i),i.push(F)),M){var B={depth:a.depth};return gi(a,"quoteStyle")&&(B.quoteStyle=a.quoteStyle),e($,B,r+1,i)}return e($,a,r+1,i)}if(typeof t=="function"&&!vO(t)){var d=are(t),m=Hc(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(m.length>0?" { "+wr.call(m,", ")+" }":"")}if(yO(t)){var h=Xa?yi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_v.call(t);return typeof t=="object"&&!Xa?Bs(h):h}if(fre(t)){for(var y="<"+oO.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+mO(Jne(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+oO.call(String(t.nodeName))+">",y}if(kv(t)){if(t.length===0)return"[]";var b=Hc(t,p);return f&&!pre(b)?"["+Ov(b,f)+"]":"[ "+wr.call(b,", ")+" ]"}if(Qne(t)){var k=Hc(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!cO.call(t,"cause")?"{ ["+String(t)+"] "+wr.call(lO.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+wr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(hO&&typeof t[hO]=="function"&&Ev)return Ev(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ore(t)){var S=[];return rO&&rO.call(t,function($,F){S.push(p(F,t,!0)+" => "+p($,t))}),xO("Map",qc.call(t),S,f)}if(ure(t)){var E=[];return iO&&iO.call(t,function($){E.push(p($,t))}),xO("Set",Wc.call(t),E,f)}if(sre(t))return Tv("WeakMap");if(cre(t))return Tv("WeakSet");if(lre(t))return Tv("WeakRef");if(tre(t))return Bs(p(Number(t)));if(rre(t))return Bs(p(wv.call(t)));if(nre(t))return Bs(qne.call(t));if(ere(t))return Bs(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ht<"u"&&t===ht)return"{ [object globalThis] }";if(!Xne(t)&&!vO(t)){var O=Hc(t,p),L=fO?fO(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",T=!L&&an&&Object(t)===t&&an in t?xv.call(bi(t),8,-1):D?"Object":"",P=L||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=P+(T||D?"["+wr.call(lO.call([],T||[],D||[]),": ")+"] ":"");return O.length===0?q+"{}":f?q+"{"+Ov(O,f)+"}":q+"{ "+wr.call(O,", ")+" }"}return String(t)};function mO(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Jne(e){return yi.call(String(e),/"/g,"&quot;")}function kv(e){return bi(e)==="[object Array]"&&(!an||!(typeof e=="object"&&an in e))}function Xne(e){return bi(e)==="[object Date]"&&(!an||!(typeof e=="object"&&an in e))}function vO(e){return bi(e)==="[object RegExp]"&&(!an||!(typeof e=="object"&&an in e))}function Qne(e){return bi(e)==="[object Error]"&&(!an||!(typeof e=="object"&&an in e))}function ere(e){return bi(e)==="[object String]"&&(!an||!(typeof e=="object"&&an in e))}function tre(e){return bi(e)==="[object Number]"&&(!an||!(typeof e=="object"&&an in e))}function nre(e){return bi(e)==="[object Boolean]"&&(!an||!(typeof e=="object"&&an in e))}function yO(e){if(Xa)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!_v)return!1;try{return _v.call(e),!0}catch{}return!1}function rre(e){if(!e||typeof e!="object"||!wv)return!1;try{return wv.call(e),!0}catch{}return!1}var ire=Object.prototype.hasOwnProperty||function(e){return e in this};function gi(e,t){return ire.call(e,t)}function bi(e){return Wne.call(e)}function are(e){if(e.name)return e.name;var t=Zne.call(Hne.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function gO(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ore(e){if(!qc||!e||typeof e!="object")return!1;try{qc.call(e);try{Wc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function sre(e){if(!Ls||!e||typeof e!="object")return!1;try{Ls.call(e,Ls);try{Fs.call(e,Fs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function lre(e){if(!aO||!e||typeof e!="object")return!1;try{return aO.call(e),!0}catch{}return!1}function ure(e){if(!Wc||!e||typeof e!="object")return!1;try{Wc.call(e);try{qc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function cre(e){if(!Fs||!e||typeof e!="object")return!1;try{Fs.call(e,Fs);try{Ls.call(e,Ls)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function fre(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bO(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bO(xv.call(e,0,t.maxStringLength),t)+r}var i=yi.call(yi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,dre);return mO(i,"single",t)}function dre(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Kne.call(t.toString(16))}function Bs(e){return"Object("+e+")"}function Tv(e){return e+" { ? }"}function xO(e,t,n,r){var i=r?Ov(n,r):wr.call(n,", ");return e+" ("+t+") {"+i+"}"}function pre(e){for(var t=0;t<e.length;t++)if(gO(e[t],`
347
+ `)>=0)return!1;return!0}function hre(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=wr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:wr.call(Array(t+1),n)}}function Ov(e,t){if(e.length===0)return"";var n=`
348
348
  `+t.prev+t.base;return n+wr.call(e,","+n)+`
349
- `+t.prev}function Hc(e,t){var n=Tv(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=gi(e,i)?t(e[i],e):""}var a=typeof _v=="function"?_v(e):[],o;if(Xa){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)gi(e,u)&&(n&&String(Number(u))===u&&u<e.length||Xa&&o["$"+u]instanceof Symbol||(sO.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof _v=="function")for(var l=0;l<a.length;l++)cO.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var wO=Ya,Qa=Pne,lre=Vne,ure=Ms,Zc=wO("%WeakMap%",!0),Kc=wO("%Map%",!0),cre=Qa("WeakMap.prototype.get",!0),fre=Qa("WeakMap.prototype.set",!0),dre=Qa("WeakMap.prototype.has",!0),pre=Qa("Map.prototype.get",!0),hre=Qa("Map.prototype.set",!0),mre=Qa("Map.prototype.has",!0),$v=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},vre=function(e,t){var n=$v(e,t);return n&&n.value},yre=function(e,t,n){var r=$v(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},gre=function(e,t){return!!$v(e,t)},bre=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new ure("Side channel does not contain "+lre(a))},get:function(a){if(Zc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return cre(t,a)}else if(Kc){if(n)return pre(n,a)}else if(r)return vre(r,a)},has:function(a){if(Zc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return dre(t,a)}else if(Kc){if(n)return mre(n,a)}else if(r)return gre(r,a);return!1},set:function(a,o){Zc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Zc),fre(t,a,o)):Kc?(n||(n=new Kc),hre(n,a,o)):(r||(r={key:{},next:null}),yre(r,a,o))}};return i},xre=String.prototype.replace,wre=/%20/g,Iv={RFC1738:"RFC1738",RFC3986:"RFC3986"},Rv={default:Iv.RFC3986,formatters:{RFC1738:function(e){return xre.call(e,wre,"+")},RFC3986:function(e){return String(e)}},RFC1738:Iv.RFC1738,RFC3986:Iv.RFC3986},Sre=Rv,Pv=Object.prototype.hasOwnProperty,Gi=Array.isArray,Sr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),_re=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Gi(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},SO=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},Ere=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Gi(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pv.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return Gi(t)&&!Gi(n)&&(i=SO(t,r)),Gi(t)&&Gi(n)?(n.forEach(function(a,o){if(Pv.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Pv.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},kre=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Tre=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Av=1024,Ore=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=Av){for(var l=o.length>=Av?o.slice(u,u+Av):o,c=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===Sre.RFC1738&&(p===40||p===41)){c[c.length]=l.charAt(f);continue}if(p<128){c[c.length]=Sr[p];continue}if(p<2048){c[c.length]=Sr[192|p>>6]+Sr[128|p&63];continue}if(p<55296||p>=57344){c[c.length]=Sr[224|p>>12]+Sr[128|p>>6&63]+Sr[128|p&63];continue}f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=Sr[240|p>>18]+Sr[128|p>>12&63]+Sr[128|p>>6&63]+Sr[128|p&63]}s+=c.join("")}return s},Cre=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return _re(n),t},$re=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Ire=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Rre=function(t,n){return[].concat(t,n)},Pre=function(t,n){if(Gi(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},_O={arrayToObject:SO,assign:kre,combine:Rre,compact:Cre,decode:Tre,encode:Ore,isBuffer:Ire,isRegExp:$re,maybeMap:Pre,merge:Ere},EO=bre,Gc=_O,Us=Rv,Are=Object.prototype.hasOwnProperty,kO={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_r=Array.isArray,Nre=Array.prototype.push,TO=function(e,t){Nre.apply(e,_r(t)?t:[t])},Dre=Date.prototype.toISOString,OO=Us.default,Bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Gc.encode,encodeValuesOnly:!1,format:OO,formatter:Us.formatters[OO],indices:!1,serializeDate:function(t){return Dre.call(t)},skipNulls:!1,strictNullHandling:!1},Mre=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Nv={},jre=function e(t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,g){for(var b=t,k=g,S=0,E=!1;(k=k.get(Nv))!==void 0&&!E;){var O=k.get(t);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");E=!0}typeof k.get(Nv)>"u"&&(S=0)}if(typeof c=="function"?b=c(n,b):b instanceof Date?b=d(b):r==="comma"&&_r(b)&&(b=Gc.maybeMap(b,function(x){return x instanceof Date?d(x):x})),b===null){if(o)return l&&!y?l(n,Bt.encoder,v,"key",m):n;b=""}if(Mre(b)||Gc.isBuffer(b)){if(l){var L=y?n:l(n,Bt.encoder,v,"key",m);return[h(L)+"="+h(l(b,Bt.encoder,v,"value",m))]}return[h(n)+"="+h(String(b))]}var D=[];if(typeof b>"u")return D;var T;if(r==="comma"&&_r(b))y&&l&&(b=Gc.maybeMap(b,l)),T=[{value:b.length>0?b.join(",")||null:void 0}];else if(_r(c))T=c;else{var P=Object.keys(b);T=f?P.sort(f):P}var q=u?n.replace(/\./g,"%2E"):n,$=i&&_r(b)&&b.length===1?q+"[]":q;if(a&&_r(b)&&b.length===0)return $+"[]";for(var F=0;F<T.length;++F){var M=T[F],B=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&B===null)){var W=p&&u?M.replace(/\./g,"%2E"):M,U=_r(b)?typeof r=="function"?r($,W):$:$+(p?"."+W:"["+W+"]");g.set(t,S);var N=EO();N.set(Nv,g),TO(D,e(B,U,r,i,a,o,s,u,r==="comma"&&y&&_r(b)?null:l,c,f,p,d,m,h,y,v,N))}}return D},Lre=function(t){if(!t)return Bt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Bt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Us.default;if(typeof t.format<"u"){if(!Are.call(Us.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Us.formatters[r],a=Bt.filter;(typeof t.filter=="function"||_r(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in kO?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Bt.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:Bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Bt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Bt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bt.strictNullHandling}},Fre=function(e,t){var n=e,r=Lre(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):_r(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=kO[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=EO(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||TO(o,jre(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var p=o.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},eo=_O,Dv=Object.prototype.hasOwnProperty,Bre=Array.isArray,Tt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:eo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Ure=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},CO=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},zre="utf8=%26%2310003%3B",Vre="utf8=%E2%9C%93",qre=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===Vre?l="utf-8":o[u]===zre&&(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("]="),p=f===-1?c.indexOf("="):f+1,d,m;p===-1?(d=n.decoder(c,Tt.decoder,l,"key"),m=n.strictNullHandling?null:""):(d=n.decoder(c.slice(0,p),Tt.decoder,l,"key"),m=eo.maybeMap(CO(c.slice(p+1),n),function(y){return n.decoder(y,Tt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=Ure(m)),c.indexOf("[]=")>-1&&(m=Bre(m)?[m]:m);var h=Dv.call(r,d);h&&n.duplicates==="combine"?r[d]=eo.combine(r[d],m):(!h||n.duplicates==="last")&&(r[d]=m)}return r},Wre=function(e,t,n,r){for(var i=r?t:CO(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},Hre=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&Dv.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Dv.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return Wre(c,n,r,i)}},Zre=function(t){if(!t)return Tt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Tt.charset:t.charset,r=typeof t.duplicates>"u"?Tt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Tt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Tt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Tt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Tt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Tt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Tt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Tt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Tt.decoder,delimiter:typeof t.delimiter=="string"||eo.isRegExp(t.delimiter)?t.delimiter:Tt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Tt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Tt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Tt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Tt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Tt.strictNullHandling}},Kre=function(e,t){var n=Zre(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?qre(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=Hre(s,r[s],n,typeof e=="string");i=eo.merge(i,u,n)}return n.allowSparse===!0?i:eo.compact(i)},Gre=Fre,Yre=Kre,Jre=Rv,Xre={formats:Jre,parse:Yre,stringify:Gre};const Qre=Ke(Xre);var Mv={exports:{}};/** @license
349
+ `+t.prev}function Hc(e,t){var n=kv(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=gi(e,i)?t(e[i],e):""}var a=typeof Sv=="function"?Sv(e):[],o;if(Xa){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)gi(e,u)&&(n&&String(Number(u))===u&&u<e.length||Xa&&o["$"+u]instanceof Symbol||(sO.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof Sv=="function")for(var l=0;l<a.length;l++)cO.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var wO=Ya,Qa=Fne,mre=Yne,vre=Ms,Zc=wO("%WeakMap%",!0),Kc=wO("%Map%",!0),yre=Qa("WeakMap.prototype.get",!0),gre=Qa("WeakMap.prototype.set",!0),bre=Qa("WeakMap.prototype.has",!0),xre=Qa("Map.prototype.get",!0),wre=Qa("Map.prototype.set",!0),Sre=Qa("Map.prototype.has",!0),Cv=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},_re=function(e,t){var n=Cv(e,t);return n&&n.value},Ere=function(e,t,n){var r=Cv(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},kre=function(e,t){return!!Cv(e,t)},Tre=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new vre("Side channel does not contain "+mre(a))},get:function(a){if(Zc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return yre(t,a)}else if(Kc){if(n)return xre(n,a)}else if(r)return _re(r,a)},has:function(a){if(Zc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return bre(t,a)}else if(Kc){if(n)return Sre(n,a)}else if(r)return kre(r,a);return!1},set:function(a,o){Zc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Zc),gre(t,a,o)):Kc?(n||(n=new Kc),wre(n,a,o)):(r||(r={key:{},next:null}),Ere(r,a,o))}};return i},Ore=String.prototype.replace,Cre=/%20/g,$v={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iv={default:$v.RFC3986,formatters:{RFC1738:function(e){return Ore.call(e,Cre,"+")},RFC3986:function(e){return String(e)}},RFC1738:$v.RFC1738,RFC3986:$v.RFC3986},$re=Iv,Rv=Object.prototype.hasOwnProperty,Gi=Array.isArray,Sr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ire=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Gi(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},SO=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},Rre=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Gi(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Rv.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return Gi(t)&&!Gi(n)&&(i=SO(t,r)),Gi(t)&&Gi(n)?(n.forEach(function(a,o){if(Rv.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Rv.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},Pre=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Are=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Pv=1024,Nre=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=Pv){for(var l=o.length>=Pv?o.slice(u,u+Pv):o,c=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===$re.RFC1738&&(p===40||p===41)){c[c.length]=l.charAt(f);continue}if(p<128){c[c.length]=Sr[p];continue}if(p<2048){c[c.length]=Sr[192|p>>6]+Sr[128|p&63];continue}if(p<55296||p>=57344){c[c.length]=Sr[224|p>>12]+Sr[128|p>>6&63]+Sr[128|p&63];continue}f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=Sr[240|p>>18]+Sr[128|p>>12&63]+Sr[128|p>>6&63]+Sr[128|p&63]}s+=c.join("")}return s},Dre=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return Ire(n),t},Mre=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},jre=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Lre=function(t,n){return[].concat(t,n)},Fre=function(t,n){if(Gi(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},_O={arrayToObject:SO,assign:Pre,combine:Lre,compact:Dre,decode:Are,encode:Nre,isBuffer:jre,isRegExp:Mre,maybeMap:Fre,merge:Rre},EO=Tre,Gc=_O,Us=Iv,Bre=Object.prototype.hasOwnProperty,kO={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},_r=Array.isArray,Ure=Array.prototype.push,TO=function(e,t){Ure.apply(e,_r(t)?t:[t])},zre=Date.prototype.toISOString,OO=Us.default,Bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Gc.encode,encodeValuesOnly:!1,format:OO,formatter:Us.formatters[OO],indices:!1,serializeDate:function(t){return zre.call(t)},skipNulls:!1,strictNullHandling:!1},Vre=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Av={},qre=function e(t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,g){for(var b=t,k=g,S=0,E=!1;(k=k.get(Av))!==void 0&&!E;){var O=k.get(t);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");E=!0}typeof k.get(Av)>"u"&&(S=0)}if(typeof c=="function"?b=c(n,b):b instanceof Date?b=d(b):r==="comma"&&_r(b)&&(b=Gc.maybeMap(b,function(x){return x instanceof Date?d(x):x})),b===null){if(o)return l&&!y?l(n,Bt.encoder,v,"key",m):n;b=""}if(Vre(b)||Gc.isBuffer(b)){if(l){var L=y?n:l(n,Bt.encoder,v,"key",m);return[h(L)+"="+h(l(b,Bt.encoder,v,"value",m))]}return[h(n)+"="+h(String(b))]}var D=[];if(typeof b>"u")return D;var T;if(r==="comma"&&_r(b))y&&l&&(b=Gc.maybeMap(b,l)),T=[{value:b.length>0?b.join(",")||null:void 0}];else if(_r(c))T=c;else{var P=Object.keys(b);T=f?P.sort(f):P}var q=u?n.replace(/\./g,"%2E"):n,$=i&&_r(b)&&b.length===1?q+"[]":q;if(a&&_r(b)&&b.length===0)return $+"[]";for(var F=0;F<T.length;++F){var M=T[F],B=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&B===null)){var W=p&&u?M.replace(/\./g,"%2E"):M,U=_r(b)?typeof r=="function"?r($,W):$:$+(p?"."+W:"["+W+"]");g.set(t,S);var N=EO();N.set(Av,g),TO(D,e(B,U,r,i,a,o,s,u,r==="comma"&&y&&_r(b)?null:l,c,f,p,d,m,h,y,v,N))}}return D},Wre=function(t){if(!t)return Bt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Bt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Us.default;if(typeof t.format<"u"){if(!Bre.call(Us.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Us.formatters[r],a=Bt.filter;(typeof t.filter=="function"||_r(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in kO?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Bt.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:Bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Bt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Bt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Bt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Bt.strictNullHandling}},Hre=function(e,t){var n=e,r=Wre(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):_r(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=kO[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=EO(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||TO(o,qre(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var p=o.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},eo=_O,Nv=Object.prototype.hasOwnProperty,Zre=Array.isArray,Tt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:eo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Kre=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},CO=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Gre="utf8=%26%2310003%3B",Yre="utf8=%E2%9C%93",Jre=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===Yre?l="utf-8":o[u]===Gre&&(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("]="),p=f===-1?c.indexOf("="):f+1,d,m;p===-1?(d=n.decoder(c,Tt.decoder,l,"key"),m=n.strictNullHandling?null:""):(d=n.decoder(c.slice(0,p),Tt.decoder,l,"key"),m=eo.maybeMap(CO(c.slice(p+1),n),function(y){return n.decoder(y,Tt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=Kre(m)),c.indexOf("[]=")>-1&&(m=Zre(m)?[m]:m);var h=Nv.call(r,d);h&&n.duplicates==="combine"?r[d]=eo.combine(r[d],m):(!h||n.duplicates==="last")&&(r[d]=m)}return r},Xre=function(e,t,n,r){for(var i=r?t:CO(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},Qre=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&Nv.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Nv.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return Xre(c,n,r,i)}},eie=function(t){if(!t)return Tt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Tt.charset:t.charset,r=typeof t.duplicates>"u"?Tt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Tt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Tt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Tt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Tt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Tt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Tt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Tt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Tt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Tt.decoder,delimiter:typeof t.delimiter=="string"||eo.isRegExp(t.delimiter)?t.delimiter:Tt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Tt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Tt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Tt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Tt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Tt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Tt.strictNullHandling}},tie=function(e,t){var n=eie(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Jre(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=Qre(s,r[s],n,typeof e=="string");i=eo.merge(i,u,n)}return n.allowSparse===!0?i:eo.compact(i)},nie=Hre,rie=tie,iie=Iv,aie={formats:iie,parse:rie,stringify:nie};const oie=Ke(aie);var Dv={exports:{}};/** @license
350
350
  * eventsource.js
351
351
  * Available under MIT License (MIT)
352
352
  * https://github.com/Yaffle/EventSource/
353
- */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(R){l.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()}),h==null){var y=f;f=function(R,J){var ae=J.signal;return y(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}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(R){function J(Fe,z,A){if(A===1)return Fe>=128>>z&&Fe<<z<=2047;if(A===2)return Fe>=2048>>z&&Fe<<z<=55295||Fe>=57344>>z&&Fe<<z<=65535;if(A===3)return Fe>=65536>>z&&Fe<<z<=1114111;throw new Error}function ae(Fe,z){if(Fe===6*1)return z>>6>15?3:z>31?2:1;if(Fe===6*2)return z>15?3:2;if(Fe===6*3)return 3;throw new Error}for(var ee=65533,ke="",we=this.bitsNeeded,Re=this.codePoint,We=0;We<R.length;We+=1){var Ae=R[We];we!==0&&(Ae<128||Ae>191||!J(Re<<6|Ae&63,we-6,ae(we,Re)))&&(we=0,Re=ee,ke+=String.fromCharCode(Re)),we===0?(Ae>=0&&Ae<=127?(we=0,Re=Ae):Ae>=192&&Ae<=223?(we=6*1,Re=Ae&31):Ae>=224&&Ae<=239?(we=6*2,Re=Ae&15):Ae>=240&&Ae<=247?(we=6*3,Re=Ae&7):(we=0,Re=ee),we!==0&&!J(Re,we,ae(we,Re))&&(we=0,Re=ee)):(we-=6,Re=Re<<6|Ae&63),we===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=we,this.codePoint=Re,ke};var g=function(){try{return new d().decode(new m().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(d==null||m==null||!g())&&(d=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,we=0;this._abort=function(A){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(),we!==0&&(i(we),we=0),A||(ae.readyState=4,ae.onabort(null),ae.onreadystatechange())),ke=0};var Re=function(){if(ke===1){var A=0,X="",ce=void 0;if("contentType"in ee)A=200,X="OK",ce=ee.contentType;else try{A=ee.status,X=ee.statusText,ce=ee.getResponseHeader("Content-Type")}catch{A=0,X="",ce=void 0}A!==0&&(ke=2,ae.readyState=2,ae.status=A,ae.statusText=X,ae._contentType=ce,ae.onreadystatechange())}},We=function(){if(Re(),ke===2||ke===3){ke=3;var A="";try{A=ee.responseText}catch{}ae.readyState=3,ae.responseText=A,ae.onprogress()}},Ae=function(A,X){if((X==null||X.preventDefault==null)&&(X={preventDefault:b}),We(),ke===1||ke===2||ke===3){if(ke=4,we!==0&&(i(we),we=0),ae.readyState=4,A==="load")ae.onload(X);else if(A==="error")ae.onerror(X);else if(A==="abort")ae.onabort(X);else throw new TypeError;ae.onreadystatechange()}},Fe=function(A){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Ae(ee.responseText===""?"error":"load",A):ee.readyState===3?"onprogress"in ee||We():ee.readyState===2&&Re())},z=function(){we=r(function(){z()},500),ee.readyState===3&&We()};"onload"in ee&&(ee.onload=function(A){Ae("load",A)}),"onerror"in ee&&(ee.onerror=function(A){Ae("error",A)}),"onabort"in ee&&(ee.onabort=function(A){Ae("abort",A)}),"onprogress"in ee&&(ee.onprogress=We),"onreadystatechange"in ee&&(ee.onreadystatechange=function(A){Fe(A)}),("contentType"in ee||!("ontimeout"in a.prototype))&&(J+=(J.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(R,J,!0),"readyState"in ee&&(we=r(function(){z()},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))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var R=this;R._sendTimeout=r(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 E(R){for(var J=Object.create(null),ae=R.split(`\r
354
- `),ee=0;ee<ae.length;ee+=1){var ke=ae[ee],we=ke.split(": "),Re=we.shift(),We=we.join(": ");J[S(Re)]=We}this._map=J}E.prototype.get=function(R){return this._map[S(R)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function O(){}O.prototype.open=function(R,J,ae,ee,ke,we,Re){R.open("GET",ke);var We=0;R.onprogress=function(){var Fe=R.responseText,z=Fe.slice(We);We+=z.length,ae(z)},R.onerror=function(Fe){Fe.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 Fe=R.status,z=R.statusText,A=R.getResponseHeader("Content-Type"),X=R.getAllResponseHeaders();J(Fe,z,A,new E(X))}},R.withCredentials=we;for(var Ae in Re)Object.prototype.hasOwnProperty.call(Re,Ae)&&R.setRequestHeader(Ae,Re[Ae]);return R.send(),R};function L(R){this._headers=R}L.prototype.get=function(R){return this._headers.get(R)};function D(){}D.prototype.open=function(R,J,ae,ee,ke,we,Re){var We=null,Ae=new h,Fe=Ae.signal,z=new d;return f(ke,{headers:Re,credentials:we?"include":"same-origin",signal:Fe,cache:"no-store"}).then(function(A){return We=A.body.getReader(),J(A.status,A.statusText,A.headers.get("Content-Type"),new L(A.headers)),new c(function(X,ce){var Ee=function(){We.read().then(function(Oe){if(Oe.done)X(void 0);else{var Je=z.decode(Oe.value,{stream:!0});ae(Je),Ee()}}).catch(function(Oe){ce(Oe)})};Ee()})}).catch(function(A){if(A.name!=="AbortError")return A}).then(function(A){ee(A)}),{abort:function(){We!=null&&We.cancel(),Ae.abort()}}};function T(){this._listeners=Object.create(null)}function P(R){r(function(){throw R},0)}T.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(we){P(we)}}},T.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,we=0;we<ee.length;we+=1)ee[we]===J&&(ke=!0);ke||ee.push(J)},T.prototype.removeEventListener=function(R,J){R=String(R);var ae=this._listeners,ee=ae[R];if(ee!=null){for(var ke=[],we=0;we<ee.length;we+=1)ee[we]!==J&&ke.push(ee[we]);ke.length===0?delete ae[R]:ae[R]=ke}};function q(R){this.type=R,this.target=void 0}function $(R,J){q.call(this,R),this.data=J.data,this.lastEventId=J.lastEventId}$.prototype=Object.create(q.prototype);function F(R,J){q.call(this,R),this.status=J.status,this.statusText=J.statusText,this.headers=J.headers}F.prototype=Object.create(q.prototype);function M(R,J){q.call(this,R),this.error=J.error}M.prototype=Object.create(q.prototype);var B=-1,W=0,U=1,N=2,x=-1,V=0,K=1,_=2,Y=3,oe=/^text\/event\-stream(;.*)?$/i,ne=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,ne),le)},ue=function(R,J,ae){try{typeof J=="function"&&J.call(R,ae)}catch(ee){P(ee)}};function Q(R,J){T.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 Z(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var de=f!=null&&p!=null&&"body"in p.prototype;function ve(R,J,ae){J=String(J);var ee=!!ae.withCredentials,ke=ae.lastEventIdQueryParameterName||"lastEventId",we=he(1e3),Re=pe(ae.heartbeatTimeout,45e3),We="",Ae=we,Fe=!1,z=0,A=ae.headers||{},X=ae.Transport,ce=de&&X==null?void 0:new k(X!=null?new X:Z()),Ee=X!=null&&typeof X!="string"?new X:ce==null?new D:new O,Oe=void 0,Je=0,lt=B,Ut="",Ot="",Ze="",Ct="",tt=V,xn=0,$n=0,rr=function(pt,wt,zt,Vt){if(lt===W)if(pt===200&&zt!=null&&oe.test(zt)){lt=U,Fe=Date.now(),Ae=we,R.readyState=U;var Xt=new F("open",{status:pt,statusText:wt,headers:Vt});R.dispatchEvent(Xt),ue(R,R.onopen,Xt)}else{var qt="";pt!==200?(wt&&(wt=wt.replace(/\s+/g," ")),qt="EventSource's response has a status "+pt+" "+wt+" that is not 200. Aborting the connection."):qt="EventSource's response has a Content-Type specifying an unsupported type: "+(zt==null?"-":zt.replace(/\s+/g," "))+". Aborting the connection.",ir();var Xt=new F("error",{status:pt,statusText:wt,headers:Vt});R.dispatchEvent(Xt),ue(R,R.onerror,Xt),console.error(qt)}},Wr=function(pt){if(lt===U){for(var wt=-1,zt=0;zt<pt.length;zt+=1){var Vt=pt.charCodeAt(zt);(Vt===10||Vt===13)&&(wt=zt)}var Xt=(wt!==-1?Ct:"")+pt.slice(0,wt+1);Ct=(wt===-1?Ct:"")+pt.slice(wt+1),pt!==""&&(Fe=Date.now(),z+=pt.length);for(var qt=0;qt<Xt.length;qt+=1){var Vt=Xt.charCodeAt(qt);if(tt===x&&Vt===10)tt=V;else if(tt===x&&(tt=V),Vt===13||Vt===10){if(tt!==V){tt===K&&($n=qt+1);var Fn=Xt.slice(xn,$n-1),Bn=Xt.slice($n+($n<qt&&Xt.charCodeAt($n)===32?1:0),qt);Fn==="data"?(Ut+=`
355
- `,Ut+=Bn):Fn==="id"?Ot=Bn:Fn==="event"?Ze=Bn:Fn==="retry"?(we=pe(Bn,we),Ae=we):Fn==="heartbeatTimeout"&&(Re=pe(Bn,Re),Je!==0&&(i(Je),Je=r(function(){Hr()},Re)))}if(tt===V){if(Ut!==""){We=Ot,Ze===""&&(Ze="message");var ki=new $(Ze,{data:Ut.slice(1),lastEventId:Ot});if(R.dispatchEvent(ki),Ze==="open"?ue(R,R.onopen,ki):Ze==="message"?ue(R,R.onmessage,ki):Ze==="error"&&ue(R,R.onerror,ki),lt===N)return}Ut="",Ze=""}tt=Vt===13?x:V}else tt===V&&(xn=qt,tt=K),tt===K?Vt===58&&($n=qt+1,tt=_):tt===_&&(tt=Y)}}},$r=function(pt){if(lt===U||lt===W){lt=B,Je!==0&&(i(Je),Je=0),Je=r(function(){Hr()},Ae),Ae=he(Math.min(we*16,Ae*2)),R.readyState=W;var wt=new M("error",{error:pt});R.dispatchEvent(wt),ue(R,R.onerror,wt),pt!=null&&console.error(pt)}},ir=function(){lt=N,Oe!=null&&(Oe.abort(),Oe=void 0),Je!==0&&(i(Je),Je=0),R.readyState=N},Hr=function(){if(Je=0,lt!==B){if(!Fe&&Oe!=null)$r(new Error("No activity within "+Re+" milliseconds. "+(lt===W?"No response received.":z+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var pt=Math.max((Fe||Date.now())+Re-Date.now(),1);Fe=!1,Je=r(function(){Hr()},pt)}return}Fe=!1,z=0,Je=r(function(){Hr()},Re),lt=W,Ut="",Ze="",Ot=We,Ct="",xn=0,$n=0,tt=V;var wt=J;if(J.slice(0,5)!=="data:"&&J.slice(0,5)!=="blob:"&&We!==""){var zt=J.indexOf("?");wt=zt===-1?J:J.slice(0,zt+1)+J.slice(zt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Bn,ki){return ki===ke?"":Bn}),wt+=(J.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(We)}var Vt=R.withCredentials,Xt={};Xt.Accept="text/event-stream";var qt=R.headers;if(qt!=null)for(var Fn in qt)Object.prototype.hasOwnProperty.call(qt,Fn)&&(Xt[Fn]=qt[Fn]);try{Oe=Ee.open(ce,rr,Wr,$r,wt,Vt,Xt)}catch(Bn){throw ir(),Bn}};R.url=J,R.readyState=W,R.withCredentials=ee,R.headers=A,R._close=ir,Hr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=W,Q.prototype.OPEN=U,Q.prototype.CLOSED=N,Q.prototype.close=function(){this._close()},Q.CONNECTING=W,Q.OPEN=U,Q.CLOSED=N,Q.prototype.withCredentials=void 0;var $e=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&($e=Q),function(R){{var J=R(t);J!==void 0&&(e.exports=J)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=u,R.EventSource=$e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ht:globalThis)})(Mv,Mv.exports);var eie=Mv.exports;const tie=Ke(eie);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var jv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(jv||(jv={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=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}},re=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"]),nie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Cn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,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(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof Cn))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=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Cn.create=e=>new Cn(e);const to=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let $O=to;function rie(e){$O=e}function Yc(){return $O}const Jc=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},iie=[];function me(e,t){const n=Yc(),r=Jc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===to?void 0:to].filter(i=>!!i)});e.common.issues.push(r)}class on{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),no=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),Lv=e=>e.status==="aborted",Fv=e=>e.status==="dirty",zs=e=>e.status==="valid",Vs=e=>typeof Promise<"u"&&e instanceof Promise;function Xc(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function IO(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var 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={}));var qs,Ws;class Er{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const RO=(e,t)=>{if(zs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Cn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class qe{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 xi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return RO(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Vs(i)?i:Promise.resolve(i));return RO(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new nr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Tr.create(this,this._def)}nullable(){return Ei.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this,this._def)}promise(){return oo.create(this,this._def)}or(t){return Gs.create([this,t],this._def)}and(t){return Ys.create(this,t,this._def)}transform(t){return new nr({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tl({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new zv({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nl({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rl.create(this,t)}readonly(){return il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aie=/^c[^\s-]{8,}$/i,oie=/^[0-9a-z]+$/,sie=/^[0-9A-HJKMNP-TV-Z]{26}$/,lie=/^[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,uie=/^[a-z0-9_-]{21}$/i,cie=/^[-+]?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)?)??$/,fie=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,die="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bv;const pie=/^(?:(?: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])$/,hie=/^(([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})))$/,mie=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PO="((\\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])))",vie=new RegExp(`^${PO}$`);function AO(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 yie(e){return new RegExp(`^${AO(e)}$`)}function NO(e){let t=`${PO}T${AO(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function gie(e,t){return!!((t==="v4"||!t)&&pie.test(e)||(t==="v6"||!t)&&hie.test(e))}class er extends qe{_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:re.invalid_type,expected:be.string,received:a.parsedType}),Me}const r=new on;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:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")fie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Bv||(Bv=new RegExp(die,"u")),Bv.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")lie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")uie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")aie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")oie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")sie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:re.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:re.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?NO(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?vie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?yie(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?cie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?gie(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?mie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:re.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:re.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new er({...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)})}nanoid(t){return this._addCheck({kind:"nanoid",...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)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Te.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,...Te.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new er({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}er.create=e=>{var t;return new er({checks:[],typeName:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function bie(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class wi extends qe{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:re.invalid_type,expected:be.number,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?bie(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new wi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new wi({...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,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}wi.create=e=>new wi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Si extends qe{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:re.invalid_type,expected:be.bigint,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new Si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new Si({...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,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Si.create=e=>{var t;return new Si({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class Hs extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),Me}return cn(t.data)}}Hs.create=e=>new Hs({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Yi extends qe{_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:re.invalid_type,expected:be.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_date}),Me}const r=new on;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:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Yi.create=e=>new Yi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...ze(e)});class Qc extends qe{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),Me}return cn(t.data)}}Qc.create=e=>new Qc({typeName:De.ZodSymbol,...ze(e)});class Zs extends qe{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),Me}return cn(t.data)}}Zs.create=e=>new Zs({typeName:De.ZodUndefined,...ze(e)});class Ks extends qe{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),Me}return cn(t.data)}}Ks.create=e=>new Ks({typeName:De.ZodNull,...ze(e)});class ro extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}ro.create=e=>new ro({typeName:De.ZodAny,...ze(e)});class Ji extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}Ji.create=e=>new Ji({typeName:De.ZodUnknown,...ze(e)});class Vr extends qe{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),Me}}Vr.create=e=>new Vr({typeName:De.ZodNever,...ze(e)});class ef extends qe{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),Me}return cn(t.data)}}ef.create=e=>new ef({typeName:De.ZodVoid,...ze(e)});class tr extends qe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?re.too_big:re.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Er(n,o,n.path,s)))).then(o=>on.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Er(n,o,n.path,s)));return on.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new tr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new tr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new tr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}tr.create=(e,t)=>new tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function io(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Tr.create(io(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof tr?new tr({...e._def,type:io(e.element)}):e instanceof Tr?Tr.create(io(e.unwrap())):e instanceof Ei?Ei.create(io(e.unwrap())):e instanceof kr?kr.create(e.items.map(t=>io(t))):e}class Et extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const l=this._getOrReturnCtx(t);return me(l,{code:re.invalid_type,expected:be.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&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 Er(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){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:re.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Er(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,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>on.mergeObjectSync(r,l)):on.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.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,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return io(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return DO(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)});class Gs extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Cn(s.ctx.common.issues));return me(n,{code:re.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.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 n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Cn(u));return me(n,{code:re.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}Gs.create=(e,t)=>new Gs({options:e,typeName:De.ZodUnion,...ze(t)});const qr=e=>e instanceof Xs?qr(e.schema):e instanceof nr?qr(e.innerType()):e instanceof Qs?[e.value]:e instanceof _i?e.options:e instanceof el?et.objectValues(e.enum):e instanceof tl?qr(e._def.innerType):e instanceof Zs?[void 0]:e instanceof Ks?[null]:e instanceof Tr?[void 0,...qr(e.unwrap())]:e instanceof Ei?[null,...qr(e.unwrap())]:e instanceof zv||e instanceof il?qr(e.unwrap()):e instanceof nl?qr(e._def.innerType):[];class tf extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:re.invalid_type,expected:be.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new tf({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function Uv(e,t){const n=xi(e),r=xi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===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=Uv(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===be.array&&r===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=Uv(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ys extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Lv(a)||Lv(o))return Me;const s=Uv(a.value,o.value);return s.valid?((Fv(a)||Fv(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:re.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ys.create=(e,t,n)=>new Ys({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});class kr extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return me(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Er(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>on.mergeArray(n,o)):on.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new kr({...this._def,rest:t})}}kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kr({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};class Js extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:re.invalid_type,expected:be.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Er(r,s,r.path,s)),value:o._parse(new Er(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof qe?new Js({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(r)}):new Js({keyType:er.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}}class nf extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.map)return me(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Er(r,s,r.path,[l,"key"])),value:a._parse(new Er(r,u,r.path,[l,"value"]))}));if(r.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 Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.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 Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}nf.create=(e,t,n)=>new nf({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});class Xi extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Er(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});class ao extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:re.invalid_type,expected:be.function,received:n.parsedType}),Me;function r(s,u){return Jc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yc(),to].filter(l=>!!l),issueData:{code:re.invalid_arguments,argumentsError:u}})}function i(s,u){return Jc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yc(),to].filter(l=>!!l),issueData:{code:re.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof oo){const s=this;return cn(async function(...u){const l=new Cn([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return cn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Cn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Cn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ao({...this._def,args:kr.create(t).rest(Ji.create())})}returns(t){return new ao({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ao({args:t||kr.create([]).rest(Ji.create()),returns:n||Ji.create(),typeName:De.ZodFunction,...ze(r)})}}class Xs extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Xs.create=(e,t)=>new Xs({getter:e,typeName:De.ZodLazy,...ze(t)});class Qs extends qe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Qs.create=(e,t)=>new Qs({value:e,typeName:De.ZodLiteral,...ze(t)});function DO(e,t){return new _i({values:e,typeName:De.ZodEnum,...ze(t)})}class _i extends qe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:re.invalid_type}),Me}if(Xc(this,qs)||IO(this,qs,new Set(this._def.values)),!Xc(this,qs).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:re.invalid_enum_value,options:r}),Me}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return _i.create(t,{...this._def,...n})}exclude(t,n=this._def){return _i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}qs=new WeakMap,_i.create=DO;class el extends qe{constructor(){super(...arguments),Ws.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:re.invalid_type}),Me}if(Xc(this,Ws)||IO(this,Ws,new Set(et.getValidEnumValues(this._def.values))),!Xc(this,Ws).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:re.invalid_enum_value,options:i}),Me}return cn(t.data)}get enum(){return this._def.values}}Ws=new WeakMap,el.create=(e,t)=>new el({values:e,typeName:De.ZodNativeEnum,...ze(t)});class oo extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:re.invalid_type,expected:be.promise,received:n.parsedType}),Me;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return cn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}oo.create=(e,t)=>new oo({type:e,typeName:De.ZodPromise,...ze(t)});class nr extends qe{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:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?no(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?no(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.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(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!zs(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>zs(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}nr.create=(e,t,n)=>new nr({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)}),nr.createWithPreprocess=(e,t,n)=>new nr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});class Tr extends qe{_parse(t){return this._getType(t)===be.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tr.create=(e,t)=>new Tr({innerType:e,typeName:De.ZodOptional,...ze(t)});class Ei extends qe{_parse(t){return this._getType(t)===be.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ei.create=(e,t)=>new Ei({innerType:e,typeName:De.ZodNullable,...ze(t)});class tl extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class nl extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Vs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}nl.create=(e,t)=>new nl({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class rf extends qe{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}rf.create=e=>new rf({typeName:De.ZodNaN,...ze(e)});const xie=Symbol("zod_brand");class zv extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class rl extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),no(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new rl({in:t,out:n,typeName:De.ZodPipeline})}}class il extends qe{_parse(t){const n=this._def.innerType._parse(t),r=i=>(zs(i)&&(i.value=Object.freeze(i.value)),i);return Vs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}il.create=(e,t)=>new il({innerType:e,typeName:De.ZodReadonly,...ze(t)});function MO(e,t={},n){return e?ro.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ro.create()}const wie={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 Sie=(e,t={message:`Input not instance of ${e.name}`})=>MO(n=>n instanceof e,t),jO=er.create,LO=wi.create,_ie=rf.create,Eie=Si.create,FO=Hs.create,kie=Yi.create,Tie=Qc.create,Oie=Zs.create,Cie=Ks.create,$ie=ro.create,Iie=Ji.create,Rie=Vr.create,Pie=ef.create,Aie=tr.create,Nie=Et.create,Die=Et.strictCreate,Mie=Gs.create,jie=tf.create,Lie=Ys.create,Fie=kr.create,Bie=Js.create,Uie=nf.create,zie=Xi.create,Vie=ao.create,qie=Xs.create,Wie=Qs.create,Hie=_i.create,Zie=el.create,Kie=oo.create,BO=nr.create,Gie=Tr.create,Yie=Ei.create,Jie=nr.createWithPreprocess,Xie=rl.create;var H=Object.freeze({__proto__:null,defaultErrorMap:to,setErrorMap:rie,getErrorMap:Yc,makeIssue:Jc,EMPTY_PATH:iie,addIssueToContext:me,ParseStatus:on,INVALID:Me,DIRTY:no,OK:cn,isAborted:Lv,isDirty:Fv,isValid:zs,isAsync:Vs,get util(){return et},get objectUtil(){return jv},ZodParsedType:be,getParsedType:xi,ZodType:qe,datetimeRegex:NO,ZodString:er,ZodNumber:wi,ZodBigInt:Si,ZodBoolean:Hs,ZodDate:Yi,ZodSymbol:Qc,ZodUndefined:Zs,ZodNull:Ks,ZodAny:ro,ZodUnknown:Ji,ZodNever:Vr,ZodVoid:ef,ZodArray:tr,ZodObject:Et,ZodUnion:Gs,ZodDiscriminatedUnion:tf,ZodIntersection:Ys,ZodTuple:kr,ZodRecord:Js,ZodMap:nf,ZodSet:Xi,ZodFunction:ao,ZodLazy:Xs,ZodLiteral:Qs,ZodEnum:_i,ZodNativeEnum:el,ZodPromise:oo,ZodEffects:nr,ZodTransformer:nr,ZodOptional:Tr,ZodNullable:Ei,ZodDefault:tl,ZodCatch:nl,ZodNaN:rf,BRAND:xie,ZodBranded:zv,ZodPipeline:rl,ZodReadonly:il,custom:MO,Schema:qe,ZodSchema:qe,late:wie,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>er.create({...e,coerce:!0}),number:e=>wi.create({...e,coerce:!0}),boolean:e=>Hs.create({...e,coerce:!0}),bigint:e=>Si.create({...e,coerce:!0}),date:e=>Yi.create({...e,coerce:!0})},any:$ie,array:Aie,bigint:Eie,boolean:FO,date:kie,discriminatedUnion:jie,effect:BO,enum:Hie,function:Vie,instanceof:Sie,intersection:Lie,lazy:qie,literal:Wie,map:Uie,nan:_ie,nativeEnum:Zie,never:Rie,null:Cie,nullable:Yie,number:LO,object:Nie,oboolean:()=>FO().optional(),onumber:()=>LO().optional(),optional:Gie,ostring:()=>jO().optional(),pipeline:Xie,preprocess:Jie,promise:Kie,record:Bie,set:zie,strictObject:Die,string:jO,symbol:Tie,transformer:BO,tuple:Fie,undefined:Oie,union:Mie,unknown:Iie,void:Pie,NEVER:Me,ZodIssueCode:re,quotelessJson:nie,ZodError:Cn}),Qie=Object.defineProperty,eae=(e,t,n)=>t in e?Qie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tae=(e,t,n)=>(eae(e,t+"",n),n),nae={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Vv=typeof window<"u"&&typeof window.document<"u"?window.crypto:FT;Vv.getRandomValues||(Vv=nae);var xt=class extends Error{constructor(t,n,r,i,a,o){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.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(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Vv.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},rae=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,qv=e=>e instanceof xt||rae(e)&&e.isApiError===!0,al=class extends xt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},iae=class extends xt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},aae=class extends xt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},oae=class extends xt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},sae=class extends xt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},lae=class extends xt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},uae=class extends xt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},cae=class extends xt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},fae=class extends xt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},dae=class extends xt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},pae=class extends xt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},hae=class extends xt{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},mae=class extends xt{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},vae=class extends xt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},yae=class extends xt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},gae=class extends xt{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},bae=class extends xt{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},xae=class extends xt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},wae=class extends xt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},Sae=class extends xt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},_ae=class extends xt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},Eae=class extends xt{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},kae=class extends xt{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},Tae=class extends xt{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},Oae={Unknown:al,Internal:iae,Unauthorized:aae,Forbidden:oae,PayloadTooLarge:sae,InvalidPayload:lae,UnsupportedMediaType:uae,MethodNotFound:cae,ResourceNotFound:fae,InvalidJsonSchema:dae,InvalidDataFormat:pae,InvalidIdentifier:hae,RelationConflict:mae,ReferenceConstraint:vae,ResourceLockedConflict:yae,ReferenceNotFound:gae,InvalidQuery:bae,Runtime:xae,AlreadyExists:wae,RateLimited:Sae,PaymentRequired:_ae,QuotaExceeded:Eae,LimitExceeded:kae,BreakingChanges:Tae},UO=e=>qv(e)?e:e instanceof Error?new al(e.message,e):typeof e=="string"?new al(e):Cae(e);function Cae(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=Oae[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new al(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new al("An invalid error occurred: "+JSON.stringify(e))}var $ae=e=>e[1]!==void 0,Nt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter($ae),s=Object.fromEntries(o),u=Qre.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n;return{method:t,url:l,headers:s,data:a}},Iae=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Rae=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Pae=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Aae=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Nae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Dae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Mae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),jae=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:{}}),Lae=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:{}}),Fae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Bae=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Uae=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),zae=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Vae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),qae=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Wae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Hae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Zae=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Kae=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}}),Gae=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}}),Yae=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Iae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Rae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Pae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=Aae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Nae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=Dae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Mae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=jae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Lae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=Fae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Bae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Uae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=zae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=Vae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=qae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=Wae(e),o=(this.props.toAxiosRequest??Nt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=Hae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=Zae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=Kae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=Gae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});this.axiosInstance=e,this.props=t}};function Dt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?UO(e.response.data):UO(e)}var zO=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},Jae=(e,t)=>{const n=new tie.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new zO;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},Xae=async(e,t={})=>{const{emitter:n,source:r}=Jae(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},Qae=H.object({type:H.literal("message_created"),data:H.object({id:H.string().describe("Id of the [Message](#schema_message)"),createdAt:H.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:H.union([H.object({audioUrl:H.string().min(1),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),type:H.literal("card")}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)}))})),type:H.literal("carousel")}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),type:H.literal("location")}),H.object({text:H.string().min(1),type:H.literal("text"),value:H.string().optional()}),H.object({videoUrl:H.string().min(1),type:H.literal("video")}),H.object({items:H.array(H.union([H.object({type:H.literal("text"),payload:H.object({text:H.string().min(1)})}),H.object({type:H.literal("markdown"),payload:H.object({markdown:H.string().min(1)})}),H.object({type:H.literal("image"),payload:H.object({imageUrl:H.string().min(1)})}),H.object({type:H.literal("audio"),payload:H.object({audioUrl:H.string().min(1)})}),H.object({type:H.literal("video"),payload:H.object({videoUrl:H.string().min(1)})}),H.object({type:H.literal("file"),payload:H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional()})}),H.object({type:H.literal("location"),payload:H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional()})})])),type:H.literal("bloc")}),H.object({markdown:H.string().min(1),type:H.literal("markdown")})]).describe("Payload is the content type of the message."),userId:H.string().describe("ID of the [User](#schema_user)"),conversationId:H.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:H.record(H.union([H.any(),H.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).")}),eoe=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.union([H.literal("show"),H.literal("hide"),H.literal("toggle")])})}),toe=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.union([H.any(),H.null()]))})}),noe=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.union([H.any(),H.null()]))})}),roe=H.object({type:H.literal("typing_started"),data:H.object({timeout:H.number().optional()})}),ioe=H.object({type:H.literal("typing_stopped"),data:H.record(H.never())}),aoe={messageCreated:Qae,webchatVisibility:eoe,webchatConfig:toe,custom:noe,typingStarted:roe,typingStopped:ioe},VO="unknown error",qO=class extends zO{constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await Xae(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(aoe)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(VO);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(VO)}});this._props=t}get status(){return this._state.status}},WO=qO;tae(WO,"listen",async e=>{const t=new qO(e);return await t.connect(),t});var HO=100*1024*1024,ooe=HO,soe=HO,loe=6e4,ZO=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await WO.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??loe,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:ooe,maxContentLength:soe});this._auto=new Yae(i)}};const uoe=6e4;function KO({apiUrl:e,clientId:t,sseTimeout:n=uoe}){const r=new ZO({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return so(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return so(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(so),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return so(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}function so(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=cf(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const af={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},bn=(e,t)=>e.status===t,Or=(e,t)=>af[e.status]<af[t],GO=(e,t)=>af[e.status]>=af[t];class Cr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const coe=6e4;class foe extends bf{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(GO(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(bn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(GO(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return bn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=cf(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new ZO({apiUrl:r,sseTimeout:coe})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Or(this._state,"user_created"))return this._state.userId}async getUser(){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Or(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){bn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():bn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=g=>{var b;return h((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=Jm(f)?f:"file",d=p==="image"?{type:p,imageUrl:c}:p==="audio"?{type:p,audioUrl:c}:p==="video"?{type:p,videoUrl:c}:{type:p,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:c,name:a,type:p}}async sendMessage(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_created")&&this._state.conversationId===n||bn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Or(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(qv(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(qv(r)&&i(r))return!1;throw r}}async newConversation(){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!bn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const doe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new foe({apiUrl:t,clientId:e}),poe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=j.useState(doe({clientId:e,apiUrl:t}));return n};function hoe(){const[e,t]=j.useState(!1),n=j.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var YO={},Wv={},of=ht&&ht.__assign||function(){return of=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},of.apply(this,arguments)};Object.defineProperty(Wv,"__esModule",{value:!0});var moe={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function voe(e){var t=of(of({},moe),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Wv.getSanitizedOptions=voe;var Hv={},Zv={},sf={},Kv={},Gv={};Object.defineProperty(Gv,"__esModule",{value:!0});function yoe(e){var t=Math.random()*e;return Math.round(t)}Gv.fullJitter=yoe;var Yv={};Object.defineProperty(Yv,"__esModule",{value:!0});function goe(e){return e}Yv.noJitter=goe,Object.defineProperty(Kv,"__esModule",{value:!0});var boe=Gv,xoe=Yv;function woe(e){switch(e.jitter){case"full":return boe.fullJitter;case"none":default:return xoe.noJitter}}Kv.JitterFactory=woe,Object.defineProperty(sf,"__esModule",{value:!0});var Soe=Kv,_oe=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Soe.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();sf.Delay=_oe;var Eoe=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),koe=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Toe=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Zv,"__esModule",{value:!0});var Ooe=sf,Coe=function(e){Eoe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return koe(this,void 0,void 0,function(){return Toe(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Ooe.Delay);Zv.SkipFirstDelay=Coe;var Jv={},$oe=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Jv,"__esModule",{value:!0});var Ioe=sf,Roe=function(e){$oe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ioe.Delay);Jv.AlwaysDelay=Roe,Object.defineProperty(Hv,"__esModule",{value:!0});var Poe=Zv,Aoe=Jv;function Noe(e,t){var n=Doe(e);return n.setAttemptNumber(t),n}Hv.DelayFactory=Noe;function Doe(e){return e.delayFirstAttempt?new Aoe.AlwaysDelay(e):new Poe.SkipFirstDelay(e)}var Xv=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Qv=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(YO,"__esModule",{value:!0});var Moe=Wv,joe=Hv;function Loe(e,t){return t===void 0&&(t={}),Xv(this,void 0,void 0,function(){var n,r;return Qv(this,function(i){switch(i.label){case 0:return n=Moe.getSanitizedOptions(t),r=new Boe(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var Foe=YO.backOff=Loe,Boe=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Xv(this,void 0,void 0,function(){var t,n;return Qv(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Xv(this,void 0,void 0,function(){var t;return Qv(this,function(n){switch(n.label){case 0:return t=joe.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function Uoe({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,...r}){const[i,a]=j.useState(),o=Bo(D=>D.messages),s=Bo(D=>D.addMessage),u=Bo(D=>D.fetchMessages),l=Bo(D=>D.setMessages),c=Bo(D=>D.isFetching),[f,p]=j.useState("connecting"),{isTyping:d,setIsTyping:m}=hoe(),h=j.useMemo(()=>new bf,[]),y=bx(n),v=j.useMemo(()=>KO({apiUrl:e,clientId:t}),[e,t]),g=j.useRef(null),[b,k]=j.useState(r.userKey),[S,E]=j.useState(r.conversationId);async function O(D){const{conversation:T}=await v.createConversation({"x-user-key":D});return y.setState({conversationId:T.id}),T.id}if(j.useEffect(()=>{let D=!0;async function T({userKey:P,conversationId:q}){let $,F=r.userKey??P,M=r.conversationId??q;if(p("connecting"),!F){const U=y.getState().user;F=U==null?void 0:U.userToken}if(!F){const{key:U,user:N}=await v.createUser({});$=N,F=U,y.setState({user:{userId:N.id,userToken:F}})}if(!$){const{user:U}=await v.getUser({"x-user-key":F});$=U}M||(M=y.getState().conversationId),M||(M=await O(F));const[B,W]=[await v.listenConversation({"x-user-key":F,id:M}),await u({client:v,conversationId:M,userKey:F})];JO({emitter:h,signalEmitter:B}),D&&(g.current=B,k(F),E(M),a($),l(W),p("connected"))}return T({userKey:b,conversationId:S}).catch(P=>{console.error(P)}),()=>{g.current&&(g.current.cleanup(),g.current=null),D=!1}},[b,S,v,h,r.conversationId,r.userKey]),j.useEffect(()=>{var T;if(!b||!S)return;async function D({userKey:P,conversationId:q}){const $=await v.listenConversation({"x-user-key":P,id:q});g.current=$,JO({emitter:h,signalEmitter:$})}f==="error"&&((T=g.current)==null||T.cleanup(),Foe(()=>D({conversationId:S,userKey:b}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),p("connected"))},[f,b,S]),j.useEffect(()=>{const D=[h.on("message",T=>((i==null?void 0:i.id)!==T.authorId&&h.emit("isTyping",{isTyping:!1,timeout:0}),s(T))),h.on("isTyping",({isTyping:T,timeout:P})=>{m(T,P)}),h.on("error",()=>{p("error")})];return()=>{D.forEach(T=>T())}},[]),f==="connecting"||!b||!S)return{clientState:"connecting",on:h.on.bind(h),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:c};const L={sendMessage:async D=>{const T=lT();s(so({id:T,createdAt:new Date().toISOString(),userId:(i==null?void 0:i.id)??"",conversationId:S,payload:D,metadata:{clientMessageId:T,delivered:!1}})),await v.createMessage({"x-user-key":b,conversationId:S,payload:D,metadata:{clientMessageId:T}}).catch(P=>h.emit("error",P))},updateUser:async D=>{const{user:T}=await v.updateUser({"x-user-key":b,name:D.name,pictureUrl:D.pictureUrl,userData:D.data});return T},sendEvent:async D=>{await v.createEvent({"x-user-key":b,conversationId:S,payload:{type:"custom",data:D}})},uploadFile:async D=>{const{size:T,name:P}=D,$=await(N=>new Promise((x,V)=>{const K=new FileReader;K.onload=_=>{var Y;return x((Y=_.target)==null?void 0:Y.result)},K.onerror=_=>{var Y;return V((Y=_.target)==null?void 0:Y.error)},K.readAsArrayBuffer(N)}))(D),{file:{uploadUrl:F,contentType:M,url:B}}=await v.createFile({"x-user-key":b,size:T,key:P,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(F,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:$});const W=M.split("/").shift()??"",U=Jm(W)?W:"file";return{fileUrl:B,name:P,type:U}},getUser:async()=>{const{user:D}=await v.getUser({"x-user-key":b});return D}};return{clientState:f,on:h.on.bind(h),client:L,messages:o,conversationId:S,newConversation:()=>{l([]),O(b).then(E)},user:i,isTyping:d,isFetchingMessages:c}}function JO({emitter:e,signalEmitter:t}){t.on("unknown",n=>{typeof n=="string"&&n==="ping"||console.debug("unknown event",n)}),t.on("message_created",n=>{e.emit("message",so(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}Pe.Avatar=Sl,Pe.Block=xa,Pe.Composer=qw,Pe.Container=pp,Pe.Fab=M0,Pe.Header=z0,Pe.Message=gp,Pe.MessageList=Ym,Pe.Modal=ui,Pe.ModalProvider=Ww,Pe.RestartConversationButton=U0,Pe.StylesheetProvider=Hw,Pe.TypingIndicator=V0,Pe.Webchat=Pee,Pe.WebchatThemeSchema=Tf,Pe.__adapters=dC,Pe.avatarThemeSchema=wl,Pe.blockThemeSchema=eg,Pe.configPropsSchema=ig,Pe.configurationSchema=Jy,Pe.cssStyleSchema=Qy,Pe.descriptionItemSchema=aa,Pe.fileTypes=uT,Pe.generateThemeStylesheet=ag,Pe.getClient=KO,Pe.getUseUserStore=bx,Pe.initPropsSchema=J$,Pe.isFileType=Jm,Pe.markdownTypeSchema=Xy,Pe.renderers=jw,Pe.statePropsSchema=ng,Pe.styleOptionSchema=fe,Pe.themeSchema=tg,Pe.useClient=poe,Pe.useWebchatClient=Uoe,Pe.useWebchatStore=ql,Pe.userPropsSchema=rg,Pe.webchatClasses=yt,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
353
+ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(R){l.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()}),h==null){var y=f;f=function(R,J){var ae=J.signal;return y(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}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(R){function J(Fe,z,A){if(A===1)return Fe>=128>>z&&Fe<<z<=2047;if(A===2)return Fe>=2048>>z&&Fe<<z<=55295||Fe>=57344>>z&&Fe<<z<=65535;if(A===3)return Fe>=65536>>z&&Fe<<z<=1114111;throw new Error}function ae(Fe,z){if(Fe===6*1)return z>>6>15?3:z>31?2:1;if(Fe===6*2)return z>15?3:2;if(Fe===6*3)return 3;throw new Error}for(var ee=65533,ke="",we=this.bitsNeeded,Pe=this.codePoint,We=0;We<R.length;We+=1){var Ae=R[We];we!==0&&(Ae<128||Ae>191||!J(Pe<<6|Ae&63,we-6,ae(we,Pe)))&&(we=0,Pe=ee,ke+=String.fromCharCode(Pe)),we===0?(Ae>=0&&Ae<=127?(we=0,Pe=Ae):Ae>=192&&Ae<=223?(we=6*1,Pe=Ae&31):Ae>=224&&Ae<=239?(we=6*2,Pe=Ae&15):Ae>=240&&Ae<=247?(we=6*3,Pe=Ae&7):(we=0,Pe=ee),we!==0&&!J(Pe,we,ae(we,Pe))&&(we=0,Pe=ee)):(we-=6,Pe=Pe<<6|Ae&63),we===0&&(Pe<=65535?ke+=String.fromCharCode(Pe):(ke+=String.fromCharCode(55296+(Pe-65535-1>>10)),ke+=String.fromCharCode(56320+(Pe-65535-1&1023))))}return this.bitsNeeded=we,this.codePoint=Pe,ke};var g=function(){try{return new d().decode(new m().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(d==null||m==null||!g())&&(d=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,we=0;this._abort=function(A){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(),we!==0&&(i(we),we=0),A||(ae.readyState=4,ae.onabort(null),ae.onreadystatechange())),ke=0};var Pe=function(){if(ke===1){var A=0,X="",ce=void 0;if("contentType"in ee)A=200,X="OK",ce=ee.contentType;else try{A=ee.status,X=ee.statusText,ce=ee.getResponseHeader("Content-Type")}catch{A=0,X="",ce=void 0}A!==0&&(ke=2,ae.readyState=2,ae.status=A,ae.statusText=X,ae._contentType=ce,ae.onreadystatechange())}},We=function(){if(Pe(),ke===2||ke===3){ke=3;var A="";try{A=ee.responseText}catch{}ae.readyState=3,ae.responseText=A,ae.onprogress()}},Ae=function(A,X){if((X==null||X.preventDefault==null)&&(X={preventDefault:b}),We(),ke===1||ke===2||ke===3){if(ke=4,we!==0&&(i(we),we=0),ae.readyState=4,A==="load")ae.onload(X);else if(A==="error")ae.onerror(X);else if(A==="abort")ae.onabort(X);else throw new TypeError;ae.onreadystatechange()}},Fe=function(A){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Ae(ee.responseText===""?"error":"load",A):ee.readyState===3?"onprogress"in ee||We():ee.readyState===2&&Pe())},z=function(){we=r(function(){z()},500),ee.readyState===3&&We()};"onload"in ee&&(ee.onload=function(A){Ae("load",A)}),"onerror"in ee&&(ee.onerror=function(A){Ae("error",A)}),"onabort"in ee&&(ee.onabort=function(A){Ae("abort",A)}),"onprogress"in ee&&(ee.onprogress=We),"onreadystatechange"in ee&&(ee.onreadystatechange=function(A){Fe(A)}),("contentType"in ee||!("ontimeout"in a.prototype))&&(J+=(J.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(R,J,!0),"readyState"in ee&&(we=r(function(){z()},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))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var R=this;R._sendTimeout=r(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 E(R){for(var J=Object.create(null),ae=R.split(`\r
354
+ `),ee=0;ee<ae.length;ee+=1){var ke=ae[ee],we=ke.split(": "),Pe=we.shift(),We=we.join(": ");J[S(Pe)]=We}this._map=J}E.prototype.get=function(R){return this._map[S(R)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function O(){}O.prototype.open=function(R,J,ae,ee,ke,we,Pe){R.open("GET",ke);var We=0;R.onprogress=function(){var Fe=R.responseText,z=Fe.slice(We);We+=z.length,ae(z)},R.onerror=function(Fe){Fe.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 Fe=R.status,z=R.statusText,A=R.getResponseHeader("Content-Type"),X=R.getAllResponseHeaders();J(Fe,z,A,new E(X))}},R.withCredentials=we;for(var Ae in Pe)Object.prototype.hasOwnProperty.call(Pe,Ae)&&R.setRequestHeader(Ae,Pe[Ae]);return R.send(),R};function L(R){this._headers=R}L.prototype.get=function(R){return this._headers.get(R)};function D(){}D.prototype.open=function(R,J,ae,ee,ke,we,Pe){var We=null,Ae=new h,Fe=Ae.signal,z=new d;return f(ke,{headers:Pe,credentials:we?"include":"same-origin",signal:Fe,cache:"no-store"}).then(function(A){return We=A.body.getReader(),J(A.status,A.statusText,A.headers.get("Content-Type"),new L(A.headers)),new c(function(X,ce){var Ee=function(){We.read().then(function(Oe){if(Oe.done)X(void 0);else{var Je=z.decode(Oe.value,{stream:!0});ae(Je),Ee()}}).catch(function(Oe){ce(Oe)})};Ee()})}).catch(function(A){if(A.name!=="AbortError")return A}).then(function(A){ee(A)}),{abort:function(){We!=null&&We.cancel(),Ae.abort()}}};function T(){this._listeners=Object.create(null)}function P(R){r(function(){throw R},0)}T.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(we){P(we)}}},T.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,we=0;we<ee.length;we+=1)ee[we]===J&&(ke=!0);ke||ee.push(J)},T.prototype.removeEventListener=function(R,J){R=String(R);var ae=this._listeners,ee=ae[R];if(ee!=null){for(var ke=[],we=0;we<ee.length;we+=1)ee[we]!==J&&ke.push(ee[we]);ke.length===0?delete ae[R]:ae[R]=ke}};function q(R){this.type=R,this.target=void 0}function $(R,J){q.call(this,R),this.data=J.data,this.lastEventId=J.lastEventId}$.prototype=Object.create(q.prototype);function F(R,J){q.call(this,R),this.status=J.status,this.statusText=J.statusText,this.headers=J.headers}F.prototype=Object.create(q.prototype);function M(R,J){q.call(this,R),this.error=J.error}M.prototype=Object.create(q.prototype);var B=-1,W=0,U=1,N=2,x=-1,V=0,K=1,_=2,Y=3,oe=/^text\/event\-stream(;.*)?$/i,ne=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,ne),le)},ue=function(R,J,ae){try{typeof J=="function"&&J.call(R,ae)}catch(ee){P(ee)}};function Q(R,J){T.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 Z(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var de=f!=null&&p!=null&&"body"in p.prototype;function ve(R,J,ae){J=String(J);var ee=!!ae.withCredentials,ke=ae.lastEventIdQueryParameterName||"lastEventId",we=he(1e3),Pe=pe(ae.heartbeatTimeout,45e3),We="",Ae=we,Fe=!1,z=0,A=ae.headers||{},X=ae.Transport,ce=de&&X==null?void 0:new k(X!=null?new X:Z()),Ee=X!=null&&typeof X!="string"?new X:ce==null?new D:new O,Oe=void 0,Je=0,lt=B,Ut="",Ot="",Ze="",Ct="",tt=V,xn=0,$n=0,rr=function(pt,wt,zt,Vt){if(lt===W)if(pt===200&&zt!=null&&oe.test(zt)){lt=U,Fe=Date.now(),Ae=we,R.readyState=U;var Xt=new F("open",{status:pt,statusText:wt,headers:Vt});R.dispatchEvent(Xt),ue(R,R.onopen,Xt)}else{var qt="";pt!==200?(wt&&(wt=wt.replace(/\s+/g," ")),qt="EventSource's response has a status "+pt+" "+wt+" that is not 200. Aborting the connection."):qt="EventSource's response has a Content-Type specifying an unsupported type: "+(zt==null?"-":zt.replace(/\s+/g," "))+". Aborting the connection.",ir();var Xt=new F("error",{status:pt,statusText:wt,headers:Vt});R.dispatchEvent(Xt),ue(R,R.onerror,Xt),console.error(qt)}},Wr=function(pt){if(lt===U){for(var wt=-1,zt=0;zt<pt.length;zt+=1){var Vt=pt.charCodeAt(zt);(Vt===10||Vt===13)&&(wt=zt)}var Xt=(wt!==-1?Ct:"")+pt.slice(0,wt+1);Ct=(wt===-1?Ct:"")+pt.slice(wt+1),pt!==""&&(Fe=Date.now(),z+=pt.length);for(var qt=0;qt<Xt.length;qt+=1){var Vt=Xt.charCodeAt(qt);if(tt===x&&Vt===10)tt=V;else if(tt===x&&(tt=V),Vt===13||Vt===10){if(tt!==V){tt===K&&($n=qt+1);var Fn=Xt.slice(xn,$n-1),Bn=Xt.slice($n+($n<qt&&Xt.charCodeAt($n)===32?1:0),qt);Fn==="data"?(Ut+=`
355
+ `,Ut+=Bn):Fn==="id"?Ot=Bn:Fn==="event"?Ze=Bn:Fn==="retry"?(we=pe(Bn,we),Ae=we):Fn==="heartbeatTimeout"&&(Pe=pe(Bn,Pe),Je!==0&&(i(Je),Je=r(function(){Hr()},Pe)))}if(tt===V){if(Ut!==""){We=Ot,Ze===""&&(Ze="message");var ki=new $(Ze,{data:Ut.slice(1),lastEventId:Ot});if(R.dispatchEvent(ki),Ze==="open"?ue(R,R.onopen,ki):Ze==="message"?ue(R,R.onmessage,ki):Ze==="error"&&ue(R,R.onerror,ki),lt===N)return}Ut="",Ze=""}tt=Vt===13?x:V}else tt===V&&(xn=qt,tt=K),tt===K?Vt===58&&($n=qt+1,tt=_):tt===_&&(tt=Y)}}},$r=function(pt){if(lt===U||lt===W){lt=B,Je!==0&&(i(Je),Je=0),Je=r(function(){Hr()},Ae),Ae=he(Math.min(we*16,Ae*2)),R.readyState=W;var wt=new M("error",{error:pt});R.dispatchEvent(wt),ue(R,R.onerror,wt),pt!=null&&console.error(pt)}},ir=function(){lt=N,Oe!=null&&(Oe.abort(),Oe=void 0),Je!==0&&(i(Je),Je=0),R.readyState=N},Hr=function(){if(Je=0,lt!==B){if(!Fe&&Oe!=null)$r(new Error("No activity within "+Pe+" milliseconds. "+(lt===W?"No response received.":z+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var pt=Math.max((Fe||Date.now())+Pe-Date.now(),1);Fe=!1,Je=r(function(){Hr()},pt)}return}Fe=!1,z=0,Je=r(function(){Hr()},Pe),lt=W,Ut="",Ze="",Ot=We,Ct="",xn=0,$n=0,tt=V;var wt=J;if(J.slice(0,5)!=="data:"&&J.slice(0,5)!=="blob:"&&We!==""){var zt=J.indexOf("?");wt=zt===-1?J:J.slice(0,zt+1)+J.slice(zt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Bn,ki){return ki===ke?"":Bn}),wt+=(J.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(We)}var Vt=R.withCredentials,Xt={};Xt.Accept="text/event-stream";var qt=R.headers;if(qt!=null)for(var Fn in qt)Object.prototype.hasOwnProperty.call(qt,Fn)&&(Xt[Fn]=qt[Fn]);try{Oe=Ee.open(ce,rr,Wr,$r,wt,Vt,Xt)}catch(Bn){throw ir(),Bn}};R.url=J,R.readyState=W,R.withCredentials=ee,R.headers=A,R._close=ir,Hr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=W,Q.prototype.OPEN=U,Q.prototype.CLOSED=N,Q.prototype.close=function(){this._close()},Q.CONNECTING=W,Q.OPEN=U,Q.CLOSED=N,Q.prototype.withCredentials=void 0;var $e=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&($e=Q),function(R){{var J=R(t);J!==void 0&&(e.exports=J)}}(function(R){R.EventSourcePolyfill=Q,R.NativeEventSource=u,R.EventSource=$e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ht:globalThis)})(Dv,Dv.exports);var sie=Dv.exports;const lie=Ke(sie);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Mv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Mv||(Mv={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xi=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}},re=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"]),uie=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Cn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,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(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof Cn))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=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Cn.create=e=>new Cn(e);const to=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let $O=to;function cie(e){$O=e}function Yc(){return $O}const Jc=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},fie=[];function me(e,t){const n=Yc(),r=Jc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===to?void 0:to].filter(i=>!!i)});e.common.issues.push(r)}class on{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),no=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),jv=e=>e.status==="aborted",Lv=e=>e.status==="dirty",zs=e=>e.status==="valid",Vs=e=>typeof Promise<"u"&&e instanceof Promise;function Xc(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function IO(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var 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={}));var qs,Ws;class Er{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const RO=(e,t)=>{if(zs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Cn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class qe{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 xi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:xi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Vs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return RO(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Vs(i)?i:Promise.resolve(i));return RO(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new nr({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Tr.create(this,this._def)}nullable(){return Ei.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this,this._def)}promise(){return oo.create(this,this._def)}or(t){return Gs.create([this,t],this._def)}and(t){return Ys.create(this,t,this._def)}transform(t){return new nr({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tl({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new Uv({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nl({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rl.create(this,t)}readonly(){return il.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const die=/^c[^\s-]{8,}$/i,pie=/^[0-9a-z]+$/,hie=/^[0-9A-HJKMNP-TV-Z]{26}$/,mie=/^[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,vie=/^[a-z0-9_-]{21}$/i,yie=/^[-+]?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)?)??$/,gie=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bie="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fv;const xie=/^(?:(?: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])$/,wie=/^(([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})))$/,Sie=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PO="((\\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])))",_ie=new RegExp(`^${PO}$`);function AO(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 Eie(e){return new RegExp(`^${AO(e)}$`)}function NO(e){let t=`${PO}T${AO(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function kie(e,t){return!!((t==="v4"||!t)&&xie.test(e)||(t==="v6"||!t)&&wie.test(e))}class er extends qe{_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:re.invalid_type,expected:be.string,received:a.parsedType}),Me}const r=new on;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:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")gie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Fv||(Fv=new RegExp(bie,"u")),Fv.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")mie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")vie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")die.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")pie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")hie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:re.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:re.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?NO(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?_ie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Eie(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?yie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?kie(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Sie.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:re.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:re.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new er({...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)})}nanoid(t){return this._addCheck({kind:"nanoid",...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)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Te.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,...Te.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new er({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new er({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new er({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}er.create=e=>{var t;return new er({checks:[],typeName:De.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function Tie(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class wi extends qe{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:re.invalid_type,expected:be.number,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Tie(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new wi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new wi({...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,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}wi.create=e=>new wi({checks:[],typeName:De.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Si extends qe{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:re.invalid_type,expected:be.bigint,received:a.parsedType}),Me}let r;const i=new on;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new Si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new Si({...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,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Si.create=e=>{var t;return new Si({checks:[],typeName:De.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class Hs extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),Me}return cn(t.data)}}Hs.create=e=>new Hs({typeName:De.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Yi extends qe{_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:re.invalid_type,expected:be.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_date}),Me}const r=new on;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:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Yi.create=e=>new Yi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:De.ZodDate,...ze(e)});class Qc extends qe{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),Me}return cn(t.data)}}Qc.create=e=>new Qc({typeName:De.ZodSymbol,...ze(e)});class Zs extends qe{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),Me}return cn(t.data)}}Zs.create=e=>new Zs({typeName:De.ZodUndefined,...ze(e)});class Ks extends qe{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),Me}return cn(t.data)}}Ks.create=e=>new Ks({typeName:De.ZodNull,...ze(e)});class ro extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}}ro.create=e=>new ro({typeName:De.ZodAny,...ze(e)});class Ji extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}}Ji.create=e=>new Ji({typeName:De.ZodUnknown,...ze(e)});class Vr extends qe{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),Me}}Vr.create=e=>new Vr({typeName:De.ZodNever,...ze(e)});class ef extends qe{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),Me}return cn(t.data)}}ef.create=e=>new ef({typeName:De.ZodVoid,...ze(e)});class tr extends qe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?re.too_big:re.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Er(n,o,n.path,s)))).then(o=>on.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Er(n,o,n.path,s)));return on.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new tr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new tr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new tr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}tr.create=(e,t)=>new tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function io(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Tr.create(io(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof tr?new tr({...e._def,type:io(e.element)}):e instanceof Tr?Tr.create(io(e.unwrap())):e instanceof Ei?Ei.create(io(e.unwrap())):e instanceof kr?kr.create(e.items.map(t=>io(t))):e}class Et extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const l=this._getOrReturnCtx(t);return me(l,{code:re.invalid_type,expected:be.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&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 Er(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){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:re.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Er(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,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>on.mergeObjectSync(r,l)):on.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.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,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return io(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Tr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return DO(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:De.ZodObject,...ze(t)});class Gs extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Cn(s.ctx.common.issues));return me(n,{code:re.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.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 n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Cn(u));return me(n,{code:re.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}Gs.create=(e,t)=>new Gs({options:e,typeName:De.ZodUnion,...ze(t)});const qr=e=>e instanceof Xs?qr(e.schema):e instanceof nr?qr(e.innerType()):e instanceof Qs?[e.value]:e instanceof _i?e.options:e instanceof el?et.objectValues(e.enum):e instanceof tl?qr(e._def.innerType):e instanceof Zs?[void 0]:e instanceof Ks?[null]:e instanceof Tr?[void 0,...qr(e.unwrap())]:e instanceof Ei?[null,...qr(e.unwrap())]:e instanceof Uv||e instanceof il?qr(e.unwrap()):e instanceof nl?qr(e._def.innerType):[];class tf extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:re.invalid_type,expected:be.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new tf({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function Bv(e,t){const n=xi(e),r=xi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===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=Bv(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===be.array&&r===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=Bv(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ys extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(jv(a)||jv(o))return Me;const s=Bv(a.value,o.value);return s.valid?((Lv(a)||Lv(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:re.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ys.create=(e,t,n)=>new Ys({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});class kr extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return me(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Er(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>on.mergeArray(n,o)):on.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new kr({...this._def,rest:t})}}kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kr({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};class Js extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:re.invalid_type,expected:be.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Er(r,s,r.path,s)),value:o._parse(new Er(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof qe?new Js({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(r)}):new Js({keyType:er.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}}class nf extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.map)return me(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Er(r,s,r.path,[l,"key"])),value:a._parse(new Er(r,u,r.path,[l,"value"]))}));if(r.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 Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.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 Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}nf.create=(e,t,n)=>new nf({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});class Xi extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Er(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});class ao extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:re.invalid_type,expected:be.function,received:n.parsedType}),Me;function r(s,u){return Jc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yc(),to].filter(l=>!!l),issueData:{code:re.invalid_arguments,argumentsError:u}})}function i(s,u){return Jc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Yc(),to].filter(l=>!!l),issueData:{code:re.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof oo){const s=this;return cn(async function(...u){const l=new Cn([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return cn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Cn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Cn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ao({...this._def,args:kr.create(t).rest(Ji.create())})}returns(t){return new ao({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ao({args:t||kr.create([]).rest(Ji.create()),returns:n||Ji.create(),typeName:De.ZodFunction,...ze(r)})}}class Xs extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Xs.create=(e,t)=>new Xs({getter:e,typeName:De.ZodLazy,...ze(t)});class Qs extends qe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Qs.create=(e,t)=>new Qs({value:e,typeName:De.ZodLiteral,...ze(t)});function DO(e,t){return new _i({values:e,typeName:De.ZodEnum,...ze(t)})}class _i extends qe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:re.invalid_type}),Me}if(Xc(this,qs)||IO(this,qs,new Set(this._def.values)),!Xc(this,qs).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:re.invalid_enum_value,options:r}),Me}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return _i.create(t,{...this._def,...n})}exclude(t,n=this._def){return _i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}qs=new WeakMap,_i.create=DO;class el extends qe{constructor(){super(...arguments),Ws.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:re.invalid_type}),Me}if(Xc(this,Ws)||IO(this,Ws,new Set(et.getValidEnumValues(this._def.values))),!Xc(this,Ws).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:re.invalid_enum_value,options:i}),Me}return cn(t.data)}get enum(){return this._def.values}}Ws=new WeakMap,el.create=(e,t)=>new el({values:e,typeName:De.ZodNativeEnum,...ze(t)});class oo extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:re.invalid_type,expected:be.promise,received:n.parsedType}),Me;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return cn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}oo.create=(e,t)=>new oo({type:e,typeName:De.ZodPromise,...ze(t)});class nr extends qe{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:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?no(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?no(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.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(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!zs(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>zs(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}nr.create=(e,t,n)=>new nr({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)}),nr.createWithPreprocess=(e,t,n)=>new nr({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});class Tr extends qe{_parse(t){return this._getType(t)===be.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tr.create=(e,t)=>new Tr({innerType:e,typeName:De.ZodOptional,...ze(t)});class Ei extends qe{_parse(t){return this._getType(t)===be.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ei.create=(e,t)=>new Ei({innerType:e,typeName:De.ZodNullable,...ze(t)});class tl extends qe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class nl extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Vs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Cn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}nl.create=(e,t)=>new nl({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class rf extends qe{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}rf.create=e=>new rf({typeName:De.ZodNaN,...ze(e)});const Oie=Symbol("zod_brand");class Uv extends qe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class rl extends qe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),no(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new rl({in:t,out:n,typeName:De.ZodPipeline})}}class il extends qe{_parse(t){const n=this._def.innerType._parse(t),r=i=>(zs(i)&&(i.value=Object.freeze(i.value)),i);return Vs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}il.create=(e,t)=>new il({innerType:e,typeName:De.ZodReadonly,...ze(t)});function MO(e,t={},n){return e?ro.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ro.create()}const Cie={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 $ie=(e,t={message:`Input not instance of ${e.name}`})=>MO(n=>n instanceof e,t),jO=er.create,LO=wi.create,Iie=rf.create,Rie=Si.create,FO=Hs.create,Pie=Yi.create,Aie=Qc.create,Nie=Zs.create,Die=Ks.create,Mie=ro.create,jie=Ji.create,Lie=Vr.create,Fie=ef.create,Bie=tr.create,Uie=Et.create,zie=Et.strictCreate,Vie=Gs.create,qie=tf.create,Wie=Ys.create,Hie=kr.create,Zie=Js.create,Kie=nf.create,Gie=Xi.create,Yie=ao.create,Jie=Xs.create,Xie=Qs.create,Qie=_i.create,eae=el.create,tae=oo.create,BO=nr.create,nae=Tr.create,rae=Ei.create,iae=nr.createWithPreprocess,aae=rl.create;var H=Object.freeze({__proto__:null,defaultErrorMap:to,setErrorMap:cie,getErrorMap:Yc,makeIssue:Jc,EMPTY_PATH:fie,addIssueToContext:me,ParseStatus:on,INVALID:Me,DIRTY:no,OK:cn,isAborted:jv,isDirty:Lv,isValid:zs,isAsync:Vs,get util(){return et},get objectUtil(){return Mv},ZodParsedType:be,getParsedType:xi,ZodType:qe,datetimeRegex:NO,ZodString:er,ZodNumber:wi,ZodBigInt:Si,ZodBoolean:Hs,ZodDate:Yi,ZodSymbol:Qc,ZodUndefined:Zs,ZodNull:Ks,ZodAny:ro,ZodUnknown:Ji,ZodNever:Vr,ZodVoid:ef,ZodArray:tr,ZodObject:Et,ZodUnion:Gs,ZodDiscriminatedUnion:tf,ZodIntersection:Ys,ZodTuple:kr,ZodRecord:Js,ZodMap:nf,ZodSet:Xi,ZodFunction:ao,ZodLazy:Xs,ZodLiteral:Qs,ZodEnum:_i,ZodNativeEnum:el,ZodPromise:oo,ZodEffects:nr,ZodTransformer:nr,ZodOptional:Tr,ZodNullable:Ei,ZodDefault:tl,ZodCatch:nl,ZodNaN:rf,BRAND:Oie,ZodBranded:Uv,ZodPipeline:rl,ZodReadonly:il,custom:MO,Schema:qe,ZodSchema:qe,late:Cie,get ZodFirstPartyTypeKind(){return De},coerce:{string:e=>er.create({...e,coerce:!0}),number:e=>wi.create({...e,coerce:!0}),boolean:e=>Hs.create({...e,coerce:!0}),bigint:e=>Si.create({...e,coerce:!0}),date:e=>Yi.create({...e,coerce:!0})},any:Mie,array:Bie,bigint:Rie,boolean:FO,date:Pie,discriminatedUnion:qie,effect:BO,enum:Qie,function:Yie,instanceof:$ie,intersection:Wie,lazy:Jie,literal:Xie,map:Kie,nan:Iie,nativeEnum:eae,never:Lie,null:Die,nullable:rae,number:LO,object:Uie,oboolean:()=>FO().optional(),onumber:()=>LO().optional(),optional:nae,ostring:()=>jO().optional(),pipeline:aae,preprocess:iae,promise:tae,record:Zie,set:Gie,strictObject:zie,string:jO,symbol:Aie,transformer:BO,tuple:Hie,undefined:Nie,union:Vie,unknown:jie,void:Fie,NEVER:Me,ZodIssueCode:re,quotelessJson:uie,ZodError:Cn}),oae=Object.defineProperty,sae=(e,t,n)=>t in e?oae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lae=(e,t,n)=>(sae(e,t+"",n),n),uae={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},zv=typeof window<"u"&&typeof window.document<"u"?window.crypto:FT;zv.getRandomValues||(zv=uae);var xt=class extends Error{constructor(t,n,r,i,a,o){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.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(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(zv.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},cae=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Vv=e=>e instanceof xt||cae(e)&&e.isApiError===!0,al=class extends xt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},fae=class extends xt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},dae=class extends xt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},pae=class extends xt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},hae=class extends xt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},mae=class extends xt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},vae=class extends xt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},yae=class extends xt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},gae=class extends xt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},bae=class extends xt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},xae=class extends xt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},wae=class extends xt{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},Sae=class extends xt{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},_ae=class extends xt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},Eae=class extends xt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},kae=class extends xt{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},Tae=class extends xt{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},Oae=class extends xt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},Cae=class extends xt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},$ae=class extends xt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},Iae=class extends xt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},Rae=class extends xt{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},Pae=class extends xt{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},Aae=class extends xt{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},Nae={Unknown:al,Internal:fae,Unauthorized:dae,Forbidden:pae,PayloadTooLarge:hae,InvalidPayload:mae,UnsupportedMediaType:vae,MethodNotFound:yae,ResourceNotFound:gae,InvalidJsonSchema:bae,InvalidDataFormat:xae,InvalidIdentifier:wae,RelationConflict:Sae,ReferenceConstraint:_ae,ResourceLockedConflict:Eae,ReferenceNotFound:kae,InvalidQuery:Tae,Runtime:Oae,AlreadyExists:Cae,RateLimited:$ae,PaymentRequired:Iae,QuotaExceeded:Rae,LimitExceeded:Pae,BreakingChanges:Aae},UO=e=>Vv(e)?e:e instanceof Error?new al(e.message,e):typeof e=="string"?new al(e):Dae(e);function Dae(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=Nae[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new al(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new al("An invalid error occurred: "+JSON.stringify(e))}var Mae=e=>e[1]!==void 0,Nt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(Mae),s=Object.fromEntries(o),u=oie.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n;return{method:t,url:l,headers:s,data:a}},jae=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Lae=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Fae=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Bae=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Uae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),zae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Vae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),qae=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:{}}),Wae=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:{}}),Hae=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Zae=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Kae=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),Gae=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Yae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),Jae=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Xae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),Qae=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),eoe=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),toe=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}}),noe=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}}),roe=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=jae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Lae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Fae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=Bae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Uae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=zae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Vae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=qae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Wae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=Hae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Zae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Kae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=Gae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=Yae(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=Jae(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=Xae(e),o=(this.props.toAxiosRequest??Nt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=Qae(e),o=(this.props.toAxiosRequest??Nt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=eoe(e),o=(this.props.toAxiosRequest??Nt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=toe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=noe(e),o=(this.props.toAxiosRequest??Nt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Dt(s)})});this.axiosInstance=e,this.props=t}};function Dt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?UO(e.response.data):UO(e)}var zO=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},ioe=(e,t)=>{const n=new lie.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new zO;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},aoe=async(e,t={})=>{const{emitter:n,source:r}=ioe(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},ooe=H.object({type:H.literal("message_created"),data:H.object({id:H.string().describe("Id of the [Message](#schema_message)"),createdAt:H.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:H.union([H.object({audioUrl:H.string().min(1),type:H.literal("audio")}),H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)})),type:H.literal("card")}),H.object({items:H.array(H.object({title:H.string().min(1),subtitle:H.string().min(1).optional(),imageUrl:H.string().min(1).optional(),actions:H.array(H.object({action:H.enum(["postback","url","say"]),label:H.string().min(1),value:H.string().min(1)}))})),type:H.literal("carousel")}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("choice"),disableFreeText:H.boolean().optional()}),H.object({text:H.string().min(1),options:H.array(H.object({label:H.string().min(1),value:H.string().min(1)})),type:H.literal("dropdown")}),H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional(),type:H.literal("file")}),H.object({imageUrl:H.string().min(1),type:H.literal("image")}),H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional(),type:H.literal("location")}),H.object({text:H.string().min(1),type:H.literal("text"),value:H.string().optional()}),H.object({videoUrl:H.string().min(1),type:H.literal("video")}),H.object({items:H.array(H.union([H.object({type:H.literal("text"),payload:H.object({text:H.string().min(1)})}),H.object({type:H.literal("markdown"),payload:H.object({markdown:H.string().min(1)})}),H.object({type:H.literal("image"),payload:H.object({imageUrl:H.string().min(1)})}),H.object({type:H.literal("audio"),payload:H.object({audioUrl:H.string().min(1)})}),H.object({type:H.literal("video"),payload:H.object({videoUrl:H.string().min(1)})}),H.object({type:H.literal("file"),payload:H.object({fileUrl:H.string().min(1),title:H.string().min(1).optional()})}),H.object({type:H.literal("location"),payload:H.object({latitude:H.number(),longitude:H.number(),address:H.string().optional(),title:H.string().optional()})})])),type:H.literal("bloc")}),H.object({markdown:H.string().min(1),type:H.literal("markdown")})]).describe("Payload is the content type of the message."),userId:H.string().describe("ID of the [User](#schema_user)"),conversationId:H.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:H.record(H.union([H.any(),H.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).")}),soe=H.object({type:H.literal("webchat_visibility"),data:H.object({visibility:H.union([H.literal("show"),H.literal("hide"),H.literal("toggle")])})}),loe=H.object({type:H.literal("webchat_config"),data:H.object({config:H.record(H.union([H.any(),H.null()]))})}),uoe=H.object({type:H.literal("custom"),data:H.object({event:H.record(H.union([H.any(),H.null()]))})}),coe=H.object({type:H.literal("typing_started"),data:H.object({timeout:H.number().optional()})}),foe=H.object({type:H.literal("typing_stopped"),data:H.record(H.never())}),doe={messageCreated:ooe,webchatVisibility:soe,webchatConfig:loe,custom:uoe,typingStarted:coe,typingStopped:foe},VO="unknown error",qO=class extends zO{constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await aoe(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(doe)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(VO);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(VO)}});this._props=t}get status(){return this._state.status}},WO=qO;lae(WO,"listen",async e=>{const t=new qO(e);return await t.connect(),t});var HO=100*1024*1024,poe=HO,hoe=HO,moe=6e4,ZO=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await WO.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??moe,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:poe,maxContentLength:hoe});this._auto=new roe(i)}};const voe=6e4;function KO({apiUrl:e,clientId:t,sseTimeout:n=voe}){const r=new ZO({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return so(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return so(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(so),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return so(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}function so(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=cf(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const af={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},bn=(e,t)=>e.status===t,Or=(e,t)=>af[e.status]<af[t],GO=(e,t)=>af[e.status]>=af[t];class Cr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const YO=["audio","file","image","video"],qv=e=>YO.includes(e),yoe=6e4;class goe extends bf{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(GO(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(bn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(GO(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return bn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=cf(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new ZO({apiUrl:r,sseTimeout:yoe})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Or(this._state,"user_created"))return this._state.userId}async getUser(){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Or(this._state,"user_created"))throw new Cr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Or(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){bn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():bn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=g=>{var b;return h((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=qv(f)?f:"file",d=p==="image"?{type:p,imageUrl:c}:p==="audio"?{type:p,audioUrl:c}:p==="video"?{type:p,videoUrl:c}:{type:p,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:c,name:a,type:p}}async sendMessage(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Or(this._state,"user_created"))throw new Cr(this._state);if(bn(this._state,"conversation_creating"))throw new Cr(this._state);let r;bn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_created")&&this._state.conversationId===n||bn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Or(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Vv(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Vv(r)&&i(r))return!1;throw r}}async newConversation(){if(Or(this._state,"user_created"))throw new Cr(this._state);bn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!bn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const boe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new goe({apiUrl:t,clientId:e}),xoe=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=j.useState(boe({clientId:e,apiUrl:t}));return n};function woe(){const[e,t]=j.useState(!1),n=j.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var JO={},Wv={},of=ht&&ht.__assign||function(){return of=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},of.apply(this,arguments)};Object.defineProperty(Wv,"__esModule",{value:!0});var Soe={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function _oe(e){var t=of(of({},Soe),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Wv.getSanitizedOptions=_oe;var Hv={},Zv={},sf={},Kv={},Gv={};Object.defineProperty(Gv,"__esModule",{value:!0});function Eoe(e){var t=Math.random()*e;return Math.round(t)}Gv.fullJitter=Eoe;var Yv={};Object.defineProperty(Yv,"__esModule",{value:!0});function koe(e){return e}Yv.noJitter=koe,Object.defineProperty(Kv,"__esModule",{value:!0});var Toe=Gv,Ooe=Yv;function Coe(e){switch(e.jitter){case"full":return Toe.fullJitter;case"none":default:return Ooe.noJitter}}Kv.JitterFactory=Coe,Object.defineProperty(sf,"__esModule",{value:!0});var $oe=Kv,Ioe=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=$oe.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();sf.Delay=Ioe;var Roe=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Poe=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Aoe=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Zv,"__esModule",{value:!0});var Noe=sf,Doe=function(e){Roe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Poe(this,void 0,void 0,function(){return Aoe(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Noe.Delay);Zv.SkipFirstDelay=Doe;var Jv={},Moe=ht&&ht.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Jv,"__esModule",{value:!0});var joe=sf,Loe=function(e){Moe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(joe.Delay);Jv.AlwaysDelay=Loe,Object.defineProperty(Hv,"__esModule",{value:!0});var Foe=Zv,Boe=Jv;function Uoe(e,t){var n=zoe(e);return n.setAttemptNumber(t),n}Hv.DelayFactory=Uoe;function zoe(e){return e.delayFirstAttempt?new Boe.AlwaysDelay(e):new Foe.SkipFirstDelay(e)}var Xv=ht&&ht.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Qv=ht&&ht.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(JO,"__esModule",{value:!0});var Voe=Wv,qoe=Hv;function Woe(e,t){return t===void 0&&(t={}),Xv(this,void 0,void 0,function(){var n,r;return Qv(this,function(i){switch(i.label){case 0:return n=Voe.getSanitizedOptions(t),r=new Zoe(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var Hoe=JO.backOff=Woe,Zoe=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Xv(this,void 0,void 0,function(){var t,n;return Qv(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Xv(this,void 0,void 0,function(){var t;return Qv(this,function(n){switch(n.label){case 0:return t=qoe.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function XO({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,...r}){const[i,a]=j.useState(),o=Bo(D=>D.messages),s=Bo(D=>D.addMessage),u=Bo(D=>D.fetchMessages),l=Bo(D=>D.setMessages),c=Bo(D=>D.isFetching),[f,p]=j.useState("connecting"),{isTyping:d,setIsTyping:m}=woe(),h=j.useMemo(()=>new bf,[]),y=bx(n),v=j.useMemo(()=>KO({apiUrl:e,clientId:t}),[e,t]),g=j.useRef(null),[b,k]=j.useState(r.userKey),[S,E]=j.useState(r.conversationId);async function O(D){const{conversation:T}=await v.createConversation({"x-user-key":D});return y.setState({conversationId:T.id}),await v.createEvent({"x-user-key":D,conversationId:T.id,payload:{type:"conversation_started",data:{}}}),T.id}if(j.useEffect(()=>{let D=!0;async function T({userKey:P,conversationId:q}){let $,F=r.userKey??P,M=r.conversationId??q;if(p("connecting"),!F){const U=y.getState().user;F=U==null?void 0:U.userToken}if(!F){const{key:U,user:N}=await v.createUser({});$=N,F=U,y.setState({user:{userId:N.id,userToken:F}})}if(!$){const{user:U}=await v.getUser({"x-user-key":F});$=U}M||(M=y.getState().conversationId),M||(M=await O(F));const[B,W]=[await v.listenConversation({"x-user-key":F,id:M}),await u({client:v,conversationId:M,userKey:F})];QO({emitter:h,signalEmitter:B}),D&&(g.current=B,k(F),E(M),a($),l(W),p("connected"))}return T({userKey:b,conversationId:S}).catch(P=>{console.error(P)}),()=>{g.current&&(g.current.cleanup(),g.current=null),D=!1}},[b,S,v,h,r.conversationId,r.userKey]),j.useEffect(()=>{var T;if(!b||!S)return;async function D({userKey:P,conversationId:q}){const $=await v.listenConversation({"x-user-key":P,id:q});g.current=$,QO({emitter:h,signalEmitter:$})}f==="error"&&((T=g.current)==null||T.cleanup(),Hoe(()=>D({conversationId:S,userKey:b}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),p("connected"))},[f,b,S]),j.useEffect(()=>{const D=[h.on("message",T=>((i==null?void 0:i.id)!==T.authorId&&h.emit("isTyping",{isTyping:!1,timeout:0}),s(T))),h.on("isTyping",({isTyping:T,timeout:P})=>{m(T,P)}),h.on("error",()=>{p("error")})];return()=>{D.forEach(T=>T())}},[]),f==="connecting"||!b||!S)return{clientState:"connecting",on:h.on.bind(h),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:c};const L={sendMessage:async D=>{const T=lT();s(so({id:T,createdAt:new Date().toISOString(),userId:(i==null?void 0:i.id)??"",conversationId:S,payload:D,metadata:{clientMessageId:T,delivered:!1}})),await v.createMessage({"x-user-key":b,conversationId:S,payload:D,metadata:{clientMessageId:T}}).catch(P=>h.emit("error",P))},updateUser:async D=>{const{user:T}=await v.updateUser({"x-user-key":b,name:D.name,pictureUrl:D.pictureUrl,userData:D.data});return T},sendEvent:async D=>{await v.createEvent({"x-user-key":b,conversationId:S,payload:{type:"custom",data:D}})},uploadFile:async D=>{const{size:T,name:P}=D,$=await(N=>new Promise((x,V)=>{const K=new FileReader;K.onload=_=>{var Y;return x((Y=_.target)==null?void 0:Y.result)},K.onerror=_=>{var Y;return V((Y=_.target)==null?void 0:Y.error)},K.readAsArrayBuffer(N)}))(D),{file:{uploadUrl:F,contentType:M,url:B}}=await v.createFile({"x-user-key":b,size:T,key:P,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(F,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:$});const W=M.split("/").shift()??"",U=qv(W)?W:"file";return{fileUrl:B,name:P,type:U}},getUser:async()=>{const{user:D}=await v.getUser({"x-user-key":b});return D}};return{clientState:f,on:h.on.bind(h),client:L,messages:o,conversationId:S,newConversation:()=>{l([]),O(b).then(E)},user:i,isTyping:d,isFetchingMessages:c}}function QO({emitter:e,signalEmitter:t}){t.on("unknown",n=>{typeof n=="string"&&n==="ping"||console.debug("unknown event",n)}),t.on("message_created",n=>{e.emit("message",so(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const Koe=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,userKey:a,conversationId:o,...s})=>{const u=t||`bp-webchat-${e}`,{clientState:l,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:m,user:h}=XO({clientId:e,apiUrl:i,conversationId:o,userKey:a,storageKey:u}),{sendMessage:y,uploadFile:v}=c??{},{botName:g,botAvatar:b}=n??{},k=j.useMemo(()=>m.map(S=>{const{authorId:E}=S,O=E===(h==null?void 0:h.id)?"outgoing":"incoming";return{...S,direction:O,sender:O==="outgoing"?{name:(h==null?void 0:h.name)??"You",avatar:h==null?void 0:h.pictureUrl}:{name:g??"Bot",avatar:b}}}),[b,g,m,h==null?void 0:h.id,h==null?void 0:h.name,h==null?void 0:h.pictureUrl]);return console.log(l),I.jsx(uT,{configuration:n??{},user:h??{id:""},isLoading:f||l==="connecting",isTyping:p,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:k,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:d,...s})};Ie.Avatar=Sl,Ie.Block=xa,Ie.Chat=uT,Ie.Composer=qw,Ie.Container=pp,Ie.Fab=M0,Ie.Header=z0,Ie.Message=gp,Ie.MessageList=Ym,Ie.Modal=ui,Ie.ModalProvider=Ww,Ie.RestartConversationButton=U0,Ie.StylesheetProvider=Hw,Ie.TypingIndicator=V0,Ie.Webchat=Koe,Ie.WebchatThemeSchema=Tf,Ie.__adapters=hC,Ie.avatarThemeSchema=wl,Ie.blockThemeSchema=eg,Ie.configPropsSchema=ig,Ie.configurationSchema=Jy,Ie.cssStyleSchema=Qy,Ie.descriptionItemSchema=aa,Ie.fileTypes=YO,Ie.generateThemeStylesheet=ag,Ie.getClient=KO,Ie.getUseUserStore=bx,Ie.initPropsSchema=Q$,Ie.isFileType=qv,Ie.markdownTypeSchema=Xy,Ie.renderers=jw,Ie.statePropsSchema=ng,Ie.styleOptionSchema=fe,Ie.themeSchema=tg,Ie.useClient=xoe,Ie.useWebchatClient=XO,Ie.useWebchatStore=ql,Ie.userPropsSchema=rg,Ie.webchatClasses=yt,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});